diff --git a/0001-Adapt-tests-to-glib-2.66.patch b/0001-Adapt-tests-to-glib-2.66.patch new file mode 100644 index 0000000000000000000000000000000000000000..79b7a91d9f3b442a3a29be1bf2a3d5845788edc4 --- /dev/null +++ b/0001-Adapt-tests-to-glib-2.66.patch @@ -0,0 +1,29 @@ +From 178de3ef611d49beff0741c165607b9643d74f67 Mon Sep 17 00:00:00 2001 +From: cuiyudong123 +Date: Mon, 27 May 2024 14:12:54 +0800 +Subject: [PATCH] Adapt-tests-to-glib-2.66 + +--- + t/g.t | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/t/g.t b/t/g.t +index 4c7cd2c..2239a71 100644 +--- a/t/g.t ++++ b/t/g.t +@@ -96,7 +96,11 @@ SKIP: { + $key_file->set_comment('locales', 'mystring', 'comment'); + like ($key_file->get_comment('locales', 'mystring'), qr/^comment$/); + $key_file->set_comment('locales', undef, "another comment\n"); +- is ($key_file->get_comment('locales', undef), "#another comment\n#"); ++ is ($key_file->get_comment('locales', undef), ++ Glib::major_version > 2 || ++ (Glib::major_version == 2 && Glib::minor_version >= 66) ? ++ "another comment\n" : "#another comment\n#" ++ ); + $key_file->set_comment(undef, undef, 'one comment more'); + like ($key_file->get_comment(undef, undef), qr/^one comment more$/); + $key_file->set_boolean($start_group, 'boolkey', FALSE); +-- +2.27.0 + diff --git a/perl-Glib.spec b/perl-Glib.spec index 5947bef457520b5c089787a670a6a5bac11855c9..f545d8a45ad6b6381f53cc0e226aeb1bfce8ef12 100755 --- a/perl-Glib.spec +++ b/perl-Glib.spec @@ -1,12 +1,13 @@ %global _empty_manifest_terminate_build 0 Name: perl-Glib Version: 1.3293 -Release: 4 +Release: 5 Summary: Perl wrappers for the GLib utility and Object libraries License: LGPL-2.1 Group: Development/Libraries URL: http://search.cpan.org/dist/Glib/ Source0: http://www.cpan.org/authors/id/X/XA/XAOC/Glib-%{version}.tar.gz +Patch0: 0001-Adapt-tests-to-glib-2.66.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glib2-devel perl-devel BuildRequires: gcc @@ -36,6 +37,7 @@ GObject-based libraries. The "SEE ALSO" section contains pointers to all sorts of good information. %prep %setup -q -n Glib-%{version} +%patch -P0 -p1 -b .commentfix %build export PERL_MM_OPT="" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" @@ -84,6 +86,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/* %changelog +* Mon May 27 2024 cuiyudong 1.3293-5 +- backport: fix issue with comment check and glib 2.77+ + * Fri Apr 14 2023 yangxianzhao 1.3293-4 - Add yaml