[130432] trunk/dports/java/jabref/Portfile
nicos at macports.org
nicos at macports.org
Tue Dec 30 05:48:48 PST 2014
Revision: 130432
https://trac.macports.org/changeset/130432
Author: nicos at macports.org
Date: 2014-12-30 05:48:48 -0800 (Tue, 30 Dec 2014)
Log Message:
-----------
jabref: adding oracle variant compatible with newer jvms
Modified Paths:
--------------
trunk/dports/java/jabref/Portfile
Modified: trunk/dports/java/jabref/Portfile
===================================================================
--- trunk/dports/java/jabref/Portfile 2014-12-30 12:34:25 UTC (rev 130431)
+++ trunk/dports/java/jabref/Portfile 2014-12-30 13:48:48 UTC (rev 130432)
@@ -2,6 +2,7 @@
# $Id$
PortSystem 1.0
+PortGroup java 1.0
name jabref
version 2.10
@@ -35,19 +36,49 @@
build.target build osx
destroot.cmd ant
-destroot.target jars osxjar
+if {![variant_isset oracle]} {
+ destroot.target jars osxjar
+} else {
+ destroot.target jars bundle
+}
destroot.destdir
+variant oracle description "Compile based on Oracle's Java (7 or 8)" {
+ depends_build-delete port:jarbundler
+ depends_build-append port:appbundler
+ patchfiles patch-build.xml.diff
+}
+
pre-configure {
- #Using macports jarbundler
- reinplace "s|classpath=\"\${lib.dir}/jarbundler-2.2.0.jar\"|classpath=\"${prefix}/share/java/jarbundler.jar\"|g" \
- ${worksrcpath}/build.xml
- #Putting destination to destroot
- reinplace "s|<jarbundler dir=\"\${build.lib}\"|<jarbundler \
- dir=\"${destroot}${applications_dir}\"|g" ${worksrcpath}/build.xml
- reinplace "s|<replace file=\"\${build.lib}|<replace \
- file=\"${destroot}${applications_dir}|g" ${worksrcpath}/build.xml
+ if {![variant_isset oracle]} {
+ #Using macports jarbundler
+ reinplace "s|classpath=\"\${lib.dir}/jarbundler-2.2.0.jar\"|classpath=\"${prefix}/share/java/jarbundler.jar\"|g" \
+ ${worksrcpath}/build.xml
+ #Putting destination to destroot
+ reinplace "s|<jarbundler dir=\"\${build.lib}\"|<jarbundler \
+ dir=\"${destroot}${applications_dir}\"|g" ${worksrcpath}/build.xml
+ reinplace "s|<replace file=\"\${build.lib}|<replace \
+ file=\"${destroot}${applications_dir}|g" ${worksrcpath}/build.xml
+ } else {
+ reinplace "s|@DESTROOT@|${destroot}|g" ${worksrcpath}/build.xml
+ reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" ${worksrcpath}/build.xml
+ reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/build.xml
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/build.xml
+ reinplace "s|@JAVAHOME@|${java_home}|g" ${worksrcpath}/build.xml
+ }
}
+post-destroot {
+ if {[variant_isset oracle]} {
+ xinstall -d 0755 ${destroot}${applications_dir}/JabRef.app/Contents/Java
+ file copy ${worksrcpath}/build/lib/JabRef-2.10.jar \
+ ${destroot}${applications_dir}/JabRef.app/Contents/Java/JabRef-2.10.jar
+ file copy ${worksrcpath}/build/images/JabRef-Logo.icns \
+ ${destroot}${applications_dir}/JabRef.app/Contents/Resources/JabRef.icns
+ reinplace "s|GenericApp.icns|JabRef.icns|g" \
+ ${destroot}${applications_dir}/JabRef.app/Contents/Info.plist
+ }
+}
+
livecheck.type sourceforge
livecheck.url http://sourceforge.net/projects/jabref/files/jabref/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141230/14c00483/attachment.html>
More information about the macports-changes
mailing list