commit:     50fb72de41777711be4fe2bbac6d6c4ea57c244b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 19 17:36:00 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 19 19:12:05 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50fb72de

app-text/ttf2pt1: port to EAPI 7

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../ttf2pt1/files/ttf2pt1-3.4.0-man-pages.diff     | 15 +++-----
 app-text/ttf2pt1/files/ttf2pt1-3.4.4-LDFLAGS.patch |  2 -
 .../ttf2pt1/files/ttf2pt1-3.4.4-Makefile.patch     |  5 +--
 .../ttf2pt1/files/ttf2pt1-3.4.4-freetype.patch     |  5 +--
 app-text/ttf2pt1/ttf2pt1-3.4.4-r1.ebuild           | 45 ++++++++++++++--------
 5 files changed, 39 insertions(+), 33 deletions(-)

diff --git a/app-text/ttf2pt1/files/ttf2pt1-3.4.0-man-pages.diff 
b/app-text/ttf2pt1/files/ttf2pt1-3.4.0-man-pages.diff
index 2d301244272..cd8fc2c69b3 100644
--- a/app-text/ttf2pt1/files/ttf2pt1-3.4.0-man-pages.diff
+++ b/app-text/ttf2pt1/files/ttf2pt1-3.4.0-man-pages.diff
@@ -1,6 +1,5 @@
-diff -ur ttf2pt1-3.4.0.orig/ttf2pt1.1 ttf2pt1-3.4.0/ttf2pt1.1
---- ttf2pt1-3.4.0.orig/ttf2pt1.1       2001-11-25 00:58:11.000000000 +0000
-+++ ttf2pt1-3.4.0/ttf2pt1.1    2006-08-15 19:15:37.129672839 +0000
+--- a/ttf2pt1.1
++++ b/ttf2pt1.1
 @@ -109,7 +109,8 @@
  ..
  .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
