diff options
-rw-r--r-- | community/gitg/APKBUILD | 11 | ||||
-rw-r--r-- | community/gitg/Fix-libgitg-date-test-package-failure.patch | 58 |
2 files changed, 65 insertions, 4 deletions
diff --git a/community/gitg/APKBUILD b/community/gitg/APKBUILD index eeca1e2aafd..14a5e9a4e25 100644 --- a/community/gitg/APKBUILD +++ b/community/gitg/APKBUILD @@ -2,12 +2,11 @@ # Maintainer: Rasmus Thomsen <oss@cogitri.dev> pkgname=gitg pkgver=3.32.1 -pkgrel=6 +pkgrel=7 pkgdesc="gitg is the GNOME GUI client to view git repositories" url="https://wiki.gnome.org/Apps/Gitg" # mips64 and riscv64 blocked by libpeas arch="all !mips64 !riscv64" -arch="" # test fails https://gitlab.alpinelinux.org/alpine/aports/-/issues/13122 license="GPL-2.0-or-later" depends="gsettings-desktop-schemas" makedepends="meson libsoup-dev libgee-dev glib-dev gobject-introspection-dev vala @@ -16,6 +15,7 @@ makedepends="meson libsoup-dev libgee-dev glib-dev gobject-introspection-dev val subpackages="$pkgname-doc $pkgname-lang" source="https://download.gnome.org/sources/gitg/${pkgver%.*}/gitg-$pkgver.tar.xz Allow-nullable-head-parameter-in-stash_if_needed.patch + Fix-libgitg-date-test-package-failure.patch " build() { @@ -31,5 +31,8 @@ package() { DESTDIR="$pkgdir" meson install --no-rebuild -C output } -sha512sums="243e630b3e5bb1919dc307e6b3fed1b1b0e3884d2a2507e4526b4af61e86f1cd7004a3dbb96001ffb0280cefe7cdb9b109c39996718913c7410224830c0145a4 gitg-3.32.1.tar.xz -99360bafd08c54470ed8f437ba9e49c2a08671e2ac0134c64ddc08c23e6217681b97c2d7408bfcdfacd6c1e8d02d60b2726bb313421ad8935fe1cbb5937aaba4 Allow-nullable-head-parameter-in-stash_if_needed.patch" +sha512sums=" +243e630b3e5bb1919dc307e6b3fed1b1b0e3884d2a2507e4526b4af61e86f1cd7004a3dbb96001ffb0280cefe7cdb9b109c39996718913c7410224830c0145a4 gitg-3.32.1.tar.xz +99360bafd08c54470ed8f437ba9e49c2a08671e2ac0134c64ddc08c23e6217681b97c2d7408bfcdfacd6c1e8d02d60b2726bb313421ad8935fe1cbb5937aaba4 Allow-nullable-head-parameter-in-stash_if_needed.patch +7d4ef43e3d473ff7f7e4b0a30c5e662748d5e7d950efaf32664821ec88855a13e8aa81630a65aa01a2bd5af37bc90f649a77293d0b7819ddc7e44378895e4ac4 Fix-libgitg-date-test-package-failure.patch +" diff --git a/community/gitg/Fix-libgitg-date-test-package-failure.patch b/community/gitg/Fix-libgitg-date-test-package-failure.patch new file mode 100644 index 00000000000..b75952c66f2 --- /dev/null +++ b/community/gitg/Fix-libgitg-date-test-package-failure.patch @@ -0,0 +1,58 @@ +From b9f102c760adaee8185567007bcbe3b6604754f2 Mon Sep 17 00:00:00 2001 +From: Mahmoud Khalil <mahmoudkhalil11@gmail.com> +Date: Sun, 31 Oct 2021 22:37:11 +0200 +Subject: [PATCH] fix libgitg-date test package failure + +This commit fixes libgitg-date test package failure by checking on the +values returned from the GLib.MatchInfo.fetch_named method if they +were empty strings as well. According to the documentation here: +https://docs.gtk.org/glib/method.MatchInfo.fetch_named.html +the values returned from this method can be NULL values as well as +empty strings +--- + libgitg/gitg-date.vala | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libgitg/gitg-date.vala b/libgitg/gitg-date.vala +index 9e4e8010..efdb4fc7 100644 +--- a/libgitg/gitg-date.vala ++++ b/libgitg/gitg-date.vala +@@ -140,7 +140,7 @@ public class Date : Object, Initable + { + string? val = info.fetch_named(name); + +- if (val == null) ++ if (val == null || val == "") + { + return false; + } +@@ -169,7 +169,7 @@ public class Date : Object, Initable + + string? tzs = info.fetch_named("tz"); + +- if (tzs != null) ++ if (tzs != null && tzs != "") + { + var ret = new DateTime.from_unix_utc(unixt); + return ret.to_timezone(new TimeZone(tzs)); +@@ -200,7 +200,7 @@ public class Date : Object, Initable + + string? tzs = info.fetch_named("tz"); + +- if (tzs != null) ++ if (tzs != null && tzs != "") + { + tz = new TimeZone(tzs); + } +@@ -247,7 +247,7 @@ public class Date : Object, Initable + + string? tzs = info.fetch_named("tz"); + +- if (tzs != null) ++ if (tzs != null && tzs != "") + { + tz = new TimeZone(tzs); + } +-- +GitLab + |