wok-6.x view glib/receipt @ 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 | b9ec43882bea |
children | d0e9cc44b37e |
line source
1 # SliTaz package receipt.
3 PACKAGE="glib"
4 VERSION="2.32.4"
5 CATEGORY="x-window"
6 SHORT_DESC="C routines."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.xz"
10 WEB_SITE="http://www.gtk.org/"
11 WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL"
12 HOST_ARCH="i486 arm"
14 CROSS_BUGS="arm: glib 2.32.4 error: cannot compute alignment of guint32"
16 DEPENDS="pcre libffi libxml2 elfutils"
17 BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python python-dev \
18 elfutils-dev libxml2-dev libxml2-tools automake"
20 # Handle cross comilation. Use host Perl, Python, etc
21 case "$ARCH" in
22 arm)
23 VERSION="2.34.3"
24 TARBALL="$PACKAGE-$VERSION.tar.xz"
25 WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL"
26 BUILD_DEPENDS="pcre-dev libffi-dev zlib-dev elfutils-dev libxml2-dev" ;;
27 esac
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 case "$ARCH" in
33 i?68)
34 ./configure \
35 --sysconfdir=/etc \
36 --with-pcre=system \
37 $CONFIGURE_ARGS ;;
38 arm)
39 # Native ARM build --> if ARCH != SLITAZ_ARCH ?
41 # Libtool fixes: /usr/bin/cross libhack (when released)
42 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
43 /cross/${ARCH}/sysroot/usr/lib/libpcre.la \
44 /cross/${ARCH}/sysroot/usr/lib/libffi.la || exit 1
45 #export LIBTOOL=arm-slitaz-linux-gnueabi-libtool
46 export LD_LIBRARY_PATH=/cross/arm/sysroot/usr/lib:/usr/lib:/lib
47 export PKG_CONFIG_LIBPATH=/cross/arm/sysroot/usr/lib/pkgconfig
49 # Glib
50 export glib_cv_stack_grows=${glib_cv_stack_grows=no}
51 export glib_cv_uscore=${glib_cv_uscore=no}
52 export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no}
53 export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}
54 export ac_cv_type_long_long=${ac_cv_type_long_long=yes}
55 CC="arm-slitaz-linux-gnueabi-gcc" \
56 ./configure \
57 --sysconfdir=/etc \
58 --with-pcre=system \
59 --build=i486-slitaz-linux \
60 --host=arm-slitaz-linux-gnueabi \
61 --enable-shared=yes \
62 --enable-static=yes ;;
63 esac &&
64 make && make install
65 }
67 # Rules to gen a SliTaz package suitable for Tazpkg.
68 genpkg_rules()
69 {
70 mkdir -p $fs/usr/lib
71 cp -a $install/usr/bin $fs/usr
72 cp -a $install/usr/lib/*.so* $fs/usr/lib
74 # Split gio --> libgio
75 rm $fs/usr/lib/libgio*
77 # Python codegen, tester, Perl mkenums --> glib-dev
78 for bin in gdbus-codegen gtester* glib-mkenums
79 do
80 rm $fs/usr/bin/$bin
81 done
83 # Cook packages that want glib.
84 for w in libgio libgio-dev
85 do
86 [ -x "/usr/bin/cook" ] && echo cook $w
87 done
88 }