[gentoo-commits] repo/gentoo:master commit in: media-gfx/jhead/files/, media-gfx/jhead/

2024-05-01 Thread Andreas K. Hüttel
commit: e1a59a083d1232dcfaf429929cee44049efb9771
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Wed May  1 10:08:04 2024 +
Commit: Andreas K. Hüttel  gentoo  org>
CommitDate: Wed May  1 10:08:32 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1a59a08

media-gfx/jhead: drop 3.06.0.1-r1

Bug: https://bugs.gentoo.org/908519
Signed-off-by: Andreas K. Hüttel  gentoo.org>

 media-gfx/jhead/Manifest   |   1 -
 .../files/jhead-3.06.0.1-CVE-2021-34055.patch  | 108 -
 .../jhead-3.06.0.1-mkstemp-fix-makefile.patch  |  52 --
 media-gfx/jhead/jhead-3.06.0.1-r1.ebuild   |  27 --
 4 files changed, 188 deletions(-)

diff --git a/media-gfx/jhead/Manifest b/media-gfx/jhead/Manifest
index d2f781c90eac..6a884cfb9bdd 100644
--- a/media-gfx/jhead/Manifest
+++ b/media-gfx/jhead/Manifest
@@ -1,2 +1 @@
-DIST jhead-3.06.0.1.tgz 1144608 BLAKE2B 
100eaddd8585e8845e83c3eb24aefb0a0a2d477f0ee818c212cc39ad88f39cbac5532979dbe7ee8c4d7b9475fdf4cce4257679d996e4fae14ef1902ef2f8e5a2
 SHA512 
7804f4bab1b07eb08ed981364b3634b1c25e0657d57651871aede640254c33f9d2307ba7c9fb3bc81eb06b71ba5d27437275a3fe53859e9e9457e37e12545db9
 DIST jhead-3.08.tgz 1146535 BLAKE2B 
8e53fed1988c12be40b804fd3c8aa51d71ddaa11d97ed11479ec100f26585cc4a19b3b29249642e1cdb5afbf612b6b4281c4f0ec3ad10ad1a6e6fdffc6729740
 SHA512 
eb50e487eaacf2b489ce5e76f09730c8bb0c50a0e2d7c854ebe8bd204ead8f6256e052c49c72af179dc46dd5372c1eff32ff549b947637b242dc7bbe8c7b20d5

diff --git a/media-gfx/jhead/files/jhead-3.06.0.1-CVE-2021-34055.patch 
b/media-gfx/jhead/files/jhead-3.06.0.1-CVE-2021-34055.patch
deleted file mode 100644
index 1669eb6f089f..
--- a/media-gfx/jhead/files/jhead-3.06.0.1-CVE-2021-34055.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From f4f57913fff5de97da347a22558bbb74a1166369 Mon Sep 17 00:00:00 2001
-From: matthias wandel 
-Date: Wed, 1 Sep 2021 18:59:15 -0300
-Subject: [PATCH] If exif header is complete garbage, don't keep it.  Fixes
- issue 36
-
-(cherry picked from commit c761620767ae72e5d61c697a73de262aebe0b591)

- exif.c| 12 +++-
- jhead.h   |  2 +-
- jpgfile.c |  5 -
- 3 files changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/exif.c b/exif.c
-index ba066b5..d250a8d 100755
 a/exif.c
