wok-next view python/receipt @ rev 20806
I. node update: security -> https://nodejs.org/en/blog/vulnerability/june-2018-security-releases/ 9.5.0 -> 9.11.2 II. add checksum
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Wed Jun 13 08:26:54 2018 +0000 (2018-06-13) |
parents | 765ca39b5898 |
children | 4e6503d7a19f |
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 --build=$HOST_SYSTEM \
79 --host=$HOST_SYSTEM &&
80 make && make DESTDIR=$DESTDIR install &&
81 chmod -v 755 $install/usr/lib/libpython2.7.so.1.0
82 ;;
83 esac
84 }
86 genpkg_rules() {
87 case $PACKAGE in
88 *-idle)
89 copy idle idlelib/ python-idle.desktop
90 CAT="development|GUI IDE using TK Toolkit"
91 DEPENDS="python-tcltk tcl tk"
92 ;;
93 *-tcltk)
94 copy _tkinter.so lib-tk/
95 CAT="development|Tcl/Tk files"
96 DEPENDS="python tcl tk xorg-libX11"
97 ;;
98 python)
99 # Now pyconfig.h is required for Mercurial.
100 copy @std pyconfig.h @rm
101 DEPENDS="bzlib expat gdbm libffi libsqlite3 ncurses \
102 ncurses-libpanel openssl readline zlib"
103 ;;
104 *-dev)
105 copy @dev @rm
106 ;;
107 esac
108 }