jobcore/glib2/PKGBUILD-arch

132 lines
3.1 KiB
Plaintext
Raw Normal View History

2022-03-20 13:19:37 +01:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgbase=glib2
pkgname=(glib2 glib2-docs)
2023-03-11 20:41:39 +01:00
pkgver=2.76.0
pkgrel=2
2022-03-20 13:19:37 +01:00
pkgdesc="Low level core library"
url="https://wiki.gnome.org/Projects/GLib"
license=(LGPL)
arch=(x86_64)
2022-11-26 02:57:14 +01:00
depends=(
libffi
libsysprof-capture
pcre2
util-linux-libs
zlib
)
makedepends=(
dbus
gettext
git
gtk-doc
libelf
meson
python
shared-mime-info
util-linux
)
checkdepends=(
desktop-file-utils
glib2
)
options=(
debug
staticlibs
)
2023-03-11 20:41:39 +01:00
_commit=8a9ada663923e39c0e8d7eefe65390955dc3c0d8 # tags/2.76.0^0
2022-11-26 02:57:14 +01:00
source=(
"git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
2022-12-22 23:04:50 +01:00
"git+https://gitlab.gnome.org/GNOME/gvdb.git"
2022-11-26 02:57:14 +01:00
0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
gio-querymodules.hook
2022-11-26 02:57:14 +01:00
glib-compile-schemas.hook
)
b2sums=('SKIP'
2022-12-22 23:04:50 +01:00
'SKIP'
2023-03-11 20:41:39 +01:00
'bd7f881ae6054c363783bf45b1add5eef5e8347554e23b9fece526701469d07cdcb9871fa73dee473796a219e8aa513796a96da769949097ea207db038578d07'
'14c9211c0557f6d8d9a914f1b18b7e0e23f79f4abde117cb03ab119b95bf9fa9d7a712aa0a29beb266468aeb352caa3a9e4540503cfc9fe0bbaf764371832a96'
2022-11-26 02:57:14 +01:00
'd30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858')
2022-05-31 21:24:46 +02:00
pkgver() {
cd glib
git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}
2022-03-20 13:19:37 +01:00
prepare() {
cd glib
# Suppress noise from glib-compile-schemas.hook
git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
2022-12-22 23:04:50 +01:00
git submodule init
git submodule set-url subprojects/gvdb "$srcdir/gvdb"
git -c protocol.file.allow=always submodule update
2022-03-20 13:19:37 +01:00
}
build() {
local meson_options=(
--default-library both
-D glib_debug=disabled
-D gtk_doc=true
-D man=true
-D selinux=disabled
-D sysprof=enabled
)
2022-05-31 21:24:46 +02:00
# Produce more debug info: GLib has a lot of useful macros
CFLAGS+=" -g3"
CXXFLAGS+=" -g3"
2022-09-03 14:12:06 +02:00
# use fat LTO objects for static libraries
CFLAGS+=" -ffat-lto-objects"
CXXFLAGS+=" -ffat-lto-objects"
arch-meson glib build "${meson_options[@]}"
2022-03-20 13:19:37 +01:00
meson compile -C build
}
check() {
meson test -C build --no-suite flaky --no-suite slow --print-errorlogs
}
package_glib2() {
2022-11-26 02:57:14 +01:00
depends+=(
libffi.so
libmount.so
)
provides+=(libg{lib,io,module,object,thread}-2.0.so)
optdepends=(
'gvfs: most gio functionality'
'libelf: gresource inspection tool'
'python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
)
2022-03-20 13:19:37 +01:00
meson install -C build --destdir "$pkgdir"
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
touch "$pkgdir/usr/lib/gio/modules/.keep"
2022-03-20 13:19:37 +01:00
python -m compileall -d /usr/share/glib-2.0/codegen \
"$pkgdir/usr/share/glib-2.0/codegen"
python -O -m compileall -d /usr/share/glib-2.0/codegen \
"$pkgdir/usr/share/glib-2.0/codegen"
# Split docs
mkdir -p docs/usr/share
mv {"$pkgdir",docs}/usr/share/gtk-doc
}
package_glib2-docs() {
pkgdesc+=" - documentation"
2022-03-20 13:19:37 +01:00
depends=()
license+=(custom)
mv -t "$pkgdir" docs/*
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 glib/docs/reference/COPYING
}
2022-09-26 01:58:10 +02:00
# vim:set sw=2 sts=-1 et: