public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/dcadec/files/, media-sound/dcadec/
Date: Sat, 14 Nov 2020 15:06:15 +0000 (UTC)	[thread overview]
Message-ID: <1605366266.df447344c25f1d74daea9664372a07bf6bbfb060.soap@gentoo> (raw)

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


                 reply	other threads:[~2020-11-14 15:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1605366266.df447344c25f1d74daea9664372a07bf6bbfb060.soap@gentoo \
    --to=soap@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox