0
@@ -15,6 +15,7 @@ checksums md5 b38b895d47ef7058e4d42b52fdae23f4 \
0
rmd160 4df75842c4cda825ba5f36f5e5235e796e49b1bb
0
+depends_run port:xmlcatmgr
0
set dirs_to_install "catalog.xml common eclipse extensions fo highlighting \
0
@@ -33,3 +34,44 @@ destroot {
0
file copy ${worksrcpath}/${dirname} ${destroot}/${prefix}/${instdir}
0
+ # xmlcatmgr as installed by MacPorts defaults to using
0
+ # ${prefix}/etc/xml/docbook (for XML) and ${prefix}/etc/xml/docbook (for
0
+ # SGML) if no catalog is specified, but we'll specify the path just in case
0
+ # users have another installation of xmlcatmgr and happen to have it before
0
+ # ${prefix}/bin in their PATH.
0
+ set catalog.xml ${prefix}/etc/xml/catalog
0
+ # Make the directory if it doesn't exist
0
+ if {![file exists ${prefix}/etc/xml]} {
0
+ xinstall -m 755 -d ${prefix}/etc/xml
0
+ # Create the catalog file if it doesn't exist
0
+ if {![file exists ${catalog.xml}]} {
0
+ system "xmlcatmgr create -c ${catalog.xml}"
0
+ # Add the nextCatalog entry to the catalog if it doesn't exist
0
+ if {[catch {exec xmlcatmgr lookup ${prefix}/${instdir}/catalog.xml}]} {
0
+ system "xmlcatmgr add nextCatalog ${prefix}/${instdir}/catalog.xml"
0
+ # Once MacPorts does get a post-deactivate hook, this should change to
0
+ # auto-detect whether or not the user's installed version has the hook, and
0
+ # only print the message if it doesn't.
0
+ "######################################################################"
0
+ ui_msg "# As MacPorts does not currently have a post-deactivate hook,\
0
+ \n# you will need to ensure that you manually remove the catalog\
0
+ \n# entry for this port when you uninstall it. To do so, run\
0
+ \n# \"xmlcatmgr remove nextCatalog ${prefix}/${instdir}/catalog.xml\"."
0
+ "######################################################################"
0
+# This will remove the catalog entry for this port once a post-deactivate hook
0
+# has been implemented.
0
+# system "xmlcatmgr remove nextCatalog ${prefix}/${instdir}/catalog.xml"
Comments
No one has commented yet.