commit:     eed3f1879631c9b54480cb9383ae990472c0a47b
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 13 15:07:22 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Dec 13 15:07:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eed3f187

media-gfx/hp2xx: Port to EAPI 7

Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch | 25 ++++++---
 media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild      | 84 +++++++++++++++++-------------
 2 files changed, 68 insertions(+), 41 deletions(-)

diff --git a/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch 
b/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch
index 9bff4f43b92..d9f3edb8494 100644
--- a/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch
+++ b/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch
@@ -1,6 +1,20 @@
-diff -ruN hp2xx-3.4.4.orig/makes/generic.mak hp2xx-3.4.4/makes/generic.mak
---- hp2xx-3.4.4.orig/makes/generic.mak 2003-06-21 17:16:35.000000000 +0200
-+++ hp2xx-3.4.4/makes/generic.mak      2012-02-07 22:30:29.000000000 +0100
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,9 @@
+ 
+ all:
+-      cd sources; make
++      cd sources && $(MAKE)
+ 
+ clean:
+-      cd sources; make clean
++      cd sources && $(MAKE) clean
+ 
+ install:
+-      cd sources; make install
++      cd sources && $(MAKE) install
+--- a/makes/generic.mak
++++ b/makes/generic.mak
 @@ -30,11 +30,11 @@
  CP       = cp
  MKINFO   = makeinfo
@@ -115,9 +129,8 @@ diff -ruN hp2xx-3.4.4.orig/makes/generic.mak 
hp2xx-3.4.4/makes/generic.mak
        $(BINDCMD)
  
  
-diff -ruN hp2xx-3.4.4.orig/sources/png.c hp2xx-3.4.4/sources/png.c
---- hp2xx-3.4.4.orig/sources/png.c     2003-06-21 17:31:51.000000000 +0200
-+++ hp2xx-3.4.4/sources/png.c  2012-02-07 22:26:33.000000000 +0100
+--- a/sources/png.c
++++ b/sources/png.c
 @@ -5,6 +5,7 @@
  #include <stdio.h>
  #include <stdlib.h>

diff --git a/media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild 
b/media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild
index 9bdc0204255..82bdb6b2b16 100644
--- a/media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild
+++ b/media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
-inherit eutils base
+inherit toolchain-funcs
 
 DESCRIPTION="Convert Hewlett-Packard's HP-GL plotter language to other 
graphics formats"
 HOMEPAGE="https://www.gnu.org/software/hp2xx/";
@@ -12,58 +12,72 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="X jpeg png tiff"
+IUSE="jpeg png tiff X"
 
 RDEPEND="
-       png? ( media-libs/libpng sys-libs/zlib )
-       tiff? ( media-libs/tiff )
        jpeg? ( virtual/jpeg )
+       png? (
+               media-libs/libpng:=
+               sys-libs/zlib
+       )
+       tiff? ( media-libs/tiff:= )
        X? ( x11-libs/libX11 )"
-DEPEND="${RDEPEND}
-       sys-apps/texinfo"
+DEPEND="${RDEPEND}"
+BDEPEND="sys-apps/texinfo"
 
-PATCHES=(  "${FILESDIR}"/${P}-r1.patch
-       "${FILESDIR}"/${P}-docbuild.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-r1.patch
+       "${FILESDIR}"/${P}-docbuild.patch
+)
 
 src_prepare() {
-       base_src_prepare
+       default
        cp -v makes/generic.mak sources/Makefile || die
 }
 
-src_compile() {
-       cd "${S}/sources" || die
+src_configure() {
        export PREVIEWER="no_prev"
        export EX_SRC=
        export EX_OBJ=
        export EX_DEFS=-DUNIX
        export ALL_LIBS=-lm
-       use X && \
-               PREVIEWER="to_x11" \
-               EX_DEFS="-DHAS_UNIX_X11" \
-               ALL_LIBS="${ALL_LIBS} -lX11"
+
        use jpeg && \
-               EX_SRC="${EX_SRC} to_jpg.c" \
-               EX_OBJ="${EX_OBJ} to_jpg.o" \
-               EX_DEFS="${EX_DEFS} -DJPG" \
-               ALL_LIBS="${ALL_LIBS} -ljpeg"
+               EX_SRC+=" to_jpg.c" \
+               EX_OBJ+=" to_jpg.o" \
+               EX_DEFS+=" -DJPG" \
+               ALL_LIBS+=" -ljpeg"
        use png && \
-               EX_SRC="${EX_SRC} png.c to_png.c" \
-               EX_OBJ="${EX_OBJ} png.o to_png.o" \
-               EX_DEFS="${EX_DEFS} -DPNG" \
-               ALL_LIBS="${ALL_LIBS} -lpng"
+               EX_SRC+=" png.c to_png.c" \
+               EX_OBJ+=" png.o to_png.o" \
+               EX_DEFS+=" -DPNG" \
+               ALL_LIBS+=" -lpng"
        use tiff && \
-               EX_SRC="${EX_SRC} to_tif.c" \
-               EX_OBJ="${EX_OBJ} to_tif.o" \
-               EX_DEFS="${EX_DEFS} -DTIF" \
-               ALL_LIBS="${ALL_LIBS} -ltiff"
-       emake all
+               EX_SRC+=" to_tif.c" \
+               EX_OBJ+=" to_tif.o" \
+               EX_DEFS+=" -DTIF" \
+               ALL_LIBS+=" -ltiff"
+       use X && \
+               PREVIEWER="to_x11" \
+               EX_DEFS="-DHAS_UNIX_X11" \
+               ALL_LIBS+=" -lX11"
+
+       tc-export CC
+}
+
+src_compile() {
+       emake -C sources all
 }
 
 src_install() {
-       dodir /usr/bin /usr/share/info /usr/share/man/man1
+       dodir \
+               /usr/bin \
+               /usr/share/info \
+               /usr/share/man/man1
 
-       make prefix="${D}/usr" \
-               mandir="${D}/usr/share/man" \
-               infodir="${D}/usr/share/info" \
-               install || die
+       emake \
+               prefix="${ED}"/usr \
+               mandir="${ED}"/usr/share/man \
+               infodir="${ED}"/usr/share/info \
+               install
 }

Reply via email to