summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2019-03-17 08:24:46 +0100
committer Matteo Bernardini2019-04-20 19:05:29 +0200
commit83a08a3dd9bd56598e3a8f1e35b39774117adf2a (patch)
treee99f5731fb69476b0b61dc88bcd98fadd7b2d590
parentfd5a9ea5097bc1dcbece1263d54364dde06a588f (diff)
downloadslackbuilds-perl-glib.tar.gz
perl/perl-glib: Fix for glib2 >= 2.59.0.perl-glib
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch42
-rw-r--r--perl/perl-glib/perl-glib.SlackBuild3
2 files changed, 45 insertions, 0 deletions
diff --git a/perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch b/perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch
new file mode 100644
index 0000000000..5b00a291cc
--- /dev/null
+++ b/perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch
@@ -0,0 +1,42 @@
+diff -up Glib-1.328/t/g.t.comment-linebreaks Glib-1.328/t/g.t
+--- Glib-1.328/t/g.t.comment-linebreaks 2012-01-06 01:26:40.000000000 -0500
++++ Glib-1.328/t/g.t 2019-01-04 14:35:05.796603043 -0500
+@@ -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');
+
diff --git a/perl/perl-glib/perl-glib.SlackBuild b/perl/perl-glib/perl-glib.SlackBuild
index 03c94d82cc..60327a2c5e 100644
--- a/perl/perl-glib/perl-glib.SlackBuild
+++ b/perl/perl-glib/perl-glib.SlackBuild
@@ -75,6 +75,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# https://gitlab.gnome.org/GNOME/perl-glib/merge_requests/1
+patch -p1 < $CWD/perl-Glib-1.328-glib2.59-comment-linebreaks.patch
+
perl Makefile.PL \
OPTIMIZE="$SLKCFLAGS" \
PREFIX=/usr \