Accepting request 685330 from devel:languages:perl

OBS-URL: https://build.opensuse.org/request/show/685330
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Glib?expand=0&rev=53
This commit is contained in:
Dominique Leuenberger 2019-03-19 10:08:40 +00:00 committed by Git OBS Bridge
commit e149242def
3 changed files with 49 additions and 0 deletions

View File

@ -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');

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 15 11:20:02 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- 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 <opensuse@dstoecker.de> Mon Oct 8 11:57:27 UTC 2018 - Dirk Stoecker <opensuse@dstoecker.de>

View File

@ -26,6 +26,7 @@ Group: Development/Libraries/Perl
Url: https://metacpan.org/pod/%{cpan_name} Url: https://metacpan.org/pod/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/X/XA/XAOC/%{cpan_name}-%{version}.tar.gz Source0: https://cpan.metacpan.org/authors/id/X/XA/XAOC/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml Source1: cpanspec.yml
Patch0: perl-Glib-1.328-glib2.59-comment-linebreaks.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: glib2-devel >= 2.0.0 BuildRequires: glib2-devel >= 2.0.0
BuildRequires: perl BuildRequires: perl
@ -47,6 +48,7 @@ sorts of good information.
%prep %prep
%setup -q -n %{cpan_name}-%{version} %setup -q -n %{cpan_name}-%{version}
%patch0 -p1
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"