summaryrefslogtreecommitdiff
path: root/misc/openoffice2-bin
diff options
context:
space:
mode:
authormrauch <mrauch@pkgsrc.org>2005-10-23 14:38:30 +0000
committermrauch <mrauch@pkgsrc.org>2005-10-23 14:38:30 +0000
commitbc9a97eb7bd24ca8cbad4dd537067b2aecef4101 (patch)
tree3ea963f5100aaf5986312c441c011caf7872ddfc /misc/openoffice2-bin
parentb884833b6701e5fd764edee94e867d17b8396f85 (diff)
downloadpkgsrc-bc9a97eb7bd24ca8cbad4dd537067b2aecef4101.tar.gz
Add optional java support via options framework.
Patch from Geert Hendrickx in mail to tech-pkg.
Diffstat (limited to 'misc/openoffice2-bin')
-rw-r--r--misc/openoffice2-bin/Makefile10
-rw-r--r--misc/openoffice2-bin/options.mk12
2 files changed, 21 insertions, 1 deletions
diff --git a/misc/openoffice2-bin/Makefile b/misc/openoffice2-bin/Makefile
index 6af23f6a968..163068e3d9e 100644
--- a/misc/openoffice2-bin/Makefile
+++ b/misc/openoffice2-bin/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2005/10/21 12:30:58 mrauch Exp $
+# $NetBSD: Makefile,v 1.6 2005/10/23 14:38:30 mrauch Exp $
PKGNAME= openoffice-bin-2.0.0
+PKGREVISION= 1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_OPENOFFICE:=stable/2.0.0/}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@@ -86,14 +87,21 @@ WRKSRC= ${WRKDIR}/OOO680_m3_native_packed-1_en-US.8968/packages
DISTNAME= # Dummy to prevent error from missing DISTNAME
.endif
+.include "options.mk"
+
do-install:
${RM} -f ${WRKDIR}/PLIST.nouniq
${RPM2PKG} ${RPM2PKGARGS} ${WRKSRC}/*.rpm
uniq ${WRKDIR}/PLIST.nouniq >${WRKDIR}/PLIST
+.if !empty(PKG_JVM)
${RM} -f ${PREFIX}/bin/soffice
${SED} -e "s|@@PREFIX@@|${PREFIX}|g" -e "s|@@OO_VER@@|${OO_VER}|g" \
+ -e "s|@@JAVA_HOME@@|${PKG_JAVA_HOME}|g" \
< ${FILESDIR}/soffice > ${PREFIX}/bin/soffice
${CHMOD} +x ${PREFIX}/bin/soffice
+.else
+ ${LN} -sf ../openoffice.org${OO_VER}/program/soffice ${PREFIX}/bin/soffice
+.endif
.for i in scalc sdraw simpress swriter
${LN} -sf ../openoffice.org${OO_VER}/program/${i} ${PREFIX}/bin/${i}
.endfor
diff --git a/misc/openoffice2-bin/options.mk b/misc/openoffice2-bin/options.mk
new file mode 100644
index 00000000000..94aa00bd505
--- /dev/null
+++ b/misc/openoffice2-bin/options.mk
@@ -0,0 +1,12 @@
+# $NetBSD
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.openoffice-bin
+PKG_SUPPORTED_OPTIONS= java
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mjava)
+PKG_JVMS_ACCEPTED= blackdown-jdk13 sun-jdk13 sun-jdk14 sun-jdk15
+USE_JAVA= run
+.include "../../mk/java-vm.mk"
+.endif