wok-next view python/receipt @ rev 20111

glade: typo; disable zip recompression for python, py3k, py3k3.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Oct 30 01:52:44 2017 +0200 (2017-10-30)
parents 2809ecb8c754
children 0e7893ac206d
line source
1 # SliTaz package receipt v2.
3 PACKAGE="python"
4 VERSION="2.7.13"
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/"
10 HOST_ARCH="i486 arm"
11 COOKOPTS="!menus !zip"
13 TARBALL="$PACKAGE-$VERSION.tar.xz"
14 WGET_URL="https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz"
16 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite3-dev zlib-dev \
17 ncurses-dev tcl-dev tk-dev db-dev gdbm-dev libffi-dev expat-dev"
18 SPLIT="python-idle python-tcltk python python-dev"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 # Temporary workaround for FS#22322
24 # See http://bugs.python.org/issue10835 for upstream report
25 sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
27 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
28 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
30 case "$ARCH" in
31 arm*)
32 # First pass for build host tools
33 unset CFLAGS CXXFLAGS
34 cp -f $CONFIG_SITE .
35 CONFIG_SITE="$(pwd)/cook.site"
36 cat >> $CONFIG_SITE << EOT
37 ac_cv_have_long_long_format=yes
38 EOT
39 ./configure CC=gcc \
40 --disable-ipv6 \
41 --build=i486-slitaz-linux \
42 --host=${BUILD_SYSTEM} &&
43 make python Parser/pgen &&
44 mv python hostpython &&
45 mv Parser/pgen Parser/hostpgen || exit 1
46 make distclean
47 rm -f $CONFIG_SITE
48 # Second pass for host tools
49 . /etc/slitaz/cook.conf
50 cp -f $CONFIG_SITE .
51 CONFIG_SITE="$(pwd)/cook.site"
52 cat >> $CONFIG_SITE << EOT
53 ac_cv_have_long_long_format=yes
54 ac_cv_buggy_getaddrinfo=no
55 ac_cv_file__dev_ptmx=yes
56 ac_cv_file__dev_ptc=no
57 EOT
58 ./configure CC=${HOST_SYSTEM}-gcc \
59 --disable-ipv6 \
60 --enable-shared \
61 --with-system-ffi \
62 ${CONFIGURE_ARGS} &&
63 make \
64 PYTHON_FOR_BUILD=${src}/hostpython \
65 HOSTPYTHON=${src}/hostpython \
66 HOSTPGEN=${src}/Parser/hostpgen \
67 CROSS_COMPILE_TARGET=yes \
68 HOSTARCH=${HOST_SYSTEM} \
69 BUILDARCH=${BUILD_SYSTEM} || exit 1
70 make DESTDIR=$DESTDIR install || exit 1
71 ;;
72 i?86)
73 ./configure \
74 --prefix=/usr \
75 --enable-shared \
76 --with-system-expat \
77 --with-system-ffi \
78 --with-ensurepip=yes \
79 --enable-unicode=ucs4 \
80 --build=$HOST_SYSTEM \
81 --host=$HOST_SYSTEM &&
82 make && make DESTDIR=$DESTDIR install &&
83 chmod -v 755 $install/usr/lib/libpython2.7.so.1.0
84 ;;
85 esac
86 }
88 # Rules to gen a SliTaz package suitable for Tazpkg.
89 genpkg_rules()
90 {
91 case $PACKAGE in
92 *-idle)
93 copy idle idlelib/ python-idle.desktop
94 CAT="development|GUI IDE using TK Toolkit"
95 DEPENDS="python-tcltk tcl tk"
96 ;;
97 *-tcltk)
98 copy _tkinter.so lib-tk/
99 CAT="development|Tcl/Tk files"
100 DEPENDS="python tcl tk xorg-libX11"
101 ;;
102 python)
103 # pyconfig.h needed for mercurial to work now
104 copy @std pyconfig.h
105 remove_already_packed
106 DEPENDS="bzlib expat gdbm libcrypto libffi libsqlite3 libssl \
107 ncurses ncurses-libpanel readline zlib"
108 ;;
109 *-dev)
110 copy @dev
111 remove_already_packed
112 ;;
113 esac
114 }