1 |
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit flag-o-matic toolchain-funcs
|
|
6 |
inherit toolchain-funcs
|
7 |
7 |
|
8 |
8 |
MY_P="${P/_/.}"
|
9 |
|
|
10 |
9 |
DESCRIPTION="Text formatter used for man pages"
|
11 |
10 |
HOMEPAGE="https://www.gnu.org/software/groff/groff.html"
|
12 |
|
SRC_URI="mirror://gnu/groff/${MY_P}.tar.gz
|
13 |
|
https://alpha.gnu.org/gnu/groff/${MY_P}.tar.gz"
|
|
11 |
|
|
12 |
if [[ ${PV} == *_rc* ]] ; then
|
|
13 |
SRC_URI="https://alpha.gnu.org/gnu/groff/${MY_P}.tar.gz"
|
|
14 |
else
|
|
15 |
SRC_URI="mirror://gnu/groff/${MY_P}.tar.gz"
|
|
16 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
|
17 |
fi
|
|
18 |
|
|
19 |
S="${WORKDIR}/${MY_P}"
|
14 |
20 |
|
15 |
21 |
LICENSE="GPL-2"
|
16 |
22 |
SLOT="0"
|
17 |
|
[[ "${PV}" == *_rc* ]] || \
|
18 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
19 |
23 |
IUSE="examples uchardet X"
|
20 |
24 |
|
21 |
25 |
RDEPEND="
|
... | ... | |
27 |
31 |
x11-libs/libXaw
|
28 |
32 |
x11-libs/libXmu
|
29 |
33 |
x11-libs/libXt
|
30 |
|
)"
|
|
34 |
)
|
|
35 |
"
|
31 |
36 |
DEPEND="${RDEPEND}"
|
32 |
37 |
BDEPEND="
|
33 |
38 |
dev-lang/perl
|
34 |
|
sys-apps/texinfo"
|
|
39 |
sys-apps/texinfo
|
|
40 |
"
|
35 |
41 |
|
36 |
42 |
DOCS=( BUG-REPORT ChangeLog MORE.STUFF NEWS PROBLEMS PROJECTS README TODO )
|
37 |
43 |
|
38 |
|
S="${WORKDIR}/${MY_P}"
|
|
44 |
QA_CONFIG_IMPL_DECL_SKIP=(
|
|
45 |
# False positive with older autoconf, will be fixed w/ autoconf-2.72
|
|
46 |
static_assert
|
|
47 |
)
|
39 |
48 |
|
40 |
49 |
PATCHES=(
|
41 |
|
"${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch #16108 #17580 #121502
|
42 |
|
"${FILESDIR}"/${PN}-1.22.4-skip-broken-diffutils-test.patch
|
|
50 |
# bug #16108, bug #17580, bug #121502
|
|
51 |
"${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch
|
43 |
52 |
)
|
44 |
53 |
|
45 |
54 |
src_prepare() {
|
46 |
55 |
default
|
47 |
56 |
|
48 |
|
# honor Gentoo's docdir
|
|
57 |
# Honor Gentoo's docdir
|
49 |
58 |
sed -i -e "s|^docdir =.*|docdir = \"${EPREFIX}/usr/share/doc/${PF}\"|g" \
|
50 |
59 |
Makefile.in \
|
51 |
60 |
|| die "failed to modify Makefile.in"
|
52 |
61 |
|
53 |
62 |
local pfx=$(usex prefix ' Prefix' '')
|
54 |
|
cat <<-EOF >> tmac/mdoc.local
|
|
63 |
cat <<-EOF >> tmac/mdoc.local || die
|
55 |
64 |
.ds volume-operating-system Gentoo${pfx}
|
56 |
65 |
.ds operating-system Gentoo${pfx}/${KERNEL}
|
57 |
66 |
.ds default-operating-system Gentoo${pfx}/${KERNEL}
|
... | ... | |
63 |
72 |
}
|
64 |
73 |
|
65 |
74 |
src_configure() {
|
66 |
|
if use elibc_musl ; then
|
67 |
|
# This should be safe to drop in the release after 1.22.4
|
68 |
|
# gnulib was rather out of date and didn't include musl in its
|
69 |
|
# CHOST checks.
|
70 |
|
# bug #678026
|
71 |
|
export gl_cv_func_signbit_gcc=yes
|
72 |
|
fi
|
73 |
|
|
74 |
|
# Drop in release after 1.22.4! bug #894154
|
75 |
|
append-cxxflags -std=gnu++11
|
76 |
|
|
77 |
75 |
local myeconfargs=(
|
78 |
|
--with-appresdir="${EPREFIX}"/usr/share/X11/app-defaults
|
|
76 |
--with-appdefdir="${EPREFIX}"/usr/share/X11/app-defaults
|
|
77 |
--without-compatibility-wrappers # for Prefix
|
79 |
78 |
$(use_with uchardet)
|
80 |
79 |
$(use_with X x)
|
81 |
80 |
)
|
|
81 |
|
82 |
82 |
econf "${myeconfargs[@]}"
|
83 |
83 |
}
|
84 |
84 |
|
... | ... | |
97 |
97 |
src_install() {
|
98 |
98 |
default
|
99 |
99 |
|
100 |
|
# The following links are required for man #123674
|
|
100 |
# The following links are required for man, bug #123674
|
101 |
101 |
dosym eqn /usr/bin/geqn
|
102 |
102 |
dosym tbl /usr/bin/gtbl
|
103 |
103 |
|
104 |
104 |
if ! use examples ; then
|
105 |
|
# The pdf files might not be generated if ghostscript is unavailable. #602020
|
|
105 |
# The pdf files might not be generated if ghostscript is unavailable, bug #602020
|
106 |
106 |
local pdf="${ED}/usr/share/doc/${PF}/examples/mom/mom-pdf.pdf"
|
107 |
107 |
if [[ -e ${pdf} ]] ; then
|
108 |
|
# Keep mom-pdf.pdf since it's more of a manual than an example. #454196 #516732
|
|
108 |
# Keep mom-pdf.pdf since it's more of a manual than an example
|
|
109 |
# bug #454196 and bug #516732
|
109 |
110 |
mv "${pdf}" "${ED}/usr/share/doc/${PF}/pdf/" || die
|
110 |
111 |
fi
|
111 |
112 |
rm -rf "${ED}/usr/share/doc/${PF}/examples"
|