wok-next view python/receipt @ rev 20976

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