Date: Saturday, May 25, 2019 @ 09:28:50 Author: foutrelis Revision: 354109
Fix test failure with recent glib2 Also prepare bump to latest version. Added: glib-perl/trunk/glib2.59-comment-linebreaks.patch Modified: glib-perl/trunk/PKGBUILD -----------------------------------+ PKGBUILD | 17 ++++++++-- glib2.59-comment-linebreaks.patch | 56 ++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-05-25 09:28:37 UTC (rev 354108) +++ PKGBUILD 2019-05-25 09:28:50 UTC (rev 354109) @@ -2,8 +2,8 @@ # Contributor: Sarah Hay <sa...@archlinux.org> pkgname=glib-perl -pkgver=1.328 -pkgrel=1 +pkgver=1.329 +pkgrel=0 pkgdesc="Perl wrappers for glib 2.x, including GObject" arch=(x86_64) license=('LGPL') @@ -11,9 +11,18 @@ options=('!emptydirs') depends=('glib2') makedepends=('perl-extutils-depends' 'perl-extutils-pkgconfig') -source=(https://downloads.sourceforge.net/sourceforge/gtk2-perl/Glib-${pkgver}.tar.gz) -sha256sums=('459cc2add7aaa90aa56675582a93989158ed38caa1e10628733ccc690e0464d5') +source=(https://downloads.sourceforge.net/sourceforge/gtk2-perl/Glib-${pkgver}.tar.gz + glib2.59-comment-linebreaks.patch) +sha256sums=('7b4ce1c8cf884849189efaa0b5722ecfb0d87a15f94fccc6a6017d3b3f982a35' + 'b816306015f9b1f32ec2191ebeaa5f5f92f2eea60829ffb638aa5dae9fb946ed') +prepare() { + cd Glib-$pkgver + + # https://gitlab.gnome.org/GNOME/perl-glib/merge_requests/1 + patch -Np1 -i ../glib2.59-comment-linebreaks.patch +} + build() { cd Glib-$pkgver PERL_USE_UNSAFE_INC=1 \ Added: glib2.59-comment-linebreaks.patch =================================================================== --- glib2.59-comment-linebreaks.patch (rev 0) +++ glib2.59-comment-linebreaks.patch 2019-05-25 09:28:50 UTC (rev 354109) @@ -0,0 +1,56 @@ +From 77ded02fbfe26d3025ae01c3b1afc1509ae49a10 Mon Sep 17 00:00:00 2001 +From: Tom Callaway <s...@fedoraproject.org> +Date: Fri, 4 Jan 2019 14:40:55 -0500 +Subject: [PATCH] fix t/g.t to deal with new comment parsing in glib2 2.59.0. + See: https://gitlab.gnome.org/GNOME/glib/merge_requests/432 + +--- + t/g.t | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/t/g.t b/t/g.t +index 2f851be..bc3df03 100644 +--- a/t/g.t ++++ b/t/g.t +@@ -84,7 +84,11 @@ SKIP: { + eq_array (\@bools, [FALSE, TRUE, FALSE]); + + ok ($key_file->has_group('locales')); +- is ($key_file->get_comment('locales', 'mystring'), "some string\n"); ++ if (Glib->CHECK_VERSION (2, 59, 0)) { ++ is ($key_file->get_comment('locales', 'mystring'), "some string"); ++ } else { ++ is ($key_file->get_comment('locales', 'mystring'), "some string\n"); ++ } + is ($key_file->get_string('locales', 'mystring'), 'Good morning'); + is ($key_file->get_locale_string('locales', 'mystring', 'it'), 'Buongiorno'); + +@@ -94,11 +98,21 @@ SKIP: { + $key_file->set_string_list('listsection', 'stringlist', 'one', 'two', 'three'); + $key_file->set_locale_string('locales', 'mystring', 'en', 'one'); + $key_file->set_comment('locales', 'mystring', 'comment'); +- is ($key_file->get_comment('locales', 'mystring'), "comment\n"); +- $key_file->set_comment('locales', undef, "another comment\n"); +- is ($key_file->get_comment('locales', undef), "#another comment\n#"); ++ if (Glib->CHECK_VERSION (2, 59, 0)) { ++ is ($key_file->get_comment('locales', 'mystring'), "comment"); ++ $key_file->set_comment('locales', undef, "another comment"); ++ is ($key_file->get_comment('locales', undef), "#another comment"); ++ } else { ++ is ($key_file->get_comment('locales', 'mystring'), "comment\n"); ++ $key_file->set_comment('locales', undef, "another comment\n"); ++ is ($key_file->get_comment('locales', undef), "#another comment\n#"); ++ } + $key_file->set_comment(undef, undef, 'one comment more'); +- is ($key_file->get_comment(undef, undef), "one comment more\n"); ++ if (Glib->CHECK_VERSION (2, 59, 0)) { ++ is ($key_file->get_comment(undef, undef), "one comment more"); ++ } else { ++ is ($key_file->get_comment(undef, undef), "one comment more\n"); ++ } + $key_file->set_boolean($start_group, 'boolkey', FALSE); + $key_file->set_value($start_group, 'boolkey', '0'); + +-- +2.21.0 +