wok view python/receipt @ rev 23614
updated redis (2.8.19 -> 5.0.8)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Apr 14 07:29:26 2020 +0100 (2020-04-14) |
parents | 6135577f4d08 |
children | 3e9a9990c985 |
line source
1 # SliTaz package receipt.
3 PACKAGE="python"
4 VERSION="2.7.17"
5 CATEGORY="development"
6 SHORT_DESC="The Python programming language."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="PSL"
9 WEB_SITE="https://www.python.org/"
11 SOURCE="Python"
12 TARBALL="$SOURCE-$VERSION.tar.xz"
13 WGET_URL="https://www.python.org/ftp/python/$VERSION/$TARBALL"
15 RELATED="python-dev python-idle" # versions must match
16 DEPENDS="bzlib gdbm libffi ncursesw openssl readline sqlite zlib"
17 BUILD_DEPENDS="bzip2-dev db-dev gdbm-dev libffi-dev ncursesw-dev
18 openssl-dev readline-dev sqlite-dev tcl-dev tk-dev zlib-dev"
20 HOST_ARCH="i486 arm"
22 # @maintainer: Please update also: python-idle
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 # Temporary workaround for FS#22322
28 # See http://bugs.python.org/issue10835 for upstream report
29 sed -i "/progname =/s/python/python${_pybasever}/" \
30 Python/pythonrun.c
32 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
33 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" \
34 setup.py
36 case "$ARCH" in
37 arm*)
38 # First pass for build host tools
39 unset CFLAGS CXXFLAGS
40 cp -f $CONFIG_SITE .
41 CONFIG_SITE="$(pwd)/cook.site"
42 cat >> $CONFIG_SITE << EOT
43 ac_cv_have_long_long_format=yes
44 EOT
45 ./configure CC=gcc \
46 --disable-ipv6 \
47 --build=i486-slitaz-linux \
48 --host=${BUILD_SYSTEM} &&
49 make python Parser/pgen &&
50 mv python hostpython &&
51 mv Parser/pgen Parser/hostpgen || exit 1
52 make distclean
53 rm -f $CONFIG_SITE
55 # Second pass for host tools
56 . /etc/slitaz/cook.conf
57 #patch -p1 < $stuff/python-2.7.3-xcompile.patch || exit 1
58 cp -f $CONFIG_SITE .
59 CONFIG_SITE="$(pwd)/cook.site"
60 cat >> $CONFIG_SITE << EOT
61 ac_cv_have_long_long_format=yes
62 ac_cv_buggy_getaddrinfo=no
63 ac_cv_file__dev_ptmx=yes
64 ac_cv_file__dev_ptc=no
65 EOT
67 ./configure CC=${HOST_SYSTEM}-gcc \
68 --disable-ipv6 \
69 --enable-shared \
70 --with-system-ffi \
71 ${CONFIGURE_ARGS} &&
72 make \
73 PYTHON_FOR_BUILD=${src}/hostpython \
74 HOSTPYTHON=${src}/hostpython \
75 HOSTPGEN=${src}/Parser/hostpgen \
76 CROSS_COMPILE_TARGET=yes \
77 HOSTARCH=${HOST_SYSTEM} \
78 BUILDARCH=${BUILD_SYSTEM} || exit 1
79 make DESTDIR=$DESTDIR install || exit 1 ;;
80 i?86)
81 ./configure \
82 --enable-shared \
83 --build=${HOST_SYSTEM} \
84 --host=${HOST_SYSTEM} &&
85 make &&
86 make DESTDIR=$DESTDIR install ;;
87 esac
88 }
90 # Rules to gen a SliTaz package suitable for Tazpkg.
91 genpkg_rules()
92 {
93 python_version=${VERSION:0:3}
94 mkdir -p $fs/usr/include/${PACKAGE}$python_version
96 cp -a $install/usr/bin $fs/usr
97 cp -a $install/usr/lib $fs/usr
99 # needed for mercurial to work now
100 cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \
101 $fs/usr/include/${PACKAGE}$python_version
102 rm -f $fs/usr/bin/*-config
104 # Split IDLE with TK dep
105 rm -f $fs/usr/bin/idle
106 rm -rf $fs/usr/lib/python2.7/idlelib
107 }