Accepting request 886651 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/886651
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/giflib?expand=0&rev=40
This commit is contained in:
Dominique Leuenberger 2021-04-22 16:03:25 +00:00 committed by Git OBS Bridge
commit ae624cc4ff
3 changed files with 39 additions and 3 deletions

21
PIE.patch Normal file
View File

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

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
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 <fstrba@suse.com>
- Added patch:
* PIE.patch
+ build path independent objects
-------------------------------------------------------------------
Fri Jul 10 21:23:35 UTC 2020 - Matthias Eliasson <elimat@opensuse.org>

View File

@ -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,9 @@ 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
%build
for file in `find util -name "*.c"`; do
touch -r $file $file.stamp
done
@ -69,7 +72,6 @@ for file in `find util -name "*.c"`; do
rm -v $file.stamp
done
%build
export CFLAGS="%optflags"
make %{?_smp_mflags}