aboutsummaryrefslogtreecommitdiffstats
path: root/main/glib/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/glib/APKBUILD')
-rw-r--r--main/glib/APKBUILD126
1 files changed, 101 insertions, 25 deletions
diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
index 4a83d6290a5..babe4c69254 100644
--- a/main/glib/APKBUILD
+++ b/main/glib/APKBUILD
@@ -1,25 +1,57 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
-# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Pablo Correa Gómez <ablocorrea@hotmail.com>
pkgname=glib
-pkgver=2.72.2
-pkgrel=0
+pkgver=2.80.0
+_gi_version=1.80.1
+pkgrel=3
pkgdesc="Common C routines used by Gtk+ and other libs"
url="https://developer.gnome.org/glib/"
arch="all"
license="LGPL-2.1-or-later"
triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules:/usr/lib/gtk-4.0"
-depends_dev="python3 gettext-dev bzip2-dev libxml2-utils libxslt
- docbook-xml docbook-xsl"
-makedepends="$depends_dev pcre-dev meson zlib-dev libffi-dev util-linux-dev"
-options="!check" # don't like to be run without first being installed
+depends_dev="
+ bzip2-dev
+ docbook-xml
+ docbook-xsl
+ gettext-dev
+ libxml2-utils
+ libxslt
+ python3
+ py3-packaging
+ "
+makedepends="$depends_dev
+ bison
+ flex
+ libffi-dev
+ meson
+ pcre2-dev
+ py3-setuptools
+ python3-dev
+ util-linux-dev
+ zlib-dev
+ py3-docutils
+ "
+subpackages="
+ $pkgname-dbg
+ $pkgname-doc
+ $pkgname-static
+ $pkgname-dev
+ $pkgname-lang
+ $pkgname-bash-completion
+ "
source="https://download.gnome.org/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
- 0001-gquark-fix-initialization-with-c-constructors.patch
+ https://download.gnome.org/sources/gobject-introspection/${_gi_version%.*}/gobject-introspection-$_gi_version.tar.xz
+ alwaysbash.patch
deprecated-no-warn.patch
- musl-libintl.patch
+ tests-machine-id.patch
+ fix-tests.patch
+ flaky-tests.patch
"
-subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang"
+
+# 2.80 moves gir here
+replaces="gobject-introspection<1.80.0"
# secfixes:
# 2.66.6-r0:
@@ -30,15 +62,56 @@ subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lan
# - CVE-2019-12450
build() {
- abuild-meson \
+ export CFLAGS="$CFLAGS -ffat-lto-objects -O2"
+ export CXXFLAGS="$CXXFLAGS -O2"
+ export CPPFLAGS="$CPPFLAGS -O2"
+ local _prefix="$PWD/boostrap-glib"
+
+ msg "build bootstrap glib"
+ meson setup \
+ --default-library=shared \
+ --prefix="$_prefix" \
+ -Dman-pages=disabled \
+ -Dlibmount=disabled \
+ -Dtests=false \
+ -Dintrospection=disabled \
+ -Dnls=disabled \
+ . output
+ meson compile -C output
+ meson install --no-rebuild -C output
+
+ msg "build bootstrap gobject-introspection"
+ meson setup \
+ --pkg-config-path="$_prefix"/lib/pkgconfig \
+ --prefix="$_prefix" \
+ -Dbuild_introspection_data=false \
+ -Dcairo=disabled \
+ -Ddoctool=disabled \
+ "$srcdir"/gobject-introspection-$_gi_version \
+ gioutput
+ meson compile -C gioutput
+ meson install --no-rebuild -C gioutput
+
+ msg "re-build glib with introspection"
+ PATH="$_prefix/bin:$PATH" LD_LIBRARY_PATH="$_prefix/lib" \
+ meson setup \
+ --reconfigure \
+ --pkg-config-path="$_prefix"/lib/pkgconfig \
--default-library=both \
- -Dman=true \
+ --prefix=/usr \
+ -Dman-pages=enabled \
+ -Dlibmount=enabled \
+ -Dtests="$(want_check && echo true || echo false)" \
+ -Dintrospection=enabled \
+ -Dnls=enabled \
. output
- meson compile ${JOBS:+-j ${JOBS}} -C output
+ PATH="$_prefix/bin:$PATH" LD_LIBRARY_PATH="$_prefix/lib" \
+ meson compile -C output
+}
- # FIXME: meson adds -lintl first in Libs: in the .pc file but it needs to be
- # last for static builds (e.g. qemu)
- sed -i -e '/^Libs:/s/-lintl \(.*\)/\1 -lintl/' output/meson-private/glib-2.0.pc
+check() {
+ # riscv64 may time out increase the timeout
+ meson test --timeout-multiplier 2 --no-rebuild --print-errorlogs -C output
}
package() {
@@ -46,29 +119,32 @@ package() {
}
dev() {
+ # 2.80 moves gir here
+ replaces="gobject-introspection-dev<1.80.0"
default_dev
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share
- find "$pkgdir"/usr/bin ! -name "glib-compile-schemas" -a \( \
+ find "$pkgdir"/usr/bin ! -name "glib-compile-schemas" -a \( \
-name "gdbus-codegen" -o \
-name "gobject-query" -o \
-name "gresource" -o \
-name "gtester*" -o \
-name "glib-*" \) \
-exec mv {} "$subpkgdir"/usr/bin \;
- mv "$pkgdir"/usr/share/gdb "$pkgdir"/usr/share/glib-2.0 \
- "$subpkgdir"/usr/share
+
+ amove usr/share/gdb usr/share/glib-2.0
}
static() {
- pkgdesc="glib static libraries"
+ default_static
depends="gettext-static"
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
sha512sums="
-9a1121be1d5b1de50fb732d55298a8deb6e6e7fe02e06ab18fdfbc51a0f0d77c13c5faf29a227b5746b0f8c1c0502fc79c36cef2b7a62c4701b9deffe5887e69 glib-2.72.2.tar.xz
-32e5aca9a315fb985fafa0b4355e4498c1f877fc1f0b58ad4ac261fb9fbced9f026c7756a5f2af7d61ce756b55c8cd02811bb08df397040e93510056f073756b 0001-gquark-fix-initialization-with-c-constructors.patch
+1514d62aeb4c4a1a1048ae0f84f7db7f0dbf355772b2dadf6a34ec547045b163a5e28331b096e7616fe3c9c19bed98025a0202b05073f5d7ee901d0efaffe143 glib-2.80.0.tar.xz
+f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a gobject-introspection-1.80.1.tar.xz
+41d23f0797cae11d017f9e9492173f1f68125d99c28416ff2482e3eb81460a9c33cecc2bee806dad1d1da19800d0a90ae43d9a44f5e2864c2cd7c8a704669eb3 alwaysbash.patch
744239ea2afb47e15d5d0214c37d7c798edac53797ca3ac14d515aee4cc3999ef9716ba744c64c40198fb259edc922559f77c9051104a568fc8ee4fc790810b1 deprecated-no-warn.patch
-8177d33932b86b25fe3a3d500641f02a338d43d006bedc65bc7f84af15d5f1bebd6301183174586bdeb8e8ae923f5727dc246ae9bb52aa694d75206117071c2d musl-libintl.patch
+4f561bfede4a559b314195aa4b7b5923a52c62063e6dd33b4933ad53b29c32ef789d69b9f7b17d8d701323006366e6b7acbb083a68674c1c535c185d35cc5d1f tests-machine-id.patch
+f04c66eb04b709df16fbc24e51a6bb11f06dc1658c55295f7c8203dd091bc5ca99acd224c760b467b04e102d98987b585e828ad80125c08e407b399e9651ea3a fix-tests.patch
+268cf6f089274f29285242f1e29bf5650e85f9fcb5744df884deb139493cc25792ad78487113732665f1c5393c94b2f76f97093a1a003e3caaf65c07960a1bf9 flaky-tests.patch
"