aboutsummaryrefslogtreecommitdiff
path: root/graphics/jpgtn/Makefile
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-11-10 22:14:46 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-11-10 22:14:46 +0000
commit3fab8b91582df1f20e63b75bd8ac9ba19e2eb6b8 (patch)
tree1fa635bf2f04420f151a1e8db5e2f23a1aca608b /graphics/jpgtn/Makefile
parent13259b3885c6ae547d2447d63175bf2b9d21787b (diff)
downloadports-3fab8b91582df1f20e63b75bd8ac9ba19e2eb6b8.tar.gz
ports-3fab8b91582df1f20e63b75bd8ac9ba19e2eb6b8.zip
Notes
Diffstat (limited to 'graphics/jpgtn/Makefile')
-rw-r--r--graphics/jpgtn/Makefile27
1 files changed, 20 insertions, 7 deletions
diff --git a/graphics/jpgtn/Makefile b/graphics/jpgtn/Makefile
index db64e0525658..681bec7a9c08 100644
--- a/graphics/jpgtn/Makefile
+++ b/graphics/jpgtn/Makefile
@@ -6,21 +6,27 @@
#
PORTNAME= jpgtn
-PORTVERSION= 1.04
-PORTREVISION= 1
+PORTVERSION= 2.06
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR= apps/graphics/misc
+MASTER_SITE_SUBDIR= apps/graphics/misc
MAINTAINER= mbr@FreeBSD.org
COMMENT= Creates thumbnails of JPEG images
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-libjpeg=${LOCALBASE}
+
MAN1= jpgtn.1
PLIST_FILES= bin/jpgtn
USE_REINPLACE= yes
+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:"
@@ -31,18 +37,25 @@ pre-everything::
.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:]]*256/define MAXSIZE ${WITH_MAXSIZE}/" ${WRKSRC}/jpgtn.h
- @${REINPLACE_CMD} "s/allowable range (24-256)/allowable range (24-${WITH_MAXSIZE})/" ${WRKSRC}/jpgtn.1
+ @${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:]]*24/define MINSIZE ${WITH_MINSIZE}/" ${WRKSRC}/jpgtn.h
- @${REINPLACE_CMD} "s/allowable range (24-)/allowable range (${WITH_MINSIZE}-/" ${WRKSRC}/jpgtn.1
+ @${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
.include <bsd.port.mk>