wok-6.x rev 16015

glib: fix cross compilation to ARM :-)
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 05 03:32:36 2014 +0100 (2014-03-05)
parents f9588901ecdc
children 89e7debe3a7e
files glib-dev/receipt glib/receipt libgio-dev/receipt libgio/receipt
line diff
     1.1 --- a/glib-dev/receipt	Wed Mar 05 03:31:25 2014 +0100
     1.2 +++ b/glib-dev/receipt	Wed Mar 05 03:32:36 2014 +0100
     1.3 @@ -8,9 +8,14 @@
     1.4  LICENSE="GPL2"
     1.5  WANTED="glib"
     1.6  WEB_SITE="http://www.gtk.org/"
     1.7 +HOST_ARCH="i486 arm"
     1.8  
     1.9  DEPENDS="glib perl python libffi-dev libgio libgio-dev pcre-dev pkg-config"
    1.10  
    1.11 +case "$ARCH" in
    1.12 +	arm) VERSION="2.34.3" ;;
    1.13 +esac
    1.14 +
    1.15  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.16  genpkg_rules()
    1.17  {
     2.1 --- a/glib/receipt	Wed Mar 05 03:31:25 2014 +0100
     2.2 +++ b/glib/receipt	Wed Mar 05 03:32:36 2014 +0100
     2.3 @@ -2,7 +2,6 @@
     2.4  
     2.5  PACKAGE="glib"
     2.6  VERSION="2.32.4"
     2.7 -#VERSION="2.34.3"
     2.8  CATEGORY="x-window"
     2.9  SHORT_DESC="C routines."
    2.10  MAINTAINER="pankso@slitaz.org"
    2.11 @@ -10,9 +9,9 @@
    2.12  TARBALL="$PACKAGE-$VERSION.tar.xz"
    2.13  WEB_SITE="http://www.gtk.org/"
    2.14  WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL"
    2.15 -#HOST_ARCH="i486 arm"
    2.16 -CROSS_BUGS="2.32.4: error: cannot compute alignment of guint32 
    2.17 -      2.34.3: Buggy shared libs format (libpcre, libffi)"
    2.18 +HOST_ARCH="i486 arm"
    2.19 +
    2.20 +CROSS_BUGS="arm: glib 2.32.4 error: cannot compute alignment of guint32"
    2.21  
    2.22  DEPENDS="pcre libffi libxml2 elfutils"
    2.23  BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python python-dev \
    2.24 @@ -20,21 +19,39 @@
    2.25  
    2.26  # Handle cross comilation. Use host Perl, Python, etc
    2.27  case "$ARCH" in
    2.28 -	arm) BUILD_DEPENDS="pcre-dev libffi-dev zlib-dev elfutils-dev libxml2-dev" ;;
    2.29 +	arm)
    2.30 +		VERSION="2.34.3"
    2.31 +		TARBALL="$PACKAGE-$VERSION.tar.xz"
    2.32 +		WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL"
    2.33 +		BUILD_DEPENDS="pcre-dev libffi-dev zlib-dev elfutils-dev libxml2-dev" ;;
    2.34  esac
    2.35  
    2.36  # Rules to configure and make the package.
    2.37  compile_rules()
    2.38  {
    2.39  	case "$ARCH" in
    2.40 +		i?68)
    2.41 +			./configure \
    2.42 +				--sysconfdir=/etc \
    2.43 +				--with-pcre=system \
    2.44 +				$CONFIGURE_ARGS ;;
    2.45  		arm)
    2.46 +			# Native ARM build --> if ARCH != SLITAZ_ARCH ?
    2.47 +			
    2.48 +			# Libtool fixes: /usr/bin/cross libhack (when released)
    2.49 +			sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
    2.50 +				/cross/${ARCH}/sysroot/usr/lib/libpcre.la \
    2.51 +				/cross/${ARCH}/sysroot/usr/lib/libffi.la || exit 1
    2.52 +			#export LIBTOOL=arm-slitaz-linux-gnueabi-libtool 
    2.53 +			export LD_LIBRARY_PATH=/cross/arm/sysroot/usr/lib:/usr/lib:/lib
    2.54 +			export PKG_CONFIG_LIBPATH=/cross/arm/sysroot/usr/lib/pkgconfig
    2.55 +			
    2.56 +			# Glib
    2.57  			export glib_cv_stack_grows=${glib_cv_stack_grows=no}
    2.58  			export glib_cv_uscore=${glib_cv_uscore=no}
    2.59  			export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no}
    2.60  			export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}
    2.61  			export ac_cv_type_long_long=${ac_cv_type_long_long=yes}
    2.62 -			export LD_LIBRARY_PATH=/cross/arm/sysroot/usr/lib:/usr/lib:/lib:/usr/local/lib
    2.63 -			export PKG_CONFIG_LIBPATH=/cross/arm/sysroot/usr/lib/pkgconfig
    2.64  			CC="arm-slitaz-linux-gnueabi-gcc" \
    2.65  			./configure \
    2.66  				--sysconfdir=/etc \
    2.67 @@ -43,11 +60,6 @@
    2.68  				--host=arm-slitaz-linux-gnueabi \
    2.69  				--enable-shared=yes \
    2.70  				--enable-static=yes ;;
    2.71 -		*)
    2.72 -			./configure \
    2.73 -				--sysconfdir=/etc \
    2.74 -				--with-pcre=system \
    2.75 -				$CONFIGURE_ARGS ;;
    2.76  	esac && 
    2.77  	make && make install
    2.78  }
     3.1 --- a/libgio-dev/receipt	Wed Mar 05 03:31:25 2014 +0100
     3.2 +++ b/libgio-dev/receipt	Wed Mar 05 03:32:36 2014 +0100
     3.3 @@ -8,9 +8,14 @@
     3.4  LICENSE="GPL2"
     3.5  WANTED="glib"
     3.6  WEB_SITE="http://www.gtk.org/"
     3.7 +HOST_ARCH="i486 arm"
     3.8  
     3.9  DEPENDS="libgio pkg-config"
    3.10  
    3.11 +case "$ARCH" in
    3.12 +	arm) VERSION="2.34.3" ;;
    3.13 +esac
    3.14 +
    3.15  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.16  genpkg_rules()
    3.17  {
     4.1 --- a/libgio/receipt	Wed Mar 05 03:31:25 2014 +0100
     4.2 +++ b/libgio/receipt	Wed Mar 05 03:32:36 2014 +0100
     4.3 @@ -8,9 +8,14 @@
     4.4  LICENSE="GPL2"
     4.5  WANTED="glib"
     4.6  WEB_SITE="http://www.gtk.org/"
     4.7 +HOST_ARCH="i486 arm"
     4.8  
     4.9  DEPENDS="glib"
    4.10  
    4.11 +case "$ARCH" in
    4.12 +	arm) VERSION="2.34.3" ;;
    4.13 +esac
    4.14 +
    4.15  # Rules to gen a SliTaz package suitable for Tazpkg.
    4.16  genpkg_rules()
    4.17  {