mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
sys-apps/groff: add 1.24.2
* Introduce USE=postscript for app-text/ghostscript-gpl and media-libs/netpbm for groff's HTML backend. It was previously automagic on both the font paths ghostscript-gpl installs and also whether the tools were available at build-time (bug #642430, bug #962804). * Don't compress files groff needs to read (bug #542624). * Wire up verify-sig. Bug: https://bugs.gentoo.org/983497 Closes: https://bugs.gentoo.org/542624 Closes: https://bugs.gentoo.org/642430 Closes: https://bugs.gentoo.org/923308 Closes: https://bugs.gentoo.org/962804 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1 +1,3 @@
|
||||
DIST groff-1.23.0.tar.gz 7433031 BLAKE2B 9fc5a2302f034761a17f0639a04b82c536ba8a7db15b062dd736e0011fc5a27fddcaf035af128d09f06762825d9bb965e8f5561e4be7a9fea3fe86ca5f6cb2dd SHA512 eff473fd1d0e6b27527318452ef2b7c6c7aba0b1c27fc529036496eccba5717f3639df0b81a297a57f700e27543196d7086b15e43d7e3c7bf075f95feb7f4089
|
||||
DIST groff-1.24.2.tar.gz 9016185 BLAKE2B fe94bc1403525285fac7a38bcf58329552a792d637ef752dffa8fd9343815c668a1f57d815b40aa84bd8f3e1e05572402277fec6b0f61a606886b743554372b0 SHA512 4fff1e98ba350b1ea57ae208aa2ed9360aec01d10c42dcc0fa4159d922ce5e707b33ce9fa787134e8e4fa61ca995150663767e17e8e8fd78865a1b335a33b244
|
||||
DIST groff-1.24.2.tar.gz.sig 566 BLAKE2B 173f371039f13eb29bddd0d902d2ad8f4e1be20edcb8f560bb960a51e38aaacf0daab78a278f792b550abb0dc4cf33967006c3d32927154b9ddf5de3494f8aeb SHA512 b3ae969bb6bce909ec1452d887fe2dbac6395abd74e1bed63e87b6334e77c00ace4e1ac11cdc638548fcca3d3fe57debdaf8e843fe9a4fa42f2c76bcb0351d59
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/groff.asc
|
||||
inherit toolchain-funcs verify-sig
|
||||
|
||||
MY_P="${P/_/.}"
|
||||
DESCRIPTION="Text formatter used for man pages"
|
||||
HOMEPAGE="https://www.gnu.org/software/groff/groff.html"
|
||||
|
||||
if [[ ${PV} == *_rc* ]] ; then
|
||||
SRC_URI="
|
||||
https://alpha.gnu.org/gnu/groff/${MY_P}.tar.gz
|
||||
verify-sig? ( https://alpha.gnu.org/gnu/groff/${MY_P}.tar.gz.sig )
|
||||
"
|
||||
else
|
||||
SRC_URI="
|
||||
mirror://gnu/groff/${MY_P}.tar.gz
|
||||
verify-sig? ( mirror://gnu/groff/${MY_P}.tar.gz.sig )
|
||||
"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="examples postscript uchardet X"
|
||||
|
||||
# ghostscript-gpl:= for font paths (bug #962804)
|
||||
DEPEND="
|
||||
uchardet? ( app-i18n/uchardet )
|
||||
postscript? (
|
||||
>=app-text/ghostscript-gpl-9.54:=
|
||||
app-text/psutils
|
||||
media-libs/netpbm
|
||||
)
|
||||
X? (
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libX11
|
||||
x11-libs/libXaw
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
media-fonts/urw-fonts
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-lang/perl-5.8
|
||||
>=sys-apps/texinfo-5.0
|
||||
sys-devel/m4
|
||||
postscript? (
|
||||
>=app-text/ghostscript-gpl-9.54
|
||||
app-text/psutils
|
||||
media-libs/netpbm
|
||||
)
|
||||
verify-sig? ( sec-keys/openpgp-keys-groff )
|
||||
"
|
||||
|
||||
DOCS=( BUG-REPORT ChangeLog MORE.STUFF NEWS PROBLEMS PROJECTS README TODO )
|
||||
|
||||
PATCHES=(
|
||||
# bug #16108, bug #17580, bug #121502
|
||||
"${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Honor Gentoo's docdir
|
||||
sed -i -e "s|^docdir =.*|docdir = \"${EPREFIX}/usr/share/doc/${PF}\"|g" \
|
||||
Makefile.in \
|
||||
|| die "failed to modify Makefile.in"
|
||||
|
||||
local pfx=$(usev prefix ' Prefix')
|
||||
cat <<-EOF >> tmac/mdoc.local || die
|
||||
.ds volume-operating-system Gentoo${pfx}
|
||||
.ds operating-system Gentoo${pfx}/${KERNEL}
|
||||
.ds default-operating-system Gentoo${pfx}/${KERNEL}
|
||||
EOF
|
||||
|
||||
# make sure we don't get a crappy `g' nameprefix on UNIX systems with real
|
||||
# troff (GROFF_G macro runs some test to see, its own troff doesn't satisfy)
|
||||
sed -i -e 's/^[ \t]\+g=g$/g=/' configure || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use postscript ; then
|
||||
export ac_cv_prog_XPMTOPPM=missing
|
||||
export GHOSTSCRIPT=missing
|
||||
export ac_cv_prog_ac_ct_GHOSTSCRIPT=missing
|
||||
export ac_cv_prog_pamcut=missing
|
||||
export ac_cv_prog_pnmcrop=missing
|
||||
export ac_cv_prog_pnmtopng=missing
|
||||
export ac_cv_prog_pnmtops=missing
|
||||
export ac_cv_prog_ps2ps=found
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--with-appdefdir="${EPREFIX}"/usr/share/X11/app-defaults
|
||||
--without-compatibility-wrappers # for Prefix
|
||||
$(use_with uchardet)
|
||||
$(use_with X x)
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local -a CROSS_ARGS
|
||||
tc-is-cross-compiler && CROSS_ARGS+=(
|
||||
GROFFBIN="$(type -P groff)"
|
||||
TROFFBIN="$(type -P troff)"
|
||||
GROFF_BIN_DIR=
|
||||
GROFF_BIN_PATH=
|
||||
)
|
||||
|
||||
emake AR="$(tc-getAR)" "${CROSS_ARGS[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# .ms, .ps files shouldn't be compressed and other files are tiny (bug #542624)
|
||||
while IFS= read -r -d ''; do
|
||||
docompress -x ${REPLY#${ED}}
|
||||
done < <(find "${ED}"/usr/share/doc/${PF} -type f \( -name '*.me' -or -name '*.ms' -o -name '*.ps' \) -print0 || die)
|
||||
|
||||
# The following links are required for man (bug #123674)
|
||||
dosym eqn /usr/bin/geqn
|
||||
dosym tbl /usr/bin/gtbl
|
||||
|
||||
if ! use examples ; then
|
||||
# The pdf files might not be generated if ghostscript is unavailable (bug #602020)
|
||||
local pdf="${ED}/usr/share/doc/${PF}/examples/mom/mom-pdf.pdf"
|
||||
if [[ -e ${pdf} ]] ; then
|
||||
# Keep mom-pdf.pdf since it's more of a manual than an example
|
||||
# bug #454196 and bug #516732
|
||||
mv "${pdf}" "${ED}/usr/share/doc/${PF}/pdf/" || die
|
||||
fi
|
||||
rm -rf "${ED}/usr/share/doc/${PF}/examples"
|
||||
fi
|
||||
}
|
||||
@@ -6,7 +6,13 @@
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="uchardet">Enable automatic encoding detection via <pkg>app-i18n/uchardet</pkg></flag>
|
||||
<flag name="postscript">
|
||||
Fully support HTML backends via tools from <pkg>app-text/ghostscript-gpl</pkg>
|
||||
and <pkg>media-libs/netpbm</pkg>.
|
||||
</flag>
|
||||
<flag name="uchardet">
|
||||
Enable automatic encoding detection via <pkg>app-i18n/uchardet</pkg>
|
||||
</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:gnu:groff</remote-id>
|
||||
|
||||
Reference in New Issue
Block a user