aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@fuz.su>2021-07-14 12:10:23 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2021-07-14 12:42:20 +0000
commited698901d96203faf7922ae6f6bf29eafde2909f (patch)
tree9de510462d361e7b5493511dd192974faa36c81d
parent681050945814ea6d4330bf6227781b4673cfd66b (diff)
downloadports-ed698901d96203faf7922ae6f6bf29eafde2909f.tar.gz
ports-ed698901d96203faf7922ae6f6bf29eafde2909f.zip
graphics/jpgtn: unbreak build
Also remove the archaic pre-everything target from the Makefile, simplify the Makefile, add SF as another master site and set LICENSE. Take over maintainership of this unmaintained port. PR: 257181
-rw-r--r--graphics/jpgtn/Makefile31
-rw-r--r--graphics/jpgtn/files/patch-src_jpgtn.c16
-rw-r--r--graphics/jpgtn/files/patch-src_jpgtn.h23
3 files changed, 44 insertions, 26 deletions
diff --git a/graphics/jpgtn/Makefile b/graphics/jpgtn/Makefile
index 8ed1ce7d43bf..717ff173975f 100644
--- a/graphics/jpgtn/Makefile
+++ b/graphics/jpgtn/Makefile
@@ -2,15 +2,15 @@
PORTNAME= jpgtn
PORTVERSION= 2.06
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= graphics
-MASTER_SITES= SUNSITE/apps/graphics/misc
+MASTER_SITES= SF SUNSITE/apps/graphics/misc
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= fuz@fuz.su
COMMENT= Creates thumbnails of JPEG images
-BROKEN_FreeBSD_13= ld: error: duplicate symbol: background
-BROKEN_FreeBSD_14= ld: error: duplicate symbol: background
+LICENSE= GPLv2+
+LICENSE_FILE= ${WRKSRC}/COPYING
USES= jpeg
GNU_CONFIGURE= yes
@@ -23,34 +23,13 @@ WITH_MAXSIZE?= 2048
WITH_MINSIZE?= 1
WITH_DEFSIZE?= 128
-pre-everything::
- @${ECHO_MSG} "===>"
- @${ECHO_MSG} "===> You can control program functionality by defining the following variables:"
- @${ECHO_MSG} "===>"
-.if !defined(WITH_MAXSIZE)
- @${ECHO_MSG} "===> Define WITH_MAXSIZE to set the maximum allowable thumbnail size"
-.endif
-.if !defined(WITH_MINSIZE)
- @${ECHO_MSG} "===> Define WITH_MINSIZE to set the minimum allowable thumbnail size"
-.endif
-.if !defined(WITH_DEFSIZE)
- @${ECHO_MSG} "===> Define WITH_DEFSIZE to set the default thumbnail size"
-.endif
- @${ECHO_MSG} "===>"
-
post-patch:
-.if defined(WITH_MAXSIZE)
@${ECHO_MSG} "Setting MAXSIZE to ${WITH_MAXSIZE}"
@${REINPLACE_CMD} "s/define MAXSIZE[[:blank:]]*2048/define MAXSIZE ${WITH_MAXSIZE}/" ${WRKSRC}/src/jpgtn.h
-.endif
-.if defined(WITH_MINSIZE)
@${ECHO_MSG} "Setting MINSIZE to ${WITH_MINSIZE}"
@${REINPLACE_CMD} "s/define MINSIZE[[:blank:]]*1/define MINSIZE ${WITH_MINSIZE}/" ${WRKSRC}/src/jpgtn.h
-.endif
-.if defined(WITH_DEFSIZE)
@${ECHO_MSG} "Setting DEFAULTSIZE to ${WITH_DEFSIZE}"
@${REINPLACE_CMD} "s/define DEFAULTSIZE[[:blank:]]*128/define DEFAULTSIZE ${WITH_DEFSIZE}/" ${WRKSRC}/src/jpgtn.h
-.endif
@${REINPLACE_CMD} "s/(2-2048) the size defaults to 128/(${WITH_MINSIZE}-${WITH_MAXSIZE}) the size defaults to ${WITH_DEFSIZE}/" \
${WRKSRC}/doc/jpgtn.1
diff --git a/graphics/jpgtn/files/patch-src_jpgtn.c b/graphics/jpgtn/files/patch-src_jpgtn.c
new file mode 100644
index 000000000000..eece8b6980c9
--- /dev/null
+++ b/graphics/jpgtn/files/patch-src_jpgtn.c
@@ -0,0 +1,16 @@
+--- src/jpgtn.c.orig 2021-07-14 12:00:52 UTC
++++ src/jpgtn.c
+@@ -30,6 +30,13 @@
+ #include "common.h"
+ #include "jpgtn.h"
+
++unsigned char *outimage; /* The current thumbnail image */
++unsigned char *palette; /* Global palette pointer */
++int width; /* Original image width */
++int height; /* Original image height */
++int background; /* Index's background color */
++long out_wide; /* Width of thumbnail image */
++long out_high; /* Height of thumbnail image */
+
+ /* Private */
+ static void print_version(void);
diff --git a/graphics/jpgtn/files/patch-src_jpgtn.h b/graphics/jpgtn/files/patch-src_jpgtn.h
new file mode 100644
index 000000000000..ed1850edb63f
--- /dev/null
+++ b/graphics/jpgtn/files/patch-src_jpgtn.h
@@ -0,0 +1,23 @@
+--- src/jpgtn.h.orig 2021-07-14 12:00:47 UTC
++++ src/jpgtn.h
+@@ -36,13 +36,13 @@
+ #define RSZ_WIDTH 1
+ #define RSZ_HEIGHT 2
+
+-unsigned char *outimage; /* The current thumbnail image */
+-unsigned char *palette; /* Global palette pointer */
+-int width; /* Original image width */
+-int height; /* Original image height */
+-int background; /* Index's background color */
+-long out_wide; /* Width of thumbnail image */
+-long out_high; /* Height of thumbnail image */
++extern unsigned char *outimage; /* The current thumbnail image */
++extern unsigned char *palette; /* Global palette pointer */
++extern int width; /* Original image width */
++extern int height; /* Original image height */
++extern int background; /* Index's background color */
++extern long out_wide; /* Width of thumbnail image */
++extern long out_high; /* Height of thumbnail image */
+
+
+ /* resizepic.c */