[119127] trunk/dports/textproc/docbook-xml/Portfile

Joshua Root jmr at macports.org
Tue Apr 22 05:24:52 PDT 2014


> Revision: 119127
>           https://trac.macports.org/changeset/119127
> Author:   pixilla at macports.org
> Date:     2014-04-17 15:38:34 -0700 (Thu, 17 Apr 2014)
> Log Message:
> -----------
> textproc/docbook-xml:
> - Use new PortGroup xmlcatalog.
> 
> Modified Paths:
> --------------
>     trunk/dports/textproc/docbook-xml/Portfile
> 
> Modified: trunk/dports/textproc/docbook-xml/Portfile
> ===================================================================
> --- trunk/dports/textproc/docbook-xml/Portfile	2014-04-17 22:37:50 UTC (rev 119126)
> +++ trunk/dports/textproc/docbook-xml/Portfile	2014-04-17 22:38:34 UTC (rev 119127)
> @@ -1,11 +1,11 @@
>  # -*- 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
>  # $Id$
> +PortSystem 1.0
> +PortGroup xmlcatalog 1.0
>  
> -PortSystem          1.0
> -
>  name                docbook-xml
>  revision            1
> -set revision-docbook-xml 2
> +set revision-docbook-xml 3
>  set docbook-xml-versions {
>      4.1.2
>      {
> @@ -50,39 +50,31 @@
>  homepage            http://www.docbook.org
>  
>  foreach {docbook-xml-version docbook-xml-checksums} ${docbook-xml-versions} {
> -
>      subport docbook-xml-${docbook-xml-version} {
> -
> -    	if {[vercmp ${docbook-xml-version} 4.1.2] == 0} {
> -
> +        if {[vercmp ${docbook-xml-version} 4.1.2] == 0} {
>              distname            docbkx412
>              extract.mkdir       yes
>  
>              depends_lib-append  port:docbook-xml-4.2
>  
>              post-extract {
> -
>                  copy ${prefix}/share/xml/docbook/4.2/catalog.xml \
>                      ${worksrcpath}/
>              }
>              post-patch {
> -
>                  reinplace "s,V4.2 ..,V4.1.2 ,g" \
>                      ${worksrcpath}/catalog.xml
>                  reinplace "s,V4.2,V4.1.2,g" \
>                      ${worksrcpath}/catalog.xml
>              }
>          } elseif {[vercmp ${docbook-xml-version} 5.0] >= 0} {
> -
>              distname            docbook-${docbook-xml-version}
>          } else {
> -
>              distname            docbook-xml-${docbook-xml-version}
>              extract.mkdir       yes
>          }
>  
>          foreach part [string trim ${docbook-xml-checksums}] {
> -
>              checksums-append    $part
>          }
>  
> @@ -101,94 +93,32 @@
>  
>          set install_dir    ${prefix}/share/xml/docbook/${docbook-xml-version}
>  
> -        # xmlcatmgr as installed by MacPorts defaults to using
> -        # ${prefix}/etc/xml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for
> -        # SGML) if no catalog is specified, but we'll specify the path just in case
> -        # users have another installation of xmlcatmgr and happen to have it before
> -        # ${prefix}/bin in their PATH.
> -        set catalog.xml    ${prefix}/etc/xml/catalog
> -        set xml.args       "-c ${catalog.xml}"
> -        set catalog.sgml   ${prefix}/etc/sgml/catalog
> -        set sgml.args      "-s -c ${catalog.sgml}"
> +        xml.catalog "${install_dir}/catalog.xml"
> +        # SGML catalog support is only in the 4.x transitional versions...
> +        if {[vercmp ${docbook-xml-version} 5.0] < 0} {
> +            sgml.catalog "${install_dir}/docbook.cat"
> +        }
>  
>          destroot {
> -
>              set destroot_dir    ${destroot}${install_dir}
>              set destroot_files  [readdir ${worksrcpath}]
>              xinstall -m 755 -d ${destroot_dir}
>              foreach file ${destroot_files} {
> -
>                  copy ${worksrcpath}/${file} ${destroot_dir}
>              }
>          }
> -
> -        post-activate {
> -
> -            # XML catalog
> -            # Make the directory if it doesn't exist
> -            if {![file exists ${prefix}/etc/xml]} {
> -
> -                xinstall -m 755 -d ${prefix}/etc/xml
> -            }
> -
> -            # Create the catalog file if it doesn't exist
> -            if {![file exists ${catalog.xml}]} {
> -
> -                system "xmlcatmgr ${xml.args} create"
> -            }
> -
> -            # Add the nextCatalog entry to the catalog if it doesn't exist
> -            if {[catch {exec xmlcatmgr ${xml.args} lookup ${install_dir}/catalog.xml}]} {
> -
> -                system "xmlcatmgr ${xml.args} add nextCatalog ${install_dir}/catalog.xml"
> -            }
> -
> -            # SGML catalog
> -            # SGML catalog support is only in the 4.x transitional versions...
> -            if {[file exists ${install_dir}/docbook.cat]} {
> -                # Make the directory if it doesn't exist
> -                if {![file exists ${prefix}/etc/sgml]} {
> -
> -                    xinstall -m 755 -d ${prefix}/etc/sgml
> -                }
> -
> -                # Create the catalog file if it doesn't exist
> -                if {![file exists ${catalog.sgml}]} {
> -
> -                    system "xmlcatmgr ${sgml.args} create"
> -                }
> -
> -                # Add the CATALOG entry to the catalog if it doesn't exist
> -                if {[catch {exec xmlcatmgr ${sgml.args} lookup ${install_dir}/docbook.cat}]} {
> -
> -                    system "xmlcatmgr ${sgml.args} add CATALOG ${install_dir}/docbook.cat"
> -                }
> -            }
> -        }
> -
> -        # This will remove the catalog entry for this port.
> -        post-deactivate {
> -
> -            system "xmlcatmgr ${xml.args} remove nextCatalog ${install_dir}/catalog.xml"
> -            # Remove the CATALOG entry from the catalog
> -            # SGML catalog support is only in the 4.x transitional versions...
> -            system "xmlcatmgr ${sgml.args} remove CATALOG ${install_dir}/docbook.cat"
> -        }
>      }
>  }
>  
>  if {${name} == ${subport}} {
> -
>      revision            ${revision-docbook-xml}
>      use_configure       no
>      build               {}
>      distfiles
>      foreach {docbook-xml-version docbook-xml-checksums} ${docbook-xml-versions} {
> -
>          depends_lib-append  port:docbook-xml-${docbook-xml-version}
>      }
>      destroot {
> -
>          set docdir ${prefix}/share/doc/${name}
>          xinstall -d ${destroot}${docdir}
>          xinstall -m 0644 ${filespath}/README ${destroot}${docdir}

What was the purpose of rev bumping docbook-xml, which appears to be
unchanged, but not the subports, which have been changed?

- Josh


More information about the macports-dev mailing list