blob: cbfabbe074f299242d32c459fe997495f197ddaa (
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
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/lcdtest/lcdtest-1.08-r1.ebuild,v 1.6 2008/04/22 13:05:46 chainsaw Exp $
inherit eutils toolchain-funcs
DESCRIPTION="Displays test patterns to spot dead/hot pixels on LCD screens"
HOMEPAGE="http://www.brouhaha.com/~eric/software/lcdtest/"
SRC_URI="http://www.brouhaha.com/~eric/software/lcdtest/download/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 x86"
IUSE=""
RDEPEND=">=media-libs/libsdl-1.2.7-r2
>=media-libs/sdl-image-1.2.3-r1"
DEPEND="$RDEPEND
>=media-libs/netpbm-10.28
>=sys-apps/sed-4.1.4"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${PV}-help-option.patch"
}
src_compile() {
tc-export CC CXX
cd "${S}/src"
ebegin "Running first stage compilation"
"${CC}" -o lcdtest.o -c ${CFLAGS} -DRELEASE=${PV} lcdtest.c || die lcdtest compilation failed
"${CC}" -o SFont.o -c ${CFLAGS} -DRELEASE=${PV} SFont.c || die SFont compilation failed
eend $?
einfo "Generating font"
pngtopnm 14P_Arial_Plain_Red.png > help_font.ppm || pngtopnm failed
ppmtoxpm -name `basename help_font.ppm .ppm`_xpm help_font.ppm |
sed 's/static //;s/black/#000000/;s/magenta/#FF00FF/;s/#E40808/#009900/' > help_font.c || ppmtoxpm failed
ebegin "Running final stage compilation"
"${CC}" -o help_font.o -c ${CFLAGS} -DRELEASE=${PV} help_font.c || die help_font compilation failed
"${CC}" -o lcdtest lcdtest.o SFont.o help_font.o -lSDL -lSDL_image || die final link failed
eend $?
}
src_install() {
dobin src/lcdtest
doman man/lcdtest.1
dodoc README
}
|