Ticket #27160: Portfile

File Portfile, 3.2 KB (added by oksmith77, 14 years ago)

updated to version 1.76.1

Line 
1# $Id: Portfile 70583 2010-08-14 13:56:39Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name        docbook-xsl
6version     1.76.1
7categories  textproc
8description The docbook xsl stylesheets
9long_description \
10    The DocBook XSL stylesheets are the official stylesheets for transforming\
11    DocBook XML documents into other document formats via XSLT.
12platforms   darwin
13maintainers     boeyms openmaintainer
14master_sites    sourceforge:docbook
15homepage    http://docbook.sourceforge.net/
16depends_run port:xmlcatmgr
17
18use_zip   yes
19
20checksums           md5     5693d578cd5517ed462a95e0ac82717b \
21                    sha1    94d5982ba9441e0a7bf3c8db3bae2b643fd0c452 \
22                    rmd160  98712a0611e29e273966ea426b49252b7512baaf
23
24supported_archs noarch
25use_configure   no
26build       {}
27set srcxslpaths "catalog.xml common eclipse extensions fo highlighting \
28                html htmlhelp images javahelp lib manpages params \
29                profiling roundtrip slides template tools xhtml VERSION"
30set srcdocpaths "BUGS README RELEASE-NOTES.html RELEASE-NOTES.xml \
31                TODO VERSION NEWS COPYING"
32set instxsldir  "share/xsl/${name}"
33set instdocdir  "share/doc/${name}"
34
35destroot {
36    foreach pathname "${instxsldir} ${instdocdir}" {
37        xinstall -m 755 -d ${destroot}${prefix}/${pathname}
38    }
39    foreach pathname ${srcxslpaths} {
40        copy ${worksrcpath}/${pathname} ${destroot}${prefix}/${instxsldir}
41    }
42    foreach pathname ${srcdocpaths} {
43        copy ${worksrcpath}/${pathname} ${destroot}${prefix}/${instdocdir}
44    }
45}
46post-activate {
47    # xmlcatmgr as installed by MacPorts defaults to using
48    # ${prefix}/etc/xml/docbook (for XML) and ${prefix}/etc/xml/docbook (for
49    # SGML) if no catalog is specified, but we'll specify the path just in case
50    # users have another installation of xmlcatmgr and happen to have it before
51    # ${prefix}/bin in their PATH.
52    set catalog.xml ${prefix}/etc/xml/catalog
53
54    # Make the directory if it doesn't exist
55    if {![file exists ${prefix}/etc/xml]} {
56        xinstall -m 755 -d ${prefix}/etc/xml
57    }
58
59    # Create the catalog file if it doesn't exist
60    if {![file exists ${catalog.xml}]} {
61        system "xmlcatmgr create -c ${catalog.xml}"
62    }
63
64    # Add the nextCatalog entry to the catalog if it doesn't exist
65    if {[catch {exec xmlcatmgr lookup ${prefix}/${instxsldir}/catalog.xml}]} {
66        system "xmlcatmgr add nextCatalog ${prefix}/${instxsldir}/catalog.xml"
67    }
68}
69
70if {${registry.format} == "receipt_flat"} {
71    notes \
72"######################################################################
73# As the flat registry format does not support post-deactivate hooks,
74# you will need to ensure that you manually remove the catalog
75# entry for this port when you uninstall it.  To do so, run
76# \"xmlcatmgr remove nextCatalog ${prefix}/${instxsldir}/catalog.xml\".
77######################################################################"
78}
79
80# This will remove the catalog entry for this port.
81post-deactivate {
82    system "xmlcatmgr remove nextCatalog ${prefix}/${instxsldir}/catalog.xml"
83}
84
85variant doc description {Install full DocBook XSL documentation} {
86    distfiles-append    [suffix ${name}-doc-${version}]
87    lappend srcdocpaths doc
88}
89
90livecheck.distname  ${name}