Ticket #43386: Portfile.diff
File Portfile.diff, 2.5 KB (added by lockhart (Thomas Lockhart), 11 years ago) |
---|
-
Portfile
old new 2 2 # $Id: Portfile 86420 2011-10-25 13:54:14Z dports@macports.org $ 3 3 4 4 PortSystem 1.0 5 PortGroup xmlcatalog 1.0 5 6 6 7 name docbook-sgml-4.2 7 8 version [strsed ${name} {s/docbook-sgml-//}] 9 revision 1 8 10 description Version ${version} of the DocBook SGML DTDs 9 11 long_description \ 10 12 Version ${version} of the DocBook SGML DTDs, which provide a structured,\ … … 18 20 supported_archs noarch 19 21 homepage http://www.docbook.org/sgml/${version}/ 20 22 21 depends_run port:xmlcatmgr port:docbook-dsssl port:iso8879 23 depends_lib port:iso8879 24 depends_run port:docbook-dsssl 22 25 23 26 master_sites http://www.oasis-open.org/docbook/sgml/${version}/ 24 27 distname docbook-${version} … … 31 34 extract.mkdir yes 32 35 33 36 use_configure no 34 build {}35 37 36 set install_dir ${prefix}/share/sgml/docbook/${version} 38 set install_dir ${prefix}/share/sgml/docbook/${version} 39 sgml.catalog "${install_dir}/docbook.cat" 37 40 38 # xmlcatmgr as installed by MacPorts defaults to using 39 # ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for 40 # SGML) if no catalog is specified, but we'll specify the path just in case 41 # users have another installation of xmlcatmgr and happen to have it before 42 # ${prefix}/bin in their PATH. 43 set catalog.sgml ${prefix}/etc/sgml/catalog 44 set xmlcatmgr.args "-s -c ${catalog.sgml}" 41 build {} 45 42 46 43 destroot { 47 44 set destroot_dir ${destroot}${install_dir} … … 51 48 copy ${worksrcpath}/${file} ${destroot_dir} 52 49 } 53 50 } 54 55 post-activate {56 # Make the directory if it doesn't exist57 if {![file exists ${prefix}/etc/sgml]} {58 xinstall -m 755 -d ${prefix}/etc/sgml59 }60 61 # Create the catalog file if it doesn't exist62 if {![file exists ${catalog.sgml}]} {63 system "xmlcatmgr ${xmlcatmgr.args} create"64 }65 66 # Add the CATALOG entry to the catalog if it doesn't exist67 if {[catch {exec xmlcatmgr ${xmlcatmgr.args} lookup ${install_dir}/docbook.cat}]} {68 system "xmlcatmgr ${xmlcatmgr.args} add CATALOG ${install_dir}/docbook.cat"69 }70 }71 72 # This will remove the catalog entry for this port.73 post-deactivate {74 # Remove the CATALOG entry from the catalog75 system "xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/docbook.cat"76 }