diff --git a/astro/openmap/Makefile b/astro/openmap/Makefile index 45586719c077..2f7e63334d3b 100644 --- a/astro/openmap/Makefile +++ b/astro/openmap/Makefile @@ -7,35 +7,30 @@ PORTNAME= openmap PORTVERSION= 4.6.2 +PORTREVISION= 1 CATEGORIES= astro java devel graphics MASTER_SITES= http://openmap.bbn.com/src/ MAINTAINER= des@FreeBSD.org COMMENT= Java toolkit for manipulating and displaying geographic data -BUILD_DEPENDS= ant:${PORTSDIR}/devel/apache-ant RUN_DEPENDS= classpath:${PORTSDIR}/java/javavmwrapper -USE_JAVA= 1.4+ +USE_JAVA= yes +JAVA_VERSION= 1.4+ PKGMESSAGE= ${WRKSRC}/LICENSE -ANT_PROPERTIES= openmap.home=${WRKSRC} \ - idl2java.compiler=${JAVA_HOME}/bin/idlj -ANT_CMD= ${LOCALBASE}/bin/ant ${ANT_PROPERTIES:C/^/-D/} +USE_ANT= yes +MAKE_ARGS+= -Dopenmap.home=${WRKSRC} \ + -Didl2java.compiler=${JAVA_HOME}/bin/idlj + +SUB_FILES= openmap.sh do-configure: (cd ${WRKSRC} && ${FIND} . -type f -print0 | ${XARGS} -0 \ ${REINPLACE_CMD} -e 's,/usr/local/openmap,${DATADIR},g') (cd ${WRKSRC} && ${FIND} . -type f -name \*.bak -delete) - ${SED} \ - -e 's,%%CLASSPATH%%,${LOCALBASE}/bin/classpath,' \ - -e 's,%%JAVAVM%%,${LOCALBASE}/bin/java,' \ - -e 's,%%DATADIR%%,${DATADIR},' \ - <${FILESDIR}/openmap.sh >${WRKDIR}/openmap.sh - -do-build: - (cd ${WRKSRC} && ${ANT_CMD}) do-install: (cd ${WRKSRC}/lib && \ diff --git a/astro/openmap/files/openmap.sh b/astro/openmap/files/openmap.sh deleted file mode 100644 index 7974ab6bbbba..000000000000 --- a/astro/openmap/files/openmap.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -cd %%DATADIR%% -exec %%JAVAVM%% \ - -classpath $(%%CLASSPATH%%) \ - com.bbn.openmap.app.OpenMap "%@" diff --git a/astro/openmap/files/openmap.sh.in b/astro/openmap/files/openmap.sh.in new file mode 100644 index 000000000000..d1a769c254e4 --- /dev/null +++ b/astro/openmap/files/openmap.sh.in @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +cd "%%DATADIR%%" +JAVA_VERSION="%%JAVA_VERSION%%" \ + exec "%%LOCALBASE%%/bin/java" \ + -classpath $(%%LOCALBASE%%/bin/classpath) \ + com.bbn.openmap.app.OpenMap "%@" diff --git a/astro/openmap/pkg-plist b/astro/openmap/pkg-plist index 865bb11144e9..fe830d2fc9f4 100644 --- a/astro/openmap/pkg-plist +++ b/astro/openmap/pkg-plist @@ -2639,11 +2639,11 @@ %%PORTDOCS%%%%DOCSDIR%%/user-guide-4.html %%PORTDOCS%%%%DOCSDIR%%/user-guide.html bin/openmap -share/java/classes/milStd2525_png.jar -share/java/classes/omcorba.jar -share/java/classes/omj3d.jar -share/java/classes/omsvg.jar -share/java/classes/openmap.jar +%%JAVAJARDIR%%/milStd2525_png.jar +%%JAVAJARDIR%%/omcorba.jar +%%JAVAJARDIR%%/omj3d.jar +%%JAVAJARDIR%%/omsvg.jar +%%JAVAJARDIR%%/openmap.jar @dirrm %%DATADIR%%/data/shape/cntry02 @dirrm %%DATADIR%%/data/shape @dirrm %%DATADIR%%/data