media-video/subtitleripper: Bump to EAPI 7
authorMichał Górny <mgorny@gentoo.org>
Sat, 9 Nov 2019 19:27:07 +0000 (20:27 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sat, 9 Nov 2019 19:33:51 +0000 (20:33 +0100)
Bug: https://bugs.gentoo.org/697264
Signed-off-by: Michał Górny <mgorny@gentoo.org>
media-video/subtitleripper/subtitleripper-0.3.4-r4.ebuild

index 226c2b9531a784eac3883b48c4432a99ef1bbc31..e547faecaf76574fcb49dbdf635d971fed9c4b90 100644 (file)
@@ -1,19 +1,21 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=0
+EAPI=7
 
-inherit versionator eutils toolchain-funcs
+inherit toolchain-funcs
 
-MY_PV="$(replace_version_separator 2 "-")"
+MY_PV="$(ver_rs 2 "-")"
 
 DESCRIPTION="DVD Subtitle Ripper for Linux"
 HOMEPAGE="http://subtitleripper.sourceforge.net/"
-LICENSE="GPL-2"
-KEYWORDS="amd64 ppc ppc64 x86"
 SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tgz"
+
+LICENSE="GPL-2"
 SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
 IUSE=""
+
 RDEPEND=">=media-libs/netpbm-10.41.0
        media-libs/libpng
        sys-libs/zlib
@@ -22,23 +24,28 @@ DEPEND="${RDEPEND}"
 
 S="${WORKDIR}/${PN}"
 
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
+PATCHES=(
+       "${FILESDIR}"/${P}-linkingorder.patch
+       "${FILESDIR}"/${P}-libpng.patch
+       "${FILESDIR}"/${P}-glibc210.patch
+       "${FILESDIR}"/${P}-respect-ldflags.patch
+)
+
+src_prepare() {
        # PPM library is libnetppm
-       sed -i -e "s:ppm:netpbm:g" Makefile
+       sed -i -e "s:ppm:netpbm:g" Makefile || die
        # fix for bug 210435
-       sed -i -e "s:#include <ppm.h>:#include <netpbm/ppm.h>:g" spudec.c subtitle2pgm.c
+       sed -i -e "s:#include <ppm.h>:#include <netpbm/ppm.h>:g" \
+               spudec.c subtitle2pgm.c || die
        # we will install the gocrfilters into /usr/share/subtitleripper
-       sed -i -e 's:~/sourceforge/subtitleripper/src/:/usr/share/subtitleripper:' pgm2txt
+       sed -i -e 's:~/sourceforge/subtitleripper/src/:/usr/share/subtitleripper:' \
+               pgm2txt || die
+
+       default
 
-       epatch "${FILESDIR}/${P}-linkingorder.patch"
-       epatch "${FILESDIR}"/${P}-libpng.patch
-       epatch "${FILESDIR}"/${P}-glibc210.patch
-       # respect CC and LDFLAGS
+       # respect CC
        sed -i -e "s:CC =.*:CC = $(tc-getCC):" \
                -e "/^CFLAGS/s: = :& ${CFLAGS} :" "${S}"/Makefile
-       epatch "${FILESDIR}"/${P}-respect-ldflags.patch
 }
 
 src_install () {