Skip to content

Instantly share code, notes, and snippets.

@greyltc
Created February 3, 2019 10:27
Show Gist options
  • Save greyltc/c379a37366454ae6f6732fb23a80194b to your computer and use it in GitHub Desktop.
Save greyltc/c379a37366454ae6f6732fb23a80194b to your computer and use it in GitHub Desktop.
glib2-static
pkgname=glib2-static
pkgver=2.59.1
pkgrel=1
pkgdesc="Low level core library. Static library."
url="https://wiki.gnome.org/Projects/GLib"
license=(LGPL2.1)
arch=(x86_64)
depends=(pcre libffi)
makedepends=(libffi zlib shared-mime-info python libelf git util-linux meson dbus libxslt docbook-xsl)
checkdepends=(desktop-file-utils dbus)
optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
'libelf: gresource inspection tool')
options=('!docs' '!libtool' '!emptydirs' '!strip' 'staticlibs')
source=("https://github.com/GNOME/glib/archive/${pkgver}.tar.gz"
noisy-glib-compile-schemas.diff
fix-static-build-589.diff)
sha256sums=('42d624d1e24cfb173002adfed48c123f5541cb86c4624a3f03500c7026a3f1cd'
'81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531'
'f4790fc845f2b4811ce5df5ef3a7dfcc23a1593ec4e19ae9173bb799a045d00f')
prepare() {
cd "glib-${pkgver}"
# Suppress noise from glib-compile-schemas.hook
patch -Np1 -i ../noisy-glib-compile-schemas.diff
patch -Np1 -i ../fix-static-build-589.diff
}
build() {
arch-meson "glib-${pkgver}" build \
--default-library static \
-D selinux=disabled \
-D man=true \
-D gtk_doc=false \
-Dinternal_pcre=false \
-Dfam=false
ninja -C build
}
check() {
meson test -C build
}
package() {
DESTDIR="$pkgdir" meson install -C build
# Only install static library
rm -rf "$pkgdir/usr/"{bin,include,share,lib/glib-2.0,lib/pkgconfig} $pkgdir/usr/lib/*.so*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment