[27284] trunk/dports/textproc/xmlroff/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 26 23:47:51 PDT 2007


Revision: 27284
          http://trac.macosforge.org/projects/macports/changeset/27284
Author:   boeyms at macports.org
Date:     2007-07-26 23:47:51 -0700 (Thu, 26 Jul 2007)

Log Message:
-----------
textproc/xmlroff: Update to latest version (0.5.1).

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

Modified: trunk/dports/textproc/xmlroff/Portfile
===================================================================
--- trunk/dports/textproc/xmlroff/Portfile	2007-07-27 06:47:44 UTC (rev 27283)
+++ trunk/dports/textproc/xmlroff/Portfile	2007-07-27 06:47:51 UTC (rev 27284)
@@ -2,8 +2,7 @@
 
 PortSystem			1.0
 name				xmlroff
-version				0.3.8
-revision			1
+version				0.5.1
 categories			textproc
 maintainers			nomaintainer at macports.org
 description			An XSL formatter producing PDF and PostScript.
@@ -16,7 +15,7 @@
 master_sites			sourceforge:xmlroff
 
 platforms			darwin
-checksums			md5 58c8995b7c5750806e2fd3a5ce8ad623
+checksums			md5 83cc19e284efb140008d11863fe74ff2
 
 depends_lib			lib:libxml2.2:libxml2 \
 				lib:libatk-1.0:atk \
@@ -32,3 +31,47 @@
 				lib:libpangoxsl-1:pangoxsl
 
 configure.env			LDFLAGS="-framework CoreFoundation"
+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
+
+    # Specify catalog to add (catalog for xmlroff's libfo library)
+    set libfocatalog ${prefix}/share/xml/libfo-${version}/catalog.xml
+
+    # 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 ${libfocatalog}}]} {
+        system "xmlcatmgr add nextCatalog ${libfocatalog}"
+    }
+    # 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 ${libfocatalog}\"."
+    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 ${libfocatalog}"
+#}
+

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


More information about the macports-changes mailing list