source: trunk/dports/textproc/fop/Portfile

Last change on this file was 147955, checked in by khindenburg@…, 19 months ago

fop: add subport fop2 (2.1) since there are so many ports that depend on

port:fop and there are a number of significant changes in 2.x #47977

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# $Id: Portfile 147955 2016-04-21 03:46:30Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                fop
6version             1.1
7categories          textproc java
8license             Apache-2
9maintainers         nomaintainer
10platforms           darwin
11supported_archs     noarch
12description         Apache FOP Java XSL-FO Print Formatter
13long_description    Apache FOP is the world's first print formatter driven by \
14                    XSL formatting objects. It is a Java application that \
15                    reads a formatting object tree conforming to the XSL 1.0 \
16                    Recommendation (15 October 2001) and then turns it into a \
17                    PDF document, certain other output formats or allows you \
18                    to preview it directly on screen. Some parts of the XSL \
19                    1.1 specification (work in progress!) have also been \
20                    implemented.
21homepage            http://xmlgraphics.apache.org/fop/
22
23# Apache recommends at present that FOP be linked to FOP-specific versions of
24# the Java libraries that it depends on (which are distributed with FOP), as
25# both it and some of those libraries are undergoing a lot of changes, and they
26# do not guarantee that FOP will work with any other versions.  We therefore
27# might as well only use the binary distribution, unless anyone else comes up
28# with a compelling reason to change this.  For the same reason, we also stick
29# to the directory structure within the archive, since it isolates FOP and its
30# libraries from conflicts with other versions.
31
32if {${name} eq ${subport}} {
33    conflicts       ${name}2
34
35    checksums       md5     8b6f4747482d77449fd4c30df129a507 \
36                    sha1    6b96c3f3fd5efe9f2b6b54bfa96161ec3f6a1dbc \
37                    rmd160  fdeee43b73f0b005738661bb9b86d9f9a4434f63
38
39    patchfiles      java_home.patch
40
41    livecheck.type  none
42}
43
44# It may be possible to install both versions just by changing subport fop2's
45# bin/fop to bin/fop2
46subport ${name}2 {
47    conflicts       ${name}
48    version         2.1
49
50    checksums       rmd160  0b261f214c2d841147f84a76ce14c78d473d1b59 \
51                    sha256  a93b59aa4d0b6d573c9090d8f21dee6c7d0c449a4bd2d48a1723e233dfb423ea
52
53    livecheck.type  regex
54    livecheck.url   http://www.apache.org/dist/xmlgraphics/fop/binaries/
55    livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)-bin${extract.suffix}"
56}
57
58distname            ${name}-${version}-bin
59master_sites        apache:xmlgraphics/fop/binaries/
60
61worksrcdir          ${name}-${version}
62
63use_configure       no
64build   {}
65pre-destroot {
66    delete ${worksrcpath}/fop.bat
67    delete ${worksrcpath}/fop.cmd
68    delete ${worksrcpath}/fop.js
69}
70destroot    {
71    xinstall -m 755 -d ${destroot}${prefix}/share/java/fop/${version}
72    set foppaths [glob ${worksrcpath}/*]
73    foreach foppath ${foppaths} {
74        copy $foppath ${destroot}${prefix}/share/java/fop/${version}
75    }
76    ln -fs ${prefix}/share/java/fop/${version}/fop \
77        ${destroot}${prefix}/bin/fop
78    xinstall -m 755 -d ${destroot}${prefix}/share/doc/fop/${version}
79    foreach fopdoc {KEYS LICENSE README NOTICE status.xml} {
80        ln -fs ${prefix}/share/java/fop/${version}/${fopdoc} \
81            ${destroot}${prefix}/share/doc/fop/${version}/${fopdoc}
82    }
83    foreach docdir {docs javadocs} {
84        ln -fs ${prefix}/share/java/fop/${version}/${docdir} \
85            ${destroot}${prefix}/share/doc/fop/${version}/${docdir}
86    }
87}
88
89# Skeleton of a source variant, despite the comments above, just in case it
90# proves useful to have one in the future :-)
91#
92#variant source description {Build FOP from source instead} {
93#    distname            ${name}-${version}-src
94#    master_sites        apache:xmlgraphics/fop/source/
95#    checksums           md5 184c578a6269a8287ed150e0fc12868d \
96#                        sha1 3efc0020fdbf14a12851acf6020ea723aebe2af6 \
97#                        rmd160 c047f7512a08120cfed07536c0849b2a999e96d4
98#
99#    depends_build       bin:ant:apache-ant
100#    build.env-append    JAVA_HOME=/Library/Java/Home
101#    build.cmd           ant
102#    # Re-building local docs requires forrest, for which we don't yet have a
103#    # port.
104#    #build.target       all docs javadocs
105#    build.target        all javadocs
106#}
Note: See TracBrowser for help on using the repository browser.