@@ -11,9 +10,8 @@ diff -ur ttf2pt1-3.4.0.orig/ttf2pt1.1 ttf2pt1-3.4.0/ttf2pt1.1
  .     \" fudge factors for nroff and troff
  .if n \{\
  .     ds #H 0
-diff -ur ttf2pt1-3.4.0.orig/ttf2pt1_convert.1 ttf2pt1-3.4.0/ttf2pt1_convert.1
---- ttf2pt1-3.4.0.orig/ttf2pt1_convert.1       2001-11-25 00:58:13.000000000 
+0000
-+++ ttf2pt1-3.4.0/ttf2pt1_convert.1    2006-08-15 19:16:14.369517359 +0000
+--- a/ttf2pt1_convert.1
++++ b/ttf2pt1_convert.1
 @@ -109,7 +109,8 @@
  ..
  .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
@@ -24,9 +22,8 @@ diff -ur ttf2pt1-3.4.0.orig/ttf2pt1_convert.1 
ttf2pt1-3.4.0/ttf2pt1_convert.1
  .     \" fudge factors for nroff and troff
  .if n \{\
  .     ds #H 0
-diff -ur ttf2pt1-3.4.0.orig/ttf2pt1_x2gs.1 ttf2pt1-3.4.0/ttf2pt1_x2gs.1
---- ttf2pt1-3.4.0.orig/ttf2pt1_x2gs.1  2001-11-25 00:58:13.000000000 +0000
-+++ ttf2pt1-3.4.0/ttf2pt1_x2gs.1       2006-08-15 19:16:30.770568473 +0000
+--- a/ttf2pt1_x2gs.1
++++ b/ttf2pt1_x2gs.1
 @@ -109,7 +109,8 @@
  ..
  .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2

diff --git a/app-text/ttf2pt1/files/ttf2pt1-3.4.4-LDFLAGS.patch 
b/app-text/ttf2pt1/files/ttf2pt1-3.4.4-LDFLAGS.patch
index 3d03e03e14c..0bb7b570595 100644
--- a/app-text/ttf2pt1/files/ttf2pt1-3.4.4-LDFLAGS.patch
+++ b/app-text/ttf2pt1/files/ttf2pt1-3.4.4-LDFLAGS.patch
@@ -1,5 +1,3 @@
-diff --git a/Makefile b/Makefile
-index 2616d46..cf72cba 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -179,7 +179,7 @@ app/RPM/ttf2pt1.spec: app/RPM/ttf2pt1.spec.src version.h

diff --git a/app-text/ttf2pt1/files/ttf2pt1-3.4.4-Makefile.patch 
b/app-text/ttf2pt1/files/ttf2pt1-3.4.4-Makefile.patch
index 6c760f43dd2..8224c168c1a 100644
--- a/app-text/ttf2pt1/files/ttf2pt1-3.4.4-Makefile.patch
+++ b/app-text/ttf2pt1/files/ttf2pt1-3.4.4-Makefile.patch
@@ -1,6 +1,5 @@
-diff -Naur ttf2pt1-3.4.4-orig/Makefile ttf2pt1-3.4.4/Makefile
---- ttf2pt1-3.4.4-orig/Makefile        2007-07-15 20:06:50.000000000 -0600
-+++ ttf2pt1-3.4.4/Makefile     2007-07-15 20:12:40.000000000 -0600
+--- a/Makefile
++++ b/Makefile
 @@ -9,7 +9,7 @@
  #
  # Use GNU C even if it's not the default compiler

diff --git a/app-text/ttf2pt1/files/ttf2pt1-3.4.4-freetype.patch 
b/app-text/ttf2pt1/files/ttf2pt1-3.4.4-freetype.patch
index 8257742ebe5..a4c4e7b9871 100644
--- a/app-text/ttf2pt1/files/ttf2pt1-3.4.4-freetype.patch
+++ b/app-text/ttf2pt1/files/ttf2pt1-3.4.4-freetype.patch
@@ -1,6 +1,5 @@
-diff -Naur ttf2pt1-3.4.4-orig/ft.c ttf2pt1-3.4.4/ft.c
---- ttf2pt1-3.4.4-orig/ft.c    2007-07-15 20:23:43.000000000 -0600
-+++ ttf2pt1-3.4.4/ft.c 2007-07-15 20:24:02.000000000 -0600
+--- a/ft.c
++++ b/ft.c
 @@ -12,6 +12,7 @@
  #include <stdlib.h>
  #include <ctype.h>

diff --git a/app-text/ttf2pt1/ttf2pt1-3.4.4-r1.ebuild 
b/app-text/ttf2pt1/ttf2pt1-3.4.4-r1.ebuild
index 82a9d444d4c..fcc8361c32a 100644
--- a/app-text/ttf2pt1/ttf2pt1-3.4.4-r1.ebuild
+++ b/app-text/ttf2pt1/ttf2pt1-3.4.4-r1.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit epatch multilib toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="True Type Font to Postscript Type 1 Converter"
 HOMEPAGE="http://ttf2pt1.sourceforge.net/";
@@ -15,24 +15,37 @@ KEYWORDS="amd64 ppc sparc x86"
 
 DEPEND=">=media-libs/freetype-2.5.1:2"
 RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-Makefile.patch
+       "${FILESDIR}"/${P}-LDFLAGS.patch
+       "${FILESDIR}"/${PN}-3.4.0-man-pages.diff
+       "${FILESDIR}"/${P}-freetype.patch
+)
 
 src_prepare() {
-       epatch "${FILESDIR}"/${P}-Makefile.patch
-       epatch "${FILESDIR}"/${P}-LDFLAGS.patch
-       epatch "${FILESDIR}"/${PN}-3.4.0-man-pages.diff
-       epatch "${FILESDIR}"/${P}-freetype.patch
-
-       sed -i -e "/^CC=/ { s:gcc:$(tc-getCC): }" Makefile
-       sed -i -e "/^CFLAGS_SYS=/ { s:-O.*$:${CFLAGS}: }" Makefile
-       sed -i -e "/^LIBS_FT=/ { s:-L/usr/lib:-L/usr/$(get_libdir): }" Makefile
-       sed -i -e "/^LIBXDIR =/ { s:libexec:$(get_libdir): }" Makefile
+       default
+
+       sed -i \
+               -e "/^CC=/ { s:gcc:$(tc-getCC): }" \
+               -e "/^CFLAGS_SYS=/ { s:-O.*$:${CFLAGS}: }" \
+               -e "/^LIBS_FT=/ { s:-L/usr/lib:-L${ESYSROOT}/usr/$(get_libdir): 
}" \
+               -e "s:-I/usr/include/freetype2 
-I/usr/include:$($(tc-getPKG_CONFIG) --cflags freetype2):" \
+               -e "s:-L/usr/lib -lfreetype:$($(tc-getPKG_CONFIG) --libs 
freetype2):" \
+               -e "/^LIBXDIR =/ { s:libexec:$(get_libdir): }" \
+               -e "/chown/d" \
+               -e "/chgrp/d" \
+               -e "/chmod/d" \
+               Makefile || die
 }
 
 src_install() {
-       emake INSTDIR="${D}"/usr install
+       emake INSTDIR="${ED}"/usr install
        dodir /usr/share/doc/${PF}
-       pushd "${D}"/usr/share/ttf2pt1 > /dev/null
-       rm -r app other
-       mv [A-Z]* ../doc/${PF}
-       popd > /dev/null
+
+       pushd "${ED}"/usr/share/ttf2pt1 > /dev/null || die
+       rm -r app other || die
+       mv [A-Z]* ../doc/${PF} || die
+       popd > /dev/null || die
 }

Reply via email to