diff options
author | edwin <edwin@FreeBSD.org> | 2004-01-12 07:47:14 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-01-12 07:47:14 +0800 |
commit | 6b4922e35ba58e84cdd9362a9f48e77ee6a60289 (patch) | |
tree | 0175939e43378ca4a8853f6dce41e2e14fc7e52c /graphics | |
parent | 168278c38942b32f0583bcb13fd3f33060a106f8 (diff) | |
download | freebsd-ports-gnome-6b4922e35ba58e84cdd9362a9f48e77ee6a60289.tar.gz freebsd-ports-gnome-6b4922e35ba58e84cdd9362a9f48e77ee6a60289.tar.zst freebsd-ports-gnome-6b4922e35ba58e84cdd9362a9f48e77ee6a60289.zip |
[patch] Update to graphics/jpgtn port
Currently the jpgtn port (graphics/jpgtn) requires editing
of source files to change the minimum and maximum thumbnail
size allowed. The following Makefile diff adds the
WITH_MINSIZE and WITH_MAXSIZE variables, so no source editing
is required by the user. Also, the man page is updated to
reflect the selected values.
PR: ports/59313
Submitted by: Ryan Rogers <freebsd@doghouserepair.com>
Approved by: maintainer timeout
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/jpgtn/Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/graphics/jpgtn/Makefile b/graphics/jpgtn/Makefile index 1a4f55af38d2..2c282c7be546 100644 --- a/graphics/jpgtn/Makefile +++ b/graphics/jpgtn/Makefile @@ -7,6 +7,7 @@ PORTNAME= jpgtn PORTVERSION= 1.04 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SUNSITE} MASTER_SITE_SUBDIR= apps/graphics/misc @@ -17,5 +18,30 @@ COMMENT= Creates thumbnails of JPEG images LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg MAN1= jpgtn.1 +USE_REINPLACE= yes + +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 + @${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 +.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 +.endif .include <bsd.port.mk> |