wok-next annotate python/receipt @ rev 20098
s/sqlite/sqlite3/
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 29 09:27:29 2017 +0100 (2017-10-29) |
parents | 8cad5edc1a45 |
children | 0f1876141d45 |
rev | line source |
---|---|
al@19763 | 1 # SliTaz package receipt v2. |
pankso@18 | 2 |
pankso@18 | 3 PACKAGE="python" |
al@19763 | 4 VERSION="2.7.13" |
pankso@204 | 5 CATEGORY="development" |
al@19763 | 6 SHORT_DESC="The Python programming language" |
pankso@18 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15378 | 8 LICENSE="PSL" |
al@19763 | 9 WEB_SITE="https://www.python.org/" |
pankso@16290 | 10 HOST_ARCH="i486 arm" |
al@19582 | 11 COOKOPTS="!menus" |
pankso@18 | 12 |
al@19763 | 13 TARBALL="$PACKAGE-$VERSION.tar.xz" |
al@19763 | 14 WGET_URL="https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz" |
al@19582 | 15 |
pascal@20098 | 16 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite3-dev zlib-dev \ |
al@19763 | 17 ncurses-dev tcl-dev tk-dev db-dev gdbm-dev libffi-dev expat-dev" |
al@19763 | 18 SPLIT="python-idle python-tcltk python python-dev" |
pankso@16026 | 19 |
pankso@18 | 20 # Rules to configure and make the package. |
pankso@18 | 21 compile_rules() |
pankso@18 | 22 { |
slaxemulator@10975 | 23 # Temporary workaround for FS#22322 |
slaxemulator@10975 | 24 # See http://bugs.python.org/issue10835 for upstream report |
slaxemulator@10975 | 25 sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c |
al@18077 | 26 |
slaxemulator@10975 | 27 # Enable built-in SQLite3 module to load extensions (fix FS#22122) |
slaxemulator@10975 | 28 sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py |
al@18077 | 29 |
pankso@16026 | 30 case "$ARCH" in |
pankso@16026 | 31 arm*) |
pankso@16290 | 32 # First pass for build host tools |
pankso@16290 | 33 unset CFLAGS CXXFLAGS |
pankso@16290 | 34 cp -f $CONFIG_SITE . |
pankso@16062 | 35 CONFIG_SITE="$(pwd)/cook.site" |
pankso@16290 | 36 cat >> $CONFIG_SITE << EOT |
pankso@16290 | 37 ac_cv_have_long_long_format=yes |
pankso@16290 | 38 EOT |
pankso@16290 | 39 ./configure CC=gcc \ |
pankso@16290 | 40 --disable-ipv6 \ |
pankso@16290 | 41 --build=i486-slitaz-linux \ |
al@19582 | 42 --host=${BUILD_SYSTEM} && |
pankso@16290 | 43 make python Parser/pgen && |
pankso@16290 | 44 mv python hostpython && |
pankso@16290 | 45 mv Parser/pgen Parser/hostpgen || exit 1 |
pankso@16290 | 46 make distclean |
pankso@16290 | 47 rm -f $CONFIG_SITE |
pankso@16290 | 48 # Second pass for host tools |
pankso@16290 | 49 . /etc/slitaz/cook.conf |
pankso@16290 | 50 cp -f $CONFIG_SITE . |
pankso@16290 | 51 CONFIG_SITE="$(pwd)/cook.site" |
pankso@16290 | 52 cat >> $CONFIG_SITE << EOT |
pankso@16290 | 53 ac_cv_have_long_long_format=yes |
pankso@16290 | 54 ac_cv_buggy_getaddrinfo=no |
pankso@16290 | 55 ac_cv_file__dev_ptmx=yes |
pankso@16290 | 56 ac_cv_file__dev_ptc=no |
pankso@16290 | 57 EOT |
pankso@16290 | 58 ./configure CC=${HOST_SYSTEM}-gcc \ |
pankso@16026 | 59 --disable-ipv6 \ |
pankso@16026 | 60 --enable-shared \ |
pankso@16290 | 61 --with-system-ffi \ |
pankso@16290 | 62 ${CONFIGURE_ARGS} && |
pankso@16290 | 63 make \ |
pankso@16290 | 64 PYTHON_FOR_BUILD=${src}/hostpython \ |
pankso@16290 | 65 HOSTPYTHON=${src}/hostpython \ |
pankso@16290 | 66 HOSTPGEN=${src}/Parser/hostpgen \ |
pankso@16290 | 67 CROSS_COMPILE_TARGET=yes \ |
pankso@16290 | 68 HOSTARCH=${HOST_SYSTEM} \ |
pankso@16290 | 69 BUILDARCH=${BUILD_SYSTEM} || exit 1 |
al@19582 | 70 make DESTDIR=$DESTDIR install || exit 1 |
al@19582 | 71 ;; |
pankso@16026 | 72 i?86) |
pankso@16026 | 73 ./configure \ |
al@19763 | 74 --prefix=/usr \ |
pankso@16026 | 75 --enable-shared \ |
al@19763 | 76 --with-system-expat \ |
al@19763 | 77 --with-system-ffi \ |
al@19763 | 78 --with-ensurepip=yes \ |
al@19763 | 79 --enable-unicode=ucs4 \ |
al@19763 | 80 --build=$HOST_SYSTEM \ |
al@19763 | 81 --host=$HOST_SYSTEM && |
al@19763 | 82 make && make DESTDIR=$DESTDIR install && |
al@19763 | 83 chmod -v 755 $install/usr/lib/libpython2.7.so.1.0 |
al@19582 | 84 ;; |
pankso@16290 | 85 esac |
pankso@18 | 86 } |
pankso@18 | 87 |
pankso@18 | 88 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@18 | 89 genpkg_rules() |
pankso@18 | 90 { |
al@19763 | 91 case $PACKAGE in |
al@19763 | 92 *-idle) |
al@19763 | 93 copy idle idlelib/ python-idle.desktop |
al@19763 | 94 CAT="development|GUI IDE using TK Toolkit" |
al@19763 | 95 DEPENDS="python-tcltk tcl tk" |
al@19763 | 96 ;; |
al@19763 | 97 *-tcltk) |
al@19763 | 98 copy _tkinter.so lib-tk/ |
al@19763 | 99 CAT="development|Tcl/Tk files" |
al@19763 | 100 DEPENDS="python tcl tk xorg-libX11" |
al@19763 | 101 ;; |
al@19763 | 102 python) |
al@19763 | 103 # pyconfig.h needed for mercurial to work now |
al@19763 | 104 copy @std pyconfig.h |
al@19763 | 105 remove_already_packed |
pascal@20098 | 106 DEPENDS="bzlib expat gdbm libcrypto libffi libsqlite3 libssl \ |
al@19763 | 107 ncurses ncurses-libpanel readline zlib" |
al@19763 | 108 ;; |
al@19763 | 109 *-dev) |
al@19763 | 110 copy @dev |
al@19763 | 111 remove_already_packed |
al@19763 | 112 ;; |
al@19763 | 113 esac |
pankso@18 | 114 } |