Ticket #31674: macports.iso8879.diff
File macports.iso8879.diff, 2.5 KB (added by fgp (Florian G. Pflug), 13 years ago) |
---|
-
iso8879/Portfile
17 17 18 18 use_zip yes 19 19 20 depends_run bin:mkcatalog:mkcatalog20 depends_run port:xmlcatmgr 21 21 22 22 use_configure no 23 23 build {} 24 24 25 set inst dir share/sgml/iso887925 set install_dir ${prefix}/share/sgml/${name} 26 26 27 # xmlcatmgr as installed by MacPorts defaults to using 28 # ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for 29 # SGML) if no catalog is specified, but we'll specify the path just in case 30 # users have another installation of xmlcatmgr and happen to have it before 31 # ${prefix}/bin in their PATH. 32 set catalog.sgml ${prefix}/etc/sgml/catalog 33 set xmlcatmgr.args "-s -c ${catalog.sgml}" 34 27 35 destroot { 28 xinstall -m 755 -d ${destroot}${ prefix}/${instdir}29 xinstall -m 644 ${portpath}/${filesdir}/catalog ${destroot}${ prefix}/${instdir}30 eval xinstall -m 644 [glob ${workpath}/ISO*] ${destroot}${ prefix}/${instdir}36 xinstall -m 755 -d ${destroot}${install_dir} 37 xinstall -m 644 ${portpath}/${filesdir}/catalog ${destroot}${install_dir} 38 eval xinstall -m 644 [glob ${workpath}/ISO*] ${destroot}${install_dir} 31 39 } 32 40 33 41 destroot.args prefix=${destroot}${prefix} 34 42 43 post-activate { 44 # Make the directory if it doesn't exist 45 if {![file exists ${prefix}/etc/sgml]} { 46 xinstall -m 755 -d ${prefix}/etc/sgml 47 } 48 49 # Create the catalog file if it doesn't exist 50 if {![file exists ${catalog.sgml}]} { 51 system "xmlcatmgr ${xmlcatmgr.args} create" 52 } 53 54 # Add the CATALOG entry to the catalog if it doesn't exist 55 if {[catch {exec xmlcatmgr ${xmlcatmgr.args} lookup ${install_dir}/catalog}]} { 56 system "xmlcatmgr ${xmlcatmgr.args} add CATALOG ${install_dir}/catalog" 57 } 58 } 59 60 if {${registry.format} == "receipt_flat"} { 61 notes \ 62 "###################################################################### 63 # As the flat registry format does not support post-deactivate hooks, 64 # you will need to ensure that you manually remove the catalog 65 # entry for this port when you uninstall it. To do so, run 66 # \"xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/catalog\". 67 ######################################################################" 68 } 69 70 # This will remove the catalog entry for this port. 71 post-deactivate { 72 # Remove the CATALOG entry from the catalog 73 system "xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/catalog" 74 }