freebsd-ports/print/pdftk/Makefile
Mathieu Arnold db38f110ea Updated port to pdftk-2.02
Changes:
- Removed LOCAL master site, no distfile there obviously
- Moved USE_ZIP after BUILD_DEPENDS due to portlint warning
- Added LICENSE due to portlint warning
- Added LIB_DEPENDS. Libraries provided by gcc required to run the binary, but gcc is registered only as build dependency. Removing the gcc after installation of pdftk is permitted but breaks pdftk
- The port doesn't install any shared libraries, so there's no point in USE_LDCONFIG
- Changed PLIST_FILES and removed MAN1 to support staging
- Removed ancient comment (mentioned gcc and FreeBSD versions are deprecated long ago)
- Prepended STAGEDIR before PREFIX to support staging
- Corrected patch-pdftk__Makefile.Base to support new version
- REMOVED FILE file/patch-pdftk__Makefile.FreeBSD (is now provided by upstream)
- REMOVED FILE file/patch-java__Makefile (patch included by upstream)

maintainer timeout.

PR:		ports/183578
Submitted by:	Kozlov Sergey
2013-11-29 15:48:07 +00:00

55 lines
1.8 KiB
Makefile

# Created by: Patrick Dung (patrick_dkt@yahoo.com.hk)
# $FreeBSD$
PORTNAME= pdftk
PORTVERSION= 2.02
CATEGORIES= print
MASTER_SITES= http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= glarkin@FreeBSD.org
COMMENT= Simple tool for doing everyday things with PDF documents
LICENSE= GPLv2
LIB_DEPENDS= libgcj.so:${PORTSDIR}/lang/gcc${CSUFF} \
libstdc++.so:${PORTSDIR}/lang/gcc${CSUFF} \
libgcc_s.so:${PORTSDIR}/lang/gcc${CSUFF}
BUILD_DEPENDS= gcj${CSUFF}:${PORTSDIR}/lang/gcc${CSUFF} \
gcjh${CSUFF}:${PORTSDIR}/lang/gcc${CSUFF} \
cpp${CSUFF}:${PORTSDIR}/lang/gcc${CSUFF}
USE_ZIP= yes
# Get GCC version suffix without the dot in USE_GCC
CSUFF= ${_USE_GCC:S/.//}
USE_GCC= yes
USES= iconv gmake
# gcj/libgcj don't exist on some platforms
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= GNU gcj does not exist on this platform
PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-dist
WRKSRC= ${PATCH_WRKSRC}/${PORTNAME}
MAKEFILE= Makefile.FreeBSD
MAKE_ENV= GCJ=gcj${CSUFF} GCJH=gcjh${CSUFF} GCPP=cpp${CSUFF} \
OBJCOPY=${OBJCOPY} LANG=C LC_CTYPE=C
PLIST_FILES= bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
post-patch:
@${REINPLACE_CMD} -e "s|TOOLPATH=|TOOLPATH=${LOCALBASE}/bin/|g" ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s|VERSUFF=|VERSUFF=${CSUFF}|g" ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s|GCJFLAGS=|GCJFLAGS= -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s|LDLIBS= -lgcj|LDLIBS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} ${ICONV_LIB} -lz -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" \
${WRKSRC}/${MAKEFILE}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/../${PORTNAME}.1 ${STAGEDIR}${PREFIX}/man/man1
.include <bsd.port.mk>