wok annotate python/receipt @ rev 25386
updated unrar (5.9.2 -> 6.1.7)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jul 30 17:51:49 2022 +0100 (2022-07-30) |
parents | 3e9a9990c985 |
children |
rev | line source |
---|---|
pankso@18 | 1 # SliTaz package receipt. |
pankso@18 | 2 |
pankso@18 | 3 PACKAGE="python" |
Hans-G?nter@25170 | 4 VERSION="2.7.18" |
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 |
Hans-G?nter@25170 | 22 # @maintainer: Please update also: python-idle |
Hans-G?nter@25170 | 23 |
pascal@24076 | 24 current_version() |
pascal@24076 | 25 { |
pascal@24076 | 26 wget -O - https://www.python.org/ftp/python/ 2>/dev/null | \ |
pascal@24076 | 27 sed "/=\"${VERSION%.*}/!d;s|.*\">\\(.*\\)/<.*|\\1|" | sort -Vr | sed q |
pascal@24076 | 28 } |
pascal@24076 | 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@25170 | 35 # sed -i "/progname =/s/python/python${_pybasever}/" \ |
Hans-G?nter@25170 | 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 |
Hans-G?nter@25170 | 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@25170 | 85 make DESTDIR=$DESTDIR install || exit 1 |
Hans-G?nter@25170 | 86 ;; |
Hans-G?nter@25170 | 87 (i?86) |
Hans-G?nter@23594 | 88 ./configure \ |
Hans-G?nter@23594 | 89 --enable-shared \ |
Hans-G?nter@23594 | 90 --build=${HOST_SYSTEM} \ |
pankso@16290 | 91 --host=${HOST_SYSTEM} && |
Hans-G?nter@23594 | 92 make && |
Hans-G?nter@25170 | 93 make DESTDIR=$DESTDIR install |
Hans-G?nter@25170 | 94 ;; |
pankso@16290 | 95 esac |
pankso@18 | 96 } |
pankso@18 | 97 |
pankso@18 | 98 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@18 | 99 genpkg_rules() |
pankso@18 | 100 { |
Hans-G?nter@25170 | 101 python_version=${VERSION%.*} |
pascal@7468 | 102 mkdir -p $fs/usr/include/${PACKAGE}$python_version |
Hans-G?nter@23594 | 103 |
Hans-G?nter@25170 | 104 cook_copy_folders bin |
Hans-G?nter@25170 | 105 cook_copy_folders lib |
Hans-G?nter@23594 | 106 |
pankso@16062 | 107 # needed for mercurial to work now |
slaxemulator@14609 | 108 cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \ |
Hans-G?nter@23594 | 109 $fs/usr/include/${PACKAGE}$python_version |
Hans-G?nter@23594 | 110 rm -f $fs/usr/bin/*-config |
Hans-G?nter@23594 | 111 |
pankso@16494 | 112 # Split IDLE with TK dep |
Hans-G?nter@23594 | 113 rm -f $fs/usr/bin/idle |
Hans-G?nter@25170 | 114 rm -rf $fs/usr/lib/python$python_version/idlelib |
pankso@18 | 115 } |