-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
-inherit eutils toolchain-funcs flag-o-matic
+EAPI=7
+
+inherit desktop flag-o-matic toolchain-funcs
DESCRIPTION="Teletext viewer for X11"
HOMEPAGE="http://www.goron.de/~froese/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc x86"
-IUSE=""
+RESTRICT="strip"
-RDEPEND="x11-libs/libX11
- >=media-libs/libpng-1.4"
+RDEPEND="
+ x11-libs/libX11
+ media-libs/libpng:="
DEPEND="${RDEPEND}
x11-base/xorg-proto"
-RESTRICT="strip"
-
-src_prepare() {
- cp -va Makefile{,.orig}
+PATCHES=(
+ "${FILESDIR}"/${P}-respectflags.patch
+ "${FILESDIR}"/${P}-libpng15.patch
+)
- epatch \
- "${FILESDIR}"/${P}-respectflags.patch \
- "${FILESDIR}"/${P}-libpng15.patch
-}
-
-src_compile() {
- append-flags -fno-strict-aliasing
- emake CC="$(tc-getCC)"
+src_configure() {
+ append-cflags -fno-strict-aliasing
+ tc-export BUILD_CC CC
}
src_install() {
dobin alevt alevt-cap alevt-date
doman alevt.1x alevt-date.1 alevt-cap.1
- dodoc CHANGELOG README
-
- insinto /usr/share/icons/hicolor/16x16/apps
- newins contrib/mini-alevt.xpm alevt.xpm
- insinto /usr/share/icons/hicolor/48x48/apps
- newins contrib/icon48x48.xpm alevt.xpm
+ einstalldocs
+ newicon -s 16 contrib/mini-alevt.xpm alevt.xpm
+ newicon -s 48 contrib/icon48x48.xpm alevt.xpm
make_desktop_entry alevt "AleVT" alevt
}
---- alevt-1.6.2/Makefile.orig 2007-12-03 06:19:54.000000000 +0100
-+++ alevt-1.6.2/Makefile 2009-05-14 10:17:39.000000000 +0200
+--- a/Makefile
++++ b/Makefile
@@ -1,5 +1,4 @@
VER=1.6.2
-OPT=-O2 -s -w
#OPT=-O -g
DEFS=-DWITH_PNG
FONT=vtxt
-@@ -11,7 +10,7 @@
+@@ -7,11 +6,10 @@
+ #USR_X11R6=/usr
+ MAN_DIR=man
+ #MAN_DIR=share/man
+-HOSTCC=$(CC)
# a smaller and thinner font
#FONT=neep9
-CFLAGS=$(OPT) -DVERSION=\"$(VER)\" $(DEFS) -I$(USR_X11R6)/include
-+CFLAGS += -DVERSION=\"$(VER)\" $(DEFS) -I$(USR_X11R6)/include
++CPPFLAGS += -DVERSION=\"$(VER)\" $(DEFS) -I$(USR_X11R6)/include
EXPOBJS=export.o exp-txt.o exp-html.o exp-gfx.o font.o
OBJS=main.o ui.o xio.o fdset.o vbi.o cache.o help.o edline.o search.o edit.o misc.o hamm.o lang.o $(EXPOBJS)
-@@ -25,13 +24,13 @@
+@@ -25,13 +23,13 @@
all: alevt alevt-date alevt-cap alevt.1x alevt-date.1 alevt-cap.1
alevt: $(OBJS)
font.o: font1.xbm font2.xbm
fontsize.h: font1.xbm font2.xbm
+@@ -44,7 +42,7 @@
+ ./bdf2xbm font2 <$(FONT)-latin-2.bdf >font2.xbm
+
+ bdf2xbm: bdf2xbm.c
+- $(HOSTCC) bdf2xbm.c -o bdf2xbm
++ $(BUILD_CC) bdf2xbm.c -o bdf2xbm
+
+ alevt.1x: alevt.1x.in
+ sed s/VERSION/$(VER)/g <alevt.1x.in >alevt.1x