wok annotate python/receipt @ rev 17250
libarchive-dev: update genpkg
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 19 12:29:39 2014 +0200 (2014-10-19) |
parents | b58da74b99ca |
children | 16df76e1fc6a |
rev | line source |
---|---|
pankso@18 | 1 # SliTaz package receipt. |
pankso@18 | 2 |
pankso@18 | 3 PACKAGE="python" |
pankso@16291 | 4 VERSION="2.7.5" |
pankso@204 | 5 CATEGORY="development" |
pankso@18 | 6 SHORT_DESC="The Python programming language." |
pankso@18 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15378 | 8 LICENSE="PSL" |
pankso@18 | 9 SOURCE="Python" |
pankso@16307 | 10 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pankso@18 | 11 WEB_SITE="http://www.python.org/" |
pankso@16290 | 12 WGET_URL="https://www.python.org/ftp/python/$VERSION/$TARBALL" |
pankso@16290 | 13 HOST_ARCH="i486 arm" |
pankso@18 | 14 |
pankso@16494 | 15 RELATED="python-dev python-idle" # version must match |
pankso@16290 | 16 DEPENDS="openssl bzlib readline sqlite zlib ncursesw gdbm libffi" |
pascal@12990 | 17 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite-dev zlib-dev \ |
pankso@16494 | 18 ncursesw-dev tcl-dev tk-dev db-dev gdbm-dev wget libffi-dev" |
pankso@16026 | 19 |
pankso@18 | 20 # Rules to configure and make the package. |
pankso@18 | 21 compile_rules() |
pankso@18 | 22 { |
slaxemulator@10975 | 23 # Temporary workaround for FS#22322 |
slaxemulator@10975 | 24 # See http://bugs.python.org/issue10835 for upstream report |
slaxemulator@10975 | 25 sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c |
pankso@16290 | 26 |
slaxemulator@10975 | 27 # Enable built-in SQLite3 module to load extensions (fix FS#22122) |
slaxemulator@10975 | 28 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py |
pankso@16290 | 29 |
pankso@16026 | 30 case "$ARCH" in |
pankso@16026 | 31 arm*) |
pankso@16290 | 32 # First pass for build host tools |
pankso@16290 | 33 unset CFLAGS CXXFLAGS |
pankso@16290 | 34 cp -f $CONFIG_SITE . |
pankso@16062 | 35 CONFIG_SITE="$(pwd)/cook.site" |
pankso@16290 | 36 cat >> $CONFIG_SITE << EOT |
pankso@16290 | 37 ac_cv_have_long_long_format=yes |
pankso@16290 | 38 EOT |
pankso@16290 | 39 ./configure CC=gcc \ |
pankso@16290 | 40 --disable-ipv6 \ |
pankso@16290 | 41 --build=i486-slitaz-linux \ |
pankso@16290 | 42 --host=${BUILD_SYSTEM} && |
pankso@16290 | 43 make python Parser/pgen && |
pankso@16290 | 44 mv python hostpython && |
pankso@16290 | 45 mv Parser/pgen Parser/hostpgen || exit 1 |
pankso@16290 | 46 make distclean |
pankso@16290 | 47 rm -f $CONFIG_SITE |
pankso@16290 | 48 # Second pass for host tools |
pankso@16290 | 49 . /etc/slitaz/cook.conf |
pankso@16291 | 50 #patch -p1 < $stuff/python-2.7.3-xcompile.patch || exit 1 |
pankso@16290 | 51 cp -f $CONFIG_SITE . |
pankso@16290 | 52 CONFIG_SITE="$(pwd)/cook.site" |
pankso@16290 | 53 cat >> $CONFIG_SITE << EOT |
pankso@16290 | 54 ac_cv_have_long_long_format=yes |
pankso@16290 | 55 ac_cv_buggy_getaddrinfo=no |
pankso@16290 | 56 ac_cv_file__dev_ptmx=yes |
pankso@16290 | 57 ac_cv_file__dev_ptc=no |
pankso@16290 | 58 EOT |
pankso@16290 | 59 ./configure CC=${HOST_SYSTEM}-gcc \ |
pankso@16026 | 60 --disable-ipv6 \ |
pankso@16026 | 61 --enable-shared \ |
pankso@16290 | 62 --with-system-ffi \ |
pankso@16290 | 63 ${CONFIGURE_ARGS} && |
pankso@16290 | 64 make \ |
pankso@16290 | 65 PYTHON_FOR_BUILD=${src}/hostpython \ |
pankso@16290 | 66 HOSTPYTHON=${src}/hostpython \ |
pankso@16290 | 67 HOSTPGEN=${src}/Parser/hostpgen \ |
pankso@16290 | 68 CROSS_COMPILE_TARGET=yes \ |
pankso@16290 | 69 HOSTARCH=${HOST_SYSTEM} \ |
pankso@16290 | 70 BUILDARCH=${BUILD_SYSTEM} || exit 1 |
pankso@16290 | 71 make DESTDIR=$DESTDIR install || exit 1 ;; |
pankso@16026 | 72 i?86) |
pankso@16026 | 73 ./configure \ |
pankso@16026 | 74 --enable-shared \ |
pankso@16026 | 75 --build=${HOST_SYSTEM} \ |
pankso@16290 | 76 --host=${HOST_SYSTEM} && |
pankso@16290 | 77 make && make DESTDIR=$DESTDIR install ;; |
pankso@16290 | 78 esac |
pankso@18 | 79 } |
pankso@18 | 80 |
pankso@18 | 81 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@18 | 82 genpkg_rules() |
pankso@18 | 83 { |
pascal@7468 | 84 python_version=${VERSION:0:3} |
pascal@7468 | 85 mkdir -p $fs/usr/include/${PACKAGE}$python_version |
slaxemulator@14609 | 86 cp -a $install/usr/bin $fs/usr |
slaxemulator@14609 | 87 cp -a $install/usr/lib $fs/usr |
pankso@16062 | 88 # needed for mercurial to work now |
slaxemulator@14609 | 89 cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \ |
pascal@7468 | 90 $fs/usr/include/${PACKAGE}$python_version |
pankso@18 | 91 rm -f $fs/usr/bin/*-config |
pankso@16494 | 92 # Split IDLE with TK dep |
pankso@16494 | 93 rm -f $fs/usr/bin/idle |
pankso@16494 | 94 rm -rf $fs/usr/lib/python2.7/idlelib |
pankso@18 | 95 } |
pankso@18 | 96 |