summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <jchelmert3@posteo.net>2020-06-24 15:39:38 -0500
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-07-04 17:25:02 +0300
commit67e090339cb570cde380194dbc8b68089d9de311 (patch)
treecd8e03f68ecf67a528405a5b890d1d4203471752 /media-gfx/jhead/files
parentsci-mathematics/mathematica: remove Windows/MacOS-specific files (diff)
downloadgentoo-67e090339cb570cde380194dbc8b68089d9de311.tar.gz
gentoo-67e090339cb570cde380194dbc8b68089d9de311.tar.bz2
gentoo-67e090339cb570cde380194dbc8b68089d9de311.zip
media-gfx/jhead: Security bump to 3.04
EAPI bumped, src_prepare refactored away, added PATCHES array instead with a patch that includes the effects of the previous patch. This patch also includes adding Makefile functionality to create a shared library that was removed upstream since the last version we have. Bug: https://bugs.gentoo.org/701826 Bug: https://bugs.gentoo.org/711220 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: John Helmert III <jchelmert3@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/16406 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'media-gfx/jhead/files')
-rw-r--r--media-gfx/jhead/files/jhead-3.04-mkstemp-fix-makefile.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/media-gfx/jhead/files/jhead-3.04-mkstemp-fix-makefile.patch b/media-gfx/jhead/files/jhead-3.04-mkstemp-fix-makefile.patch
new file mode 100644
index 000000000000..0bb634b6f5b9
--- /dev/null
+++ b/media-gfx/jhead/files/jhead-3.04-mkstemp-fix-makefile.patch
@@ -0,0 +1,53 @@
+diff --git a/jhead.c b/jhead.c
+index f78127a..d8d1472 100644
+--- a/jhead.c
++++ b/jhead.c
+@@ -376,7 +376,7 @@ static void DoCommand(const char * FileName, int ShowIt)
+ // as mktemp - that is, that between getting the random name, and making the file
+ // some other program could snatch that exact same name!
+ // also, not all platforms support mkstemp.
+- mktemp(TempName);
++ mkstemp(TempName);
+
+
+ if(!TempName[0]) {
+diff --git a/makefile b/makefile
+index f8f195e..c36d34f 100644
+--- a/makefile
++++ b/makefile
+@@ -3,17 +3,20 @@
+ #--------------------------------
+ OBJ=.
+ SRC=.
+-CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+-CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+-LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
++LFLAGS = -fPIC -shared -Wl,-soname,libjhead.so.1
+
+-all: jhead
++TARGET = libjhead.so.1.0.0
++TARGET0 = libjhead.so
++TARGET1 = libjhead.so.1
++TARGET2 = libjhead.so.1.0
++
++all: jhead $(TARGET)
+
+ objs = $(OBJ)/jhead.o $(OBJ)/jpgfile.o $(OBJ)/jpgqguess.o $(OBJ)/paths.o \
+ $(OBJ)/exif.o $(OBJ)/iptc.o $(OBJ)/gpsinfo.o $(OBJ)/makernote.o
+
+ $(OBJ)/%.o:$(SRC)/%.c
+- ${CC} $(CFLAGS) $(CPPFLAGS) -c $< -o $@
++ ${CC} -fPIC $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ jhead: $(objs) jhead.h
+ ${CC} $(LDFLAGS) -o jhead $(objs) -lm
+@@ -23,3 +26,9 @@ clean:
+
+ install:
+ cp jhead ${DESTDIR}/usr/bin/
++
++$(TARGET): $(objs) jhead
++ ${CC} $(LDFLAGS) $(LFLAGS) -o $(TARGET) $(objs)
++ ln -s ${TARGET} ${TARGET0}
++ ln -s ${TARGET} ${TARGET1}
++ ln -s ${TARGET} ${TARGET2}