Changeset 130432 for trunk/dports/java


Ignore:
Timestamp:
Dec 30, 2014, 1:48:48 PM (5 years ago)
Author:
nicos@…
Message:

jabref: adding oracle variant compatible with newer jvms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/java/jabref/Portfile

    r118082 r130432  
    33
    44PortSystem          1.0
     5PortGroup           java 1.0
    56
    67name                jabref
     
    3637
    3738destroot.cmd        ant
    38 destroot.target     jars osxjar
     39if {![variant_isset oracle]} {
     40    destroot.target     jars osxjar
     41} else {
     42    destroot.target     jars bundle
     43}
    3944destroot.destdir   
    4045
     46variant oracle description "Compile based on Oracle's Java (7 or 8)" {
     47    depends_build-delete    port:jarbundler
     48    depends_build-append    port:appbundler
     49    patchfiles              patch-build.xml.diff
     50}
     51
    4152pre-configure {
    42     #Using macports jarbundler
    43     reinplace "s|classpath=\"\${lib.dir}/jarbundler-2.2.0.jar\"|classpath=\"${prefix}/share/java/jarbundler.jar\"|g" \
    44         ${worksrcpath}/build.xml
    45     #Putting destination to destroot
    46     reinplace "s|<jarbundler dir=\"\${build.lib}\"|<jarbundler \
    47         dir=\"${destroot}${applications_dir}\"|g" ${worksrcpath}/build.xml
    48     reinplace "s|<replace file=\"\${build.lib}|<replace \
    49         file=\"${destroot}${applications_dir}|g" ${worksrcpath}/build.xml
     53    if {![variant_isset oracle]} {
     54        #Using macports jarbundler
     55        reinplace "s|classpath=\"\${lib.dir}/jarbundler-2.2.0.jar\"|classpath=\"${prefix}/share/java/jarbundler.jar\"|g" \
     56            ${worksrcpath}/build.xml
     57        #Putting destination to destroot
     58        reinplace "s|<jarbundler dir=\"\${build.lib}\"|<jarbundler \
     59            dir=\"${destroot}${applications_dir}\"|g" ${worksrcpath}/build.xml
     60        reinplace "s|<replace file=\"\${build.lib}|<replace \
     61            file=\"${destroot}${applications_dir}|g" ${worksrcpath}/build.xml
     62    } else {
     63        reinplace "s|@DESTROOT@|${destroot}|g" ${worksrcpath}/build.xml
     64        reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" ${worksrcpath}/build.xml
     65        reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/build.xml
     66        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/build.xml
     67        reinplace "s|@JAVAHOME@|${java_home}|g" ${worksrcpath}/build.xml
     68    }
     69}
     70
     71post-destroot {
     72    if {[variant_isset oracle]} {
     73        xinstall -d 0755 ${destroot}${applications_dir}/JabRef.app/Contents/Java
     74        file copy ${worksrcpath}/build/lib/JabRef-2.10.jar \
     75            ${destroot}${applications_dir}/JabRef.app/Contents/Java/JabRef-2.10.jar
     76        file copy ${worksrcpath}/build/images/JabRef-Logo.icns \
     77            ${destroot}${applications_dir}/JabRef.app/Contents/Resources/JabRef.icns
     78        reinplace "s|GenericApp.icns|JabRef.icns|g" \
     79            ${destroot}${applications_dir}/JabRef.app/Contents/Info.plist
     80    }
    5081}
    5182
Note: See TracChangeset for help on using the changeset viewer.