[86420] trunk/dports/textproc

dports at macports.org dports at macports.org
Tue Oct 25 06:54:14 PDT 2011


Revision: 86420
          http://trac.macports.org/changeset/86420
Author:   dports at macports.org
Date:     2011-10-25 06:54:14 -0700 (Tue, 25 Oct 2011)
Log Message:
-----------
docbook-sgml-4.2: new port (#31673)

Added Paths:
-----------
    trunk/dports/textproc/docbook-sgml-4.2/
    trunk/dports/textproc/docbook-sgml-4.2/Portfile

Added: trunk/dports/textproc/docbook-sgml-4.2/Portfile
===================================================================
--- trunk/dports/textproc/docbook-sgml-4.2/Portfile	                        (rev 0)
+++ trunk/dports/textproc/docbook-sgml-4.2/Portfile	2011-10-25 13:54:14 UTC (rev 86420)
@@ -0,0 +1,76 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+name            docbook-sgml-4.2
+version         [strsed ${name} {s/docbook-sgml-//}]
+description     Version ${version} of the DocBook SGML DTDs
+long_description \
+    Version ${version} of the DocBook SGML DTDs, which provide a structured,\
+    semantic markup format for books and documentation, especially for\
+    computer hardware and software.
+
+categories      textproc
+license         MIT Permissive
+platforms       darwin
+maintainers     phlo.org:fgp
+supported_archs noarch
+homepage        http://www.docbook.org/sgml/${version}/
+
+depends_run     port:xmlcatmgr port:docbook-dsssl port:iso8879
+
+master_sites    http://www.oasis-open.org/docbook/sgml/${version}/
+distname        docbook-${version}
+worksrcdir      ${distname}
+
+checksums       rmd160  f97bf5c595f1f28d0bb4be6549b27f701da7c9f8 \
+                sha256  67ebd2c94b342718c6865d2de60f5d4ff02d77a7e4b0d9e72a48c45f2b2635c3
+
+use_zip         yes
+extract.mkdir   yes
+
+use_configure   no
+build       {}
+
+set install_dir    ${prefix}/share/sgml/docbook/${version}
+
+# xmlcatmgr as installed by MacPorts defaults to using
+# ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (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.sgml    ${prefix}/etc/sgml/catalog
+set xmlcatmgr.args  "-s -c ${catalog.sgml}"
+
+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 {
+    # Make the directory if it doesn't exist
+    if {![file exists ${prefix}/etc/sgml]} {
+        xinstall -m 755 -d ${prefix}/etc/sgml
+    }
+
+    # Create the catalog file if it doesn't exist
+    if {![file exists ${catalog.sgml}]} {
+        system "xmlcatmgr ${xmlcatmgr.args} create"
+    }
+
+    # Add the CATALOG entry to the catalog if it doesn't exist
+    if {[catch {exec xmlcatmgr ${xmlcatmgr.args} lookup ${install_dir}/docbook.cat}]} {
+        system "xmlcatmgr ${xmlcatmgr.args} add CATALOG ${install_dir}/docbook.cat"
+    }
+}
+
+# This will remove the catalog entry for this port.
+post-deactivate {
+    # Remove the CATALOG entry from the catalog
+    system "xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/docbook.cat"
+}


Property changes on: trunk/dports/textproc/docbook-sgml-4.2/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111025/d9da2606/attachment.html>


More information about the macports-changes mailing list