- Add forgotten patch

- Switch to OPTIONS
- Add Java bindings [1]

Submitted by:	Oliver Brandmueller <ob@e-Gitt.NET> [1]
This commit is contained in:
Alex Dupre 2012-01-13 09:17:41 +00:00
parent 76e86dada6
commit f7309710ee
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=289094
4 changed files with 50 additions and 13 deletions

View file

@ -5,7 +5,7 @@
# $FreeBSD$
#
CATEGORIES= print perl
PKGNAMESUFFIX= -perl
MAINTAINER= ale@FreeBSD.org

View file

@ -7,7 +7,7 @@
PORTNAME= pdflib
PORTVERSION= 7.0.5
CATEGORIES= print
CATEGORIES= print perl java
MASTER_SITES= http://www.pdflib.com/binaries/PDFlib/${PORTVERSION:S/.//g}/
DISTNAME= PDFlib-Lite-${PORTVERSION}
@ -16,20 +16,17 @@ COMMENT= A C library for dynamically generating PDF
RESTRICTED= many odd restrictions on usage and distribution
.if defined(WITH_PERL)
OPTIONS= PERL "Build perl bindings" on
.else
OPTIONS= PERL "Build perl bindings" off
.endif
OPTIONS+= JAVA "Build Java bindings" off
USE_LDCONFIG= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-java=no --with-py=no --with-ruby=no --with-tcl=no
.if defined(WITH_PERL)
USE_PERL5= yes
PLIST_SUB= PERL=""
CONFIGURE_ARGS+=--with-perl=${PERL}
PKGNAMESUFFIX= -perl
.else
CONFIGURE_ARGS+=--with-perl=no
PLIST_SUB= PERL="@comment "
.endif
CONFIGURE_ARGS= --with-py=no --with-ruby=no --with-tcl=no
PORTDOCS= *
@ -39,9 +36,32 @@ PORTDOCS= *
CONFIGURE_ARGS+=--enable-64bit
.endif
.if defined(WITH_PERL)
USE_PERL5= yes
PLIST_SUB= PERL=""
CONFIGURE_ARGS+=--with-perl=${PERL}
.else
CONFIGURE_ARGS+=--with-perl=no
PLIST_SUB= PERL="@comment "
.endif
.if defined(WITH_JAVA)
USE_JAVA= yes
JAVA_BUILD= yes
JAVA_RUN= yes
PLIST_SUB+= JAVA=""
CONFIGURE_ARGS+=--with-java=${JAVA_HOME}
.else
CONFIGURE_ARGS+=--with-java=no
PLIST_SUB+= JAVA="@comment "
.endif
post-install:
${MKDIR} ${DATADIR}/fonts
${INSTALL_DATA} ${WRKSRC}/fonts/* ${DATADIR}/fonts
.if defined(WITH_JAVA)
${INSTALL_DATA} ${WRKSRC}/bind/pdflib/java/pdflib.jar ${JAVAJARDIR}/pdflib.jar
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/pdflib/* ${DOCSDIR}

View file

@ -0,0 +1,12 @@
--- configure.orig 2012-01-10 12:18:55.000000000 +0100
+++ configure 2012-01-10 12:20:13.000000000 +0100
@@ -21416,6 +21416,9 @@
if test "$WITH_CXX" = "yes" ; then
BINDINGS="$BINDINGS cpp"
fi
+if test "$WITH_PERL" = "yes" ; then
+ BINDINGS="$BINDINGS perl"
+fi
if test "$WITH_JAVA" = "yes" ; then
BINDINGS="$BINDINGS java"
PLOPBINDINGS="$PLOPBINDINGS java"

View file

@ -11,6 +11,11 @@ lib/libpdf.so.6
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/pdflib_pl.la
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/pdflib_pl.so
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/pdflib_pl.so.0
%%JAVA%%lib/libpdf_java.a
%%JAVA%%lib/libpdf_java.la
%%JAVA%%lib/libpdf_java.so.0
%%JAVA%%lib/libpdf_java.so
%%JAVA%%%%JAVAJARDIR%%/pdflib.jar
%%DATADIR%%/fonts/pdflib.upr
%%DATADIR%%/fonts/print_glyphs.ps
@dirrm share/pdflib/fonts