diff options
author | Ilya Basin | 2018-03-27 17:31:19 +0300 |
---|---|---|
committer | Ilya Basin | 2018-03-27 17:31:19 +0300 |
commit | 5cac35560d8082d286b42683e3885644e27fc1d8 (patch) | |
tree | 689aa613187153d83ccdfdb5ece7a0f3516eabec | |
download | aur-5cac35560d8082d286b42683e3885644e27fc1d8.tar.gz |
root
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 124 | ||||
-rw-r--r-- | gio-querymodules.hook | 11 | ||||
-rw-r--r-- | glib-compile-schemas.hook | 12 | ||||
-rw-r--r-- | noisy-glib-compile-schemas.diff | 24 |
5 files changed, 206 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b61fc613b226 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +# Generated by mksrcinfo v8 +# Tue Mar 27 14:31:14 UTC 2018 +pkgbase = aarch64-linux-gnu-glib2 + pkgdesc = Low level core library + pkgver = 2.56.0+7+g66948ae + pkgrel = 1 + url = https://wiki.gnome.org/Projects/GLib + arch = any + license = LGPL2.1 + makedepends = gettext + makedepends = gtk-doc + makedepends = shared-mime-info + makedepends = python + makedepends = libelf + makedepends = git + makedepends = dbus + makedepends = aarch64-linux-gnu-util-linux + makedepends = aarch64-linux-gnu-pkg-config + depends = aarch64-linux-gnu-pcre + depends = aarch64-linux-gnu-libutil-linux + depends = zlib-aarch64 + optdepends = python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report + optdepends = libelf: gresource inspection tool + options = !emptydirs + source = git+https://gitlab.gnome.org/GNOME/glib.git#commit=66948ae231f75a548c8a2eb7b3a9d64cfd728b8e + source = noisy-glib-compile-schemas.diff + source = glib-compile-schemas.hook + source = gio-querymodules.hook + sha256sums = SKIP + sha256sums = 81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531 + sha256sums = e1123a5d85d2445faac33f6dae1085fdd620d83279a4e130a83fe38db52b62b3 + sha256sums = 5ba204a2686304b1454d401a39a9d27d09dd25e4529664e3fd565be3d439f8b6 + +pkgname = aarch64-linux-gnu-glib2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6def0c2aadc1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,124 @@ +# $Id$ + +_target=aarch64-linux-gnu +_pkgbase=glib2 +pkgbase=${_target}-glib2 +pkgname=(${_target}-glib2 +#${_target}-glib2-docs +) +pkgver=2.56.0+7+g66948ae +pkgrel=1 +pkgdesc="Low level core library" +url="https://wiki.gnome.org/Projects/GLib" +license=(LGPL2.1) +arch=('any') +depends=(${_target}-pcre +#libffi +${_target}-libutil-linux +zlib-aarch64 +) +makedepends=(gettext gtk-doc shared-mime-info python libelf git dbus +${_target}-util-linux # for pkgconfig/*.pc +${_target}-pkg-config +) +optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report' + 'libelf: gresource inspection tool') +options=(!emptydirs) +_commit=66948ae231f75a548c8a2eb7b3a9d64cfd728b8e # glib-2-56 +source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit" + noisy-glib-compile-schemas.diff + glib-compile-schemas.hook gio-querymodules.hook) +sha256sums=('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 + + NOCONFIGURE=1 ./autogen.sh +} + +build() { + local debug=minimum + check_option debug n && debug=yes + + cd glib + unset CFLAGS CXXFLAGS +if true; then + glib_cv_stack_grows=no \ + glib_cv_uscore=no \ + glib_cv_compliant_posix_memalign=1 \ + ./configure \ + --host=${_target} \ + --prefix=/usr/${_target} \ + --libdir=/usr/${_target}/lib \ + --sysconfdir=/etc \ + --with-pcre=system \ + --enable-debug=$debug \ + --disable-fam + +# --enable-gtk-doc \ + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool +fi + make +} + +strip() { + ${_target}-strip "$@" +} + +objcopy() { + ${_target}-objcopy "$@" +} + +check() { + local s readelfarch + readelfarch='AArch64' + cd glib + + s=$(find . -type f "(" -name "*.so*" -o -name "*.a" ")" -print0 | \ + 2>/dev/null LC_ALL=C xargs -0 readelf -h | \ + sed -n -e '/File:/h;/Machine:/{/'"$readelfarch"'/!{H;x;p}}' | head -10) + + if [ -n "$s" ]; then + >&2 echo "some binaries have wrong architecture:" + >&2 echo "$s" + return 1 + fi +} + +package_glib2() { + cd glib + make DESTDIR="$pkgdir" install + #mv "$pkgdir/usr/share/gtk-doc" "$srcdir" + + install -Dt "$pkgdir/usr/${_target}/share/libalpm/hooks" -m644 ../*.hook + + # delete all executables + rm -rf "$pkgdir/usr/${_target}/bin" +} + +package_glib2-docs() { + pkgdesc="Documentation for GLib" + depends=() + optdepends=() + 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 +} + +for p in "${pkgname[@]}"; do + eval "package_${p}() { package_${p/${_target}-/} "'"$@"'"; }" +done 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); + |