-+++ b/exif.c
-@@ -1005,7 +1005,7 @@ void Clear_EXIF ()
- // Process a EXIF marker
- // Describes all the drivel that most digital cameras include...
- //--
--void process_EXIF (unsigned char * ExifSection, int length)
-+int process_EXIF (unsigned char * ExifSection, int length)
- {
- int FirstOffset;
- 
-@@ -1020,7 +1020,7 @@ void process_EXIF (unsigned char * ExifSection, int 
length)
- static uchar ExifHeader[] = "Exif\0\0";
- if (memcmp(ExifSection+2, ExifHeader,6)){
- ErrNonfatal("Incorrect Exif header",0,0);
--return;
-+return 0;
- }
- }
- 
-@@ -1033,21 +1033,21 @@ void process_EXIF (unsigned char * ExifSection, int 
length)
- MotorolaOrder = 1;
- }else{
- ErrNonfatal("Invalid Exif alignment marker.",0,0);
--return;
-+return 0;
- }
- }
- 
- // Check the next value for correctness.
- if (Get16u(ExifSection+10) != 0x2a){
- ErrNonfatal("Invalid Exif start (1)",0,0);
--return;
-+return 0;
- }
- 
- FirstOffset = (int)Get32u(ExifSection+12);
- if (FirstOffset < 8 || FirstOffset > 16){
- if (FirstOffset < 16 || FirstOffset > length-16 || length < 16){
- ErrNonfatal("invalid offset for first Exif IFD value",0,0);
--return;
-+return 0;
- }
- // Usually set to 8, but other values valid too.
- ErrNonfatal("Suspicious offset of first Exif IFD value",0,0);
-@@ -1086,6 +1086,7 @@ void process_EXIF (unsigned char * ExifSection, int 
length)
- ImageInfo.FocalLength35mmEquiv = 
(int)(ImageInfo.FocalLength/ImageInfo.CCDWidth*36 + 0.5);
- }
- }
-+  return 1;
- }
- 
- 
-@@ -1235,6 +1236,7 @@ void create_EXIF(void)
- const char * ClearOrientation(void)
- {
- int a;
-+
- if (NumOrientations == 0) return NULL;
- 
- for (a=0;ahttp://www.sentex.net/~mwandel/jhead";
-SRC_URI="https://github.com/Matthias-Wandel/jhead/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tgz"
-
-LICENSE="public-domain"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 sparc x86"
-
-PATCHES=(
-   "${FILESDIR}/${P}-mkstemp-fix-makefile.patch"
-   "${FILESDIR}/${P}-CVE-2021-34055.patch"
-)
-
-src_install() {
-   dobin ${PN}
-   dodoc *.txt
-   docinto html
-   dodoc *.html
-   doman ${PN}.1
-   doheader ${PN}.h
-   dolib.so lib${PN}.so*
-}



[gentoo-commits] repo/gentoo:master commit in: media-gfx/jhead/files/, media-gfx/jhead/

2024-03-11 Thread Sam James
commit: d4bf8684d408ef7310a7915ca277707350d708d6
Author: Sam James  gentoo  org>
AuthorDate: Mon Mar 11 18:02:02 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Mar 11 18:02:11 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4bf8684

media-gfx/jhead: add 3.08

Bug: https://bugs.gentoo.org/908519
Closes: https://bugs.gentoo.org/879543
Closes: https://bugs.gentoo.org/890252
Signed-off-by: Sam James  gentoo.org>

 media-gfx/jhead/Manifest   |  1 +
 .../jhead/files/jhead-3.08-fix-makefile.patch  | 42 ++
 media-gfx/jhead/jhead-3.08.ebuild  | 36 +++
 3 files changed, 79 insertions(+)

diff --git a/media-gfx/jhead/Manifest b/media-gfx/jhead/Manifest
index 088685d71f13..d2f781c90eac 100644
--- a/media-gfx/jhead/Manifest
+++ b/media-gfx/jhead/Manifest
@@ -1 +1,2 @@
 DIST jhead-3.06.0.1.tgz 1144608 BLAKE2B 
100eaddd8585e8845e83c3eb24aefb0a0a2d477f0ee818c212cc39ad88f39cbac5532979dbe7ee8c4d7b9475fdf4cce4257679d996e4fae14ef1902ef2f8e5a2
 SHA512 
7804f4bab1b07eb08ed981364b3634b1c25e0657d57651871aede640254c33f9d2307ba7c9fb3bc81eb06b71ba5d27437275a3fe53859e9e9457e37e12545db9
+DIST jhead-3.08.tgz 1146535 BLAKE2B 
8e53fed1988c12be40b804fd3c8aa51d71ddaa11d97ed11479ec100f26585cc4a19b3b29249642e1cdb5afbf612b6b4281c4f0ec3ad10ad1a6e6fdffc6729740
 SHA512 
eb50e487eaacf2b489ce5e76f09730c8bb0c50a0e2d7c854ebe8bd204ead8f6256e052c49c72af179dc46dd5372c1eff32ff549b947637b242dc7bbe8c7b20d5

diff --git a/media-gfx/jhead/files/jhead-3.08-fix-makefile.patch 
b/media-gfx/jhead/files/jhead-3.08-fix-makefile.patch
new file mode 100644
index ..7f4e80be57ea
--- /dev/null
+++ b/media-gfx/jhead/files/jhead-3.08-fix-makefile.patch
@@ -0,0 +1,42 @@
+--- a/makefile
 b/makefile
+@@ -8,11 +8,15 @@ MANDIR=$(PREFIX)/share/man/man1
+ OBJ=obj
+ SRC=.
+ 
+-DPKG_BUILDFLAGS := $(shell command -v dpkg-buildflags 2> /dev/null)
+-ifdef DPKG_BUILDFLAGS
+-CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+-LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+-endif
++CFLAGS ?= -O2
++LDFLAGS += -fPIC -shared -Wl,-soname,libjhead.so.1
++
++TARGET = libjhead.so.1.0.0
++TARGET0= libjhead.so
++TARGET1= libjhead.so.1
++TARGET2 = libjhead.so.1.0
++
+++all: objdir jhead $(TARGET)
+ 
+ # To enable electric fence, set ELECTRIC_FENCE=1
+ ifeq ($(ELECTRIC_FENCE),1)
+@@ -31,7 +35,7 @@ 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 objdir
+-  ${CC} $(CFLAGS) $(CPPFLAGS) -c $< -o $@
++  ${CC} -fPIC $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+ 
+ jhead: $(objs) jhead.h
+   ${CC} $(LDFLAGS) -o jhead $(objs) -lm
+@@ -44,3 +48,9 @@ install: all
+   install -m 0755 jhead $(BINDIR)
+   install -m 0644 $(docs) $(DOCDIR)
+   install -m 0644 jhead.1 $(MANDIR)
++
++$(TARGET): $(objs) jhead
++  ${CC} $(LDFLAGS) $(LFLAGS) -o $(TARGET) $(objs)
++  ln -s ${TARGET} ${TARGET0}
++  ln -s ${TARGET} ${TARGET1}
++  ln -s ${TARGET} ${TARGET2}

diff --git a/media-gfx/jhead/jhead-3.08.ebuild 
b/media-gfx/jhead/jhead-3.08.ebuild
new file mode 100644
index ..c933270e140a
--- /dev/null
+++ b/media-gfx/jhead/jhead-3.08.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="EXIF JPEG camera setting parser and thumbnail remover"
+HOMEPAGE="http://www.sentex.net/~mwandel/jhead";
+SRC_URI="https://github.com/Matthias-Wandel/jhead/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-3.08-fix-makefile.patch
+)
+
+src_compile() {
+   # Older codebase with aliasing violations (bug #890252)
+   append-flags -fno-strict-aliasing
+   filter-lto
+
+   emake CC="$(tc-getCC)"
+}
+
+src_install() {
+   dobin ${PN}
+   dodoc *.txt
+   docinto html
+   dodoc *.html
+   doman ${PN}.1
+   doheader ${PN}.h
+   dolib.so lib${PN}.so*
+}



[gentoo-commits] repo/gentoo:master commit in: media-gfx/jhead/files/

2023-04-18 Thread Conrad Kostecki
commit: 227dea7a3673b42a6073fff1f607ea3212a795e2
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Sat Apr  8 17:15:34 2023 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Tue Apr 18 13:43:32 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=227dea7a

media-gfx/jhead: remove unused patch

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/30519
Signed-off-by: Conrad Kostecki  gentoo.org>

 .../files/jhead-3.04-mkstemp-fix-makefile.patch| 53 --
 1 file changed, 53 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
deleted file mode 100644
index 0bb634b6f5b9..
--- a/media-gfx/jhead/files/jhead-3.04-mkstemp-fix-makefile.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-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}



