1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00
freebsd-ports/graphics/jpgtn/Makefile
Mathieu Arnold 60d1a83c2a MASTER_SITES cleanup.
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
  of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
  no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.

While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.

Also, replace some EXTRACT_SUFX occurences with USES=tar:*.

Checked by:	make fetch-urlall-list
With hat:	portmgr
Sponsored by:	Absolight
2015-05-14 10:15:04 +00:00

57 lines
1.7 KiB
Makefile

# Created by: mb@imp.ch
# $FreeBSD$
PORTNAME= jpgtn
PORTVERSION= 2.06
PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= SUNSITE/apps/graphics/misc
MAINTAINER= ports@FreeBSD.org
COMMENT= Creates thumbnails of JPEG images
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libjpeg=${LOCALBASE}
PLIST_FILES= bin/jpgtn \
man/man1/jpgtn.1.gz
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
.include <bsd.port.mk>