From 8b90430caa85f9fbf54d700f905ed0b05a5537e188073d3771d3aab970ba7448 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Fri, 15 Mar 2019 11:24:43 +0000 Subject: [PATCH] Accepting request 685329 from home:iznogood:branches:devel:languages:perl - Add perl-Glib-1.328-glib2.59-comment-linebreaks.patch: Fix build with new glib2. Patch from fedora. OBS-URL: https://build.opensuse.org/request/show/685329 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Glib?expand=0&rev=58 --- ...ib-1.328-glib2.59-comment-linebreaks.patch | 41 +++++++++++++++++++ perl-Glib.changes | 6 +++ perl-Glib.spec | 2 + 3 files changed, 49 insertions(+) create mode 100644 perl-Glib-1.328-glib2.59-comment-linebreaks.patch diff --git a/perl-Glib-1.328-glib2.59-comment-linebreaks.patch b/perl-Glib-1.328-glib2.59-comment-linebreaks.patch new file mode 100644 index 0000000..f8a80f2 --- /dev/null +++ b/perl-Glib-1.328-glib2.59-comment-linebreaks.patch @@ -0,0 +1,41 @@ +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-Glib.changes b/perl-Glib.changes index 761ebf3..4a230f6 100644 --- a/perl-Glib.changes +++ b/perl-Glib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 15 11:20:02 UTC 2019 - Bjørn Lie + +- Add perl-Glib-1.328-glib2.59-comment-linebreaks.patch: Fix build + with new glib2. Patch from fedora. + ------------------------------------------------------------------- Mon Oct 8 11:57:27 UTC 2018 - Dirk Stoecker diff --git a/perl-Glib.spec b/perl-Glib.spec index 2118033..01e2b5b 100644 --- a/perl-Glib.spec +++ b/perl-Glib.spec @@ -26,6 +26,7 @@ Group: Development/Libraries/Perl Url: https://metacpan.org/pod/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/X/XA/XAOC/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml +Patch0: perl-Glib-1.328-glib2.59-comment-linebreaks.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: glib2-devel >= 2.0.0 BuildRequires: perl @@ -47,6 +48,7 @@ sorts of good information. %prep %setup -q -n %{cpan_name}-%{version} +%patch0 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"