source: trunk/dports/java/jabref/Portfile

Last change on this file was 132163, checked in by nicos@…, 3 years ago

jabref: adding missing patch file, adding flag for Retina displays

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 132163 2015-01-25 05:41:03Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           java 1.0
6
7name                jabref
8version             2.10
9categories          java
10platforms           darwin
11license             GPL-2+
12maintainers         nicos openmaintainer
13
14description         JabRef is an java-based bibliography reference manager.
15long_description    JabRef is an open source bibliography reference manager. \
16                    The native file format used by JabRef is BibTeX, the standard \
17                    LaTeX bibliography format.\
18
19homepage            http://jabref.sourceforge.net/index.php
20distname            JabRef-${version}-src
21master_sites        sourceforge:project/jabref/jabref/${version}
22
23checksums           rmd160  7144b51058f69953ef0440900f38311a7a4a916c \
24                    sha256  09b57afcfeb1730b58a887dc28f0f4c803e9c00fade1f57245ab70e2a98ce6ad
25
26worksrcdir          ${name}-${version}
27
28use_bzip2           yes
29
30depends_build       port:apache-ant \
31                    port:jarbundler
32
33use_configure       no
34
35build.cmd           ant
36build.target        build osx
37
38destroot.cmd        ant
39if {![variant_isset oracle]} {
40    destroot.target     jars osxjar
41} else {
42    destroot.target     jars bundle
43}
44destroot.destdir   
45
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
52pre-configure {
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        #Adding flag for Retina displays
81        reinplace "s|<key>NSHumanReadableCopyright</key>|<key>NSHighResolutionCapable</key>\\\n<true/>\\\n<key>NSHumanReadableCopyright</key>|g" \
82            ${destroot}${applications_dir}/JabRef.app/Contents/Info.plist
83    }
84}
85
86livecheck.type      sourceforge
87livecheck.url       http://sourceforge.net/projects/jabref/files/jabref/
Note: See TracBrowser for help on using the repository browser.