media-sound/vlevel: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Thu, 12 Dec 2019 16:02:47 +0000 (17:02 +0100)
committerDavid Seifert <soap@gentoo.org>
Thu, 12 Dec 2019 16:02:47 +0000 (17:02 +0100)
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
media-sound/vlevel/files/vlevel-0.5-makefile.patch
media-sound/vlevel/vlevel-0.5-r1.ebuild

index af50f1e3c08cbe09452a1f9d1eff090110838502..d7f5d80ebb460dc39643774aaa36af03c28d3a9b 100644 (file)
@@ -1,6 +1,16 @@
---- vlevel-0.5/Makefile.orig
-+++ vlevel-0.5/Makefile
-@@ -30,6 +30,7 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,8 @@
+ # User-editable options:
+ # Change this to suit your preferences (maybe add -march=cputype)     
+-CXXFLAGS=-Wall -O3 -fPIC -DPIC -g
++CXXFLAGS+=-Wall -fPIC
++CPPFLAGS+=-DPIC
+ # This is where it will be installed
+ PREFIX=/usr/local/bin/
+@@ -30,6 +31,7 @@
  all: vlevel-bin vlevel-ladspa.so
  
  install: all
        cp -f vlevel-bin $(PREFIX)
        mkdir -p $(LADSPA_PREFIX)
        cp -f vlevel-ladspa.so $(LADSPA_PREFIX)
-@@ -38,13 +39,13 @@
+@@ -38,20 +40,7 @@
        rm -f *.o vlevel-bin vlevel-ladspa.so
  
  vlevel-ladspa.so: vlevel-ladspa.o volumeleveler.o
 -      $(CXX) $(CXXFLAGS) -shared -o vlevel-ladspa.so vlevel-ladspa.o volumeleveler.o
+-
+-vlevel-ladspa.o: vlevel-ladspa.cpp volumeleveler.h vlevel-ladspa.h vlevel.h ladspa.h
+-      $(CXX) $(CXXFLAGS) -c vlevel-ladspa.cpp
 +      $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o vlevel-ladspa.so vlevel-ladspa.o volumeleveler.o
  
- vlevel-ladspa.o: vlevel-ladspa.cpp volumeleveler.h vlevel-ladspa.h vlevel.h ladspa.h
-       $(CXX) $(CXXFLAGS) -c vlevel-ladspa.cpp
  vlevel-bin: volumeleveler.o commandline.o vlevel-bin.o vlevel.h
 -      $(CXX) $(CXXFLAGS) -o vlevel-bin vlevel-bin.o volumeleveler.o commandline.o
+-
+-volumeleveler.o: volumeleveler.cpp volumeleveler.h vlevel.h
+-      $(CXX) $(CXXFLAGS) -c volumeleveler.cpp
+-
+-vlevel-bin.o: vlevel-bin.cpp volumeleveler.h commandline.h vlevel.h
+-      $(CXX) $(CXXFLAGS) -c vlevel-bin.cpp
+-
+-commandline.o: commandline.cpp commandline.h
+-      $(CXX) $(CXXFLAGS) -c commandline.cpp
+-
 +      $(CXX) $(CXXFLAGS) $(LDFLAGS) -o vlevel-bin vlevel-bin.o volumeleveler.o commandline.o
- volumeleveler.o: volumeleveler.cpp volumeleveler.h vlevel.h
-       $(CXX) $(CXXFLAGS) -c volumeleveler.cpp
index d25eb4ec8439c628d9f429fc0058e13c75078e9e..3878e4aedc2c34e2f9486ca9c4871db676a522aa 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
-inherit eutils multilib toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="Dynamic compressor to amplify quiet parts of music"
 HOMEPAGE="http://vlevel.sourceforge.net/"
@@ -12,27 +12,22 @@ SRC_URI="mirror://sourceforge/vlevel/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~ppc ~sparc x86"
-IUSE=""
 
 RDEPEND="media-libs/ladspa-sdk"
 DEPEND="${RDEPEND}"
 
-src_prepare() {
-       epatch "${FILESDIR}"/${P}-makefile.patch
-}
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
 
-src_compile() {
-       emake CXX=$(tc-getCXX) CXXFLAGS="$CXXFLAGS -fPIC -DPIC"
+src_configure() {
+       tc-export CXX
 }
 
 src_install() {
-       emake PREFIX="${D}/usr/bin/" LADSPA_PREFIX="${D}/usr/$(get_libdir)/ladspa/" install
+       emake PREFIX="${ED}"/usr/bin/ LADSPA_PREFIX="${ED}"/usr/$(get_libdir)/ladspa/ install
 
-       dodoc README TODO docs/*
+       dodoc -r README TODO docs/.
 
-       exeinto /usr/share/doc/${PF}/examples
-       doexe utils/{levelplay,raw2wav,vlevel-dir}
        docinto examples
-       dodoc utils/README
-       docompress -x /usr/share/doc/${PF}/examples/{levelplay,raw2wav,vlevel-dir}
+       dodoc utils/{levelplay,raw2wav,vlevel-dir,README}
+       docompress -x /usr/share/doc/${PF}/examples
 }