summaryrefslogtreecommitdiff
blob: 0b6a0146109e4f2cc21ce06a5d62d85109501215 (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=4
inherit eutils toolchain-funcs

DESCRIPTION="Many to one page printing utility"
HOMEPAGE="http://www.mesa.nl/"
SRC_URI="http://www.mesa.nl/pub/${PN}/${P}.tgz
	https://dev.gentoo.org/~mgorny/dist/${P}-gentoo-patchset.tar.bz2"

KEYWORDS="amd64 ppc x86"
LICENSE="freedist"
SLOT="0"
IUSE=""

src_prepare() {
	sed -i Makefile \
		-e '/^CFLAGS/s|=.*| += $(DEFS)|g' \
		-e 's|$(CFLAGS) -o|$(LDFLAGS) &|g' \
		|| die "sed Makefile"
	EPATCH_SOURCE="${WORKDIR}/${P}-gentoo-patchset" epatch \
		01_previous_changes.patch 10_bts354935_fix_fontdefs.patch \
		20_bts416573_manpage_fixes.patch 30_bts443280_libdir_manpage.patch
}

src_compile() {
	emake \
		CC="$(tc-getCC)" \
		PREFIX=/usr \
		MANDIR=/usr/share/man/man1
}

src_install () {
	emake \
		PREFIX="${D}/usr" \
		MANDIR="${D}/usr/share/man/man1" install
	dodoc CHANGES Encoding.format FAQ NEWS README TODO
}