[119131] trunk/dports/textproc/openjade/Portfile

pixilla at macports.org pixilla at macports.org
Thu Apr 17 15:40:03 PDT 2014


Revision: 119131
          https://trac.macports.org/changeset/119131
Author:   pixilla at macports.org
Date:     2014-04-17 15:40:03 -0700 (Thu, 17 Apr 2014)
Log Message:
-----------
textproc/openjade:
- Use new PortGroup xmlcatalog.

Modified Paths:
--------------
    trunk/dports/textproc/openjade/Portfile

Modified: trunk/dports/textproc/openjade/Portfile
===================================================================
--- trunk/dports/textproc/openjade/Portfile	2014-04-17 22:39:43 UTC (rev 119130)
+++ trunk/dports/textproc/openjade/Portfile	2014-04-17 22:40:03 UTC (rev 119131)
@@ -2,22 +2,22 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup xmlcatalog 1.0
 
 name            openjade
 version         1.3.2
-revision        7
+revision        8
 categories      textproc
 license         MIT
 maintainers     fourpalms.org:lockhart openmaintainer
 description     James Clark's implementation of DSSSL
+long_description \
+    OpenJade is an implementation of ISO/IEC 10179:1996 \
+    standard DSSSL language.
 homepage        http://openjade.sourceforge.net/
 platforms       darwin freebsd
+master_sites    sourceforge
 
-long_description OpenJade is an implementation of ISO/IEC 10179:1996 \
-                 standard DSSSL language.
-
-master_sites    sourceforge:project/openjade/openjade/${version}
-
 checksums       md5 7df692e3186109cc00db6825b777201e
 
 patchfiles      clang.patch \
@@ -30,25 +30,19 @@
 depends_lib     port:opensp
 depends_run     port:xmlcatmgr
 
-# xmlcatmgr as installed by MacPorts defaults to using
-# ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for
-# SGML). For historic reasons, openjade expects the catalog to be in
-# share/sgml/catalog. To avoid breaking existing setup, we simply add
-# a reference to the root catalog (/etc/sgml/catalog) to openjade's
-# catalog (/share/sgml/catalog)
-set catalog.sgml      ${prefix}/etc/sgml/catalog
-set catalog.openjade  ${prefix}/share/sgml/catalog
- 
-configure.args  --enable-http --enable-html --enable-mif \
-                --disable-dependency-tracking \
-                --enable-default-catalog=${catalog.openjade} \
-                --datadir=${prefix}/share/sgml/openjade \
-                --mandir=${prefix}/share/man
+set openjade.catalog ${prefix}/share/sgml/catalog
+set openjade.rootcatalog ${prefix}/share/sgml/openjade/catalog
 
-configure.env-append        LIBS="-L${prefix}/lib"
-configure.cxxflags-append   "-isystem ${prefix}/include -fno-rtti"
-configure.ldflags-delete    "-L${prefix}/lib"
+sgml.catalog ${openjade.rootcatalog}
+# Add the root catalog to the openjade catalog
+sgml.addtocatalog "${openjade.catalog}" "${sgml.rootcatalog}"
 
+configure.args --enable-http --enable-html --enable-mif \
+               --disable-dependency-tracking \
+               --enable-default-catalog=${openjade.catalog} \
+               --datadir=${prefix}/share/sgml/openjade \
+               --mandir=${prefix}/share/man
+
 # Fix build failure on Tiger due to use of -isystem
 compiler.blacklist    gcc-4.0 gcc-3.3
 
@@ -58,6 +52,10 @@
     set cxx_stdlibflags "-stdlib=${configure.cxx_stdlib}"
 }
 
+configure.env-append      LIBS="-L${prefix}/lib"
+configure.cxxflags-append "-isystem ${prefix}/include -fno-rtti"
+configure.ldflags-delete  "-L${prefix}/lib"
+
 post-configure  {
     reinplace "s|^#pragma implementation||g" ${worksrcpath}/grove/Node.cxx
     reinplace "s|^#pragma implementation||g" ${worksrcpath}/msggen.pl
@@ -75,40 +73,7 @@
 
 destroot.target install install-man
 
-post-destroot   {
+post-destroot {
     system "install -d -m 755 ${destroot}${prefix}/share/sgml/openjade"
     system "install -m 644 ${worksrcpath}/dsssl/* ${destroot}${prefix}/share/sgml/openjade"
 }
-
-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 root catalog file if it doesn't exist
-    if {![file exists ${catalog.sgml}]} {
-        system "xmlcatmgr -s -c ${catalog.sgml} create"
-    }
-
-    # Create the openjade catalog file if it doesn't exist
-    if {![file exists ${catalog.openjade}]} {
-        system "xmlcatmgr -s -c ${catalog.openjade} create"
-    }
-
-    # Add the root catalog to openjade's catalog
-    if {[catch {exec xmlcatmgr -s -c ${catalog.openjade} lookup ${catalog.sgml}}]} {
-        system "xmlcatmgr -s -c ${catalog.openjade} add CATALOG ${catalog.sgml}"
-    }
-
-    # And add openjade's catalog to the root catalog
-    if {[catch {exec xmlcatmgr -s -c ${catalog.sgml} lookup ${prefix}/share/sgml/openjade/catalog}]} {
-        system "xmlcatmgr -s -c ${catalog.sgml} add CATALOG ${prefix}/share/sgml/openjade/catalog"
-    }
-}
-
-# This will remove the catalog entry for this port.
-post-deactivate {
-    # Remove the CATALOG entry from the catalog
-    system "xmlcatmgr -s -c ${catalog.sgml} remove CATALOG ${prefix}/share/sgml/openjade/catalog"
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140417/c8dd5611/attachment.html>


More information about the macports-changes mailing list