From 4df43f7333c99d7ae364de63920401df2aa9a5b1592f0df9e920ebe75c3b3dc2 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 14 Apr 2021 11:26:01 +0000 Subject: [PATCH 1/3] Accepting request 885313 from home:wfrisch:branches:devel:libraries:c_c++ Enable Position Independent Code and inherit CFLAGS from the build system. FYI: The package fails to build on SLE_12_SP5 and I'm not sure why. OBS-URL: https://build.opensuse.org/request/show/885313 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/giflib?expand=0&rev=53 --- PIE.patch | 21 +++++++++++++++++++++ giflib.spec | 5 +++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 PIE.patch diff --git a/PIE.patch b/PIE.patch new file mode 100644 index 0000000..c5a1cc1 --- /dev/null +++ b/PIE.patch @@ -0,0 +1,21 @@ +Index: a/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ + # + OFLAGS = -O0 -g + OFLAGS = -O2 +-CFLAGS = -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS) ++CFLAGS += -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS) + + SHELL = /bin/sh + TAR = tar +@@ -64,6 +64,7 @@ LDLIBS=libgif.a -lm + all: libgif.so libgif.a libutil.so libutil.a $(UTILS) + $(MAKE) -C doc + ++$(UTILS):: LDFLAGS += -pie + $(UTILS):: libgif.a libutil.a + + libgif.so: $(OBJECTS) $(HEADERS) diff --git a/giflib.spec b/giflib.spec index c7b79b0..24f8a63 100644 --- a/giflib.spec +++ b/giflib.spec @@ -1,7 +1,7 @@ # # spec file for package giflib # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,7 @@ License: MIT URL: http://giflib.sf.net/ Source: http://downloads.sf.net/giflib/%{name}-%{version}.tar.gz Source2: baselibs.conf +Patch1: PIE.patch BuildRequires: libtool >= 2 %description @@ -55,7 +56,7 @@ This Library allows manipulating GIF Image files. Since the LZW patents have expired, giflib can again be used instead of libungif. %prep -%autosetup +%autosetup -p1 for file in `find util -name "*.c"`; do touch -r $file $file.stamp done From 73a467e84fcb3185f4908dce680b244e5d9ee3199d35c41134c689d1f4fe082b Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 14 Apr 2021 13:23:49 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/giflib?expand=0&rev=54 --- giflib.changes | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/giflib.changes b/giflib.changes index ddff6e3..d440a10 100644 --- a/giflib.changes +++ b/giflib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 14 11:32:49 UTC 2021 - Fridrich Strba + +- Added patch: + * PIE.patch + + build path independent objects + ------------------------------------------------------------------- Fri Jul 10 21:23:35 UTC 2020 - Matthias Eliasson From 2f1fcaa033fa93a9a0671ad08421af35b9bf3879b4b1e09aa8f276e34755a850 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 19 Apr 2021 11:17:01 +0000 Subject: [PATCH 3/3] Accepting request 886252 from home:olh:branches:devel:libraries:c_c++ - prep section should just extract and patch, further modifications have to be done in the build section OBS-URL: https://build.opensuse.org/request/show/886252 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/giflib?expand=0&rev=55 --- giflib.changes | 6 ++++++ giflib.spec | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/giflib.changes b/giflib.changes index d440a10..d461e8a 100644 --- a/giflib.changes +++ b/giflib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 15 15:15:15 UTC 2021 - olaf@aepfle.de + +- prep section should just extract and patch, + further modifications have to be done in the build section + ------------------------------------------------------------------- Wed Apr 14 11:32:49 UTC 2021 - Fridrich Strba diff --git a/giflib.spec b/giflib.spec index 24f8a63..2ac0016 100644 --- a/giflib.spec +++ b/giflib.spec @@ -57,6 +57,8 @@ have expired, giflib can again be used instead of libungif. %prep %autosetup -p1 + +%build for file in `find util -name "*.c"`; do touch -r $file $file.stamp done @@ -70,7 +72,6 @@ for file in `find util -name "*.c"`; do rm -v $file.stamp done -%build export CFLAGS="%optflags" make %{?_smp_mflags}