wok-current view glib/receipt @ rev 25701

Fix dep for libglamoregl.so (libepoxy), and miss file for amdgpu (thanks alanyih)
author Stanislas Leduc <shann@slitaz.org>
date Fri Apr 19 12:48:51 2024 +0000 (2 months ago)
parents 3ad63c8fc2f9
children
line source
1 # SliTaz package receipt.
3 PACKAGE="glib"
4 VERSION="2.70.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 python3-dev \
16 elfutils-dev libxml2-dev libxml2-tools meson"
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 # Workaround for webkitgtk build
33 # see https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1935
34 patch -p1 < $stuff/glib-webkitgtk-workaround.patch
36 case "$ARCH" in
37 i?86)
38 meson build \
39 --prefix=/usr \
40 --libdir=lib \
41 --bindir=/usr/bin \
42 --sbindir=/usr/sbin \
43 --buildtype=release \
44 -Dselinux=disabled \
45 --default-library=both &&
46 ninja -C build &&
47 ninja -C build install ;;
48 arm*)
49 # Native ARM build --> if ARCH != SLITAZ_ARCH ?
50 export LD_LIBRARY_PATH=/cross/$ARCH/sysroot/usr/lib:/usr/lib:/lib
51 export PKG_CONFIG_PATH=/cross/$ARCH/sysroot/usr/lib/pkgconfig
52 export LDFLAGS="$LDFLAGS -L/cross/$ARCH/sysroot/usr/lib -Wl,-rpath=/cross/$ARCH/sysroot/usr/lib"
54 # Glib
55 export glib_cv_stack_grows=${glib_cv_stack_grows=no}
56 export glib_cv_uscore=${glib_cv_uscore=no}
57 export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no}
58 export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}
59 export ac_cv_type_long_long=${ac_cv_type_long_long=yes}
60 CC="$HOST_SYSTEM-gcc" \
61 LIBTOOL="$HOST_SYSTEM-libtool" \
62 ./configure \
63 --sysconfdir=/etc \
64 --with-pcre=system \
65 --build=i486-slitaz-linux \
66 --host=$ARCH-slitaz-linux-gnueabi \
67 --enable-shared=yes \
68 --enable-static=yes \
69 --disable-rpath ;;
70 esac
71 }
73 # Rules to gen a SliTaz package suitable for Tazpkg.
74 genpkg_rules()
75 {
76 mkdir -p $fs/usr/lib
77 cp -a $install/usr/bin $fs/usr
78 cp -a $install/usr/lib/*.so* $fs/usr/lib
80 # Split gio --> libgio
81 rm $fs/usr/lib/libgio*
83 # Python codegen, tester, Perl mkenums --> glib-dev
84 for bin in gdbus-codegen gtester* glib-mkenums glib-genmarshal
85 do
86 rm $fs/usr/bin/$bin
87 done
89 # Cook packages that want glib.
90 for w in libgio libgio-dev
91 do
92 [ -x "/usr/bin/cook" ] && echo cook $w
93 done
94 }