wok rev 16290

ARM: add x11vnc
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 07 00:13:51 2014 +0200 (2014-04-07)
parents c6a95de2d272
children a2dca580808d
files python/receipt x11vnc-extra/receipt x11vnc/receipt
line diff
     1.1 --- a/python/receipt	Sun Apr 06 22:35:50 2014 +0200
     1.2 +++ b/python/receipt	Mon Apr 07 00:13:51 2014 +0200
     1.3 @@ -1,18 +1,18 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="python"
     1.7 -VERSION="2.7.5"
     1.8 +VERSION="2.7.3"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="The Python programming language."
    1.11  MAINTAINER="pankso@slitaz.org"
    1.12  LICENSE="PSL"
    1.13  SOURCE="Python"
    1.14 -TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.15 +TARBALL="$SOURCE-$VERSION.tar.xz"
    1.16  WEB_SITE="http://www.python.org/"
    1.17 -WGET_URL="http://www.python.org/ftp/python/$VERSION/$TARBALL"
    1.18 -#HOST_ARCH="i486 arm"
    1.19 +WGET_URL="https://www.python.org/ftp/python/$VERSION/$TARBALL"
    1.20 +HOST_ARCH="i486 arm"
    1.21  
    1.22 -DEPENDS="openssl bzlib readline sqlite zlib ncursesw gdbm"
    1.23 +DEPENDS="openssl bzlib readline sqlite zlib ncursesw gdbm libffi"
    1.24  BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite-dev zlib-dev \
    1.25  ncursesw-dev tcl-dev tk-dev db-dev gdbm-dev"
    1.26  SUGGESTED="tcl tk"
    1.27 @@ -20,7 +20,7 @@
    1.28  # Handle cross compilation
    1.29  case "$ARCH" in
    1.30  	arm*) BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev ncursesw-dev \
    1.31 -tcl-dev db-dev" ;;
    1.32 +tcl-dev db-dev wget libffi-dev gdbm-dev" ;;
    1.33  esac
    1.34  
    1.35  # Rules to configure and make the package.
    1.36 @@ -29,28 +29,59 @@
    1.37  	# Temporary workaround for FS#22322
    1.38  	# See http://bugs.python.org/issue10835 for upstream report
    1.39  	sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
    1.40 +	
    1.41  	# Enable built-in SQLite3 module to load extensions (fix FS#22122)
    1.42  	sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
    1.43 +	
    1.44  	case "$ARCH" in
    1.45  		arm*)
    1.46 -			#ac_cv_file__dev_ptmx=no
    1.47 -			#ac_cv_file__dev_ptc=no
    1.48 -			cp -s $CONFIG_SITE .
    1.49 +			# First pass for build host tools
    1.50 +			unset CFLAGS CXXFLAGS
    1.51 +			cp -f $CONFIG_SITE .
    1.52  			CONFIG_SITE="$(pwd)/cook.site"
    1.53 -			echo 'ac_cv_file__dev_ptmx=no' >> $CONFIG_SITE
    1.54 -			echo 'ac_cv_file__dev_ptc=no' >> $CONFIG_SITE
    1.55 -			./configure \
    1.56 +			cat >> $CONFIG_SITE << EOT
    1.57 +ac_cv_have_long_long_format=yes
    1.58 +EOT
    1.59 +			./configure CC=gcc \
    1.60 +				--disable-ipv6 \
    1.61 +				--build=i486-slitaz-linux \
    1.62 +				--host=${BUILD_SYSTEM} && 
    1.63 +			make python Parser/pgen &&
    1.64 +			mv python hostpython &&
    1.65 +			mv Parser/pgen Parser/hostpgen || exit 1
    1.66 +			make distclean
    1.67 +			rm -f $CONFIG_SITE
    1.68 +			# Second pass for host tools
    1.69 +			. /etc/slitaz/cook.conf
    1.70 +			patch -p1 < $stuff/python-2.7.3-xcompile.patch || exit 1
    1.71 +			cp -f $CONFIG_SITE .
    1.72 +			CONFIG_SITE="$(pwd)/cook.site"
    1.73 +			cat >> $CONFIG_SITE << EOT
    1.74 +ac_cv_have_long_long_format=yes
    1.75 +ac_cv_buggy_getaddrinfo=no
    1.76 +ac_cv_file__dev_ptmx=yes
    1.77 +ac_cv_file__dev_ptc=no
    1.78 +EOT
    1.79 +			./configure CC=${HOST_SYSTEM}-gcc \
    1.80  				--disable-ipv6 \
    1.81  				--enable-shared \
    1.82 -				--build=i486-slitaz-linux \
    1.83 -				--host=${ARCH}-slitaz-linux-gnueabi ;;
    1.84 +				--with-system-ffi \
    1.85 +				${CONFIGURE_ARGS} &&
    1.86 +			make \
    1.87 +				PYTHON_FOR_BUILD=${src}/hostpython \
    1.88 +				HOSTPYTHON=${src}/hostpython \
    1.89 +				HOSTPGEN=${src}/Parser/hostpgen \
    1.90 +				CROSS_COMPILE_TARGET=yes \
    1.91 +				HOSTARCH=${HOST_SYSTEM} \
    1.92 +				BUILDARCH=${BUILD_SYSTEM} || exit 1
    1.93 +			make DESTDIR=$DESTDIR install || exit 1 ;;
    1.94  		i?86)
    1.95  			./configure \
    1.96  				--enable-shared \
    1.97  				--build=${HOST_SYSTEM} \
    1.98 -				--host=${HOST_SYSTEM} ;;
    1.99 -	esac &&
   1.100 -	make &&	make DESTDIR=$DESTDIR install
   1.101 +				--host=${HOST_SYSTEM} &&
   1.102 +				make &&	make DESTDIR=$DESTDIR install ;;
   1.103 +	esac
   1.104  }
   1.105  
   1.106  # Rules to gen a SliTaz package suitable for Tazpkg.
   1.107 @@ -60,6 +91,11 @@
   1.108  	mkdir -p $fs/usr/include/${PACKAGE}$python_version
   1.109  	cp -a $install/usr/bin $fs/usr
   1.110  	cp -a $install/usr/lib $fs/usr
   1.111 +	# Create /usr/bin/python for ARM
   1.112 +	if [ ! -f "$fs/usr/python" ]; then
   1.113 +		cd $fs/usr/bin && ln -s python2.7 python
   1.114 +		mkdir -p $fs/usr/lib/python2.7
   1.115 +	fi
   1.116  	# needed for mercurial to work now
   1.117  	cp -a $install/usr/include/${PACKAGE}$python_version/pyconfig.h \
   1.118  		$fs/usr/include/${PACKAGE}$python_version
     2.1 --- a/x11vnc-extra/receipt	Sun Apr 06 22:35:50 2014 +0200
     2.2 +++ b/x11vnc-extra/receipt	Mon Apr 07 00:13:51 2014 +0200
     2.3 @@ -9,6 +9,7 @@
     2.4  WEB_SITE="http://www.karlrunge.com/x11vnc/"
     2.5  WANTED="x11vnc"
     2.6  TAGS="vnc"
     2.7 +HOST_ARCH="i486 arm"
     2.8  
     2.9  DEPENDS="x11vnc"
    2.10  
     3.1 --- a/x11vnc/receipt	Sun Apr 06 22:35:50 2014 +0200
     3.2 +++ b/x11vnc/receipt	Mon Apr 07 00:13:51 2014 +0200
     3.3 @@ -9,15 +9,15 @@
     3.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     3.5  WEB_SITE="http://www.karlrunge.com/x11vnc/"
     3.6  WGET_URL="$SF_MIRROR/libvncserver/$TARBALL"
     3.7 -TAGS="vnc"
     3.8 +TAGS="vnc server"
     3.9 +HOST_ARCH="i486 arm"
    3.10  
    3.11 -DEPENDS="xorg-libXtst openssl slitaz-base-files jpeg xorg-libXdamage zlib"
    3.12 -BUILD_DEPENDS="openssl-dev"
    3.13 +DEPENDS="xorg-libXtst openssl jpeg xorg-libXdamage zlib"
    3.14 +BUILD_DEPENDS="openssl-dev jpeg-dev"
    3.15  
    3.16  # Rules to configure and make the package.
    3.17  compile_rules()
    3.18  {
    3.19 -	cd $src
    3.20  	./configure --prefix=/usr \
    3.21  		$CONFIGURE_ARGS &&
    3.22  	make &&
    3.23 @@ -28,7 +28,7 @@
    3.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.25  genpkg_rules()
    3.26  {
    3.27 -	mkdir -p $fs/usr/bin $fs/usr/share $fs/etc/init.d
    3.28 +	mkdir -p $fs/usr/bin $fs/etc/init.d
    3.29  	cp -a $install/usr/bin/x11vnc $fs/usr/bin
    3.30  	cp -a $stuff/x11vnc $fs/etc/init.d
    3.31  }