[97546] trunk/dports/textproc

pixilla at macports.org pixilla at macports.org
Sat Sep 8 09:59:08 PDT 2012


Revision: 97546
          https://trac.macports.org/changeset/97546
Author:   pixilla at macports.org
Date:     2012-09-08 09:59:07 -0700 (Sat, 08 Sep 2012)
Log Message:
-----------
textproc/sgml-common:
- New port sgml-common version 0.6.3.

Added Paths:
-----------
    trunk/dports/textproc/sgml-common/
    trunk/dports/textproc/sgml-common/Portfile
    trunk/dports/textproc/sgml-common/files/
    trunk/dports/textproc/sgml-common/files/patch-bin-install-catalog.in.diff
    trunk/dports/textproc/sgml-common/files/patch-config-sgml.conf.diff
    trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.am.diff
    trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.in.diff

Added: trunk/dports/textproc/sgml-common/Portfile
===================================================================
--- trunk/dports/textproc/sgml-common/Portfile	                        (rev 0)
+++ trunk/dports/textproc/sgml-common/Portfile	2012-09-08 16:59:07 UTC (rev 97546)
@@ -0,0 +1,130 @@
+# -*- 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
+
+name                sgml-common
+version             0.6.3
+categories          textproc
+platforms           darwin
+license             GPL-2+
+maintainers         fourpalms.org:lockhart openmaintainer
+# Actually - there is no homepage of this project, on that URL
+# page you could get complete ISO 8879 listing as was on the
+# old page - only part of it is included in sgml-common package.
+homepage            http://www.w3.org/2003/entities/
+description         A collection of entities and DTDs common to multiple packages.
+long_description    The sgml-common package contains a collection of entities and DTDs \
+                    that are useful for processing SGML, but that don't need to be \
+                    included in multiple packages.  Sgml-common also includes an \
+                    up-to-date Open Catalog file. \
+                    Transcribed from the Fedora 15 RPM written originally by \
+                    Tim Waugh <twaugh at redhat.com> based on work by Eric Bischoff \
+                    and with recent maintenance by Ondrej Vasik <ovasik at redhat.com>.
+master_sites        ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/
+
+extract.suffix      .tgz
+
+checksums           [lindex $distfiles 0] \
+                    rmd160  246d01272f70cd8382a7d596392e61d7dc0eec78 \
+                    sha256  7dc418c1d361123ffc5e45d61f1b97257940a8eb35d0bfbbc493381cc5b1f959
+
+set openjade        openjade-1.3.2
+distfiles-append    ${openjade}.tar.gz:openjade
+master_sites        sourceforge:openjade
+checksums-append    ${openjade}.tar.gz \
+                    rmd160  3b12f6596a42c49a60cc07cd9b8f4c5fdf3bafd2 \
+                    sha256  1d2d7996cc94f9b87d0c51cf0e028070ac177c4123ecbfd7ac1cb8d0b7d322d1
+
+depends_lib         port:perl5 \
+                    port:libxml2 \
+                    port:openjade \
+                    port:docbook-dsssl \
+                    port:docbook-sgml-4.2
+
+depends_run         port:xmlcatmgr
+
+set bindir ${prefix}/bin
+set confdir ${prefix}/etc
+set datadir ${prefix}/share
+set sgmldir ${datadir}/sgml
+set sgmlcatalog ${confdir}/sgml/catalog
+set xmldir ${datadir}/xml
+set xmlcatalog ${confdir}/xml/catalog
+# 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 xml.args       "-c ${xmlcatalog}"
+set sgml.args      "-s -c ${sgmlcatalog}"
+
+patch.pre_args      -p1
+patchfiles          patch-bin-install-catalog.in.diff \
+                    patch-config-sgml.conf.diff \
+                    patch-xml-iso-entities-Makefile.am.diff \
+                    patch-xml-iso-entities-Makefile.in.diff
+
+post-patch {
+    reinplace "s|@PREFIX@|${prefix}|" \
+        ${worksrcpath}/config/sgml.conf
+}
+
+use_configure       no
+
+build {
+    # XML catalog
+    # Make the directory if it doesn't exist
+    if {![file exists ${confdir}/xml]} {
+        xinstall -m 755 -d ${confdir}/xml
+    }
+
+    # Create the catalog file if it doesn't exist
+    if {![file exists ${xmlcatalog}]} {
+        system "xmlcatmgr ${xml.args} create"
+    }
+
+    # SGML catalog
+    # Make the directory if it doesn't exist
+    if {![file exists ${confdir}/sgml]} {
+        xinstall -m 755 -d ${confdir}/sgml
+    }
+
+    # Create the catalog file if it doesn't exist
+    if {![file exists ${sgmlcatalog}]} {
+        system "xmlcatmgr ${sgml.args} create"
+    }
+
+    # Now put the common DocBook entries in it
+    # system "${bindir}/xmlcatalog --noout --add 'delegatePublic' \
+    #     '-//OASIS//ENTITIES DocBook XML' \
+    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
+    # system "${bindir}/xmlcatalog --noout --add 'delegatePublic' \
+    #     '-//OASIS//DTD DocBook XML' \
+    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
+    # system "${bindir}/xmlcatalog --noout --add 'delegatePublic' \
+    #     'ISO 8879:1986' \
+    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
+    # system "${bindir}/xmlcatalog --noout --add 'delegateSystem' \
+    #     'http://www.oasis-open.org/docbook/' \
+    #     'file://${confdir}/sgml/docbook/xmlcatalog' ${worksrcpath}${xmlcatalog}"
+    # system "${bindir}/xmlcatalog --noout --add 'delegateURI' \
+    #     'http://www.oasis-open.org/docbook/' \
+    #     'file://${confdir}/sgml/docbook/xmlcatalog'
+	# ${worksrcpath}${xmlcatalog}"
+    # Also create the common DocBook catalog
+    # xinstall -d ${worksrcpath}${confdir}/sgml/docbook
+    # system "${bindir}/xmlcatalog --noout --create \
+    #     ${worksrcpath}${confdir}/sgml/docbook/xmlcatalog"
+}
+
+destroot {
+    xinstall -d ${destroot}${confdir}/sgml
+    xinstall ${worksrcpath}/config/sgml.conf ${destroot}${prefix}/etc/sgml/sgml.conf
+    xinstall -d ${destroot}${sgmldir}
+    # Following 4 from openjade/pubtext - same maintainer as in SGML-common, so up2date:
+    xinstall ${workpath}/${openjade}/pubtext/xml.dcl ${destroot}${sgmldir}/
+    xinstall ${workpath}/${openjade}/pubtext/xml.soc ${destroot}${sgmldir}/
+    xinstall ${workpath}/${openjade}/pubtext/html.dcl ${destroot}${sgmldir}/
+    xinstall ${workpath}/${openjade}/pubtext/html.soc ${destroot}${sgmldir}/
+}


Property changes on: trunk/dports/textproc/sgml-common/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/sgml-common/files/patch-bin-install-catalog.in.diff
===================================================================
--- trunk/dports/textproc/sgml-common/files/patch-bin-install-catalog.in.diff	                        (rev 0)
+++ trunk/dports/textproc/sgml-common/files/patch-bin-install-catalog.in.diff	2012-09-08 16:59:07 UTC (rev 97546)
@@ -0,0 +1,104 @@
+--- a/bin/install-catalog.in	2012-09-04 16:37:48.000000000 -0700
++++ b/bin/install-catalog.in	2012-09-04 16:37:56.000000000 -0700
+@@ -13,6 +13,9 @@
+ \040 -h, --help: \t\t\t\t Print this help message and exit\n\
+ \040 -v, --version: \t\t\t Print the version number and exit\n"
+ 
++# We need the files we create to be world readable
++umask 022
++
+ # Set version message
+ SGML_VERSION_MESSAGE="sgml-common version @VERSION@ (install-catalog version 1.0)"
+ 
+@@ -36,8 +39,8 @@
+ # Process actions
+ case $1 in
+    -a|--add)    SGML_ACTION="addition"
+-		SGML_CENTRALIZED=$2
+-		SGML_ORDINARY=$3
++		SGML_CENTRALIZED="$2"
++		SGML_ORDINARY="$3"
+ 		;;
+    -r|--remove)	if [ -z "$3" -o "$3" = "--version" ]
+ 		then
+@@ -45,8 +48,8 @@
+ 		  exit 0
+ 		fi
+    		SGML_ACTION="removal"
+-		SGML_CENTRALIZED=$2
+-		SGML_ORDINARY=$3
++		SGML_CENTRALIZED="$2"
++		SGML_ORDINARY="$3"
+ 		;;
+    -h|--help)	echo -e $SGML_HELP_MESSAGE
+ 		exit 0
+@@ -93,14 +96,14 @@
+ fi
+ case $SGML_ACTION in
+    addition)
+-	if [ -e $SGML_CENTRALIZED -a ! -w $SGML_CENTRALIZED ]
++	if [ -e "$SGML_CENTRALIZED" -a ! -w "$SGML_CENTRALIZED" ]
+ 	then
+ 	  echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
+ 	  exit 2
+ 	fi
+ 	;;
+    removal)
+-	if [ ! -w $SGML_CENTRALIZED ]
++	if [ ! -w "$SGML_CENTRALIZED" ]
+ 	then
+ 	  echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
+ 	  exit 2
+@@ -116,7 +119,7 @@
+ fi
+ case $SGML_ACTION in
+    addition)
+-	if [ ! -s $SGML_ORDINARY ]
++	if [ ! -s "$SGML_ORDINARY" ]
+ 	then
+ 	  echo "`basename $0`: \"$SGML_ORDINARY\" does not exist or is empty." >&2
+ 	  exit 2
+@@ -128,33 +131,33 @@
+ case $SGML_ACTION in
+     addition)
+ 	echo "`basename $0`: addition of $SGML_ORDINARY in $SGML_CENTRALIZED"
+-	if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null
++	if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
+ 	then
+ 	  echo "Warning: $SGML_ORDINARY is already installed in the centralized catalog $SGML_CENTRALIZED" >&2
+ 	else
+-	  echo "$SGML_POINTER $SGML_ORDINARY" >> $SGML_CENTRALIZED
++	  echo "$SGML_POINTER \"$SGML_ORDINARY\"" >> "$SGML_CENTRALIZED"
+ 	fi
+-	grep -q $SGML_CENTRALIZED /etc/sgml/catalog 2>/dev/null
++	grep -q "$SGML_CENTRALIZED" /etc/sgml/catalog 2>/dev/null
+ 	if [ $? -ne 0 ]
+ 	then
+ 	  echo "`basename $0`: addition of $SGML_CENTRALIZED in /etc/sgml/catalog"
+-	  echo "$SGML_POINTER $SGML_CENTRALIZED" >> /etc/sgml/catalog
++	  echo "$SGML_POINTER \"$SGML_CENTRALIZED\"" >> /etc/sgml/catalog
+ 	fi
+ 	;;
+    removal)
+ 	echo "`basename $0`: removal of $SGML_ORDINARY from $SGML_CENTRALIZED"
+-	if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null
++	if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
+ 	then
+-          sed -e "\:$SGML_POINTER $SGML_ORDINARY:d" < $SGML_CENTRALIZED > ${SGML_CENTRALIZED}.new
+-          mv ${SGML_CENTRALIZED}.new $SGML_CENTRALIZED
++          sed -e "\:$SGML_POINTER \"\\?$SGML_ORDINARY\"\\?:d" < "$SGML_CENTRALIZED" > "${SGML_CENTRALIZED}.new"
++          mv "${SGML_CENTRALIZED}.new" "$SGML_CENTRALIZED"
+ 	else
+ 	  echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2
+ 	fi
+-	if [ ! -s $SGML_CENTRALIZED ]
++	if [ ! -s "$SGML_CENTRALIZED" ]
+ 	then
+-	  rm $SGML_CENTRALIZED
++	  rm "$SGML_CENTRALIZED"
+ 	  echo "`basename $0`: removal of $SGML_CENTRALIZED from /etc/sgml/catalog"
+-          sed -e "\:$SGML_POINTER $SGML_CENTRALIZED:d" < /etc/sgml/catalog > /etc/sgml/catalog.new
++          sed -e "\:$SGML_POINTER \"\\?$SGML_CENTRALIZED\"\\?:d" < /etc/sgml/catalog > /etc/sgml/catalog.new
+           mv /etc/sgml/catalog.new /etc/sgml/catalog
+ 	fi
+ 	;;

Added: trunk/dports/textproc/sgml-common/files/patch-config-sgml.conf.diff
===================================================================
--- trunk/dports/textproc/sgml-common/files/patch-config-sgml.conf.diff	                        (rev 0)
+++ trunk/dports/textproc/sgml-common/files/patch-config-sgml.conf.diff	2012-09-08 16:59:07 UTC (rev 97546)
@@ -0,0 +1,9 @@
+--- a/config/sgml.conf	2012-09-04 16:37:48.000000000 -0700
++++ b/config/sgml.conf	2012-09-04 16:41:37.000000000 -0700
+@@ -1,3 +1,3 @@
+-# /etc/sgml/sgml.conf conformant with LSB
+-SGML_BASE_DIR=/usr/share/sgml
+-SGML_CATALOGS_DIR=/etc/sgml
++# @PREFIX@/etc/sgml/sgml.conf conformant with LSB
++SGML_BASE_DIR=@PREFIX@/share/sgml
++SGML_CATALOGS_DIR=@PREFIX@/etc/sgml

Added: trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.am.diff
===================================================================
--- trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.am.diff	                        (rev 0)
+++ trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.am.diff	2012-09-08 16:59:07 UTC (rev 97546)
@@ -0,0 +1,8 @@
+--- a/xml-iso-entities/Makefile.am	2012-09-04 16:37:48.000000000 -0700
++++ b/xml-iso-entities/Makefile.am	2012-09-04 16:37:56.000000000 -0700
+@@ -1,4 +1,4 @@
+-isoentdir = $(prefix)/share/sgml/xml-iso-entities-8879.1986
++isoentdir = $(prefix)/share/xml/xml-iso-entities-8879.1986
+ isoent_DATA = ISOamsa.ent ISOamsb.ent ISOamsc.ent ISOamsn.ent ISOamso.ent ISOamsr.ent \
+               ISObox.ent ISOcyr1.ent ISOcyr2.ent ISOdia.ent ISOgrk1.ent ISOgrk2.ent \
+               ISOgrk3.ent ISOgrk4.ent ISOlat1.ent ISOlat2.ent ISOnum.ent ISOpub.ent \

