summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-11-14 16:04:26 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-14 16:04:26 +0100
commitdf447344c25f1d74daea9664372a07bf6bbfb060 (patch)
treeb1881fd87c908ab242e296da4562ed66e086998b /media-sound/dcadec
parentmedia-sound/cmusfm: Remove old 0.2.5, 0.3.1 (diff)
downloadgentoo-df447344c25f1d74daea9664372a07bf6bbfb060.tar.gz
gentoo-df447344c25f1d74daea9664372a07bf6bbfb060.tar.bz2
gentoo-df447344c25f1d74daea9664372a07bf6bbfb060.zip
media-sound/dcadec: Port to EAPI 7
Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'media-sound/dcadec')
-rw-r--r--media-sound/dcadec/dcadec-0.2.0.ebuild44
-rw-r--r--media-sound/dcadec/files/dcadec-0.2.0-respect-CFLAGS.patch11
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