2020-11-12 17:13:16 +01:00
|
|
|
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
|
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
|
|
|
|
|
|
_pkgname=glib2
|
2022-03-07 10:50:48 +01:00
|
|
|
pkgname=static-compat-$_pkgname
|
2024-01-02 14:03:27 +01:00
|
|
|
pkgver=2.78.3
|
2022-06-25 12:22:19 +02:00
|
|
|
pkgrel=1
|
2020-11-12 17:13:16 +01:00
|
|
|
pkgdesc="Low level core library"
|
2024-01-02 14:03:27 +01:00
|
|
|
url="https://gitlab.gnome.org/GNOME/glib"
|
2020-11-12 17:13:16 +01:00
|
|
|
license=(LGPL)
|
|
|
|
arch=(x86_64)
|
2022-10-05 22:45:11 +02:00
|
|
|
depends=(static-compat-pcre2 static-compat-libffi static-compat-util-linux static-compat-zlib)
|
2022-03-07 10:50:48 +01:00
|
|
|
makedepends=(gettext shared-mime-info python libelf git static-compat-meson)
|
2020-11-12 17:13:16 +01:00
|
|
|
checkdepends=(desktop-file-utils)
|
|
|
|
options=(!strip !emptydirs staticlibs)
|
2024-01-02 14:03:27 +01:00
|
|
|
_commit=03f7c1fbf3a3784cb4c3604f83ca3645e9225577 # tags/2.78.3^0
|
2023-06-01 12:47:43 +02:00
|
|
|
source=(
|
|
|
|
"git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
|
|
|
|
"git+https://gitlab.gnome.org/GNOME/gvdb.git"
|
|
|
|
0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
|
|
|
|
)
|
2022-11-28 21:20:18 +01:00
|
|
|
b2sums=('SKIP'
|
2023-02-11 19:03:00 +01:00
|
|
|
'SKIP'
|
2024-01-02 14:03:27 +01:00
|
|
|
'94c73ca7070c239494873dd52d6ee09382bbb5b1201f7afd737cfa140b1a2fb0744b2c2831baf3943d1d072550c35888d21ce6f19f89481ff9d1a60d9a0b30e0')
|
2020-11-12 17:13:16 +01:00
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd glib
|
2023-06-01 12:47:43 +02:00
|
|
|
git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
|
2020-11-12 17:13:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd glib
|
|
|
|
|
|
|
|
# Suppress noise from glib-compile-schemas.hook
|
2022-03-07 10:50:48 +01:00
|
|
|
git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
|
2023-02-11 19:03:00 +01:00
|
|
|
|
|
|
|
git submodule init
|
|
|
|
git submodule set-url subprojects/gvdb "$srcdir/gvdb"
|
|
|
|
git -c protocol.file.allow=always submodule update
|
2020-11-12 17:13:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2022-03-07 10:50:48 +01:00
|
|
|
export CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
|
|
|
|
export LDFLAGS+=" -lblkid"
|
|
|
|
source static-compat-environment
|
|
|
|
static-compat-meson glib build \
|
2020-11-12 17:13:16 +01:00
|
|
|
-D selinux=disabled \
|
2022-03-07 10:50:48 +01:00
|
|
|
-Dsysprof=disabled \
|
2020-11-12 17:13:16 +01:00
|
|
|
-D man=false \
|
2022-08-20 23:04:12 +02:00
|
|
|
-D gtk_doc=false
|
2020-11-12 17:13:16 +01:00
|
|
|
meson compile -C build
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2022-03-07 10:50:48 +01:00
|
|
|
source static-compat-environment
|
2023-06-01 12:47:43 +02:00
|
|
|
meson test -C build --no-suite flaky --no-suite slow --print-errorlogs || true
|
2020-11-12 17:13:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-03-07 10:50:48 +01:00
|
|
|
source static-compat-environment
|
2020-11-12 17:13:16 +01:00
|
|
|
DESTDIR="$pkgdir" meson install -C build
|
|
|
|
|
|
|
|
# Strip messes up the LTO-enabled archive's index so strip libs manually and then run ranlib again
|
|
|
|
find "$pkgdir" -name '*.a' -exec strip $STRIP_STATIC {} \;
|
|
|
|
find "$pkgdir" -name '*.a' -exec ranlib {} \;
|
|
|
|
|
|
|
|
export PYTHONHASHSEED=0
|
2022-03-07 10:50:48 +01:00
|
|
|
python -m compileall -d "$static_compat_prefix"/share/glib-2.0/codegen \
|
|
|
|
"$pkgdir/$static_compat_prefix/share/glib-2.0/codegen"
|
|
|
|
python -O -m compileall -d "$static_compat_prefix"/share/glib-2.0/codegen \
|
|
|
|
"$pkgdir/$static_compat_prefix/share/glib-2.0/codegen"
|
2020-11-12 17:13:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set sw=2 et:
|