talimat 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Tanım: Sonraki nesil python üst düzey betik dili
  2. # URL: http://www.python.org
  3. # Paketçi: milisarge
  4. # Gerekler: sqlite libffi tk
  5. # Grup: geliştirme
  6. isim=python3
  7. surum=3.7.0
  8. devir=1
  9. kaynak=(http://www.python.org/ftp/python/$surum/Python-$surum.tar.xz
  10. bpo34056-always-return-bytes-from-_HackedGetData.get_data.patch
  11. dont-make-libpython-readonly.patch)
  12. derle() {
  13. _pybasever=${surum%.*}
  14. cd Python-$surum
  15. # https://bugs.python.org/issue34056
  16. patch -Np1 -i ../bpo34056-always-return-bytes-from-_HackedGetData.get_data.patch
  17. # FS#45809
  18. patch -p1 -i ../dont-make-libpython-readonly.patch
  19. # FS#23997
  20. sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python3|" Lib/cgi.py
  21. # Ensure that we are using the system copy of various libraries (expat, libffi, and libmpdec),
  22. # rather than copies shipped in the tarball
  23. rm -r Modules/expat
  24. rm -r Modules/_ctypes/{darwin,libffi}*
  25. rm -r Modules/_decimal/libmpdec
  26. ./configure --prefix=/usr \
  27. --enable-shared \
  28. --with-threads \
  29. --with-computed-gotos \
  30. --enable-optimizations \
  31. --with-lto \
  32. --enable-ipv6 \
  33. --with-system-expat \
  34. --with-dbmliborder=gdbm:ndbm \
  35. --with-system-ffi \
  36. --with-system-libmpdec \
  37. --enable-loadable-sqlite-extensions \
  38. --without-ensurepip
  39. make
  40. sed -i 's/^all:.*$/all: build_all/' Makefile
  41. make DESTDIR="${PKG}" EXTRA_CFLAGS="$CFLAGS" install
  42. install -dm755 "${PKG}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
  43. install -m755 Tools/i18n/{msgfmt,pygettext}.py "${PKG}"/usr/lib/python${_pybasever}/Tools/i18n/
  44. install -m755 Tools/scripts/{README,*py} "${PKG}"/usr/lib/python${_pybasever}/Tools/scripts/
  45. # Lisans
  46. install -Dm644 LICENSE "${PKG}/usr/share/licenses/${isim}/LICENSE"
  47. }