summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-text/sgml-common/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-text/sgml-common/files')
-rw-r--r--app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in182
-rw-r--r--app-text/sgml-common/files/sgml-common-0.6.3-prefix.patch17
2 files changed, 199 insertions, 0 deletions
diff --git a/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in b/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in
new file mode 100644
index 000000000000..bd261669064e
--- /dev/null
+++ b/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in
@@ -0,0 +1,182 @@
+#!@GENTOO_PORTAGE_EPREFIX@/bin/bash
+# Script to install a catalog in the centralized SGML catalog
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+# Modified by Gentoo developers to better integrate it to portage.
+# <text-markup@gentoo.org>
+
+# Set help message
+SGML_HELP_MESSAGE="Usage: `basename $0` [<option>] <action>\n\
+where <option> is:\n\
+\040 -d|--delegate: \t\t\t Use DELEGATE instead of CATALOG\n\
+and where <action> is:\n\
+\040 -a|--add <centralized> <ordinary>: \t Declare ordinary catalog in the centralized catalog\n\
+\040 -r|--remove <centralized> <ordinary>:\t Remove ordinary catalog from the centralized catalog\n\
+\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"
+
+# Set version message
+SGML_VERSION_MESSAGE="sgml-common version @VERSION@ (install-catalog version 1.0)"
+
+# Set type of pointer
+SGML_POINTER="CATALOG"
+
+# Set action to be performed
+SGML_ACTION=""
+
+# Set catalogs
+SGML_CENTRALIZED=""
+SGML_ORDINARY=""
+
+# Default ROOT value (usually defined by portage)
+[ -z "$ROOT" ] && ROOT="/"
+[[ $ROOT == */ ]] || ROOT="${ROOT}/"
+EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
+EROOT=${ROOT%/}${EPREFIX}/
+
+
+# Process options
+case $1 in
+ -d|--delegate) SGML_POINTER="DELEGATE"
+ shift 1
+ ;;
+esac
+
+# Process actions
+case $1 in
+ -a|--add) SGML_ACTION="addition"
+ SGML_CENTRALIZED=$2
+ SGML_ORDINARY=$3
+ ;;
+ -r|--remove) if [ -z "$3" -o "$3" = "--version" ]
+ then
+ echo "install-catalog: Old syntax; doing nothing"
+ exit 0
+ fi
+ SGML_ACTION="removal"
+ SGML_CENTRALIZED=$2
+ SGML_ORDINARY=$3
+ ;;
+ -h|--help) echo -e $SGML_HELP_MESSAGE
+ exit 0
+ ;;
+ -v|--version) echo -e $SGML_VERSION_MESSAGE
+ exit 0
+ ;;
+ --install) echo "install-catalog: Old syntax; doing nothing"
+ exit 0
+ ;;
+ *) echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+ ;;
+esac
+
+
+# The arguments to this program should always be relative to $ROOT. Here we
+# declare some extra variables to distingish between the absolute and
+# relative paths.
+SGML_ROOT_CENTRALIZED="${ROOT%/}${SGML_CENTRALIZED}"
+SGML_ROOT_ORDINARY="${ROOT%/}${SGML_ORDINARY}"
+
+
+# Check that the super catalog can be created and changed and deleted
+if [ ! -w "${EROOT}etc/sgml" ]
+then
+ echo "`basename $0`: unable to write in ${EROOT}etc/sgml." >&2
+ exit 2
+fi
+case $SGML_ACTION in
+ addition)
+ if [ -e "${EROOT}etc/sgml/catalog" -a ! -w "${EROOT}etc/sgml/catalog" ]
+ then
+ echo "`basename $0`: can not modify \"${EROOT}etc/sgml/catalog\"." >&2
+ exit 2
+ fi
+ ;;
+ removal)
+ if [ ! -w "${EROOT}etc/sgml/catalog" ]
+ then
+ echo "`basename $0`: can not modify \"${EROOT}etc/sgml/catalog\"." >&2
+ exit 2
+ fi
+ ;;
+esac
+
+# Check that the centralized catalog can be created, changed and deleted
+if [ -z "$SGML_ROOT_CENTRALIZED" ]
+then
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+fi
+case $SGML_ACTION in
+ addition)
+ if [ -e "$SGML_ROOT_CENTRALIZED" -a ! -w "$SGML_ROOT_CENTRALIZED" ]
+ then
+ echo "`basename $0`: can not modify \"$SGML_ROOT_CENTRALIZED\"." >&2
+ exit 2
+ fi
+ ;;
+ removal)
+ if [ ! -w "$SGML_ROOT_CENTRALIZED" ]
+ then
+ echo "`basename $0`: can not modify \"$SGML_ROOT_CENTRALIZED\"." >&2
+ exit 2
+ fi
+ ;;
+esac
+
+# Check that we have at least one ordinary package to process
+if [ -z "$SGML_ROOT_ORDINARY" ]
+then
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+fi
+case $SGML_ACTION in
+ addition)
+ if [ ! -s "$SGML_ROOT_ORDINARY" ]
+ then
+ echo "`basename $0`: \"$SGML_ROOT_ORDINARY\" does not exist or is empty." >&2
+ exit 2
+ fi
+ ;;
+esac
+
+# Installation or removal of pointers
+case $SGML_ACTION in
+ addition)
+ echo "`basename $0`: addition of $SGML_ORDINARY in $SGML_CENTRALIZED"
+ if grep -q "$SGML_ORDINARY" "$SGML_ROOT_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_ROOT_CENTRALIZED"
+ fi
+ grep -q "$SGML_CENTRALIZED" "${EROOT}etc/sgml/catalog" 2>/dev/null
+ if [ $? -ne 0 ]
+ then
+ echo "`basename $0`: addition of $SGML_CENTRALIZED in ${EROOT}etc/sgml/catalog"
+ echo "$SGML_POINTER \"$SGML_CENTRALIZED\"" >> "${EROOT}etc/sgml/catalog"
+ fi
+ ;;
+ removal)
+ echo "`basename $0`: removal of $SGML_ORDINARY from $SGML_CENTRALIZED"
+ if grep -q "$SGML_ORDINARY" "$SGML_ROOT_CENTRALIZED" 2>/dev/null
+ then
+ sed -e "\:$SGML_POINTER \"$SGML_ORDINARY\":d" < \
+ "$SGML_ROOT_CENTRALIZED" > "${SGML_ROOT_CENTRALIZED}.new"
+ mv "${SGML_ROOT_CENTRALIZED}.new" "$SGML_ROOT_CENTRALIZED"
+ else
+ echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2
+ fi
+ if [ ! -s "$SGML_ROOT_CENTRALIZED" ]
+ then
+ rm "$SGML_ROOT_CENTRALIZED"
+ echo "`basename $0`: removal of $SGML_CENTRALIZED from ${EROOT}etc/sgml/catalog"
+ sed -e "\:$SGML_POINTER \"$SGML_CENTRALIZED\":d" < "${EROOT}etc/sgml/catalog" > "${EROOT}etc/sgml/catalog.new"
+ mv "${EROOT}etc/sgml/catalog.new" "${EROOT}etc/sgml/catalog"
+ fi
+ ;;
+esac
+
+exit 0
diff --git a/app-text/sgml-common/files/sgml-common-0.6.3-prefix.patch b/app-text/sgml-common/files/sgml-common-0.6.3-prefix.patch
new file mode 100644
index 000000000000..bfca708799d3
--- /dev/null
+++ b/app-text/sgml-common/files/sgml-common-0.6.3-prefix.patch
@@ -0,0 +1,17 @@
+--- bin/sgmlwhich~ 2007-10-08 04:21:25 +0200
++++ bin/sgmlwhich 2007-10-08 04:21:36 +0200
+@@ -3,5 +3,5 @@
+ # Send any comments to Eric Bischoff <eric@caldera.de>
+ # This program is under GPL license. See LICENSE file for details.
+
+-echo "/etc/sgml/sgml.conf"
++echo "@GENTOO_PORTAGE_EPREFIX@/etc/sgml/sgml.conf"
+ # Simple, isn't it? ;-)
+--- config/sgml.conf~ 2000-11-17 09:36:11 +0100
++++ config/sgml.conf 2007-10-08 04:42:52 +0200
+@@ -1,3 +1,3 @@
+ # /etc/sgml/sgml.conf conformant with LSB
+-SGML_BASE_DIR=/usr/share/sgml
+-SGML_CATALOGS_DIR=/etc/sgml
++SGML_BASE_DIR=@GENTOO_PORTAGE_EPREFIX@/usr/share/sgml
++SGML_CATALOGS_DIR=@GENTOO_PORTAGE_EPREFIX@/etc/sgml