source: trunk/dports/textproc/iso8879/Portfile @ 86410

Last change on this file since 86410 was 86410, checked in by dports@…, 9 years ago

iso8879: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1# $Id: Portfile 86410 2011-10-25 11:15:36Z dports@macports.org $
2
3PortSystem 1.0
4name            iso8879
5version         1986
6revision        1
7categories      textproc
8license         Permissive
9maintainers     nomaintainer
10description     Character entity sets from ISO 8879:1986 (SGML)
11platforms       darwin
12
13long_description $description
14
15master_sites    freebsd
16
17distname        isoENTS
18checksums       md5 c8a9561212c1a2ec6e48919640de9c67
19
20use_zip         yes
21
22depends_run     port:xmlcatmgr
23
24use_configure   no
25build           {}
26
27set install_dir ${prefix}/share/sgml/${name}
28
29# xmlcatmgr as installed by MacPorts defaults to using
30# ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for
31# SGML) if no catalog is specified, but we'll specify the path just in case
32# users have another installation of xmlcatmgr and happen to have it before
33# ${prefix}/bin in their PATH.
34set catalog.sgml ${prefix}/etc/sgml/catalog
35set xmlcatmgr.args "-s -c ${catalog.sgml}"
36
37destroot        {
38        xinstall -m 755 -d ${destroot}${install_dir}
39        xinstall -m 644 ${portpath}/${filesdir}/catalog ${destroot}${install_dir}
40        eval xinstall -m 644 [glob ${workpath}/ISO*] ${destroot}${install_dir}
41}
42
43destroot.args   prefix=${destroot}${prefix}
44
45post-activate {
46    # Make the directory if it doesn't exist
47    if {![file exists ${prefix}/etc/sgml]} {
48        xinstall -m 755 -d ${prefix}/etc/sgml
49    }
50
51    # Create the catalog file if it doesn't exist
52    if {![file exists ${catalog.sgml}]} {
53        system "xmlcatmgr ${xmlcatmgr.args} create"
54    }
55
56    # Add the CATALOG entry to the catalog if it doesn't exist
57    if {[catch {exec xmlcatmgr ${xmlcatmgr.args} lookup ${install_dir}/catalog}]} {
58        system "xmlcatmgr ${xmlcatmgr.args} add CATALOG ${install_dir}/catalog"
59    }
60}
61
62# This will remove the catalog entry for this port.
63post-deactivate {
64    # Remove the CATALOG entry from the catalog
65    system "xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/catalog"
66}
Note: See TracBrowser for help on using the repository browser.