Ticket #25910: Portfile

File Portfile, 3.3 KB (added by oksmith77, 13 years ago)

Updated to version 1.76.1

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