[gentoo-commits] repo/gentoo:master commit in: media-gfx/jhead/files/, media-gfx/jhead/

2023-04-09 Thread Andreas K. Hüttel
commit: ecf038d30f5cae49c82bed3af187d62387ed8c1e
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Mon Apr 10 02:48:08 2023 +
Commit: Andreas K. Hüttel  gentoo  org>
CommitDate: Mon Apr 10 02:48:38 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecf038d3

media-gfx/jhead: Add CVE-2021-34055 patch

Bug: https://bugs.gentoo.org/879801
Signed-off-by: Andreas K. Hüttel  gentoo.org>

 .../files/jhead-3.06.0.1-CVE-2021-34055.patch  | 108 +
 media-gfx/jhead/jhead-3.06.0.1-r1.ebuild   |  27 ++
 2 files changed, 135 insertions(+)

diff --git a/media-gfx/jhead/files/jhead-3.06.0.1-CVE-2021-34055.patch 
b/media-gfx/jhead/files/jhead-3.06.0.1-CVE-2021-34055.patch
new file mode 100644
index ..1669eb6f089f
--- /dev/null
+++ b/media-gfx/jhead/files/jhead-3.06.0.1-CVE-2021-34055.patch
@@ -0,0 +1,108 @@
+From f4f57913fff5de97da347a22558bbb74a1166369 Mon Sep 17 00:00:00 2001
+From: matthias wandel 
+Date: Wed, 1 Sep 2021 18:59:15 -0300
+Subject: [PATCH] If exif header is complete garbage, don't keep it.  Fixes
+ issue 36
+
+(cherry picked from commit c761620767ae72e5d61c697a73de262aebe0b591)
+---
+ exif.c| 12 +++-
+ jhead.h   |  2 +-
+ jpgfile.c |  5 -
+ 3 files changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/exif.c b/exif.c
+index ba066b5..d250a8d 100755
+--- a/exif.c
 b/exif.c
