[25675] trunk/dports/textproc

source_changes at macosforge.org source_changes at macosforge.org
Sun May 27 23:58:03 PDT 2007


Revision: 25675
          http://trac.macosforge.org/projects/macports/changeset/25675
Author:   boeyms at macports.org
Date:     2007-05-27 23:58:03 -0700 (Sun, 27 May 2007)

Log Message:
-----------
textproc/docbook-xml-4.1.2:
 * Port providing the XML DTDs for DocBook V4.1.2, including addition of entries
   to the local XML catalog on activation.  In consultation with the current
   maintainer of the docbook-xml ports (rhwood), this will replace the current
   docbook-xml-412 port in order to provide a fixed and standardised port name
   for this DocBook version.

Added Paths:
-----------
    trunk/dports/textproc/docbook-xml-4.1.2/
    trunk/dports/textproc/docbook-xml-4.1.2/Portfile

Added: trunk/dports/textproc/docbook-xml-4.1.2/Portfile
===================================================================
--- trunk/dports/textproc/docbook-xml-4.1.2/Portfile	                        (rev 0)
+++ trunk/dports/textproc/docbook-xml-4.1.2/Portfile	2007-05-28 06:58:03 UTC (rev 25675)
@@ -0,0 +1,86 @@
+# $Id$
+
+PortSystem 1.0
+
+name        docbook-xml-4.1.2
+version     [strsed ${name} {s/docbook-xml-//}]
+description Version ${version} of the DocBook XML DTDs
+categories  textproc
+platforms   darwin
+maintainers boeyms at macports.org openmaintainer at macports.org
+distname    docbkx412
+
+homepage    http://www.docbook.org/xml/${version}/
+master_sites    http://www.oasis-open.org/docbook/xml/${version}/
+checksums   md5 900d7609fb7e6d78901b357e4acfbc17 \
+            sha1 b9ae7a41056bfaf885581812d60651b7b5531519 \
+            rmd160 89af805434b21f12f7be7ef58cf52edeb458e0c9
+
+worksrcdir  ${distname}
+
+depends_run port:xmlcatmgr
+
+use_zip     yes
+
+# The extract.dir and pre-extract lines are to prevent the source "tarbombing"
+# into the work directory and polluting it.
+extract.dir ${worksrcpath}
+pre-extract {
+    xinstall -m 755 -d ${worksrcpath}
+}
+
+configure   {}
+build       {}
+
+set install_dir    ${prefix}/share/xml/docbook/${version}
+
+destroot {
+    set destroot_dir    ${destroot}${install_dir}
+    set destroot_files  [readdir ${worksrcpath}]
+    xinstall -m 755 -d ${destroot_dir}
+    foreach file ${destroot_files} {
+        copy ${worksrcpath}/${file} ${destroot_dir}
+    }
+}
+
+post-activate {
+    # xmlcatmgr as installed by MacPorts defaults to using
+    # ${prefix}/etc/xml/docbook (for XML) and ${prefix}/etc/xml/docbook (for
+    # SGML) if no catalog is specified, but we'll specify the path just in case
+    # users have another installation of xmlcatmgr and happen to have it before
+    # ${prefix}/bin in their PATH.
+    set catalog.xml ${prefix}/etc/xml/catalog
+
+    # Make the directory if it doesn't exist
+    if {![file exists ${prefix}/etc/xml]} {
+        xinstall -m 755 -d ${prefix}/etc/xml 
+    }
+
+    # Create the catalog file if it doesn't exist
+    if {![file exists ${catalog.xml}]} {
+        system "xmlcatmgr create -c ${catalog.xml}"
+    }
+
+    # Add the nextCatalog entry to the catalog if it doesn't exist
+    if {[catch {exec xmlcatmgr lookup ${install_dir}/catalog.xml}]} {
+        system "xmlcatmgr add nextCatalog ${install_dir}/catalog.xml"
+    }
+
+    # Once MacPorts does get a post-deactivate hook, this should change to
+    # auto-detect whether or not the user's installed version has the hook, and
+    # only print the message if it doesn't.
+    ui_msg \
+    "######################################################################"
+    ui_msg "# As MacPorts does not currently have a post-deactivate hook,\
+        \n# you will need to ensure that you manually remove the catalog\
+        \n# entry for this port when you uninstall it.  To do so, run\
+        \n# \"xmlcatmgr remove nextCatalog ${install_dir}/catalog.xml\"."
+    ui_msg \
+    "######################################################################"
+}
+
+# This will remove the catalog entry for this port once a post-deactivate hook
+# has been implemented.
+#post-deactivate {
+#    system "xmlcatmgr remove nextCatalog ${install_dir}/catalog.xml"
+#}


Property changes on: trunk/dports/textproc/docbook-xml-4.1.2/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070527/def2ba9e/attachment.html


More information about the macports-changes mailing list