View | Details | Raw Unified | Return to bug 257181
Collapse All | Expand All

(-)b/graphics/jpgtn/Makefile (-26 / +5 lines)
Lines 2-16 Link Here
2
2
3
PORTNAME=	jpgtn
3
PORTNAME=	jpgtn
4
PORTVERSION=	2.06
4
PORTVERSION=	2.06
5
PORTREVISION=	3
5
PORTREVISION=	4
6
CATEGORIES=	graphics
6
CATEGORIES=	graphics
7
MASTER_SITES=	SUNSITE/apps/graphics/misc
7
MASTER_SITES=	SF SUNSITE/apps/graphics/misc
8
8
9
MAINTAINER=	ports@FreeBSD.org
9
MAINTAINER=	fuz@fuz.su
10
COMMENT=	Creates thumbnails of JPEG images
10
COMMENT=	Creates thumbnails of JPEG images
11
11
12
BROKEN_FreeBSD_13=	ld: error: duplicate symbol: background
12
LICENSE=	GPLv2+
13
BROKEN_FreeBSD_14=	ld: error: duplicate symbol: background
13
LICENSE_FILE=	${WRKSRC}/COPYING
14
14
15
USES=		jpeg
15
USES=		jpeg
16
GNU_CONFIGURE=	yes
16
GNU_CONFIGURE=	yes
Lines 23-56 WITH_MAXSIZE?= 2048 Link Here
23
WITH_MINSIZE?=	1
23
WITH_MINSIZE?=	1
24
WITH_DEFSIZE?=	128
24
WITH_DEFSIZE?=	128
25
25
26
pre-everything::
27
	@${ECHO_MSG} "===>"
28
	@${ECHO_MSG} "===> You can control program functionality by defining the following variables:"
29
	@${ECHO_MSG} "===>"
30
.if !defined(WITH_MAXSIZE)
31
	@${ECHO_MSG} "===> Define WITH_MAXSIZE to set the maximum allowable thumbnail size"
32
.endif
33
.if !defined(WITH_MINSIZE)
34
	@${ECHO_MSG} "===> Define WITH_MINSIZE to set the minimum allowable thumbnail size"
35
.endif
36
.if !defined(WITH_DEFSIZE)
37
	@${ECHO_MSG} "===> Define WITH_DEFSIZE to set the default thumbnail size"
38
.endif
39
	@${ECHO_MSG} "===>"
40
41
post-patch:
26
post-patch:
42
.if defined(WITH_MAXSIZE)
43
	@${ECHO_MSG} "Setting MAXSIZE to ${WITH_MAXSIZE}"
27
	@${ECHO_MSG} "Setting MAXSIZE to ${WITH_MAXSIZE}"
44
	@${REINPLACE_CMD} "s/define MAXSIZE[[:blank:]]*2048/define MAXSIZE ${WITH_MAXSIZE}/" ${WRKSRC}/src/jpgtn.h
28
	@${REINPLACE_CMD} "s/define MAXSIZE[[:blank:]]*2048/define MAXSIZE ${WITH_MAXSIZE}/" ${WRKSRC}/src/jpgtn.h
45
.endif
46
.if defined(WITH_MINSIZE)
47
	@${ECHO_MSG} "Setting MINSIZE to ${WITH_MINSIZE}"
29
	@${ECHO_MSG} "Setting MINSIZE to ${WITH_MINSIZE}"
48
	@${REINPLACE_CMD} "s/define MINSIZE[[:blank:]]*1/define MINSIZE ${WITH_MINSIZE}/" ${WRKSRC}/src/jpgtn.h
30
	@${REINPLACE_CMD} "s/define MINSIZE[[:blank:]]*1/define MINSIZE ${WITH_MINSIZE}/" ${WRKSRC}/src/jpgtn.h
49
.endif
50
.if defined(WITH_DEFSIZE)
51
	@${ECHO_MSG} "Setting DEFAULTSIZE to ${WITH_DEFSIZE}"
31
	@${ECHO_MSG} "Setting DEFAULTSIZE to ${WITH_DEFSIZE}"
52
	@${REINPLACE_CMD} "s/define DEFAULTSIZE[[:blank:]]*128/define DEFAULTSIZE ${WITH_DEFSIZE}/" ${WRKSRC}/src/jpgtn.h
32
	@${REINPLACE_CMD} "s/define DEFAULTSIZE[[:blank:]]*128/define DEFAULTSIZE ${WITH_DEFSIZE}/" ${WRKSRC}/src/jpgtn.h
53
.endif
54
	@${REINPLACE_CMD} "s/(2-2048) the size defaults to 128/(${WITH_MINSIZE}-${WITH_MAXSIZE}) the size defaults to ${WITH_DEFSIZE}/" \
33
	@${REINPLACE_CMD} "s/(2-2048) the size defaults to 128/(${WITH_MINSIZE}-${WITH_MAXSIZE}) the size defaults to ${WITH_DEFSIZE}/" \
55
		${WRKSRC}/doc/jpgtn.1
34
		${WRKSRC}/doc/jpgtn.1
56
35
(-)b/graphics/jpgtn/files/patch-src_jpgtn.c (+16 lines)
Added Link Here
1
--- src/jpgtn.c.orig	2021-07-14 12:00:52 UTC
2
+++ src/jpgtn.c
3
@@ -30,6 +30,13 @@
4
 #include "common.h"
5
 #include "jpgtn.h"
6
 
7
+unsigned char *outimage;                    /* The current thumbnail image */
8
+unsigned char *palette;                     /* Global palette pointer      */
9
+int            width;                       /* Original image width        */
10
+int            height;                      /* Original image height       */
11
+int            background;                  /* Index's background color    */
12
+long           out_wide;                    /* Width of thumbnail image    */
13
+long           out_high;                    /* Height of thumbnail image   */
14
 
15
 /* Private */
16
 static void print_version(void);
(-)b/graphics/jpgtn/files/patch-src_jpgtn.h (-1 / +23 lines)
Added Link Here
0
- 
1
--- src/jpgtn.h.orig	2021-07-14 12:00:47 UTC
2
+++ src/jpgtn.h
3
@@ -36,13 +36,13 @@
4
 #define RSZ_WIDTH  1
5
 #define RSZ_HEIGHT 2
6
 
7
-unsigned char *outimage;                    /* The current thumbnail image */
8
-unsigned char *palette;                     /* Global palette pointer      */
9
-int            width;                       /* Original image width        */
10
-int            height;                      /* Original image height       */
11
-int            background;                  /* Index's background color    */
12
-long           out_wide;                    /* Width of thumbnail image    */
13
-long           out_high;                    /* Height of thumbnail image   */
14
+extern unsigned char *outimage;                    /* The current thumbnail image */
15
+extern unsigned char *palette;                     /* Global palette pointer      */
16
+extern int            width;                       /* Original image width        */
17
+extern int            height;                      /* Original image height       */
18
+extern int            background;                  /* Index's background color    */
19
+extern long           out_wide;                    /* Width of thumbnail image    */
20
+extern long           out_high;                    /* Height of thumbnail image   */
21
 
22
 
23
 /* resizepic.c */

Return to bug 257181