wok-next view python/receipt @ rev 19715

Fix building: pciutils, pcmanfm-legacy, arj
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 13 17:25:31 2017 +0300 (2017-05-13)
parents 16df76e1fc6a
children 8cad5edc1a45
line source
1 # SliTaz package receipt.
3 PACKAGE="python"
4 VERSION="2.7.5"
5 CATEGORY="development"
6 SHORT_DESC="The Python programming language."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="PSL"
9 WEB_SITE="http://www.python.org/"
10 HOST_ARCH="i486 arm"
11 COOKOPTS="!menus"
13 TARBALL="$PACKAGE-$VERSION.tar.bz2"
14 WGET_URL="https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.bz2"
16 DEPENDS="openssl bzlib readline sqlite zlib ncurses gdbm libffi"
17 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite-dev zlib-dev \
18 ncurses-dev tcl-dev tk-dev db-dev gdbm-dev libffi-dev"
19 SPLIT="python-idle"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 # Temporary workaround for FS#22322
25 # See http://bugs.python.org/issue10835 for upstream report
26 sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
28 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
29 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
31 case "$ARCH" in
32 arm*)
33 # First pass for build host tools
34 unset CFLAGS CXXFLAGS
35 cp -f $CONFIG_SITE .
36 CONFIG_SITE="$(pwd)/cook.site"
37 cat >> $CONFIG_SITE << EOT
38 ac_cv_have_long_long_format=yes
39 EOT
40 ./configure CC=gcc \
41 --disable-ipv6 \
42 --build=i486-slitaz-linux \
43 --host=${BUILD_SYSTEM} &&
44 make python Parser/pgen &&
45 mv python hostpython &&
46 mv Parser/pgen Parser/hostpgen || exit 1
47 make distclean
48 rm -f $CONFIG_SITE
49 # Second pass for host tools
50 . /etc/slitaz/cook.conf
51 #patch -p1 < $stuff/python-2.7.3-xcompile.patch || exit 1
52 cp -f $CONFIG_SITE .
53 CONFIG_SITE="$(pwd)/cook.site"
54 cat >> $CONFIG_SITE << EOT
55 ac_cv_have_long_long_format=yes
56 ac_cv_buggy_getaddrinfo=no
57 ac_cv_file__dev_ptmx=yes
58 ac_cv_file__dev_ptc=no
59 EOT
60 ./configure CC=${HOST_SYSTEM}-gcc \
61 --disable-ipv6 \
62 --enable-shared \
63 --with-system-ffi \
64 ${CONFIGURE_ARGS} &&
65 make \
66 PYTHON_FOR_BUILD=${src}/hostpython \
67 HOSTPYTHON=${src}/hostpython \
68 HOSTPGEN=${src}/Parser/hostpgen \
69 CROSS_COMPILE_TARGET=yes \
70 HOSTARCH=${HOST_SYSTEM} \
71 BUILDARCH=${BUILD_SYSTEM} || exit 1
72 make DESTDIR=$DESTDIR install || exit 1
73 ;;
74 i?86)
75 ./configure \
76 --enable-shared \
77 --build=${HOST_SYSTEM} \
78 --host=${HOST_SYSTEM} &&
79 make && make DESTDIR=$DESTDIR install
80 ;;
81 esac
83 cp -a $stuff/applications $install/usr/share
84 }
86 # Rules to gen a SliTaz package suitable for Tazpkg.
87 genpkg_rules()
88 {
89 python_version=${VERSION:0:3}
90 mkdir -p $fs/usr/include/${PACKAGE}$python_version
91 cp -a $install/usr/bin $fs/usr
92 cp -a $install/usr/lib $fs/usr
93 # needed for mercurial to work now
94 cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \
95 $fs/usr/include/${PACKAGE}$python_version
96 rm -f $fs/usr/bin/*-config
97 # Split IDLE with TK dep
98 rm -f $fs/usr/bin/idle
99 rm -rf $fs/usr/lib/python2.7/idlelib
100 }