media-sound/ttaenc: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Tue, 10 Dec 2019 23:48:58 +0000 (00:48 +0100)
committerDavid Seifert <soap@gentoo.org>
Tue, 10 Dec 2019 23:48:58 +0000 (00:48 +0100)
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
media-sound/ttaenc/files/ttaenc-3.4.1-fix-build-system.patch [new file with mode: 0644]
media-sound/ttaenc/ttaenc-3.4.1-r1.ebuild

diff --git a/media-sound/ttaenc/files/ttaenc-3.4.1-fix-build-system.patch b/media-sound/ttaenc/files/ttaenc-3.4.1-fix-build-system.patch
new file mode 100644 (file)
index 0000000..794316d
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,16 +2,12 @@
+ # $Id: Makefile,v 1.4 2007/04/04 00:00:00 root Exp $
+ #
+-CFLAGS        = -Wall -O3 -fomit-frame-pointer -funroll-loops \
+-                -fforce-addr -falign-functions=4 -msse
++CFLAGS        += -Wall
+ TTAENC        = ttaenc
+ INSDIR        = /usr/bin
+ ttaenc: $(patsubst %.c, %.o, $(wildcard *.c))
+-      gcc $^ -o $@ $(CFLAGS)
+-
+-%.o:  %.c
+-      gcc -c $(CFLAGS) $<
++      $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
+ install:
+       [ -d "$(INSDIR)" ] || mkdir $(INSDIR)
index d7697469bc3e0a75533548933baa765dad7a2692..34f01191dd63f0603dd9d2cfac51fb3f795559b7 100644 (file)
@@ -1,7 +1,7 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
 inherit toolchain-funcs
 
@@ -12,23 +12,15 @@ SRC_URI="mirror://sourceforge/tta/${P}-src.tgz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 x86"
-IUSE=""
 
-DEPEND="sys-apps/sed"
+S="${WORKDIR}/${P}-src"
+PATCHES=( "${FILESDIR}"/${P}-fix-build-system.patch )
 
-S=${WORKDIR}/${P}-src
-
-src_prepare() {
-       sed -i -e "s:gcc:$(tc-getCC):g" \
-               -e "s:-o:${LDFLAGS} -o:g" \
-               Makefile || die
-}
-
-src_compile () {
-       emake CFLAGS="${CFLAGS}"
+src_configure() {
+       tc-export CC
 }
 
-src_install () {
+src_install() {
        dobin ttaenc
        dodoc ChangeLog-${PV} README
 }