diff options
Diffstat (limited to 'app-text/sgml-common')
-rw-r--r-- | app-text/sgml-common/Manifest | 7 | ||||
-rw-r--r-- | app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in | 182 | ||||
-rw-r--r-- | app-text/sgml-common/files/sgml-common-0.6.3-prefix.patch | 17 | ||||
-rw-r--r-- | app-text/sgml-common/metadata.xml | 5 | ||||
-rw-r--r-- | app-text/sgml-common/sgml-common-0.6.3-r5.ebuild | 84 |
5 files changed, 295 insertions, 0 deletions
diff --git a/app-text/sgml-common/Manifest b/app-text/sgml-common/Manifest new file mode 100644 index 000000000000..2822beedf7bc --- /dev/null +++ b/app-text/sgml-common/Manifest @@ -0,0 +1,7 @@ +AUX sgml-common-0.6.3-install-catalog.in 5064 SHA256 dffad899948ae7177b33e1c3132f9b7c6ea9e3f5a6d1e34b9334b91e54cc5fa6 SHA512 85fbcdd7aceb28256e08ca1a5b6472247d81499e604d6a45edabf662bc32b72a22326db907e2a408b1a6da02deccd89606749e3fc8e42594ad6402ab29d501b9 WHIRLPOOL a25ad29a334b38d794e52ac5a04232d319ffa109d3130e2d9a89868548090a1001c512c75bd67f9335fd6d0a898bae673692106238e7ebe1a876d3dd45717e2f +AUX sgml-common-0.6.3-prefix.patch 658 SHA256 6926c44655ddd713276cc26d777d39b56b3cc740e55bbc2c543daad21359bee3 SHA512 25e02afb59be7c056577169a5c644a2fa6800bf07c5876fac3f9ad6b3094ee186b1864f59ae2fcbb99acb7f0d6e0d32f8daeb2aeec16f8f2f98d43b3e890ef7d WHIRLPOOL f7b7ee85138b5e7f89f7fb88653d416dcf534530535aec3fb3fe84fd51e49d84b0745f529f412faf29bc7d2b000331d214a6952ad71833c4d0b08be7119052da +DIST sgml-common-0.6.3-gentoo.tar.gz 128903 SHA256 c5f6668cb19e230df5c5adaf2704fa5225da0aab090b42a23f4247224c6523ee SHA512 c8de573d707ccf524407c9be9a6e7740341eb88ecb6bee69d6d11a2658ef74e6acfb7495afa33c9983ab015c3c925aac98278a4e01ee217892a9fb99e60798ce WHIRLPOOL 18187f92fd4def6affdbb9e7c6de5f4a29f906b6f5199bb9db049ff106cc3fccd51144b83ad575caeb1ef8b6cb01d59db7a33563867fe14053019d93b9084772 +EBUILD sgml-common-0.6.3-r5.ebuild 2477 SHA256 df6a6e510a63d98a3f96cd588c6ffa88b1b6fa10956a244decdc71608da2da47 SHA512 0ea375e2fd3a481f59656f488aa9e5702d6755019a909cbe7f091e836cb9d99f3f19fda10e9ec03bc66033b234891aca1b71a81ddb15b74cd271da816358ee78 WHIRLPOOL e5208df33f487685aba0e07a2e6b95df6b10be73fafcab0861bfc1f702e8634026c13eafe28590ad4971e1d1cbc09626bd78dbda8aa3c91444a11cf3b1ec5fcb +MISC ChangeLog 2659 SHA256 7c001a3980252c54534108bc7214b5258af8cc676ea68204a1a54a0314bb9510 SHA512 4fa4aba97b8ef2b58eca9d9c018118de7cab0960e3c89910f253608a8e7a26b209f481a2cde77c91da1db4684b1a1d621cff77251f0aaafe5399917cf45cb304 WHIRLPOOL ed0322d2ccb3dbc76daef67e8a910c8e57d10e3c1150c558f72dec69ae7b718e8458429a78da5e968cfe852e86b186709daf040a6765bceabeeb62f91a4af387 +MISC ChangeLog-2015 9360 SHA256 dff19456b9a5b4d3efdd731757777f1ed2b5be1bbcc5e048f4d40a8ad88f2cdd SHA512 3534e8a2fbad7010a90e820834e12410f3f43e55e1f9df7f325ff0f8b820cb1131f8fe27917efda2ea53ac46317ddfc25b36604cd909cae1029706c267c04d6d WHIRLPOOL ed88533f45ba5de82da8d2efd01b79b8fb70738fcd0b92b948c268d54aeebc164950538c59737f1b317770f14aa8f13693de9609c0985abc08074693733288cc +MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968 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 diff --git a/app-text/sgml-common/metadata.xml b/app-text/sgml-common/metadata.xml new file mode 100644 index 000000000000..6f49eba8f496 --- /dev/null +++ b/app-text/sgml-common/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +</pkgmetadata> diff --git a/app-text/sgml-common/sgml-common-0.6.3-r5.ebuild b/app-text/sgml-common/sgml-common-0.6.3-r5.ebuild new file mode 100644 index 000000000000..adb5d0c161d5 --- /dev/null +++ b/app-text/sgml-common/sgml-common-0.6.3-r5.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" + +inherit eutils prefix + +DESCRIPTION="Base ISO character entities and utilities for SGML" +HOMEPAGE="http://www.iso.ch/cate/3524030.html" +#SRC_URI="mirror://kde/devel/docbook/SOURCES/${P}.tgz" +SRC_URI="https://dev.gentoo.org/~floppym/dist/${PN}/${P}-gentoo.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_prepare() { + # We use a hacked version of install-catalog that supports the ROOT + # variable, puts quotes around the CATALOG files, and can be prefixed. + cp "${FILESDIR}/${P}-install-catalog.in" "${S}/bin/install-catalog.in" + + epatch "${FILESDIR}"/${P}-prefix.patch + eprefixify bin/install-catalog.in bin/sgmlwhich config/sgml.conf +} + +src_configure() { + econf --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" +} + +pkg_postinst() { + local installer="${EROOT}usr/bin/install-catalog" + if [[ ! -x ${installer} ]]; then + eerror "install-catalog not found! Something went wrong!" + die "install-catalog not found! Something went wrong!" + fi + + einfo "Installing Catalogs..." + "$installer" --add \ + "${EPREFIX}"/etc/sgml/sgml-ent.cat \ + "${EPREFIX}"/usr/share/sgml/sgml-iso-entities-8879.1986/catalog + "$installer" --add \ + "${EPREFIX}"/etc/sgml/sgml-docbook.cat \ + "${EPREFIX}"/etc/sgml/sgml-ent.cat + + local file + for file in `find "${EROOT}etc/sgml/" -name "*.cat"` "${EROOT}etc/sgml/catalog" + do + einfo "Fixing ${file}" + awk '/"$/ { print $1 " " $2 } + ! /"$/ { print $1 " \"" $2 "\"" }' ${file} > ${file}.new + mv ${file}.new ${file} + done +} + +pkg_prerm() { + cp "${EROOT}usr/bin/install-catalog" "${T}" +} + +pkg_postrm() { + if [ ! -x "${T}/install-catalog" ]; then + return + fi + + einfo "Removing Catalogs..." + if [ -e "${EROOT}etc/sgml/sgml-ent.cat" ]; then + "${T}"/install-catalog --remove \ + "${EPREFIX}"/etc/sgml/sgml-ent.cat \ + "${EPREFIX}"/usr/share/sgml/sgml-iso-entities-8879.1986/catalog + fi + + if [ -e "${EROOT}etc/sgml/sgml-docbook.cat" ]; then + "${T}"/install-catalog --remove \ + "${EPREFIX}"/etc/sgml/sgml-docbook.cat \ + "${EPREFIX}"/etc/sgml/sgml-ent.cat + fi +} |