summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dc87b53644fad84e98393ecd217b1814526d2eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: nightuser <nightuser.android at gmail dot com>

pkgname=glib2-static
pkgver=2.62.2
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=(zlib libffi shared-mime-info python libelf git util-linux meson dbus)
checkdepends=(desktop-file-utils dbus)
options=('!docs' '!libtool' '!emptydirs' '!strip' 'staticlibs')
_commit=ca9f51b82f57e05f6b3c82b98c235623afa47573  # tags/2.62.2^0
source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
        disable_utf8-pointer_test.patch)
sha256sums=(SKIP
            3142dc433504e0a7c6801c36bb2fd3e61bd294173bbfc401d2e88a47752fc30e)

pkgver() {
  cd glib
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd glib
  patch -Np1 -i "$srcdir"/disable_utf8-pointer_test.patch
}

build() {
  arch-meson glib _build \
    --default-library static \
    --buildtype release \
    -Dselinux=disabled \
    -Dman=false \
    -Dgtk_doc=false \
    -Dinternal_pcre=false
  ninja -C _build
}

check() {
  # meson test -C build
  meson test -C _build --no-suite flaky --timeout-multiplier 2 --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C _build

  # Only install static library
  rm -rf "$pkgdir"/usr/{bin,include,share,lib/glib-2.0,lib/pkgconfig}
}