summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas PARLANT <nicolas.parlant@parhuet.fr>2025-11-20 12:08:23 +0100
committerSam James <sam@gentoo.org>2025-11-22 11:37:53 +0000
commitd1e0499718d19e9e67a0cb63cadc5dc181ba2d0f (patch)
treed3ecfd1f19f3273b4e56f9e9d7efc4026e53e985
parent9ced2febad0369005f29d3e19e0c631d938bf28d (diff)
downloadgentoo-d1e0499718d19e9e67a0cb63cadc5dc181ba2d0f.tar.gz
gentoo-d1e0499718d19e9e67a0cb63cadc5dc181ba2d0f.tar.bz2
gentoo-d1e0499718d19e9e67a0cb63cadc5dc181ba2d0f.zip
media-libs/libdca: update EAPI 7 -> 8, fix musl
use getopt from glibc/musl instead of outdated bundled lib Closes: https://bugs.gentoo.org/945000 Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr> Part-of: https://github.com/gentoo/gentoo/pull/44685 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--media-libs/libdca/files/libdca-0.0.7-rm_getopt.patch16
-rw-r--r--media-libs/libdca/libdca-0.0.7-r1.ebuild60
2 files changed, 76 insertions, 0 deletions
diff --git a/media-libs/libdca/files/libdca-0.0.7-rm_getopt.patch b/media-libs/libdca/files/libdca-0.0.7-rm_getopt.patch
new file mode 100644
index 000000000000..3fd88fe8ffae
--- /dev/null
+++ b/media-libs/libdca/files/libdca-0.0.7-rm_getopt.patch
@@ -0,0 +1,16 @@
+see https://bugs.gentoo.org/945000
+use getopt from glibc/musl instead, getopt.h must be removed too
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -2,9 +2,9 @@ AM_CFLAGS = $(DCADEC_CFLAGS)
+ AM_CPPFLAGS = -I$(top_srcdir)/include
+
+ bin_PROGRAMS = dcadec extract_dca
+-dcadec_SOURCES = dcadec.c getopt.h getopt.c gettimeofday.h gettimeofday.c
++dcadec_SOURCES = dcadec.c gettimeofday.h gettimeofday.c
+ dcadec_LDADD = ../libdca/libdca.la ../libao/libao.la
+-extract_dca_SOURCES = extract_dca.c getopt.c
++extract_dca_SOURCES = extract_dca.c
+
+ man1_MANS = dcadec.1 extract_dca.1
+ EXTRA_DIST = $(man1_MANS)
diff --git a/media-libs/libdca/libdca-0.0.7-r1.ebuild b/media-libs/libdca/libdca-0.0.7-r1.ebuild
new file mode 100644
index 000000000000..9f2bb1988a57
--- /dev/null
+++ b/media-libs/libdca/libdca-0.0.7-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic multilib-minimal
+
+DESCRIPTION="Library for decoding DTS Coherent Acoustics streams used in DVD"
+HOMEPAGE="https://www.videolan.org/developers/libdca.html"
+SRC_URI="https://www.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="debug oss"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO doc/${PN}.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.0.5-cflags.patch
+ "${FILESDIR}"/${PN}-0.0.5-tests-optional.patch
+ "${FILESDIR}"/${PN}-0.0.7-slibtool.patch
+ "${FILESDIR}"/${PN}-0.0.7-rm_getopt.patch
+)
+
+src_prepare() {
+ default
+
+ # use getopt.h from glibc/musl, bug 945000
+ rm src/getopt.h || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ append-lfs-flags #328875
+
+ local myeconfargs=(
+ --disable-static
+ $(use_enable debug)
+ $(use_enable oss)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+
+ # Those are thrown away afterwards, don't build them in the first place
+ if [[ "${ABI}" != "${DEFAULT_ABI}" ]] ; then
+ sed -e 's/ libao src//' -i Makefile || die
+ fi
+}
+
+multilib_src_compile() {
+ emake OPT_CFLAGS=""
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ find "${D}" -name '*.la' -type f -delete || die
+ rm "${D}"/usr/$(get_libdir)/libdts.a || die
+}