1 | # $Id: Portfile 56184 2009-08-25 06:11:10Z ryandesign@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name iso8879 |
---|
5 | version 1986 |
---|
6 | categories textproc |
---|
7 | maintainers nomaintainer |
---|
8 | description Character entity sets from ISO 8879:1986 (SGML) |
---|
9 | platforms darwin |
---|
10 | |
---|
11 | long_description $description |
---|
12 | |
---|
13 | master_sites freebsd |
---|
14 | |
---|
15 | distname isoENTS |
---|
16 | checksums md5 c8a9561212c1a2ec6e48919640de9c67 |
---|
17 | |
---|
18 | use_zip yes |
---|
19 | |
---|
20 | depends_run bin:mkcatalog:mkcatalog port:xmlcatmgr |
---|
21 | |
---|
22 | use_configure no |
---|
23 | build {} |
---|
24 | |
---|
25 | set install_dir ${prefix}/share/sgml/${name} |
---|
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 | |
---|
34 | destroot { |
---|
35 | xinstall -m 755 -d ${destroot}${install_dir} |
---|
36 | xinstall -m 644 ${portpath}/${filesdir}/catalog ${destroot}${install_dir} |
---|
37 | eval xinstall -m 644 [glob ${workpath}/ISO*] ${destroot}${install_dir} |
---|
38 | } |
---|
39 | |
---|
40 | destroot.args prefix=${destroot}${prefix} |
---|
41 | |
---|
42 | post-activate { |
---|
43 | # Make the directory if it doesn't exist |
---|
44 | if {![file exists ${prefix}/etc/sgml]} { |
---|
45 | xinstall -m 755 -d ${prefix}/etc/sgml |
---|
46 | } |
---|
47 | |
---|
48 | # Create the catalog file if it doesn't exist |
---|
49 | if {![file exists ${catalog.sgml}]} { |
---|
50 | system "xmlcatmgr -s -c ${catalog.sgml} create" |
---|
51 | } |
---|
52 | |
---|
53 | # Add the CATALOG entry to the catalog if it doesn't exist |
---|
54 | if {[catch {exec xmlcatmgr lookup ${install_dir}/catalog}]} { |
---|
55 | system "xmlcatmgr -s -c ${catalog.sgml} add CATALOG ${install_dir}/catalog" |
---|
56 | } |
---|
57 | } |
---|
58 | |
---|
59 | if {${registry.format} == "receipt_flat"} { |
---|
60 | notes \ |
---|
61 | "###################################################################### |
---|
62 | # As the flat registry format does not support post-deactivate hooks, |
---|
63 | # you will need to ensure that you manually remove the catalog |
---|
64 | # entry for this port when you uninstall it. To do so, run |
---|
65 | # \"xmlcatmgr -s -c ${prefix}/etc/sgml/catalog remove CATALOG ${install_dir}/catalog\". |
---|
66 | ######################################################################" |
---|
67 | } |
---|
68 | |
---|
69 | # This will remove the catalog entry for this port. |
---|
70 | post-deactivate { |
---|
71 | # Remove the CATALOG entry from the catalog |
---|
72 | system "xmlcatmgr -s -c ${catalog.sgml} remove CATALOG ${install_dir}/catalog" |
---|
73 | } |
---|