wok view python/receipt @ rev 17177

Up?slitaz-tools s/gz/bz2
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Fri Sep 26 18:13:35 2014 +0200 (2014-09-26)
parents b58da74b99ca
children 16df76e1fc6a
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 SOURCE="Python"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.python.org/"
12 WGET_URL="https://www.python.org/ftp/python/$VERSION/$TARBALL"
13 HOST_ARCH="i486 arm"
15 RELATED="python-dev python-idle" # version must match
16 DEPENDS="openssl bzlib readline sqlite zlib ncursesw gdbm libffi"
17 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite-dev zlib-dev \
18 ncursesw-dev tcl-dev tk-dev db-dev gdbm-dev wget libffi-dev"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 # Temporary workaround for FS#22322
24 # See http://bugs.python.org/issue10835 for upstream report
25 sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
27 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
28 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
30 case "$ARCH" in
31 arm*)
32 # First pass for build host tools
33 unset CFLAGS CXXFLAGS
34 cp -f $CONFIG_SITE .
35 CONFIG_SITE="$(pwd)/cook.site"
36 cat >> $CONFIG_SITE << EOT
37 ac_cv_have_long_long_format=yes
38 EOT
39 ./configure CC=gcc \
40 --disable-ipv6 \
41 --build=i486-slitaz-linux \
42 --host=${BUILD_SYSTEM} &&
43 make python Parser/pgen &&
44 mv python hostpython &&
45 mv Parser/pgen Parser/hostpgen || exit 1
46 make distclean
47 rm -f $CONFIG_SITE
48 # Second pass for host tools
49 . /etc/slitaz/cook.conf
50 #patch -p1 < $stuff/python-2.7.3-xcompile.patch || exit 1
51 cp -f $CONFIG_SITE .
52 CONFIG_SITE="$(pwd)/cook.site"
53 cat >> $CONFIG_SITE << EOT
54 ac_cv_have_long_long_format=yes
55 ac_cv_buggy_getaddrinfo=no
56 ac_cv_file__dev_ptmx=yes
57 ac_cv_file__dev_ptc=no
58 EOT
59 ./configure CC=${HOST_SYSTEM}-gcc \
60 --disable-ipv6 \
61 --enable-shared \
62 --with-system-ffi \
63 ${CONFIGURE_ARGS} &&
64 make \
65 PYTHON_FOR_BUILD=${src}/hostpython \
66 HOSTPYTHON=${src}/hostpython \
67 HOSTPGEN=${src}/Parser/hostpgen \
68 CROSS_COMPILE_TARGET=yes \
69 HOSTARCH=${HOST_SYSTEM} \
70 BUILDARCH=${BUILD_SYSTEM} || exit 1
71 make DESTDIR=$DESTDIR install || exit 1 ;;
72 i?86)
73 ./configure \
74 --enable-shared \
75 --build=${HOST_SYSTEM} \
76 --host=${HOST_SYSTEM} &&
77 make && make DESTDIR=$DESTDIR install ;;
78 esac
79 }
81 # Rules to gen a SliTaz package suitable for Tazpkg.
82 genpkg_rules()
83 {
84 python_version=${VERSION:0:3}
85 mkdir -p $fs/usr/include/${PACKAGE}$python_version
86 cp -a $install/usr/bin $fs/usr
87 cp -a $install/usr/lib $fs/usr
88 # needed for mercurial to work now
89 cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \
90 $fs/usr/include/${PACKAGE}$python_version
91 rm -f $fs/usr/bin/*-config
92 # Split IDLE with TK dep
93 rm -f $fs/usr/bin/idle
94 rm -rf $fs/usr/lib/python2.7/idlelib
95 }