summaryrefslogtreecommitdiff
blob: bdaf06587cd81727deb085671e243b211f25af50 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/tic98/tic98-1.01-r3.ebuild,v 1.5 2009/07/05 12:24:52 maekke Exp $

inherit eutils

DESCRIPTION="compressor for black-and-white images, in particular scanned documents"
HOMEPAGE="http://membled.com/work/mirror/tic98/"
SRC_URI="http://membled.com/work/mirror/tic98/${P}.tar.bz2"

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

DEPEND=""
RDEPEND=""
RESTRICT="test"

S="${WORKDIR}/${PN}"

src_unpack() {
	unpack ${A}
	epatch "${FILESDIR}"/${P}-macos.patch
	cd "${S}"
	epatch "${FILESDIR}"/${P}-gentoo.diff
	epatch "${FILESDIR}"/${P}-glibc-2.10.patch

	# respect CFLAGS and LDFLAGS
	sed -i -e "s:CFLAGS= -O -Wall -Wno-unused:CFLAGS=${CFLAGS}:" \
		-e "s:LIBS=   -lm #-L/home/singlis/linux/lib -lccmalloc -ldl:LIBS= -lm ${LDFLAGS}:" \
		-e "s:CC=	gcc -pipe :CC=$(tc-getCC):" \
		-e "s:CPP=	gcc -pipe:CPP=$(tc-getCPP):" \
		Makefile || die
}

src_compile() {
	emake all || die
	emake all2 || die
}

src_install() {
	dodir /usr/bin
	emake BIN="${D}"usr/bin install || die

	# collision with media-gfx/netpbm, see bug #207534
	rm "${D}"/usr/bin/pbmclean || die
}