wok-6.x annotate glib/receipt @ 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 | fd22b033a84a |
children | 128f691c5117 |
rev | line source |
---|---|
pascal@6023 | 1 # SliTaz package receipt. |
pankso@22 | 2 |
pankso@22 | 3 PACKAGE="glib" |
pascal@13394 | 4 VERSION="2.32.4" |
pankso@15967 | 5 #VERSION="2.34.3" |
pankso@22 | 6 CATEGORY="x-window" |
pankso@22 | 7 SHORT_DESC="C routines." |
pankso@22 | 8 MAINTAINER="pankso@slitaz.org" |
pascal@15000 | 9 LICENSE="GPL2" |
pankso@12471 | 10 TARBALL="$PACKAGE-$VERSION.tar.xz" |
pankso@22 | 11 WEB_SITE="http://www.gtk.org/" |
slaxemulator@10985 | 12 WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL" |
pankso@15967 | 13 #HOST_ARCH="i486 arm" |
pankso@15967 | 14 CROSS_BUGS="2.32.4: error: cannot compute alignment of guint32 |
pankso@15967 | 15 2.34.3: Buggy shared libs format (libpcre, libffi)" |
pankso@22 | 16 |
pankso@12471 | 17 DEPENDS="pcre libffi libxml2 elfutils" |
pankso@12471 | 18 BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python python-dev \ |
pascal@15616 | 19 elfutils-dev libxml2-dev libxml2-tools automake" |
slaxemulator@10804 | 20 |
pankso@15967 | 21 # Handle cross comilation. Use host Perl, Python, etc |
pankso@15967 | 22 case "$ARCH" in |
pankso@15967 | 23 arm) BUILD_DEPENDS="pcre-dev libffi-dev zlib-dev elfutils-dev libxml2-dev" ;; |
pankso@15967 | 24 esac |
pankso@15967 | 25 |
pankso@22 | 26 # Rules to configure and make the package. |
pankso@22 | 27 compile_rules() |
pankso@22 | 28 { |
pankso@15967 | 29 case "$ARCH" in |
pankso@15967 | 30 arm) |
pankso@15967 | 31 export glib_cv_stack_grows=${glib_cv_stack_grows=no} |
pankso@15967 | 32 export glib_cv_uscore=${glib_cv_uscore=no} |
pankso@15967 | 33 export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no} |
pankso@15967 | 34 export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no} |
pankso@15967 | 35 export ac_cv_type_long_long=${ac_cv_type_long_long=yes} |
pankso@15967 | 36 export LD_LIBRARY_PATH=/cross/arm/sysroot/usr/lib:/usr/lib:/lib:/usr/local/lib |
pankso@15967 | 37 export PKG_CONFIG_LIBPATH=/cross/arm/sysroot/usr/lib/pkgconfig |
pankso@15967 | 38 CC="arm-slitaz-linux-gnueabi-gcc" \ |
pankso@15967 | 39 ./configure \ |
pankso@15967 | 40 --sysconfdir=/etc \ |
pankso@15967 | 41 --with-pcre=system \ |
pankso@15967 | 42 --build=i486-slitaz-linux \ |
pankso@15967 | 43 --host=arm-slitaz-linux-gnueabi \ |
pankso@15967 | 44 --enable-shared=yes \ |
pankso@15967 | 45 --enable-static=yes ;; |
pankso@15967 | 46 *) |
pankso@15967 | 47 ./configure \ |
pankso@15967 | 48 --sysconfdir=/etc \ |
pankso@15967 | 49 --with-pcre=system \ |
pankso@15967 | 50 $CONFIGURE_ARGS ;; |
pankso@15967 | 51 esac && |
slaxemulator@10245 | 52 make && make install |
pankso@22 | 53 } |
pankso@22 | 54 |
pankso@22 | 55 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@22 | 56 genpkg_rules() |
pankso@22 | 57 { |
pankso@547 | 58 mkdir -p $fs/usr/lib |
slaxemulator@11626 | 59 cp -a $install/usr/bin $fs/usr |
slaxemulator@10985 | 60 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pankso@12471 | 61 |
pankso@12471 | 62 # Split gio --> libgio |
pankso@842 | 63 rm $fs/usr/lib/libgio* |
pankso@12471 | 64 |
slaxemulator@12597 | 65 # Python codegen, tester, Perl mkenums --> glib-dev |
slaxemulator@12597 | 66 for bin in gdbus-codegen gtester* glib-mkenums |
pankso@12471 | 67 do |
pankso@12471 | 68 rm $fs/usr/bin/$bin |
pankso@12471 | 69 done |
pankso@12471 | 70 |
pankso@12471 | 71 # Cook packages that want glib. |
pankso@12471 | 72 for w in libgio libgio-dev |
pankso@12471 | 73 do |
pascal@15152 | 74 [ -x "/usr/bin/cook" ] && echo cook $w |
pankso@12471 | 75 done |
pankso@22 | 76 } |