public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-sound/dcadec/files/, media-sound/dcadec/
@ 2020-11-14 15:06 David Seifert
  0 siblings, 0 replies; only message in thread
From: David Seifert @ 2020-11-14 15:06 UTC (permalink / raw
  To: gentoo-commits

commit:     df447344c25f1d74daea9664372a07bf6bbfb060
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 14 15:04:26 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Nov 14 15:04:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df447344

media-sound/dcadec: Port to EAPI 7

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

 media-sound/dcadec/dcadec-0.2.0.ebuild             | 44 +++++++++-------------
 .../dcadec/files/dcadec-0.2.0-respect-CFLAGS.patch | 11 ++++++
 2 files changed, 29 insertions(+), 26 deletions(-)

diff --git a/media-sound/dcadec/dcadec-0.2.0.ebuild b/media-sound/dcadec/dcadec-0.2.0.ebuild
index d49effdb57c..68303aac607 100644
--- a/media-sound/dcadec/dcadec-0.2.0.ebuild
+++ b/media-sound/dcadec/dcadec-0.2.0.ebuild
@@ -1,54 +1,46 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI=7
 
-inherit eutils toolchain-funcs multilib multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://github.com/foo86/${PN}.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/foo86/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
-fi
+inherit toolchain-funcs multilib-minimal
 
 DESCRIPTION="DTS Coherent Acoustics decoder with support for HD extensions"
 HOMEPAGE="https://github.com/foo86/dcadec"
+SRC_URI="https://github.com/foo86/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="LGPL-2.1"
 SLOT="0"
-IUSE=""
-DOCS=( CHANGELOG.md README.md )
+KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
 
-src_prepare() {
-	sed -i \
-		-e '/^CFLAGS/s:-O3::' \
-		Makefile || die
-}
+PATCHES=( "${FILESDIR}"/${P}-respect-CFLAGS.patch )
+
+multilib_src_configure() {
+	tc-export AR CC
 
-multilib_src_compile() {
 	# Build shared libs
-	echo 'CONFIG_SHARED=1' >> .config
+	echo 'CONFIG_SHARED=1' >> .config || die
+}
 
+multilib_src_compile() {
 	local target=all
 	multilib_is_native_abi || target=lib
-	tc-export AR CC
-	PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-		emake -f "${S}/Makefile" ${target}
+
+	PREFIX="${EPREFIX}"/usr LIBDIR="${EPREFIX}"/usr/$(get_libdir) \
+		emake -f "${S}"/Makefile ${target}
 }
 
 multilib_src_install() {
 	local target=install
 	multilib_is_native_abi || target=install-lib
-	PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-		emake -f "${S}/Makefile" DESTDIR="${D}" ${target}
+
+	PREFIX="${EPREFIX}"/usr LIBDIR="${EPREFIX}"/usr/$(get_libdir) \
+		emake -f "${S}"/Makefile DESTDIR="${D}" ${target}
 }
 
 multilib_src_install_all() {
 	# Rename the executable since it conflicts with libdca.
 	mv "${ED}"/usr/bin/dcadec{,-new} || die
 
-	einstalldocs
+	dodoc CHANGELOG.md README.md
 }

diff --git a/media-sound/dcadec/files/dcadec-0.2.0-respect-CFLAGS.patch b/media-sound/dcadec/files/dcadec-0.2.0-respect-CFLAGS.patch
new file mode 100644
index 00000000000..d232cd2ce78
--- /dev/null
+++ b/media-sound/dcadec/files/dcadec-0.2.0-respect-CFLAGS.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,7 @@
+ API_MINOR = 1
+ API_PATCH = 0
+ 
+-CFLAGS := -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wall -Wextra -O3 -ffast-math -g -MMD $(CFLAGS)
++CFLAGS := -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wall -Wextra -ffast-math -MMD $(CFLAGS) $(CPPFLAGS)
+ 
+ PREFIX ?= /usr/local
+ BINDIR ?= $(PREFIX)/bin


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-14 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-14 15:06 [gentoo-commits] repo/gentoo:master commit in: media-sound/dcadec/files/, media-sound/dcadec/ David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox