aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/fop
diff options
context:
space:
mode:
authorhq <hq@FreeBSD.org>2004-12-24 11:22:49 +0800
committerhq <hq@FreeBSD.org>2004-12-24 11:22:49 +0800
commit35cda04f84df2422bc858cb78e0c968dc7a32987 (patch)
treeeccecfc1fd6be455b8e1da02b06d82be7023104b /textproc/fop
parent350b6cb0f2069478f5acc8a5df536dd727445264 (diff)
downloadfreebsd-ports-gnome-35cda04f84df2422bc858cb78e0c968dc7a32987.tar.gz
freebsd-ports-gnome-35cda04f84df2422bc858cb78e0c968dc7a32987.tar.zst
freebsd-ports-gnome-35cda04f84df2422bc858cb78e0c968dc7a32987.zip
- Update to bsd.java.mk 2.0
- Cleanup unused PLIST_SUB entry - Use MASTER_SITE_APACHE_XML - Use INSTALL_DATA to install documentation and JAR files - Add a new FreeBSD specific launcher shell script which uses javavmwrapper - Use %%DATADIR%% to calm portlint
Diffstat (limited to 'textproc/fop')
-rw-r--r--textproc/fop/Makefile37
-rw-r--r--textproc/fop/files/fop.sh.in18
-rw-r--r--textproc/fop/files/patch-aa37
-rw-r--r--textproc/fop/pkg-plist82
4 files changed, 79 insertions, 95 deletions
diff --git a/textproc/fop/Makefile b/textproc/fop/Makefile
index 655483435a51..07d513c9e228 100644
--- a/textproc/fop/Makefile
+++ b/textproc/fop/Makefile
@@ -8,36 +8,39 @@
PORTNAME= fop
PORTVERSION= 0.20.5
CATEGORIES= textproc java
-MASTER_SITES= http://www.apache.org/dist/xml/fop/ \
- http://nagoya.apache.org/mirror/xml/fop/recent/
+MASTER_SITES= ${MASTER_SITE_APACHE_XML}
+MASTER_SITE_SUBDIR= fop
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= ports@FreeBSD.org
COMMENT= Print formatter driven by XSL formatting
+BUILD_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
+
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}
NO_BUILD= yes
-PLIST_SUB= PORTVERSION="${PORTVERSION}"
-USE_JAVA= 1.2+
-NO_BUILD_DEPENDS_JAVA= YES
+USE_JAVA= yes
+JAVA_VERSION= 1.2+
-pre-install:
- ${MKDIR} ${DATADIR} ${DATADIR}/build ${DOCSDIR}
- ${FIND} ${WRKSRC} \( -name \*.orig -o -name \*~ -o -name CVS \) -exec ${RM} -rf \{} \;
+SUB_FILES= fop.sh
do-install:
+ ${MKDIR} ${DATADIR}/build
cd ${WRKSRC}; \
- ${INSTALL_DATA} CHANGES LICENSE README ReleaseNotes.html \
- STATUS ${DATADIR}; \
- ${INSTALL_SCRIPT} fop.sh ${DATADIR}; \
- ${SED} -i "" -e s,%%PREFIX%%,${PREFIX}, ${DATADIR}/fop.sh ;\
- ${LN} -sf ${DATADIR}/fop.sh ${PREFIX}/bin/fop; \
- ${CP} -R conf src/hyph lib ${DATADIR}; \
- ${CP} build/fop.jar ${DATADIR}/build
+ ${INSTALL_DATA} CHANGES LICENSE README ReleaseNotes.html STATUS ${DATADIR}/
+ ${INSTALL_SCRIPT} ${WRKDIR}/fop.sh ${PREFIX}/bin/fop
+ cd ${WRKSRC} \
+ && ${FIND} conf lib -type d -exec ${MKDIR} ${DATADIR}/{} \; \
+ && ${FIND} conf lib -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
+ cd ${WRKSRC}/src \
+ && ${FIND} hyph -type d -exec ${MKDIR} ${DATADIR}/{} \; \
+ && ${FIND} hyph -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
+ ${INSTALL_DATA} ${WRKSRC}/build/fop.jar ${DATADIR}/build/
.if !defined(NOPORTDOCS)
- (cd ${WRKSRC}/build/site && \
- ${TAR} -cf - . | ${TAR} -xf - -C ${DOCSDIR})
+ cd ${WRKSRC}/build/site \
+ && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
+ && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
.endif
.include <bsd.port.mk>
diff --git a/textproc/fop/files/fop.sh.in b/textproc/fop/files/fop.sh.in
new file mode 100644
index 000000000000..2c685be75fdc
--- /dev/null
+++ b/textproc/fop/files/fop.sh.in
@@ -0,0 +1,18 @@
+#! /bin/sh
+#
+# $FreeBSD$
+
+if [ -f $HOME/.foprc ] ; then
+ . $HOME/.foprc
+fi
+
+# add fop.jar, which resides in $FOP_HOME/build
+CLASSPATH="%%DATADIR%%/build/fop.jar:${CLASSPATH}"
+
+# add in the dependency .jar files, which reside in $FOP_HOME/lib
+for jarfile in %%DATADIR%%/lib/*.jar
+do
+ CLASSPATH="${jarfile}:${CLASSPATH}"
+done
+
+JAVA_VERSION="1.2+" "%%LOCALBASE%%/bin/java" ${JAVA_OPTS} -classpath "${CLASSPATH}" ${FOP_OPTS} org.apache.fop.apps.Fop "$@"
diff --git a/textproc/fop/files/patch-aa b/textproc/fop/files/patch-aa
deleted file mode 100644
index 060b93d09a56..000000000000
--- a/textproc/fop/files/patch-aa
+++ /dev/null
@@ -1,37 +0,0 @@
---- fop.sh.orig Fri Oct 3 00:24:47 2003
-+++ fop.sh Fri Oct 3 00:25:24 2003
-@@ -1,5 +1,25 @@
- #! /bin/sh
- #
-+# Common variables
-+PREFIX=%%PREFIX%%
-+
-+# Default JAVACMD, JAVA_HOME, FOP_HOME
-+JAVACMD=${JAVACMD:-`which javavm`}
-+if [ -f ${PREFIX}/etc/javavms ]; then
-+ JAVA_HOME=`head -1 /usr/local/etc/javavms | sed -e 's,/bin/java *#.*$,,'`
-+elif [ -n "`echo ${PREFIX}/jdk*/bin/java 2> /dev/null`" ]; then
-+ JAVA_HOME=`ls -d /usr/local/jdk*/bin/java | sort -r | head -1 | sed -e 's,/bin/java *$,,'`
-+fi
-+SHAREDIR=${PREFIX}/share
-+FOP_HOME=${SHAREDIR}/fop
-+DIRLIBS="\
-+ ${FOP_HOME}/lib/xml-apis.jar
-+ ${FOP_HOME}/lib/xercesImpl-2.2.1.jar
-+ ${FOP_HOME}/lib/xalan-2.4.1.jar
-+ ${FOP_HOME}/lib/batik.jar
-+ ${FOP_HOME}/lib/avalon-framework-cvs-20020806.jar
-+ ${FOP_HOME}/lib/ant-1.5.1.jar"
-+
- # Shell script to run FOP, adapted from the Jakarta-Ant project.
-
- if [ -f $HOME/.foprc ] ; then
-@@ -79,7 +99,7 @@
- LOCALCLASSPATH=${FOP_HOME}/build/fop.jar:$LOCALCLASSPATH
-
- # add in the dependency .jar files, which reside in $FOP_HOME/lib
--DIRLIBS=${FOP_HOME}/lib/*.jar
-+
- for i in ${DIRLIBS}
- do
- # if the directory is empty, then it will return the input string
diff --git a/textproc/fop/pkg-plist b/textproc/fop/pkg-plist
index 430036a2724a..d435d22daa9b 100644
--- a/textproc/fop/pkg-plist
+++ b/textproc/fop/pkg-plist
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
bin/fop
%%PORTDOCS%%%%DOCSDIR%%/anttask.html
%%PORTDOCS%%%%DOCSDIR%%/anttask.pdf
@@ -137,47 +138,46 @@ bin/fop
%%PORTDOCS%%%%DOCSDIR%%/status.pdf
%%PORTDOCS%%%%DOCSDIR%%/team.html
%%PORTDOCS%%%%DOCSDIR%%/team.pdf
-share/fop/CHANGES
-share/fop/LICENSE
-share/fop/README
-share/fop/ReleaseNotes.html
-share/fop/STATUS
-share/fop/build/fop.jar
-share/fop/conf/config.dtd
-share/fop/conf/config.xml
-share/fop/conf/userconfig.xml
-share/fop/fop.sh
-share/fop/hyph/README
-share/fop/hyph/en.xml
-share/fop/hyph/es.xml
-share/fop/hyph/fi.xml
-share/fop/hyph/hu.xml
-share/fop/hyph/hyphenation.dtd
-share/fop/hyph/it.xml
-share/fop/hyph/pl.xml
-share/fop/hyph/pt.xml
-share/fop/hyph/ru.xml
-share/fop/lib/ant-1.5.1.jar
-share/fop/lib/ant.license.txt
-share/fop/lib/avalon-framework-cvs-20020806.jar
-share/fop/lib/avalon.LICENSE.txt
-share/fop/lib/batik.LICENSE.txt
-share/fop/lib/batik.jar
-share/fop/lib/bin/antRun
-share/fop/lib/readme
-share/fop/lib/xalan-2.4.1.jar
-share/fop/lib/xalan.LICENSE.txt
-share/fop/lib/xerces.LICENSE.txt
-share/fop/lib/xercesImpl-2.2.1.jar
-share/fop/lib/xml-apis.LICENSE.txt
-share/fop/lib/xml-apis.README.txt
-share/fop/lib/xml-apis.jar
-@dirrm share/fop/lib/bin
-@dirrm share/fop/lib
-@dirrm share/fop/hyph
-@dirrm share/fop/conf
-@dirrm share/fop/build
-@dirrm share/fop
+%%DATADIR%%/CHANGES
+%%DATADIR%%/LICENSE
+%%DATADIR%%/README
+%%DATADIR%%/ReleaseNotes.html
+%%DATADIR%%/STATUS
+%%DATADIR%%/build/fop.jar
+%%DATADIR%%/conf/config.dtd
+%%DATADIR%%/conf/config.xml
+%%DATADIR%%/conf/userconfig.xml
+%%DATADIR%%/hyph/README
+%%DATADIR%%/hyph/en.xml
+%%DATADIR%%/hyph/es.xml
+%%DATADIR%%/hyph/fi.xml
+%%DATADIR%%/hyph/hu.xml
+%%DATADIR%%/hyph/hyphenation.dtd
+%%DATADIR%%/hyph/it.xml
+%%DATADIR%%/hyph/pl.xml
+%%DATADIR%%/hyph/pt.xml
+%%DATADIR%%/hyph/ru.xml
+%%DATADIR%%/lib/ant-1.5.1.jar
+%%DATADIR%%/lib/ant.license.txt
+%%DATADIR%%/lib/avalon-framework-cvs-20020806.jar
+%%DATADIR%%/lib/avalon.LICENSE.txt
+%%DATADIR%%/lib/batik.LICENSE.txt
+%%DATADIR%%/lib/batik.jar
+%%DATADIR%%/lib/bin/antRun
+%%DATADIR%%/lib/readme
+%%DATADIR%%/lib/xalan-2.4.1.jar
+%%DATADIR%%/lib/xalan.LICENSE.txt
+%%DATADIR%%/lib/xerces.LICENSE.txt
+%%DATADIR%%/lib/xercesImpl-2.2.1.jar
+%%DATADIR%%/lib/xml-apis.LICENSE.txt
+%%DATADIR%%/lib/xml-apis.README.txt
+%%DATADIR%%/lib/xml-apis.jar
+@dirrm %%DATADIR%%/lib/bin
+@dirrm %%DATADIR%%/lib
+@dirrm %%DATADIR%%/hyph
+@dirrm %%DATADIR%%/conf
+@dirrm %%DATADIR%%/build
+@dirrm %%DATADIR%%
@unexec rmdir %D/%%DOCSDIR%%/skin/css 2>/dev/null || true
@dirrm %%DOCSDIR%%/skin/images
@unexec rmdir %D/%%DOCSDIR%%/skin/scripts 2>/dev/null || true