33 | | # xmlcatmgr as installed by MacPorts defaults to using |
34 | | # ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for |
35 | | # SGML). For historic reasons, openjade expects the catalog to be in |
36 | | # share/sgml/catalog. To avoid breaking existing setup, we simply add |
37 | | # a reference to the root catalog (/etc/sgml/catalog) to openjade's |
38 | | # catalog (/share/sgml/catalog) |
39 | | set catalog.sgml ${prefix}/etc/sgml/catalog |
40 | | set catalog.openjade ${prefix}/share/sgml/catalog |
41 | | |
42 | | configure.args --enable-http --enable-html --enable-mif \ |
43 | | --disable-dependency-tracking \ |
44 | | --enable-default-catalog=${catalog.openjade} \ |
45 | | --datadir=${prefix}/share/sgml/openjade \ |
46 | | --mandir=${prefix}/share/man |
47 | | |
48 | | configure.env-append LIBS="-L${prefix}/lib" |
49 | | configure.cxxflags-append "-isystem ${prefix}/include -fno-rtti" |
50 | | configure.ldflags-delete "-L${prefix}/lib" |
| 33 | set openjade.catalog ${prefix}/share/sgml/catalog |
| 34 | set openjade.rootcatalog ${prefix}/share/sgml/openjade/catalog |
| 35 | |
| 36 | sgml.catalog ${openjade.rootcatalog} |
| 37 | # Add the root catalog to the openjade catalog |
| 38 | sgml.addtocatalog "${openjade.catalog}" "${sgml.rootcatalog}" |
| 39 | |
| 40 | configure.args --enable-http --enable-html --enable-mif \ |
| 41 | --disable-dependency-tracking \ |
| 42 | --enable-default-catalog=${openjade.catalog} \ |
| 43 | --datadir=${prefix}/share/sgml/openjade \ |
| 44 | --mandir=${prefix}/share/man |
82 | | |
83 | | post-activate { |
84 | | # Make the directory if it doesn't exist |
85 | | if {![file exists ${prefix}/etc/sgml]} { |
86 | | xinstall -m 755 -d ${prefix}/etc/sgml |
87 | | } |
88 | | |
89 | | # Create the root catalog file if it doesn't exist |
90 | | if {![file exists ${catalog.sgml}]} { |
91 | | system "xmlcatmgr -s -c ${catalog.sgml} create" |
92 | | } |
93 | | |
94 | | # Create the openjade catalog file if it doesn't exist |
95 | | if {![file exists ${catalog.openjade}]} { |
96 | | system "xmlcatmgr -s -c ${catalog.openjade} create" |
97 | | } |
98 | | |
99 | | # Add the root catalog to openjade's catalog |
100 | | if {[catch {exec xmlcatmgr -s -c ${catalog.openjade} lookup ${catalog.sgml}}]} { |
101 | | system "xmlcatmgr -s -c ${catalog.openjade} add CATALOG ${catalog.sgml}" |
102 | | } |
103 | | |
104 | | # And add openjade's catalog to the root catalog |
105 | | if {[catch {exec xmlcatmgr -s -c ${catalog.sgml} lookup ${prefix}/share/sgml/openjade/catalog}]} { |
106 | | system "xmlcatmgr -s -c ${catalog.sgml} add CATALOG ${prefix}/share/sgml/openjade/catalog" |
107 | | } |
108 | | } |
109 | | |
110 | | # This will remove the catalog entry for this port. |
111 | | post-deactivate { |
112 | | # Remove the CATALOG entry from the catalog |
113 | | system "xmlcatmgr -s -c ${catalog.sgml} remove CATALOG ${prefix}/share/sgml/openjade/catalog" |
114 | | } |