Added: trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.in.diff
===================================================================
--- trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/textproc/sgml-common/files/patch-xml-iso-entities-Makefile.in.diff	2012-09-08 16:59:07 UTC (rev 97546)
@@ -0,0 +1,11 @@
+--- a/xml-iso-entities/Makefile.in	2012-09-04 16:37:48.000000000 -0700
++++ b/xml-iso-entities/Makefile.in	2012-09-04 16:37:56.000000000 -0700
+@@ -62,7 +62,7 @@
+ VERSION = @VERSION@
+ docdir = @docdir@
+ 
+-isoentdir = $(prefix)/share/sgml/xml-iso-entities-8879.1986
++isoentdir = $(prefix)/share/xml/xml-iso-entities-8879.1986
+ isoent_DATA = ISOamsa.ent ISOamsb.ent ISOamsc.ent ISOamsn.ent ISOamso.ent ISOamsr.ent               ISObox.ent ISOcyr1.ent ISOcyr2.ent ISOdia.ent ISOgrk1.ent ISOgrk2.ent               ISOgrk3.ent ISOgrk4.ent ISOlat1.ent ISOlat2.ent ISOnum.ent ISOpub.ent               ISOtech.ent catalog
+ 
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120908/13574529/attachment.html>


More information about the macports-changes mailing list