wok rev 15967

glib: an attemp to cross compile it to ARM
author Christophe Lincoln <pankso@slitaz.org>
date Mon Feb 24 17:36:28 2014 +0100 (2014-02-24)
parents 0fcd787c7a03
children 86575a4745f4
files glib/receipt
line diff
     1.1 --- a/glib/receipt	Mon Feb 24 17:34:42 2014 +0100
     1.2 +++ b/glib/receipt	Mon Feb 24 17:36:28 2014 +0100
     1.3 @@ -2,6 +2,7 @@
     1.4  
     1.5  PACKAGE="glib"
     1.6  VERSION="2.32.4"
     1.7 +#VERSION="2.34.3"
     1.8  CATEGORY="x-window"
     1.9  SHORT_DESC="C routines."
    1.10  MAINTAINER="pankso@slitaz.org"
    1.11 @@ -9,18 +10,45 @@
    1.12  TARBALL="$PACKAGE-$VERSION.tar.xz"
    1.13  WEB_SITE="http://www.gtk.org/"
    1.14  WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL"
    1.15 +#HOST_ARCH="i486 arm"
    1.16 +CROSS_BUGS="2.32.4: error: cannot compute alignment of guint32 
    1.17 +      2.34.3: Buggy shared libs format (libpcre, libffi)"
    1.18  
    1.19  DEPENDS="pcre libffi libxml2 elfutils"
    1.20  BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python python-dev \
    1.21  elfutils-dev libxml2-dev libxml2-tools automake"
    1.22  
    1.23 +# Handle cross comilation. Use host Perl, Python, etc
    1.24 +case "$ARCH" in
    1.25 +	arm) BUILD_DEPENDS="pcre-dev libffi-dev zlib-dev elfutils-dev libxml2-dev" ;;
    1.26 +esac
    1.27 +
    1.28  # Rules to configure and make the package.
    1.29  compile_rules()
    1.30  {
    1.31 -	cd $src
    1.32 -	./configure --sysconfdir=/etc \
    1.33 -		--with-pcre=system \
    1.34 -		$CONFIGURE_ARGS &&
    1.35 +	case "$ARCH" in
    1.36 +		arm)
    1.37 +			export glib_cv_stack_grows=${glib_cv_stack_grows=no}
    1.38 +			export glib_cv_uscore=${glib_cv_uscore=no}
    1.39 +			export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no}
    1.40 +			export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}
    1.41 +			export ac_cv_type_long_long=${ac_cv_type_long_long=yes}
    1.42 +			export LD_LIBRARY_PATH=/cross/arm/sysroot/usr/lib:/usr/lib:/lib:/usr/local/lib
    1.43 +			export PKG_CONFIG_LIBPATH=/cross/arm/sysroot/usr/lib/pkgconfig
    1.44 +			CC="arm-slitaz-linux-gnueabi-gcc" \
    1.45 +			./configure \
    1.46 +				--sysconfdir=/etc \
    1.47 +				--with-pcre=system \
    1.48 +				--build=i486-slitaz-linux \
    1.49 +				--host=arm-slitaz-linux-gnueabi \
    1.50 +				--enable-shared=yes \
    1.51 +				--enable-static=yes ;;
    1.52 +		*)
    1.53 +			./configure \
    1.54 +				--sysconfdir=/etc \
    1.55 +				--with-pcre=system \
    1.56 +				$CONFIGURE_ARGS ;;
    1.57 +	esac && 
    1.58  	make && make install
    1.59  }
    1.60