summaryrefslogtreecommitdiff
blob: 6974b8580492fd7c82db277035ef185bc53cab2b (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
59
60
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs

DESCRIPTION="A svgalib console image viewer"
HOMEPAGE="http://www.svgalib.org/rus/zgv/"
SRC_URI="http://www.svgalib.org/rus/zgv/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"

RDEPEND="
	media-libs/libpng
	>=media-libs/svgalib-1.4.2
	>=media-libs/tiff-3.5.5:=
	media-libs/libjpeg-turbo:=
	sys-apps/gawk
	>=sys-libs/zlib-1.1.4
"
DEPEND="${RDEPEND}"

PATCHES=(
	"${FILESDIR}"/${P}-Makefile-QA.patch
	"${FILESDIR}"/${P}-cmyk-yccl-fix.diff
	"${FILESDIR}"/${P}-libpng15.patch
)

src_prepare() {
	sed -i -e "/^CFLAGS=/s:=.*:=${CFLAGS}:" config.mk || die
	sed -i -e 's:$(RM):echo:' doc/Makefile || die
	default
}

src_compile() {
	emake CC="$(tc-getCC)"
}

src_install() {
	dodir /usr/bin /usr/share/info /usr/share/man/man1

	emake \
		PREFIX="${ED}"/usr \
		INFODIR="${ED}"/usr/share/info \
		MANDIR="${ED}"/usr/share/man/man1 \
		install

	dodoc AUTHORS ChangeLog INSTALL NEWS README* SECURITY TODO

	# Fix info files
	cd "${D}"/usr/share/info
	rm dir* || die
	mv zgv zgv.info || die
	for i in 1 2 3 4 ; do
		mv zgv-$i zgv.info-$i || die
	done
}