source: trunk/dports/textproc/sgml-common/Portfile @ 97546

Last change on this file since 97546 was 97546, checked in by pixilla@…, 8 years ago

textproc/sgml-common:

  • New port sgml-common version 0.6.3.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 97546 2012-09-08 16:59:07Z pixilla@macports.org $
3
4PortSystem          1.0
5
6name                sgml-common
7version             0.6.3
8categories          textproc
9platforms           darwin
10license             GPL-2+
11maintainers         fourpalms.org:lockhart openmaintainer
12# Actually - there is no homepage of this project, on that URL
13# page you could get complete ISO 8879 listing as was on the
14# old page - only part of it is included in sgml-common package.
15homepage            http://www.w3.org/2003/entities/
16description         A collection of entities and DTDs common to multiple packages.
17long_description    The sgml-common package contains a collection of entities and DTDs \
18                    that are useful for processing SGML, but that don't need to be \
19                    included in multiple packages.  Sgml-common also includes an \
20                    up-to-date Open Catalog file. \
21                    Transcribed from the Fedora 15 RPM written originally by \
22                    Tim Waugh <twaugh@redhat.com> based on work by Eric Bischoff \
23                    and with recent maintenance by Ondrej Vasik <ovasik@redhat.com>.
24master_sites        ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/
25
26extract.suffix      .tgz
27
28checksums           [lindex $distfiles 0] \
29                    rmd160  246d01272f70cd8382a7d596392e61d7dc0eec78 \
30                    sha256  7dc418c1d361123ffc5e45d61f1b97257940a8eb35d0bfbbc493381cc5b1f959
31
32set openjade        openjade-1.3.2
33distfiles-append    ${openjade}.tar.gz:openjade
34master_sites        sourceforge:openjade
35checksums-append    ${openjade}.tar.gz \
36                    rmd160  3b12f6596a42c49a60cc07cd9b8f4c5fdf3bafd2 \
37                    sha256  1d2d7996cc94f9b87d0c51cf0e028070ac177c4123ecbfd7ac1cb8d0b7d322d1
38
39depends_lib         port:perl5 \
40                    port:libxml2 \
41                    port:openjade \
42                    port:docbook-dsssl \
43                    port:docbook-sgml-4.2
44
45depends_run         port:xmlcatmgr
46
47set bindir ${prefix}/bin
48set confdir ${prefix}/etc
49set datadir ${prefix}/share
50set sgmldir ${datadir}/sgml
51set sgmlcatalog ${confdir}/sgml/catalog
52set xmldir ${datadir}/xml
53set xmlcatalog ${confdir}/xml/catalog
54# xmlcatmgr as installed by MacPorts defaults to using
55# ${prefix}/etc/xml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for
56# SGML) if no catalog is specified, but we'll specify the path just in case
57# users have another installation of xmlcatmgr and happen to have it before
58# ${prefix}/bin in their PATH.
59set xml.args       "-c ${xmlcatalog}"
60set sgml.args      "-s -c ${sgmlcatalog}"
61
62patch.pre_args      -p1
63patchfiles          patch-bin-install-catalog.in.diff \
64                    patch-config-sgml.conf.diff \
65                    patch-xml-iso-entities-Makefile.am.diff \
66                    patch-xml-iso-entities-Makefile.in.diff
67
68post-patch {
69    reinplace "s|@PREFIX@|${prefix}|" \
70        ${worksrcpath}/config/sgml.conf
71}
72
73use_configure       no
74
75build {
76    # XML catalog
77    # Make the directory if it doesn't exist
78    if {![file exists ${confdir}/xml]} {
79        xinstall -m 755 -d ${confdir}/xml
80    }
81
82    # Create the catalog file if it doesn't exist
83    if {![file exists ${xmlcatalog}]} {
84        system "xmlcatmgr ${xml.args} create"
85    }
86
87    # SGML catalog
88    # Make the directory if it doesn't exist
89    if {![file exists ${confdir}/sgml]} {
90        xinstall -m 755 -d ${confdir}/sgml
91    }
92
93    # Create the catalog file if it doesn't exist
94    if {![file exists ${sgmlcatalog}]} {
95        system "xmlcatmgr ${sgml.args} create"
96    }
97
98    # Now put the common DocBook entries in it
99    # system "${bindir}/xmlcatalog --noout --add 'delegatePublic' \
100    #     '-//OASIS//ENTITIES DocBook XML' \
101    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
102    # system "${bindir}/xmlcatalog --noout --add 'delegatePublic' \
103    #     '-//OASIS//DTD DocBook XML' \
104    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
105    # system "${bindir}/xmlcatalog --noout --add 'delegatePublic' \
106    #     'ISO 8879:1986' \
107    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
108    # system "${bindir}/xmlcatalog --noout --add 'delegateSystem' \
109    #     'http://www.oasis-open.org/docbook/' \
110    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
111    # system "${bindir}/xmlcatalog --noout --add 'delegateURI' \
112    #     'http://www.oasis-open.org/docbook/' \
113    #     'file://${confdir}/sgml/docbook/xmlcatalog'
114        # ${worksrcpath}${xmlcatalog}"
115    # Also create the common DocBook catalog
116    # xinstall -d ${worksrcpath}${confdir}/sgml/docbook
117    # system "${bindir}/xmlcatalog --noout --create \
118    #     ${worksrcpath}${confdir}/sgml/docbook/xmlcatalog"
119}
120
121destroot {
122    xinstall -d ${destroot}${confdir}/sgml
123    xinstall ${worksrcpath}/config/sgml.conf ${destroot}${prefix}/etc/sgml/sgml.conf
124    xinstall -d ${destroot}${sgmldir}
125    # Following 4 from openjade/pubtext - same maintainer as in SGML-common, so up2date:
126    xinstall ${workpath}/${openjade}/pubtext/xml.dcl ${destroot}${sgmldir}/
127    xinstall ${workpath}/${openjade}/pubtext/xml.soc ${destroot}${sgmldir}/
128    xinstall ${workpath}/${openjade}/pubtext/html.dcl ${destroot}${sgmldir}/
129    xinstall ${workpath}/${openjade}/pubtext/html.soc ${destroot}${sgmldir}/
130}
Note: See TracBrowser for help on using the repository browser.