wok view python/receipt @ rev 16481
xpaint: clean up packaged files
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 23 03:43:46 2014 +0200 (2014-04-23) |
parents | 705623ffc522 |
children | cfa58aeee489 |
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 DEPENDS="openssl bzlib readline sqlite zlib ncursesw gdbm libffi"
16 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite-dev zlib-dev \
17 ncursesw-dev tcl-dev tk-dev db-dev gdbm-dev wget"
18 SUGGESTED="tcl tk"
20 # Handle cross compilation
21 case "$ARCH" in
22 arm*) BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev ncursesw-dev \
23 tcl-dev db-dev wget libffi-dev gdbm-dev" ;;
24 esac
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 # Temporary workaround for FS#22322
30 # See http://bugs.python.org/issue10835 for upstream report
31 sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
33 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
34 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
36 case "$ARCH" in
37 arm*)
38 # First pass for build host tools
39 unset CFLAGS CXXFLAGS
40 cp -f $CONFIG_SITE .
41 CONFIG_SITE="$(pwd)/cook.site"
42 cat >> $CONFIG_SITE << EOT
43 ac_cv_have_long_long_format=yes
44 EOT
45 ./configure CC=gcc \
46 --disable-ipv6 \
47 --build=i486-slitaz-linux \
48 --host=${BUILD_SYSTEM} &&
49 make python Parser/pgen &&
50 mv python hostpython &&
51 mv Parser/pgen Parser/hostpgen || exit 1
52 make distclean
53 rm -f $CONFIG_SITE
54 # Second pass for host tools
55 . /etc/slitaz/cook.conf
56 #patch -p1 < $stuff/python-2.7.3-xcompile.patch || exit 1
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 i?86)
79 ./configure \
80 --enable-shared \
81 --build=${HOST_SYSTEM} \
82 --host=${HOST_SYSTEM} &&
83 make && make DESTDIR=$DESTDIR install ;;
84 esac
85 }
87 # Rules to gen a SliTaz package suitable for Tazpkg.
88 genpkg_rules()
89 {
90 python_version=${VERSION:0:3}
91 mkdir -p $fs/usr/include/${PACKAGE}$python_version
92 cp -a $install/usr/bin $fs/usr
93 cp -a $install/usr/lib $fs/usr
94 # needed for mercurial to work now
95 cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \
96 $fs/usr/include/${PACKAGE}$python_version
97 rm -f $fs/usr/bin/*-config
98 }