summaryrefslogtreecommitdiff
blob: b35afa12de16a3ccb20e19b298166997b323cdb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs

MY_P="man-${PV}"

DESCRIPTION="Standard commands to read man pages"
HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
SRC_URI="http://primates.ximian.com/~flucifredi/man/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"

RDEPEND="!sys-apps/man"

PATCHES=(
	"${FILESDIR}"/man-1.6f-man2html-compression-2.patch
	"${FILESDIR}"/man-1.6-cross-compile.patch
	"${FILESDIR}"/man-1.6g-compress.patch #205147
)

src_configure() {
	echoit() {
		echo "$@"
		"$@"
	}

	tc-export CC BUILD_CC

	# Just a stub to disable configure check.  man2html doesn't use it.
	export COMPRESS=true
	echoit \
	./configure \
		-confdir=/etc \
		+sgid +fhs \
		+lang none \
		|| die "configure failed"
}

src_compile() {
	emake {src,man2html}/Makefile
	emake -C src version.h
	emake -C man2html
}

src_install() {
	# A little faster to run this by hand than `emake install`.
	cd man2html || die

	dobin man2html
	doman man2html.1
	dodoc README TODO
}