media-video/alevt: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Fri, 13 Dec 2019 13:20:33 +0000 (14:20 +0100)
committerDavid Seifert <soap@gentoo.org>
Fri, 13 Dec 2019 13:20:33 +0000 (14:20 +0100)
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
media-video/alevt/alevt-1.6.2.ebuild
media-video/alevt/files/alevt-1.6.2-libpng15.patch
media-video/alevt/files/alevt-1.6.2-respectflags.patch

index d93fd6f0ccb31d482211326b96a02c6e80ec2d06..efa778cbc2103e9471959af02bb0f6a8a6112134 100644 (file)
@@ -1,8 +1,9 @@
-# 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/"
@@ -11,37 +12,30 @@ SRC_URI="http://www.goron.de/~froese/alevt/${P}.tar.gz"
 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
 }
index 337a6f7c709fca90916c7f38c459d05734177446..a134fd014051d97729e8ce28e283bb93e5f5d9cf 100644 (file)
@@ -1,5 +1,5 @@
---- exp-gfx.c
-+++ exp-gfx.c
+--- a/exp-gfx.c
++++ b/exp-gfx.c
 @@ -4,6 +4,8 @@
  #include <stdlib.h>
  #include <string.h>
index 368b0ff614cd3e56b37de8fbdd5ce6fb82fc16fa..62716d0e8f43c22202d0c6229fa43a8c3c98ba13 100644 (file)
@@ -1,21 +1,25 @@
---- 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