mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 16:37:01 +02:00
app-text/docbook-xsl-stylesheets: Sync with Gentoo
It's from Gentoo commit 03677f912ed3fd5e02cbbbb2c9f37940d87d6c97.
This commit is contained in:
parent
5846ab83ca
commit
8bae1ce374
@ -1,9 +1,9 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=6
|
EAPI=8
|
||||||
USE_RUBY="ruby25 ruby26 ruby27"
|
|
||||||
|
|
||||||
|
USE_RUBY="ruby27 ruby30"
|
||||||
inherit ruby-single
|
inherit ruby-single
|
||||||
|
|
||||||
DOCBOOKDIR="/usr/share/sgml/${PN/-//}"
|
DOCBOOKDIR="/usr/share/sgml/${PN/-//}"
|
||||||
@ -13,22 +13,20 @@ MY_P="${MY_PN}-${PV}"
|
|||||||
DESCRIPTION="XSL Stylesheets for Docbook"
|
DESCRIPTION="XSL Stylesheets for Docbook"
|
||||||
HOMEPAGE="https://github.com/docbook/wiki/wiki"
|
HOMEPAGE="https://github.com/docbook/wiki/wiki"
|
||||||
SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2"
|
SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2"
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||||
IUSE="ruby"
|
IUSE="ruby"
|
||||||
|
# Makefile is broken since 1.76.0
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
>=app-text/build-docbook-catalog-1.1
|
>=app-text/build-docbook-catalog-1.1
|
||||||
ruby? ( ${RUBY_DEPS} )
|
ruby? ( ${RUBY_DEPS} )
|
||||||
"
|
"
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}"
|
|
||||||
|
|
||||||
# Makefile is broken since 1.76.0
|
|
||||||
RESTRICT=test
|
|
||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/nonrecursive-string-subst.patch
|
"${FILESDIR}"/nonrecursive-string-subst.patch
|
||||||
)
|
)
|
||||||
@ -66,30 +64,25 @@ src_install() {
|
|||||||
for i in */; do
|
for i in */; do
|
||||||
i=${i%/}
|
i=${i%/}
|
||||||
|
|
||||||
cd "${S}"/${i}
|
|
||||||
for doc in ChangeLog README; do
|
for doc in ChangeLog README; do
|
||||||
if [ -e "$doc" ]; then
|
if [[ -e ${i}/${doc} ]]; then
|
||||||
mv ${doc} ${doc}.${i}
|
newdoc ${i}/${doc} ${doc}.${i}
|
||||||
dodoc ${doc}.${i}
|
rm ${i}/${doc} || die
|
||||||
rm ${doc}.${i}
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
doins -r "${S}"/${i}
|
doins -r ${i}
|
||||||
done
|
done
|
||||||
|
|
||||||
if use ruby; then
|
if use ruby; then
|
||||||
local cmd="dbtoepub${MY_PN#docbook-xsl}"
|
local cmd="dbtoepub${MY_PN#docbook-xsl}"
|
||||||
|
|
||||||
# we can't use a symlink or it'll look for the library in the
|
# we can't use a symlink or it'll look for the library in the wrong path
|
||||||
# wrong path.
|
newbin - ${cmd} <<-EOF
|
||||||
dodir /usr/bin
|
#!/usr/bin/env ruby
|
||||||
cat - > "${ED%/}"/usr/bin/${cmd} <<EOF
|
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
load "${EPREFIX}${DOCBOOKDIR}/epub/bin/dbtoepub"
|
load "${EPREFIX}${DOCBOOKDIR}/epub/bin/dbtoepub"
|
||||||
EOF
|
EOF
|
||||||
fperms 0755 /usr/bin/${cmd}
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user