+@@ -1005,7 +1005,7 @@ void Clear_EXIF ()
+ // Process a EXIF marker
+ // Describes all the drivel that most digital cameras include...
+ //--
+-void process_EXIF (unsigned char * ExifSection, int length)
++int process_EXIF (unsigned char * ExifSection, int length)
+ {
+ int FirstOffset;
+ 
+@@ -1020,7 +1020,7 @@ void process_EXIF (unsigned char * ExifSection, int 
length)
+ static uchar ExifHeader[] = "Exif\0\0";
+ if (memcmp(ExifSection+2, ExifHeader,6)){
+ ErrNonfatal("Incorrect Exif header",0,0);
+-return;
++return 0;
+ }
+ }
+ 
+@@ -1033,21 +1033,21 @@ void process_EXIF (unsigned char * ExifSection, int 
length)
+ MotorolaOrder = 1;
+ }else{
+ ErrNonfatal("Invalid Exif alignment marker.",0,0);
+-return;
++return 0;
+ }
+ }
+ 
+ // Check the next value for correctness.
+ if (Get16u(ExifSection+10) != 0x2a){
+ ErrNonfatal("Invalid Exif start (1)",0,0);
+-return;
++return 0;
+ }
+ 
+ FirstOffset = (int)Get32u(ExifSection+12);
+ if (FirstOffset < 8 || FirstOffset > 16){
+ if (FirstOffset < 16 || FirstOffset > length-16 || length < 16){
+ ErrNonfatal("invalid offset for first Exif IFD value",0,0);
+-return;
++return 0;
+ }
+ // Usually set to 8, but other values valid too.
+ ErrNonfatal("Suspicious offset of first Exif IFD value",0,0);
+@@ -1086,6 +1086,7 @@ void process_EXIF (unsigned char * ExifSection, int 
length)
+ ImageInfo.FocalLength35mmEquiv = 
(int)(ImageInfo.FocalLength/ImageInfo.CCDWidth*36 + 0.5);
+ }
+ }
++  return 1;
+ }
+ 
+ 
+@@ -1235,6 +1236,7 @@ void create_EXIF(void)
+ const char * ClearOrientation(void)
+ {
+ int a;
++
+ if (NumOrientations == 0) return NULL;
+ 
+ for (a=0;ahttp://www.sentex.net/~mwandel/jhead";
+SRC_URI="https://github.com/Matthias-Wandel/jhead/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+PATCHES=(
+   "${FILESDIR}/${P}-mkstemp-fix-makefile.patch"
+   "${FILESDIR}/${P}-CVE-2021-34055.patch"
+)
+
+src_install() {
+   dobin ${PN}
+   dodoc *.txt
+   docinto html
+   dodoc *.html
+   doman ${PN}.1
+   doheader ${PN}.h
+   dolib.so lib${PN}.so*
+}



[gentoo-commits] repo/gentoo:master commit in: media-gfx/jhead/files/, media-gfx/jhead/

2022-10-08 Thread Andreas K. Hüttel
commit: a47a1d8535d26adffaf93b0df37a623ed2e629c5
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Sat Oct  8 22:30:53 2022 +
Commit: Andreas K. Hüttel  gentoo  org>
CommitDate: Sat Oct  8 22:35:44 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a47a1d85

media-gfx/jhead: add 3.06.0.1

Bug: https://bugs.gentoo.org/730746
Signed-off-by: Andreas K. Hüttel  gentoo.org>

 media-gfx/jhead/Manifest   |  1 +
 .../jhead-3.06.0.1-mkstemp-fix-makefile.patch  | 52 ++
 media-gfx/jhead/jhead-3.06.0.1.ebuild  | 24 ++
 3 files changed, 77 insertions(+)

diff --git a/media-gfx/jhead/Manifest b/media-gfx/jhead/Manifest
index c10ba22dd113..85a8dee9132a 100644
--- a/media-gfx/jhead/Manifest
+++ b/media-gfx/jhead/Manifest
@@ -1 +1,2 @@
 DIST jhead-3.04.tar.gz 67754 BLAKE2B 
4b81927fe3db58bf10b6e42c7e045a9d8a2f50df152faf886bb28238ef74e73371d37902c3c13e6edb74a89347b2c6f698f18dd91b51797e1882cb1d3bf5461f
 SHA512 
d783b02059ebcb01845d346e7c48bdc9d9f12fb7b0fd47bf8aff0a85a03f3523fbc536ddab0912f1c56ddb315b6cf31f16d4c7a4f81112d9a4c76a4a57ec1aed
+DIST jhead-3.06.0.1.tgz 1144608 BLAKE2B 
100eaddd8585e8845e83c3eb24aefb0a0a2d477f0ee818c212cc39ad88f39cbac5532979dbe7ee8c4d7b9475fdf4cce4257679d996e4fae14ef1902ef2f8e5a2
 SHA512 
7804f4bab1b07eb08ed981364b3634b1c25e0657d57651871aede640254c33f9d2307ba7c9fb3bc81eb06b71ba5d27437275a3fe53859e9e9457e37e12545db9

diff --git a/media-gfx/jhead/files/jhead-3.06.0.1-mkstemp-fix-makefile.patch 
b/media-gfx/jhead/files/jhead-3.06.0.1-mkstemp-fix-makefile.patch
new file mode 100644
index ..d25323d4ab38
--- /dev/null
+++ b/media-gfx/jhead/files/jhead-3.06.0.1-mkstemp-fix-makefile.patch
@@ -0,0 +1,52 @@
+diff -ruN jhead-3.06.0.1.orig/jhead.c jhead-3.06.0.1/jhead.c
+--- jhead-3.06.0.1.orig/jhead.c2021-04-14 14:02:45.0 +0200
 jhead-3.06.0.1/jhead.c 2022-10-09 00:25:03.812585996 +0200
+@@ -377,7 +377,7 @@
+ // 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 -ruN jhead-3.06.0.1.orig/makefile jhead-3.06.0.1/makefile
+--- jhead-3.06.0.1.orig/makefile   2021-04-14 14:02:45.0 +0200
 jhead-3.06.0.1/makefile2022-10-09 00:27:28.659543801 +0200
+@@ -3,10 +3,14 @@
+ #
+ OBJ=obj
+ SRC=.
+-CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+-LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
++LFLAGS = -fPIC -shared -Wl,-soname,libjhead.so.1
+ 
+-all: objdir jhead
++TARGET= libjhead.so.1.0.0
++TARGET0   = libjhead.so
++TARGET1   = libjhead.so.1
++TARGET2 = libjhead.so.1.0
++
++all: objdir jhead $(TARGET)
+ 
+ objdir:
+   @mkdir -p obj
+@@ -15,7 +19,7 @@
+   $(OBJ)/exif.o $(OBJ)/iptc.o $(OBJ)/gpsinfo.o $(OBJ)/makernote.o 
+ 
+ $(OBJ)/%.o:$(SRC)/%.c
+-  ${CC} $(CFLAGS) -c $< -o $@
++  ${CC} -fPIC $(CFLAGS) -c $< -o $@
+ 
+ jhead: $(objs) jhead.h
+   ${CC} $(LDFLAGS) -o jhead $(objs) -lm
+@@ -26,3 +30,9 @@
+ install:
+   mkdir -p ${DESTDIR}/usr/bin/
+   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}

