wok view glib/receipt @ rev 24757

pkg-config: cheat configure
author Hans-G?nter Theisgen
date Fri Mar 18 06:53:58 2022 +0100 (2022-03-18)
parents 324b3fa82b76
children
line source
1 # SliTaz package receipt.
3 PACKAGE="glib"
4 VERSION="2.43.3"
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="https://www.gtk.org/"
11 WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION%.*}/$TARBALL"
12 HOST_ARCH="i486 arm"
14 DEPENDS="pcre libffi libxml2 elfutils"
15 BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python-dev \
16 elfutils-dev libxml2-dev libxml2-tools automake"
18 # Handle cross comilation. Use host Perl, Python, etc
19 case "$ARCH" in
20 arm*)
21 BUILD_DEPENDS="pcre-dev libffi-dev zlib-dev elfutils-dev libxml2-dev" ;;
22 esac
24 current_version()
25 {
26 wget -O - $(dirname $WGET_URL) 2>/dev/null | sed '/LATEST/!d;s|.*IS-||;s|<.*||'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 case "$ARCH" in
33 i?86)
34 ./configure \
35 --sysconfdir=/etc \
36 --with-pcre=system \
37 $CONFIGURE_ARGS ;;
38 arm*)
39 # Native ARM build --> if ARCH != SLITAZ_ARCH ?
40 export LD_LIBRARY_PATH=/cross/$ARCH/sysroot/usr/lib:/usr/lib:/lib
41 export PKG_CONFIG_PATH=/cross/$ARCH/sysroot/usr/lib/pkgconfig
42 export LDFLAGS="$LDFLAGS -L/cross/$ARCH/sysroot/usr/lib -Wl,-rpath=/cross/$ARCH/sysroot/usr/lib"
44 # Glib
45 export glib_cv_stack_grows=${glib_cv_stack_grows=no}
46 export glib_cv_uscore=${glib_cv_uscore=no}
47 export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no}
48 export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}
49 export ac_cv_type_long_long=${ac_cv_type_long_long=yes}
50 CC="$HOST_SYSTEM-gcc" \
51 LIBTOOL="$HOST_SYSTEM-libtool" \
52 ./configure \
53 --sysconfdir=/etc \
54 --with-pcre=system \
55 --build=i486-slitaz-linux \
56 --host=$ARCH-slitaz-linux-gnueabi \
57 --enable-shared=yes \
58 --enable-static=yes \
59 --disable-rpath ;;
60 esac &&
61 make && make install
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 mkdir -p $fs/usr/lib
68 cp -a $install/usr/bin $fs/usr
69 cp -a $install/usr/lib/*.so* $fs/usr/lib
71 # Split gio --> libgio
72 rm $fs/usr/lib/libgio*
74 # Python codegen, tester, Perl mkenums --> glib-dev
75 for bin in gdbus-codegen gtester* glib-mkenums
76 do
77 rm $fs/usr/bin/$bin
78 done
80 # Cook packages that want glib.
81 for w in libgio libgio-dev
82 do
83 [ -x "/usr/bin/cook" ] && echo cook $w
84 done
85 }