wok annotate python/receipt @ rev 24841
updated libuninameslist and libuninameslist-dev (20190701 -> 20211114)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Mar 25 09:32:35 2022 +0100 (2022-03-25) |
parents | 0e3b43ca38e6 |
children | 401ca84be53a |
rev | line source |
---|---|
pankso@18 | 1 # SliTaz package receipt. |
pankso@18 | 2 |
pankso@18 | 3 PACKAGE="python" |
Hans-G?nter@23594 | 4 VERSION="2.7.17" |
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" |
Hans-G?nter@23594 | 9 WEB_SITE="https://www.python.org/" |
Hans-G?nter@23594 | 10 |
pankso@18 | 11 SOURCE="Python" |
pascal@20432 | 12 TARBALL="$SOURCE-$VERSION.tar.xz" |
pankso@16290 | 13 WGET_URL="https://www.python.org/ftp/python/$VERSION/$TARBALL" |
Hans-G?nter@23594 | 14 |
Hans-G?nter@23594 | 15 RELATED="python-dev python-idle" # versions must match |
Hans-G?nter@23594 | 16 DEPENDS="bzlib gdbm libffi ncursesw openssl readline sqlite zlib" |
Hans-G?nter@23594 | 17 BUILD_DEPENDS="bzip2-dev db-dev gdbm-dev libffi-dev ncursesw-dev |
Hans-G?nter@23594 | 18 openssl-dev readline-dev sqlite-dev tcl-dev tk-dev zlib-dev" |
Hans-G?nter@23594 | 19 |
pankso@16290 | 20 HOST_ARCH="i486 arm" |
pankso@18 | 21 |
pascal@24076 | 22 current_version() |
pascal@24076 | 23 { |
pascal@24076 | 24 wget -O - https://www.python.org/ftp/python/ 2>/dev/null | \ |
pascal@24076 | 25 sed "/=\"${VERSION%.*}/!d;s|.*\">\\(.*\\)/<.*|\\1|" | sort -Vr | sed q |
pascal@24076 | 26 } |
pascal@24076 | 27 |
Hans-G?nter@23594 | 28 # @maintainer: Please update also: python-idle |
pankso@16026 | 29 |
pankso@18 | 30 # Rules to configure and make the package. |
pankso@18 | 31 compile_rules() |
pankso@18 | 32 { |
slaxemulator@10975 | 33 # Temporary workaround for FS#22322 |
slaxemulator@10975 | 34 # See http://bugs.python.org/issue10835 for upstream report |
Hans-G?nter@23594 | 35 sed -i "/progname =/s/python/python${_pybasever}/" \ |
Hans-G?nter@23594 | 36 Python/pythonrun.c |
al@18077 | 37 |
slaxemulator@10975 | 38 # Enable built-in SQLite3 module to load extensions (fix FS#22122) |
Hans-G?nter@23594 | 39 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" \ |
Hans-G?nter@23594 | 40 setup.py |
al@18077 | 41 |
pankso@16026 | 42 case "$ARCH" in |
pankso@16026 | 43 arm*) |
pankso@16290 | 44 # First pass for build host tools |
pankso@16290 | 45 unset CFLAGS CXXFLAGS |
pankso@16290 | 46 cp -f $CONFIG_SITE . |
pankso@16062 | 47 CONFIG_SITE="$(pwd)/cook.site" |
pankso@16290 | 48 cat >> $CONFIG_SITE << EOT |
pankso@16290 | 49 ac_cv_have_long_long_format=yes |
pankso@16290 | 50 EOT |
Hans-G?nter@23594 | 51 ./configure CC=gcc \ |
Hans-G?nter@23594 | 52 --disable-ipv6 \ |
Hans-G?nter@23594 | 53 --build=i486-slitaz-linux \ |
pankso@16290 | 54 --host=${BUILD_SYSTEM} && |
pankso@16290 | 55 make python Parser/pgen && |
pankso@16290 | 56 mv python hostpython && |
pankso@16290 | 57 mv Parser/pgen Parser/hostpgen || exit 1 |
pankso@16290 | 58 make distclean |
pankso@16290 | 59 rm -f $CONFIG_SITE |
Hans-G?nter@23594 | 60 |
pankso@16290 | 61 # Second pass for host tools |
pankso@16290 | 62 . /etc/slitaz/cook.conf |
pankso@16291 | 63 #patch -p1 < $stuff/python-2.7.3-xcompile.patch || exit 1 |
pankso@16290 | 64 cp -f $CONFIG_SITE . |
pankso@16290 | 65 CONFIG_SITE="$(pwd)/cook.site" |
pankso@16290 | 66 cat >> $CONFIG_SITE << EOT |
pankso@16290 | 67 ac_cv_have_long_long_format=yes |
pankso@16290 | 68 ac_cv_buggy_getaddrinfo=no |
pankso@16290 | 69 ac_cv_file__dev_ptmx=yes |
pankso@16290 | 70 ac_cv_file__dev_ptc=no |
pankso@16290 | 71 EOT |
Hans-G?nter@23594 | 72 |
Hans-G?nter@23594 | 73 ./configure CC=${HOST_SYSTEM}-gcc \ |
Hans-G?nter@23594 | 74 --disable-ipv6 \ |
Hans-G?nter@23594 | 75 --enable-shared \ |
Hans-G?nter@23594 | 76 --with-system-ffi \ |
pankso@16290 | 77 ${CONFIGURE_ARGS} && |
Hans-G?nter@23594 | 78 make \ |
Hans-G?nter@23594 | 79 PYTHON_FOR_BUILD=${src}/hostpython \ |
Hans-G?nter@23594 | 80 HOSTPYTHON=${src}/hostpython \ |
Hans-G?nter@23594 | 81 HOSTPGEN=${src}/Parser/hostpgen \ |
Hans-G?nter@23594 | 82 CROSS_COMPILE_TARGET=yes \ |
Hans-G?nter@23594 | 83 HOSTARCH=${HOST_SYSTEM} \ |
pankso@16290 | 84 BUILDARCH=${BUILD_SYSTEM} || exit 1 |
Hans-G?nter@23594 | 85 make DESTDIR=$DESTDIR install || exit 1 ;; |
pankso@16026 | 86 i?86) |
Hans-G?nter@23594 | 87 ./configure \ |
Hans-G?nter@23594 | 88 --enable-shared \ |
Hans-G?nter@23594 | 89 --build=${HOST_SYSTEM} \ |
pankso@16290 | 90 --host=${HOST_SYSTEM} && |
Hans-G?nter@23594 | 91 make && |
Hans-G?nter@23594 | 92 make DESTDIR=$DESTDIR install ;; |
pankso@16290 | 93 esac |
pankso@18 | 94 } |
pankso@18 | 95 |
pankso@18 | 96 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@18 | 97 genpkg_rules() |
pankso@18 | 98 { |
pascal@7468 | 99 python_version=${VERSION:0:3} |
pascal@7468 | 100 mkdir -p $fs/usr/include/${PACKAGE}$python_version |
Hans-G?nter@23594 | 101 |
Hans-G?nter@23594 | 102 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@23594 | 103 cp -a $install/usr/lib $fs/usr |
Hans-G?nter@23594 | 104 |
pankso@16062 | 105 # needed for mercurial to work now |
slaxemulator@14609 | 106 cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \ |
Hans-G?nter@23594 | 107 $fs/usr/include/${PACKAGE}$python_version |
Hans-G?nter@23594 | 108 rm -f $fs/usr/bin/*-config |
Hans-G?nter@23594 | 109 |
pankso@16494 | 110 # Split IDLE with TK dep |
Hans-G?nter@23594 | 111 rm -f $fs/usr/bin/idle |
Hans-G?nter@23594 | 112 rm -rf $fs/usr/lib/python2.7/idlelib |
pankso@18 | 113 } |