summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolodymyr Zhdanov2019-08-22 18:25:51 +0300
committerVolodymyr Zhdanov2019-08-22 18:36:51 +0300
commita352a1a017efd7bd01fcad20ed50fca745c59cf5 (patch)
treed0579556422887d67072d9fdbe34f46e1a662d7d
downloadaur-a352a1a017efd7bd01fcad20ed50fca745c59cf5.tar.gz
Initial commit from glib2-clear
* based on archlinux glib2 PKGBUILD with Clear Linux patches and flags
-rw-r--r--.SRCINFO43
-rw-r--r--PKGBUILD95
-rw-r--r--gio-querymodules.hook11
-rw-r--r--glib-compile-schemas.hook12
-rw-r--r--noisy-glib-compile-schemas.diff24
5 files changed, 185 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b5351e6f12f7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,43 @@
+pkgbase = glib2-clear
+ pkgdesc = Low level core library
+ pkgver = 2.60.6
+ pkgrel = 1
+ url = https://wiki.gnome.org/Projects/GLib
+ arch = x86_64
+ license = LGPL2.1
+ checkdepends = desktop-file-utils
+ makedepends = gettext
+ makedepends = gtk-doc
+ makedepends = shared-mime-info
+ makedepends = python
+ makedepends = libelf
+ makedepends = git
+ makedepends = util-linux
+ makedepends = meson
+ makedepends = dbus
+ depends = pcre
+ depends = libffi
+ depends = libutil-linux
+ depends = zlib
+ optdepends = python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report
+ optdepends = libelf: gresource inspection tool
+ options = !emptydirs
+ source = git+https://github.com/GNOME/glib.git#commit=0a63daa96426715498b55318f68a67baee40c509
+ source = clearlinux::git+https://github.com/clearlinux-pkgs/glib.git#commit=c57f2dff8fa0f25043e4d2ce608a2abd57ee7860
+ source = noisy-glib-compile-schemas.diff
+ source = glib-compile-schemas.hook
+ source = gio-querymodules.hook
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531
+ sha256sums = e1123a5d85d2445faac33f6dae1085fdd620d83279a4e130a83fe38db52b62b3
+ sha256sums = 5ba204a2686304b1454d401a39a9d27d09dd25e4529664e3fd565be3d439f8b6
+
+pkgname = glib2-clear
+
+pkgname = glib2-docs-clear
+ pkgdesc = Documentation for GLib
+ license = custom
+ depends =
+ optdepends =
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e01134df3738
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,95 @@
+# Maintainer: Volodymyr Zhdanov <wight554@gmail.com>
+# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+pkgbase=glib2-clear
+_pkgname=glib2
+pkgname=(glib2-clear glib2-docs-clear)
+pkgver=2.60.6
+pkgrel=1
+pkgdesc="Low level core library"
+url="https://wiki.gnome.org/Projects/GLib"
+license=(LGPL2.1)
+arch=(x86_64)
+depends=(pcre libffi libutil-linux zlib)
+makedepends=(gettext gtk-doc shared-mime-info python libelf git util-linux meson dbus)
+checkdepends=(desktop-file-utils)
+optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
+ 'libelf: gresource inspection tool')
+conflicts=($_pkgname)
+provides=($_pkgname=$pkgver)
+options=(!emptydirs)
+_commit=0a63daa96426715498b55318f68a67baee40c509 # tags/2.60.6^0
+_clcommit=c57f2dff8fa0f25043e4d2ce608a2abd57ee7860 # tags/2.60.6-98^0
+source=("git+https://github.com/GNOME/glib.git#commit=$_commit"
+ "clearlinux::git+https://github.com/clearlinux-pkgs/glib.git#commit=$_clcommit"
+ noisy-glib-compile-schemas.diff
+ glib-compile-schemas.hook gio-querymodules.hook)
+sha256sums=('SKIP'
+ 'SKIP'
+ '81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531'
+ 'e1123a5d85d2445faac33f6dae1085fdd620d83279a4e130a83fe38db52b62b3'
+ '5ba204a2686304b1454d401a39a9d27d09dd25e4529664e3fd565be3d439f8b6')
+
+pkgver() {
+ cd glib
+ git describe --tags | sed 's/-/+/g'
+}
+
+prepare() {
+ cd glib
+
+ # Suppress noise from glib-compile-schemas.hook
+ patch -Np1 -i ../noisy-glib-compile-schemas.diff
+
+ # Add Clearlinux patches add-multilib-config.patch
+ for i in $(grep '^Patch' ${srcdir}/clearlinux/glib.spec | sed -n 's/.*: //p'); do
+ msg2 "Applying patch ${i}..."
+ patch -Np1 -i "$srcdir/clearlinux/${i}"
+ done
+}
+
+build() {
+ CFLAGS+=" -DG_DISABLE_CAST_CHECKS -O3 -falign-functions=32 -fcf-protection=full \
+ -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition \
+ -fno-trapping-math -fstack-protector-strong"
+ CXXFLAGS+=" -O3 -falign-functions=32 -fcf-protection=full \
+ -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition \
+ -fno-trapping-math -fstack-protector-strong"
+ arch-meson glib build \
+ -D selinux=disabled \
+ -D man=true \
+ -D gtk_doc=true
+ ninja -C build
+}
+
+check() {
+ meson test -C build --no-suite flaky --print-errorlogs
+}
+
+package_glib2-clear() {
+ DESTDIR="$pkgdir" meson install -C build
+ install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
+
+ 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
+ mv "$pkgdir/usr/share/gtk-doc" "$srcdir"
+}
+
+package_glib2-docs-clear() {
+ pkgdesc="Documentation for GLib"
+ depends=()
+ optdepends=()
+ provides=($_pkgname-docs)
+ conflicts=($_pkgname-docs)
+ license+=(custom)
+
+ mkdir -p "$pkgdir/usr/share"
+ mv gtk-doc "$pkgdir/usr/share"
+
+ install -Dt "$pkgdir/usr/share/licenses/glib2-docs" -m644 glib/docs/reference/COPYING
+}
+
+# vim:set sw=2 et:
diff --git a/gio-querymodules.hook b/gio-querymodules.hook
new file mode 100644
index 000000000000..193233398168
--- /dev/null
+++ b/gio-querymodules.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/gio/modules/*.so
+
+[Action]
+Description = Updating GIO module cache...
+When = PostTransaction
+Exec = /usr/bin/gio-querymodules /usr/lib/gio/modules
diff --git a/glib-compile-schemas.hook b/glib-compile-schemas.hook
new file mode 100644
index 000000000000..04dc59b1a638
--- /dev/null
+++ b/glib-compile-schemas.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/glib-2.0/schemas/*.gschema.xml
+Target = usr/share/glib-2.0/schemas/*.gschema.override
+
+[Action]
+Description = Compiling GSettings XML schema files...
+When = PostTransaction
+Exec = /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas
diff --git a/noisy-glib-compile-schemas.diff b/noisy-glib-compile-schemas.diff
new file mode 100644
index 000000000000..f5f2d9482229
--- /dev/null
+++ b/noisy-glib-compile-schemas.diff
@@ -0,0 +1,24 @@
+diff --git i/gio/glib-compile-schemas.c w/gio/glib-compile-schemas.c
+index b8de0907248f6860..130f89b1728f7932 100644
+--- i/gio/glib-compile-schemas.c
++++ w/gio/glib-compile-schemas.c
+@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state,
+ return;
+ }
+
+- if (path && (g_str_has_prefix (path, "/apps/") ||
+- g_str_has_prefix (path, "/desktop/") ||
+- g_str_has_prefix (path, "/system/")))
+- {
+- gchar *message = NULL;
+- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. "
+- "Paths starting with "
+- "“/apps/”, “/desktop/” or “/system/” are deprecated."),
+- id, path);
+- g_printerr ("%s\n", message);
+- g_free (message);
+- }
+-
+ state->schema_state = schema_state_new (path, gettext_domain,
+ extends, extends_name, list_of);
+