76 lines
2.4 KiB
Bash
76 lines
2.4 KiB
Bash
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
|
|
_pkgname=glib2
|
|
pkgname=static-compat-$_pkgname
|
|
pkgver=2.74.5
|
|
pkgrel=1
|
|
pkgdesc="Low level core library"
|
|
url="https://wiki.gnome.org/Projects/GLib"
|
|
license=(LGPL)
|
|
arch=(x86_64)
|
|
depends=(static-compat-pcre2 static-compat-libffi static-compat-util-linux static-compat-zlib)
|
|
makedepends=(gettext shared-mime-info python libelf git static-compat-meson)
|
|
checkdepends=(desktop-file-utils)
|
|
options=(!strip !emptydirs staticlibs)
|
|
_commit=39a71aff372ed491a24ca84409d9f93bc7c5d6d4 # tags/2.74.5^0
|
|
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)
|
|
b2sums=('SKIP'
|
|
'SKIP'
|
|
'4d5cb5ad1222a5e8d06e79736170cd694a6277e0da71ffd55560d74cf5c3273551d302a35bd2ff43f09070d61c1de147bb312428fce98347d232ac3d44406511')
|
|
|
|
pkgver() {
|
|
cd glib
|
|
git describe --tags | sed 's/-/+/g'
|
|
}
|
|
|
|
prepare() {
|
|
cd glib
|
|
|
|
# Fix build (missing include)
|
|
git cherry-pick -n 03cb4261e00cf505790f4fd4e69f97b2ef4fcccd
|
|
|
|
# Suppress noise from glib-compile-schemas.hook
|
|
git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
|
|
|
|
git submodule init
|
|
git submodule set-url subprojects/gvdb "$srcdir/gvdb"
|
|
git -c protocol.file.allow=always submodule update
|
|
}
|
|
|
|
build() {
|
|
export CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
|
|
export LDFLAGS+=" -lblkid"
|
|
source static-compat-environment
|
|
static-compat-meson glib build \
|
|
-D selinux=disabled \
|
|
-Dsysprof=disabled \
|
|
-D man=false \
|
|
-D gtk_doc=false
|
|
meson compile -C build
|
|
}
|
|
|
|
check() {
|
|
source static-compat-environment
|
|
meson test -C build --no-suite flaky --print-errorlogs || true
|
|
}
|
|
|
|
package() {
|
|
source static-compat-environment
|
|
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
|
|
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"
|
|
}
|
|
|
|
# vim:set sw=2 et:
|