wok-current view glib/receipt @ rev 25628

add libffi dep for git, required by git-remote-https
author Stanislas Leduc <shann@slitaz.org>
date Tue Sep 05 19:41:41 2023 +0000 (10 months ago)
parents a3b6dd3aac6f
children 3ad63c8fc2f9
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 {
33 # Fix build with gcc >= 6.x
34 patch -p1 -i $stuff/glib-2.41.2-ignore-format-nonliteral-warning.patch
36 case "$ARCH" in
37 i?86)
38 ./configure \
39 --sysconfdir=/etc \
40 --with-pcre=system \
41 $CONFIGURE_ARGS ;;
42 arm*)
43 # Native ARM build --> if ARCH != SLITAZ_ARCH ?
44 export LD_LIBRARY_PATH=/cross/$ARCH/sysroot/usr/lib:/usr/lib:/lib
45 export PKG_CONFIG_PATH=/cross/$ARCH/sysroot/usr/lib/pkgconfig
46 export LDFLAGS="$LDFLAGS -L/cross/$ARCH/sysroot/usr/lib -Wl,-rpath=/cross/$ARCH/sysroot/usr/lib"
48 # Glib
49 export glib_cv_stack_grows=${glib_cv_stack_grows=no}
50 export glib_cv_uscore=${glib_cv_uscore=no}
51 export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no}
52 export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}
53 export ac_cv_type_long_long=${ac_cv_type_long_long=yes}
54 CC="$HOST_SYSTEM-gcc" \
55 LIBTOOL="$HOST_SYSTEM-libtool" \
56 ./configure \
57 --sysconfdir=/etc \
58 --with-pcre=system \
59 --build=i486-slitaz-linux \
60 --host=$ARCH-slitaz-linux-gnueabi \
61 --enable-shared=yes \
62 --enable-static=yes \
63 --disable-rpath ;;
64 esac &&
65 make && make install
66 }
68 # Rules to gen a SliTaz package suitable for Tazpkg.
69 genpkg_rules()
70 {
71 mkdir -p $fs/usr/lib
72 cp -a $install/usr/bin $fs/usr
73 cp -a $install/usr/lib/*.so* $fs/usr/lib
75 # Split gio --> libgio
76 rm $fs/usr/lib/libgio*
78 # Python codegen, tester, Perl mkenums --> glib-dev
79 for bin in gdbus-codegen gtester* glib-mkenums
80 do
81 rm $fs/usr/bin/$bin
82 done
84 # Cook packages that want glib.
85 for w in libgio libgio-dev
86 do
87 [ -x "/usr/bin/cook" ] && echo cook $w
88 done
89 }