diff --git a/media-gfx/jhead/jhead-3.06.0.1.ebuild 
b/media-gfx/jhead/jhead-3.06.0.1.ebuild
new file mode 100644
index ..eb2c6cbb5bbd
--- /dev/null
+++ b/media-gfx/jhead/jhead-3.06.0.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Exif Jpeg camera setting parser and thumbnail remover"
+HOMEPAGE="http://www.sentex.net/~mwandel/jhead";
+SRC_URI="https://github.com/Matthias-Wandel/jhead/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+PATCHES=( "${FILESDIR}/${P}-mkstemp-fix-makefile.patch" )
+
+src_install() {
+   dobin ${PN}
+   dodoc *.txt
+   docinto html
+   dodoc *.html
+   doman ${PN}.1
+   doheader ${PN}.h
+   dolib.so lib${PN}.so*
+}



[gentoo-commits] repo/gentoo:master commit in: media-gfx/jhead/files/

2020-07-28 Thread Aaron Bauman
commit: fa3833ddd2a83c8bc49f4d3409288b0186c37173
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Tue Jul 28 13:29:01 2020 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Tue Jul 28 18:19:29 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa3833dd

media-gfx/jhead: remove unused patch

Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Michael Mair-Keimberger  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16873
Signed-off-by: Aaron Bauman  gentoo.org>

 media-gfx/jhead/files/Makefile | 44 --
 1 file changed, 44 deletions(-)

