summaryrefslogtreecommitdiff
path: root/app-text/docbook-xsl-stylesheets
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-text/docbook-xsl-stylesheets
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-text/docbook-xsl-stylesheets')
-rw-r--r--app-text/docbook-xsl-stylesheets/Manifest4
-rw-r--r--app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild101
-rw-r--r--app-text/docbook-xsl-stylesheets/files/nonrecursive-string-subst.patch30
-rw-r--r--app-text/docbook-xsl-stylesheets/metadata.xml14
4 files changed, 149 insertions, 0 deletions
diff --git a/app-text/docbook-xsl-stylesheets/Manifest b/app-text/docbook-xsl-stylesheets/Manifest
new file mode 100644
index 000000000000..b2a0d1a7cde9
--- /dev/null
+++ b/app-text/docbook-xsl-stylesheets/Manifest
@@ -0,0 +1,4 @@
+AUX nonrecursive-string-subst.patch 1205 BLAKE2B 0c7bb8e3ba646a137bc0b50722448c65437881672a4bbb3f3dc7a181e5074f667fca0fbcb4475b83f04ac63bdddbf3dae800b7a7094b5d9aea270faeb81d9e50 SHA512 6a26838078a3ce28273dddfa1af6a378cffc28b6d1ba48a4cfc839addd7bf58ce217d6584b735f9c75381954744ab2386c75fa3c593858b6e27882be55c00d04
+DIST docbook-xsl-1.79.1.tar.bz2 21967928 BLAKE2B 42b7e989616d16fa100c2dad713830ecedf6c7e26f56f99a9bf9330385c753f282cea1033e689196352bd41f9dca59a06ff09fc4638051cb478a630df9bfeb0b SHA512 83325cbaf1545da6b9b8b77f5f0e6fdece26e3c455164b300a1aa3d19e3bd29ae71fd563553a714a5394968d1a65684c6c7987c77524469358d18b8c227025c7
+EBUILD docbook-xsl-stylesheets-1.79.1-r2.ebuild 2171 BLAKE2B c7720c9f35b56c9302e364dbcd9b9e1d571aecdcf363e2260035bd202bf561b800e2ef7c5f6347c2c6de448ec8cb703b468e3c3b8e2207761156e4e0e2079617 SHA512 0e7a04f68a10a037c2784336c64edae12c6102d44bff00b2eaca64ac76ca4c7ce6a23c0fdcab31a7b65d5c3b3be2a6ded06301685aeac9f161ee7a695b1eff1c
+MISC metadata.xml 413 BLAKE2B c4ba1418a2d7499d953111afac5907a4dd53c183f8a2613218aa0f0f510f1b75d04c6839c5407f20703ebab963d505dc09e081cfb053970147b07001caea6920 SHA512 7c32b5261d0bfe9f552efd08854233b47958d04cab7b932ddb67cfe163319f8f8ea82d1b169203b9e2158d3a436862d7050dcc762d3b525ba806690640ad3892
diff --git a/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild
new file mode 100644
index 000000000000..25331a2f2de1
--- /dev/null
+++ b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+USE_RUBY="ruby22 ruby23 ruby24 ruby25"
+
+inherit ruby-single
+
+DOCBOOKDIR="/usr/share/sgml/${PN/-//}"
+MY_PN="${PN%-stylesheets}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="XSL Stylesheets for Docbook"
+HOMEPAGE="https://github.com/docbook/wiki/wiki"
+SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-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="ruby"
+
+RDEPEND=">=app-text/build-docbook-catalog-1.1
+ ruby? ( ${RUBY_DEPS} )"
+
+S="${WORKDIR}/${MY_P}"
+
+# Makefile is broken since 1.76.0
+RESTRICT=test
+
+PATCHES=(
+ "${FILESDIR}"/nonrecursive-string-subst.patch
+)
+
+src_prepare() {
+ default
+
+ # Delete the unnecessary Java-related stuff and other tools as they
+ # bloat the stage3 tarballs massively. See bug #575818.
+ rm -rv extensions/ tools/ || die
+ find \( -name build.xml -o -name build.properties \) \
+ -printf "removed %p\n" -delete || die
+
+ if ! use ruby; then
+ rm -rv epub/ || die
+ fi
+}
+
+# The makefile runs tests, not builds.
+src_compile() { :; }
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ # The changelog is now zipped, and copied as the RELEASE-NOTES, so we
+ # don't need to install it
+ dodoc AUTHORS BUGS NEWS README RELEASE-NOTES.txt TODO
+
+ insinto ${DOCBOOKDIR}
+ doins VERSION VERSION.xsl
+
+ local i
+ for i in */; do
+ i=${i%/}
+
+ cd "${S}"/${i}
+ for doc in ChangeLog README; do
+ if [ -e "$doc" ]; then
+ mv ${doc} ${doc}.${i}
+ dodoc ${doc}.${i}
+ rm ${doc}.${i}
+ fi
+ done
+
+ doins -r "${S}"/${i}
+ done
+
+ if use ruby; then
+ local cmd="dbtoepub${MY_PN#docbook-xsl}"
+
+ # we can't use a symlink or it'll look for the library in the
+ # wrong path.
+ dodir /usr/bin
+ cat - > "${D}"/usr/bin/${cmd} <<EOF
+#!/usr/bin/env ruby
+
+load "${DOCBOOKDIR}/epub/bin/dbtoepub"
+EOF
+ fperms 0755 /usr/bin/${cmd}
+ fi
+}
+
+pkg_postinst() {
+ build-docbook-catalog
+}
+
+pkg_postrm() {
+ build-docbook-catalog
+}
diff --git a/app-text/docbook-xsl-stylesheets/files/nonrecursive-string-subst.patch b/app-text/docbook-xsl-stylesheets/files/nonrecursive-string-subst.patch
new file mode 100644
index 000000000000..99ce9960d9e4
--- /dev/null
+++ b/app-text/docbook-xsl-stylesheets/files/nonrecursive-string-subst.patch
@@ -0,0 +1,30 @@
+Description: use EXSLT "replace" function when available
+ A recursive implementation of string.subst is problematic,
+ long strings with many matches will cause stack overflows.
+Author: Peter De Wachter <pdewacht@gmail.com>
+Bug-Debian: https://bugs.debian.org/750593
+
+--- a/lib/lib.xsl
++++ b/lib/lib.xsl
+@@ -10,7 +10,10 @@
+ This module implements DTD-independent functions
+
+ ******************************************************************** -->
+-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++ xmlns:str="http://exslt.org/strings"
++ exclude-result-prefixes="str"
++ version="1.0">
+
+ <xsl:template name="dot.count">
+ <!-- Returns the number of "." characters in a string -->
+@@ -56,6 +59,9 @@
+ <xsl:param name="replacement"/>
+
+ <xsl:choose>
++ <xsl:when test="function-available('str:replace')">
++ <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
++ </xsl:when>
+ <xsl:when test="contains($string, $target)">
+ <xsl:variable name="rest">
+ <xsl:call-template name="string.subst">
diff --git a/app-text/docbook-xsl-stylesheets/metadata.xml b/app-text/docbook-xsl-stylesheets/metadata.xml
new file mode 100644
index 000000000000..cef0d5fef5cf
--- /dev/null
+++ b/app-text/docbook-xsl-stylesheets/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="ruby">
+ Install the Ruby-based dbtoepub script; requires an interpreter
+ compatible with <pkg>app-eselect/eselect-ruby</pkg>.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">docbook</remote-id>
+ </upstream>
+</pkgmetadata>