- Update to bsd.java.mk 2.0

- Improve launcher shell script (switch to javavmwrapper 2.0)
- Dynamic plist
- Install in DATADIR=${JAVASHAREDIR}/${PORTNAME}
- Bump PORTREVISION
This commit is contained in:
Herve Quiroz 2005-02-03 00:51:59 +00:00
parent ef488d3fa7
commit 677401496a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127937
4 changed files with 27 additions and 57 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= aoi
PORTVERSION= 1.6
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= graphics java
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= aoi
@ -16,51 +16,36 @@ DISTNAME= AoI${PORTVERSION:S/.//}
MAINTAINER= ports@FreeBSD.org
COMMENT= An open source Java written 3D modelling and rendering studio
USE_JAVA= 1.3+
USE_SIZE= yes
RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
USE_JAVA= yes
JAVA_VERSION= 1.3+
USE_ZIP= yes
NO_BUILD= yes
NO_BUILD_DEPENDS_JAVA= yes
PLIST_SUB= JAR_DIR=${JAR_DIR} \
JAR_FILE=${JAR_FILE}
WRKSRC= ${WRKDIR}/ArtOfIllusion${PORTVERSION}
EXTRACT_BEFORE_ARGS= -a -q
JAVAVM= ${LOCALBASE}/bin/javavm
JAR_DIR= share/java/jar/${PORTNAME}/
JAR_MANIFEST= ${FILESDIR}/manifest
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
DOC_FILES= HISTORY LICENSE README
JAR_FILES= ArtOfIllusion.jar
JAR_PLUGIN_FILES= OSSpecific.jar Renderers.jar Tools.jar Translators.jar
JAR_FILES= ArtOfIllusion.jar ${JAR_PLUGIN_FILES:S,^,Plugins/,}
SUB_FILES= aoi.sh
post-patch:
# remove trailing ^M
@${SED} -e "s|%%JAR_DIR%%|${JAR_DIR}|;s|%%JAR_FILE%%|${JAR_FILE}|; \
s|%%JAVAVM%%|${JAVAVM}|;s|%%PREFIX%%|${PREFIX}|" \
${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh
.if !defined(NOPORTDOCS)
PORTDOCS= HISTORY LICENSE README
.endif
PLIST_FILES= ${JAR_FILES:S,^,%%DATADIR%%/,} bin/aoi
PLIST_DIRS= %%DATADIR%%/Plugins %%DATADIR%%
do-install:
@${MKDIR} ${PREFIX}/${JAR_DIR}
.for jar in ${JAR_FILES}
@${INSTALL_DATA} ${WRKSRC}/${jar} ${PREFIX}/${JAR_DIR}
.endfor
@${MKDIR} ${PREFIX}/${JAR_DIR}/Plugins
.for jar in ${JAR_PLUGIN_FILES}
@${INSTALL_DATA} ${WRKSRC}/Plugins/${jar} \
${PREFIX}/${JAR_DIR}/Plugins
.endfor
@${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/${PORTNAME}
.ifndef(NOPORTDOCS)
@${MKDIR} ${DATADIR}/Plugins
cd ${WRKSRC} \
&& ${FIND} ${JAR_FILES} -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
${INSTALL_SCRIPT} ${WRKDIR}/aoi.sh ${PREFIX}/bin/aoi
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for doc in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
.endfor
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
.endif
.include <bsd.port.pre.mk>
JAR_FILE= ArtOfIllusion.jar
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -0,0 +1,7 @@
#!/bin/sh
#
# $FreeBSD$
( cd "%%DATADIR%%" && \
"%%LOCALBASE%%/bin/java" -jar "%%DATADIR%%/ArtOfIllusion.jar" "${@}" )

View file

@ -1,9 +0,0 @@
#!/bin/sh
PREFIX="%%PREFIX%%"
JAVAVM="%%JAVAVM%%"
JAR_DIR="%%JAR_DIR%%"
JAR_FILE="%%JAR_FILE%%"
( cd ${PREFIX}/${JAR_DIR} && \
${JAVAVM} -jar ${PREFIX}/${JAR_DIR}/${JAR_FILE} "${@}" )

View file

@ -1,13 +0,0 @@
bin/aoi
%%PORTDOCS%%share/doc/aoi/HISTORY
%%PORTDOCS%%share/doc/aoi/LICENSE
%%PORTDOCS%%share/doc/aoi/README
share/java/jar/aoi/ArtOfIllusion.jar
share/java/jar/aoi/Plugins/OSSpecific.jar
share/java/jar/aoi/Plugins/Renderers.jar
share/java/jar/aoi/Plugins/Tools.jar
share/java/jar/aoi/Plugins/Translators.jar
@dirrm share/java/jar/aoi/Plugins
@dirrm share/java/jar/aoi
@unexec rmdir %D/share/java/jar 2>/dev/null || true
%%PORTDOCS%%@dirrm share/doc/aoi