wok-next view python/receipt @ rev 20715

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