wok-next annotate python/receipt @ rev 20443

The rest of my "home work" for update many packages (up to Xorg, GTK and Openbox) for Next and mainly for Next64. Since this point this repository is open for commits. Many errors are expected due to harfbuzz-freetype dependency loop...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Feb 24 16:17:33 2018 +0200 (2018-02-24)
parents 0f1876141d45
children 765ca39b5898
rev   line source
al@19763 1 # SliTaz package receipt v2.
pankso@18 2
pankso@18 3 PACKAGE="python"
al@19763 4 VERSION="2.7.13"
pankso@204 5 CATEGORY="development"
al@19763 6 SHORT_DESC="The Python programming language"
pankso@18 7 MAINTAINER="pankso@slitaz.org"
pascal@15378 8 LICENSE="PSL"
al@19763 9 WEB_SITE="https://www.python.org/"
al@20443 10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/general/python2.html"
pankso@18 11
al@19763 12 TARBALL="$PACKAGE-$VERSION.tar.xz"
al@19763 13 WGET_URL="https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz"
al@19582 14
pascal@20098 15 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite3-dev zlib-dev \
al@19763 16 ncurses-dev tcl-dev tk-dev db-dev gdbm-dev libffi-dev expat-dev"
al@19763 17 SPLIT="python-idle python-tcltk python python-dev"
al@20443 18 COOKOPTS="!menus !zip"
pankso@16026 19
al@20443 20 compile_rules() {
slaxemulator@10975 21 # Temporary workaround for FS#22322
slaxemulator@10975 22 # See http://bugs.python.org/issue10835 for upstream report
slaxemulator@10975 23 sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
al@18077 24
slaxemulator@10975 25 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
slaxemulator@10975 26 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
al@18077 27
pankso@16026 28 case "$ARCH" in
pankso@16026 29 arm*)
pankso@16290 30 # First pass for build host tools
pankso@16290 31 unset CFLAGS CXXFLAGS
pankso@16290 32 cp -f $CONFIG_SITE .
pankso@16062 33 CONFIG_SITE="$(pwd)/cook.site"
al@20443 34 cat >> $CONFIG_SITE <<EOT
pankso@16290 35 ac_cv_have_long_long_format=yes
pankso@16290 36 EOT
pankso@16290 37 ./configure CC=gcc \
pankso@16290 38 --disable-ipv6 \
pankso@16290 39 --build=i486-slitaz-linux \
al@19582 40 --host=${BUILD_SYSTEM} &&
pankso@16290 41 make python Parser/pgen &&
pankso@16290 42 mv python hostpython &&
pankso@16290 43 mv Parser/pgen Parser/hostpgen || exit 1
pankso@16290 44 make distclean
pankso@16290 45 rm -f $CONFIG_SITE
pankso@16290 46 # Second pass for host tools
pankso@16290 47 . /etc/slitaz/cook.conf
pankso@16290 48 cp -f $CONFIG_SITE .
pankso@16290 49 CONFIG_SITE="$(pwd)/cook.site"
al@20443 50 cat >> $CONFIG_SITE <<EOT
pankso@16290 51 ac_cv_have_long_long_format=yes
pankso@16290 52 ac_cv_buggy_getaddrinfo=no
pankso@16290 53 ac_cv_file__dev_ptmx=yes
pankso@16290 54 ac_cv_file__dev_ptc=no
pankso@16290 55 EOT
pankso@16290 56 ./configure CC=${HOST_SYSTEM}-gcc \
pankso@16026 57 --disable-ipv6 \
pankso@16026 58 --enable-shared \
pankso@16290 59 --with-system-ffi \
pankso@16290 60 ${CONFIGURE_ARGS} &&
pankso@16290 61 make \
pankso@16290 62 PYTHON_FOR_BUILD=${src}/hostpython \
pankso@16290 63 HOSTPYTHON=${src}/hostpython \
pankso@16290 64 HOSTPGEN=${src}/Parser/hostpgen \
pankso@16290 65 CROSS_COMPILE_TARGET=yes \
pankso@16290 66 HOSTARCH=${HOST_SYSTEM} \
pankso@16290 67 BUILDARCH=${BUILD_SYSTEM} || exit 1
al@19582 68 make DESTDIR=$DESTDIR install || exit 1
al@19582 69 ;;
al@20443 70 i?86|x86_64)
pankso@16026 71 ./configure \
al@19763 72 --prefix=/usr \
pankso@16026 73 --enable-shared \
al@19763 74 --with-system-expat \
al@19763 75 --with-system-ffi \
al@19763 76 --with-ensurepip=yes \
al@19763 77 --enable-unicode=ucs4 \
al@19763 78 --build=$HOST_SYSTEM \
al@19763 79 --host=$HOST_SYSTEM &&
al@19763 80 make && make DESTDIR=$DESTDIR install &&
al@19763 81 chmod -v 755 $install/usr/lib/libpython2.7.so.1.0
al@19582 82 ;;
pankso@16290 83 esac
pankso@18 84 }
pankso@18 85
al@20443 86 genpkg_rules() {
al@19763 87 case $PACKAGE in
al@19763 88 *-idle)
al@19763 89 copy idle idlelib/ python-idle.desktop
al@19763 90 CAT="development|GUI IDE using TK Toolkit"
al@19763 91 DEPENDS="python-tcltk tcl tk"
al@19763 92 ;;
al@19763 93 *-tcltk)
al@19763 94 copy _tkinter.so lib-tk/
al@19763 95 CAT="development|Tcl/Tk files"
al@19763 96 DEPENDS="python tcl tk xorg-libX11"
al@19763 97 ;;
al@19763 98 python)
al@20443 99 # Now pyconfig.h is required for Mercurial.
al@20443 100 copy @std pyconfig.h @rm
al@20443 101 DEPENDS="bzlib expat gdbm libffi libsqlite3 ncurses \
al@20443 102 ncurses-libpanel openssl readline zlib"
al@19763 103 ;;
al@19763 104 *-dev)
al@20443 105 copy @dev @rm
al@19763 106 ;;
al@19763 107 esac
pankso@18 108 }