aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/jdictionary
diff options
context:
space:
mode:
authorhq <hq@FreeBSD.org>2004-12-19 11:34:56 +0800
committerhq <hq@FreeBSD.org>2004-12-19 11:34:56 +0800
commit0d03238ac07cd754daa0f4e8a20c8bccc28a63ed (patch)
tree3011ec7794f34a48bab4e5e6bc3c04931c5749b6 /textproc/jdictionary
parent1b36f3f4b619cbbbb75ba76735ca9119193fe5e3 (diff)
downloadfreebsd-ports-gnome-0d03238ac07cd754daa0f4e8a20c8bccc28a63ed.tar.gz
freebsd-ports-gnome-0d03238ac07cd754daa0f4e8a20c8bccc28a63ed.tar.zst
freebsd-ports-gnome-0d03238ac07cd754daa0f4e8a20c8bccc28a63ed.zip
- Use bsd.java.mk
- Use SUB_LIST to transform the launcher shell script - Use DATADIR=${JAVASHAREDIR}/${PORTNAME} as encouraged in the Porter's handbook for Java application ports. - Add $FreeBSD$ tags where missing - Use INSTALL_DATA to install JAR file - Minor cosmetic improvements - Bump PORTREVISION as the location of files has changed - Add support for plugin ports (this port will act as the MASTERDIR for plugin ports that will include Makefile.plugin) Reviewed by: glewis Approved by: maintainer
Diffstat (limited to 'textproc/jdictionary')
-rw-r--r--textproc/jdictionary/Makefile29
-rw-r--r--textproc/jdictionary/Makefile.plugin38
-rw-r--r--textproc/jdictionary/files/jdictionary.sh3
-rw-r--r--textproc/jdictionary/files/jdictionary.sh.in6
-rw-r--r--textproc/jdictionary/pkg-plist5
-rw-r--r--textproc/jdictionary/pkg-plist.plugin3
6 files changed, 64 insertions, 20 deletions
diff --git a/textproc/jdictionary/Makefile b/textproc/jdictionary/Makefile
index 9b8e1fbea71b..f38390f75d4b 100644
--- a/textproc/jdictionary/Makefile
+++ b/textproc/jdictionary/Makefile
@@ -7,31 +7,30 @@
PORTNAME= jdictionary
PORTVERSION= 1.8
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc java
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR=jdictionary
-DISTNAME= jdictionary-1_8
+MASTER_SITE_SUBDIR=${PORTNAME}
+DISTNAME= ${PORTNAME}-${PORTVERSION:S,.,_,}
MAINTAINER= janos.mohacsi@bsd.hu
-COMMENT= JDictionary - Platform independent, plugin based dictionary
+COMMENT= Platform independent, plugin based dictionary
-RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper \
- ${LOCALBASE}/etc/javavms:${PORTSDIR}/java/jdk13
+RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
+
+USE_JAVA= yes
+JAVA_VERSION= 1.3+
USE_ZIP= yes
-WRKSRC= ${WRKDIR}/jdictionary
-NO_BUILD=yes
+WRKSRC= ${WRKDIR}/${PORTNAME}
+NO_BUILD= yes
-do-configure:
- @${SED} "s|%%PREFIX%%|${PREFIX}|g ; s|%%LOCALBASE%%|${LOCALBASE}|g" \
- ${FILESDIR}/jdictionary.sh > ${WRKDIR}/jdictionary.sh
+DATADIR= ${JAVASHAREDIR}/${PORTNAME}
+SUB_FILES= jdictionary.sh
do-install:
- @if [ ! -d ${PREFIX}/share/java/classes/jdictionary ]; then \
- ${MKDIR} ${PREFIX}/share/java/classes/jdictionary; fi
- ${CP} ${WRKSRC}/jdictionary.jar \
- ${PREFIX}/share/java/classes/jdictionary/
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/jdictionary.jar ${DATADIR}/
${INSTALL_SCRIPT} ${WRKDIR}/jdictionary.sh ${PREFIX}/bin/jdictionary
.include <bsd.port.mk>
diff --git a/textproc/jdictionary/Makefile.plugin b/textproc/jdictionary/Makefile.plugin
new file mode 100644
index 000000000000..1e08f254884f
--- /dev/null
+++ b/textproc/jdictionary/Makefile.plugin
@@ -0,0 +1,38 @@
+# New ports collection makefile for: jdictionary (plugins)
+# Date created: 15.12.2004
+# Whom: hq@FreeBSD.org
+#
+# $FreeBSD$
+#
+
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= jdictionary
+EXTRACT_SUFX= #
+
+MAINTAINER?= janos.mohacsi@bsd.hu
+COMMENT?= JDictionary plugin master port
+
+RUN_DEPENDS+= jdictionary:${PORTSDIR}/textproc/jdictionary
+
+# WARNING: USE_JAVA is set to be able to use JAVASHAREDIR.
+# Please make sure that JAVA_VERSION here is the same as in Makefile.
+USE_JAVA= yes
+JAVA_VERSION= 1.3+
+
+EXTRACT_CMD= ${CP}
+EXTRACT_BEFORE_ARGS= #
+EXTRACT_AFTER_ARGS= ${WRKDIR}
+NO_BUILD= yes
+
+DATADIR= ${JAVASHAREDIR}/jdictionary/Plugins
+
+PLIST= ${MASTERDIR}/pkg-plist.plugin
+MD5_FILE= ${.CURDIR}/distinfo
+DESCR= ${.CURDIR}/pkg-descr
+PLIST_SUB+= DISTNAME=${DISTNAME}
+
+do-install:
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME} ${DATADIR}/
+
+.include <bsd.port.mk>
diff --git a/textproc/jdictionary/files/jdictionary.sh b/textproc/jdictionary/files/jdictionary.sh
deleted file mode 100644
index 4d1644405ef0..000000000000
--- a/textproc/jdictionary/files/jdictionary.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd %%PREFIX%%/share/java/classes/jdictionary
-exec %%LOCALBASE%%/bin/javavm -jar %%PREFIX%%/share/java/classes/jdictionary/jdictionary.jar
diff --git a/textproc/jdictionary/files/jdictionary.sh.in b/textproc/jdictionary/files/jdictionary.sh.in
new file mode 100644
index 000000000000..e5db42f7fd64
--- /dev/null
+++ b/textproc/jdictionary/files/jdictionary.sh.in
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+cd "%%DATADIR%%"
+exec "%%LOCALBASE%%/bin/java" -jar "%%DATADIR%%/jdictionary.jar" "@*"
diff --git a/textproc/jdictionary/pkg-plist b/textproc/jdictionary/pkg-plist
index 2230943e244c..b637f1d34ab1 100644
--- a/textproc/jdictionary/pkg-plist
+++ b/textproc/jdictionary/pkg-plist
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
bin/jdictionary
-share/java/classes/jdictionary/jdictionary.jar
-@dirrm share/java/classes/jdictionary
+%%DATADIR%%/jdictionary.jar
+@dirrm %%DATADIR%%
diff --git a/textproc/jdictionary/pkg-plist.plugin b/textproc/jdictionary/pkg-plist.plugin
new file mode 100644
index 000000000000..8f731b35b7cc
--- /dev/null
+++ b/textproc/jdictionary/pkg-plist.plugin
@@ -0,0 +1,3 @@
+@comment $FreeBSD$
+%%DATADIR%%/%%DISTNAME%%
+@unexec rmdir %D/%%DATADIR%% || true