1 | # $Id: Portfile 70583 2010-08-14 13:56:39Z ryandesign@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name docbook-xsl |
---|
6 | version 1.76.1 |
---|
7 | categories textproc |
---|
8 | description The docbook xsl stylesheets |
---|
9 | long_description \ |
---|
10 | The DocBook XSL stylesheets are the official stylesheets for transforming\ |
---|
11 | DocBook XML documents into other document formats via XSLT. |
---|
12 | platforms darwin |
---|
13 | maintainers boeyms openmaintainer |
---|
14 | master_sites sourceforge:docbook |
---|
15 | homepage http://docbook.sourceforge.net/ |
---|
16 | depends_run port:xmlcatmgr |
---|
17 | |
---|
18 | use_zip yes |
---|
19 | |
---|
20 | checksums md5 5693d578cd5517ed462a95e0ac82717b \ |
---|
21 | sha1 94d5982ba9441e0a7bf3c8db3bae2b643fd0c452 \ |
---|
22 | rmd160 98712a0611e29e273966ea426b49252b7512baaf |
---|
23 | |
---|
24 | supported_archs noarch |
---|
25 | use_configure no |
---|
26 | build {} |
---|
27 | set srcxslpaths "catalog.xml common eclipse extensions fo highlighting \ |
---|
28 | html htmlhelp images javahelp lib manpages params \ |
---|
29 | profiling roundtrip slides template tools xhtml VERSION" |
---|
30 | set srcdocpaths "BUGS README RELEASE-NOTES.html RELEASE-NOTES.xml \ |
---|
31 | TODO VERSION NEWS COPYING" |
---|
32 | set instxsldir "share/xsl/${name}" |
---|
33 | set instdocdir "share/doc/${name}" |
---|
34 | |
---|
35 | destroot { |
---|
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 | } |
---|
46 | post-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 | |
---|
70 | if {${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. |
---|
81 | post-deactivate { |
---|
82 | system "xmlcatmgr remove nextCatalog ${prefix}/${instxsldir}/catalog.xml" |
---|
83 | } |
---|
84 | |
---|
85 | variant doc description {Install full DocBook XSL documentation} { |
---|
86 | distfiles-append [suffix ${name}-doc-${version}] |
---|
87 | lappend srcdocpaths doc |
---|
88 | } |
---|
89 | |
---|
90 | livecheck.distname ${name} |
---|