1 # Copyright © 2020 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
8 inherit toolchain-funcs desktop xdg
10 DESCRIPTION="LCD monitor test pattern generator"
11 HOMEPAGE="http://www.brouhaha.com/~eric/software/lcdtest/"
12 SRC_URI="$HOMEPAGE/download/$P.tar.gz"
15 KEYWORDS="~amd64 ~x86"
18 DEPEND="media-libs/libsdl[video]
21 media-fonts/liberation-fonts"
24 "$FILESDIR/$P-no-sdl-image.patch"
25 "$FILESDIR/$P-fix-prints.patch"
26 "$FILESDIR/$P-font-path.patch"
30 local font="/usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf"
31 local mycc=$(tc-getCC)
32 local compile="$mycc $CPPFLAGS $CFLAGS -c" link="$mycc $CFLAGS $LDFLAGS"
34 (cd src || exit; set -x
35 $compile lcdtest.c -DFONT_PATH=\""${EPREFIX%/}$font"\" -DRELEASE=$PV &&
36 $link -o lcdtest lcdtest.o -lSDL_ttf -lSDL) || die
42 doicon -s scalable desktop/lcdtest.svg
43 domenu desktop/lcdtest.desktop