]> git.draconx.ca Git - gentoo-draconx.git/blob - sys-apps/lcdtest/lcdtest-1.18.ebuild
Add sys-apps/lcdtest ebuild.
[gentoo-draconx.git] / sys-apps / lcdtest / lcdtest-1.18.ebuild
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.
5
6 EAPI=7
7
8 inherit toolchain-funcs desktop xdg
9
10 DESCRIPTION="LCD monitor test pattern generator"
11 HOMEPAGE="http://www.brouhaha.com/~eric/software/lcdtest/"
12 SRC_URI="$HOMEPAGE/download/$P.tar.gz"
13
14 LICENSE="GPL-3"
15 KEYWORDS="~amd64 ~x86"
16 SLOT="0"
17
18 DEPEND="media-libs/libsdl[video]
19         media-libs/sdl-ttf"
20 RDEPEND="$DEPEND
21         media-fonts/liberation-fonts"
22
23 PATCHES=(
24         "$FILESDIR/$P-no-sdl-image.patch"
25         "$FILESDIR/$P-fix-prints.patch"
26         "$FILESDIR/$P-font-path.patch"
27         )
28
29 src_compile () {
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"
33
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
37 }
38
39 src_install () {
40         dobin src/lcdtest
41         doman man/lcdtest.1
42         doicon -s scalable desktop/lcdtest.svg
43         domenu desktop/lcdtest.desktop
44
45         default
46 }