diff --git a/media-gfx/jhead/files/Makefile b/media-gfx/jhead/files/Makefile
deleted file mode 100644
index 5f1d9799a42..000
--- a/media-gfx/jhead/files/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# jhead makefile for Unix
-# this make file also creates libjhead for meshlab
-#
-OBJ=.
-SRC=.
-AR = ar cqs
-LFLAGS = -shared -Wl,-soname,libjhead.so.1
-
-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 
-
-TARGET= libjhead.so.1.0.0
-TARGET0   = libjhead.so
-TARGET1   = libjhead.so.1
-TARGET2   = libjhead.so.1.0
-
-all: jhead $(TARGET) 
-
-$(OBJ)/%.o:$(SRC)/%.c
-   ${CC} -fPIC $(CFLAGS) -c $< -o $@
-
-jhead: $(objs) jhead.h
-   ${CC} ${LDFLAGS} -o jhead $(objs) -lm
-
-clean:
-   rm -f $(objs) jhead ${TARGET} ${TARGETA} ${TARGET0} ${TARGETD} \
-${TARGET1} ${TARGET2}
- 
-install:
-   cp jhead ${DESTDIR}/usr/bin/
-   cp ${TARGET} ${DESTDIR}/usr/lib/
-   cp jhead ${DESTDIR}/usr/bin/
-   cp ${TARGET0} ${DESTDIR}/usr/lib/
-   cp ${TARGET1} ${DESTDIR}/usr/lib/
-   cp ${TARGET2} ${DESTDIR}/usr/lib/
-
-$(TARGET):  $(objs) jhead
-   ${CC} $(LDFLAGS) $(LFLAGS) -o $(TARGET) $(objs) 
-   ln -s ${TARGET} ${TARGET0}
-   ln -s ${TARGET} ${TARGET1}
-   ln -s ${TARGET} ${TARGET2}
-
-