wok-next view python/receipt @ rev 20916

libopenraw, abiword: update deps; boost: pack unpacked libs
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Aug 21 05:42:25 2018 +0300 (2018-08-21)
parents 4e6503d7a19f
children c9a7a7b42a86
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 # If setuptools installed on the host, they will not be installed to the
30 # $DESTDIR. Probably bug. Dirty hack using chroot to resolve it:
31 rm /usr/bin/easy_install* /usr/bin/pip*
32 rm -r /usr/lib/python2.7/site-packages/easy_install.py \
33 /usr/lib/python2.7/site-packages/pip* \
34 /usr/lib/python2.7/site-packages/pkg_resources \
35 /usr/lib/python2.7/site-packages/setuptools*
37 case "$ARCH" in
38 arm*)
39 # First pass for build host tools
40 unset CFLAGS CXXFLAGS
41 cp -f $CONFIG_SITE .
42 CONFIG_SITE="$(pwd)/cook.site"
43 cat >> $CONFIG_SITE <<EOT
44 ac_cv_have_long_long_format=yes
45 EOT
46 ./configure CC=gcc \
47 --disable-ipv6 \
48 --build=i486-slitaz-linux \
49 --host=${BUILD_SYSTEM} &&
50 make python Parser/pgen &&
51 mv python hostpython &&
52 mv Parser/pgen Parser/hostpgen || exit 1
53 make distclean
54 rm -f $CONFIG_SITE
55 # Second pass for host tools
56 . /etc/slitaz/cook.conf
57 cp -f $CONFIG_SITE .
58 CONFIG_SITE="$(pwd)/cook.site"
59 cat >> $CONFIG_SITE <<EOT
60 ac_cv_have_long_long_format=yes
61 ac_cv_buggy_getaddrinfo=no
62 ac_cv_file__dev_ptmx=yes
63 ac_cv_file__dev_ptc=no
64 EOT
65 ./configure CC=${HOST_SYSTEM}-gcc \
66 --disable-ipv6 \
67 --enable-shared \
68 --with-system-ffi \
69 ${CONFIGURE_ARGS} &&
70 make \
71 PYTHON_FOR_BUILD=${src}/hostpython \
72 HOSTPYTHON=${src}/hostpython \
73 HOSTPGEN=${src}/Parser/hostpgen \
74 CROSS_COMPILE_TARGET=yes \
75 HOSTARCH=${HOST_SYSTEM} \
76 BUILDARCH=${BUILD_SYSTEM} || exit 1
77 make DESTDIR=$DESTDIR install || exit 1
78 ;;
79 i?86|x86_64)
80 ./configure \
81 --prefix=/usr \
82 --enable-shared \
83 --with-system-expat \
84 --with-system-ffi \
85 --with-ensurepip=yes \
86 --enable-unicode=ucs4 \
87 --build=$HOST_SYSTEM \
88 --host=$HOST_SYSTEM &&
89 make &&
90 make DESTDIR=$DESTDIR install &&
91 chmod -v 755 $install/usr/lib/libpython2.7.so.1.0
92 ;;
93 esac
94 }
96 genpkg_rules() {
97 case $PACKAGE in
98 *-idle)
99 copy idle idlelib/ python-idle.desktop
100 CAT="development|GUI IDE using TK Toolkit"
101 DEPENDS="python-tcltk tcl tk"
102 ;;
103 *-tcltk)
104 copy _tkinter.so lib-tk/
105 CAT="development|Tcl/Tk files"
106 DEPENDS="python tcl tk xorg-libX11"
107 ;;
108 python)
109 # Now pyconfig.h is required for Mercurial.
110 copy @std pyconfig.h @rm
111 DEPENDS="bzlib expat gdbm libffi libsqlite3 ncurses \
112 ncurses-libpanel openssl readline zlib"
113 ;;
114 *-dev)
115 copy @dev @rm
116 ;;
117 esac
118 }