diff --git a/media-libs/a52dec/a52dec-0.7.4-r9.ebuild b/media-libs/a52dec/a52dec-0.7.4-r9.ebuild index 952daa0a630c5..5811ae7d4af99 100644 --- a/media-libs/a52dec/a52dec-0.7.4-r9.ebuild +++ b/media-libs/a52dec/a52dec-0.7.4-r9.ebuild @@ -23,6 +23,7 @@ PATCHES=( "${FILESDIR}"/${P}-tests-optional.patch "${FILESDIR}"/${P}-test-hidden-symbols.patch "${FILESDIR}"/${P}-dont-mangle-cflags.patch + "${FILESDIR}"/${P}-rm_getopt.patch ) src_prepare() { @@ -31,6 +32,9 @@ src_prepare() { sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die # bug #466978 mv configure.{in,ac} || die + # use getopt.h from glibc/musl, bug 944997 + rm src/getopt.h || die + eautoreconf filter-flags -fprefetch-loop-arrays diff --git a/media-libs/a52dec/files/a52dec-0.7.4-rm_getopt.patch b/media-libs/a52dec/files/a52dec-0.7.4-rm_getopt.patch new file mode 100644 index 0000000000000..f0823d6ba41a9 --- /dev/null +++ b/media-libs/a52dec/files/a52dec-0.7.4-rm_getopt.patch @@ -0,0 +1,18 @@ +see https://bugs.gentoo.org/944997 +use getopt from glibc/musl instead, getopt.h must be removed too +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,10 +1,10 @@ + + bin_PROGRAMS = a52dec extract_a52 +-a52dec_SOURCES = a52dec.c getopt.c gettimeofday.c ++a52dec_SOURCES = a52dec.c gettimeofday.c + a52dec_LDADD = $(top_builddir)/liba52/liba52.la \ + $(top_builddir)/libao/libao.a @LIBAO_LIBS@ +-extract_a52_SOURCES = extract_a52.c getopt.c ++extract_a52_SOURCES = extract_a52.c + + man_MANS = a52dec.1 extract_a52.1 + +-EXTRA_DIST = configure.incl getopt.h gettimeofday.h $(man_MANS) ++EXTRA_DIST = configure.incl gettimeofday.h $(man_MANS)