diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-11-20 17:13:51 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-11-20 17:13:51 +0000 |
commit | be675f929577458bd306c90ed78b62054197c0b1 (patch) | |
tree | 5eabf108becbac5f9628fb677b1a0eb93fab07a3 /media-libs/libmpg123 | |
parent | c72af498eade96364bed882cf8ab30fc3da7d772 (diff) |
gentoo auto-resync : 20:11:2023 - 17:13:50
Diffstat (limited to 'media-libs/libmpg123')
-rw-r--r-- | media-libs/libmpg123/Manifest | 5 | ||||
-rw-r--r-- | media-libs/libmpg123/files/mpg123-1.32.3-build-programs-component.patch | 55 | ||||
-rw-r--r-- | media-libs/libmpg123/files/mpg123-1.32.3-build-with-installed-libs.patch | 252 | ||||
-rw-r--r-- | media-libs/libmpg123/libmpg123-1.32.3.ebuild | 104 | ||||
-rw-r--r-- | media-libs/libmpg123/metadata.xml | 17 |
5 files changed, 433 insertions, 0 deletions
diff --git a/media-libs/libmpg123/Manifest b/media-libs/libmpg123/Manifest new file mode 100644 index 000000000000..02e234a51ba1 --- /dev/null +++ b/media-libs/libmpg123/Manifest @@ -0,0 +1,5 @@ +AUX mpg123-1.32.3-build-programs-component.patch 1304 BLAKE2B f0e4694bba608c20ed0cb1db0cf5f1c90ec522fc2eee6c01e8440fd39351e7d6a3e4165bac3a0ea3c1355bd7351dd6fefec9a02f8925226064ff741f01e3033a SHA512 b049a1da5b0185637f07445bcb5a00d37ba8c51456f10ee555e73fcacde2a3227ec900eaa334f84605a6956610831df5fceedef6c078375a82a0808c492b46a6 +AUX mpg123-1.32.3-build-with-installed-libs.patch 7957 BLAKE2B 668aecace3cde2acb25474ea235b20b7c81398c1e4c91216dc95acaa3961683e6f87c0e1b5b3ffec0486484de7c2cf9fb85a41549013698ce3734ac41dba952e SHA512 6e59255199c19b5f3ca4cc9c3175b0f3e01440d44820806c3b3ad37291afa771809c556ce5369b9df45d98c6e300576b55ef1c61668fd0286372cb0afcf550a4 +DIST mpg123-1.32.3.tar.bz2 1111054 BLAKE2B 67f889403c2bb639d675ec5ebea5a19c4b7174971d62bdd8d940ad659e6b0c06dada38422fc9d71b878917aa89e305ec48c8faa78d65d507cd6a0c9a79951359 SHA512 946c1073b6eebfd65333ec543df1caeea25864479e9c8e153fb53d8b636cc756d8d81947f7b5cbedbbfb1ea664d3fb27562ed36e7726d95e80591bd2ad622afc +EBUILD libmpg123-1.32.3.ebuild 2766 BLAKE2B de730a7d5dcbc365973090978d1cf3dd4107e448a42ef98c3ebada11051f2dbdf2adb31516a091b5aed90e4e75c56dfdfea617fd4761881426cdff6d2395fe7a SHA512 26043fbc612ab141ee704240eaa138260b4d349651a62e5511d577f812dbee65bc82671740d4f7ab3e423be6660957c891b8c50052b992deed2a9640eae5a14e +MISC metadata.xml 526 BLAKE2B 42eed8f068420cefea4cf3e75a880889be7abe182feec2aa95e0e7f550cf68eb2582460e43500d24b7ad189adb3e0e135da1079efb405957fe3dfc6b93a91ece SHA512 11e572b6ec77d6c971766e666db84ee4b605479c3f89ba639177de7fb109a8d9e38d1f5034a52554736e6bd0915aae84830169ba3580f6d64794adc4c8cb9d0e diff --git a/media-libs/libmpg123/files/mpg123-1.32.3-build-programs-component.patch b/media-libs/libmpg123/files/mpg123-1.32.3-build-programs-component.patch new file mode 100644 index 000000000000..ea20c8a445f6 --- /dev/null +++ b/media-libs/libmpg123/files/mpg123-1.32.3-build-programs-component.patch @@ -0,0 +1,55 @@ +build: add programs component + +From: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> + +Upstream PR: https://github.com/madebr/mpg123/pull/11 +Bug: https://bugs.gentoo.org/915858 +--- + configure.ac | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e47c7d5b..db37ff9b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -440,6 +440,21 @@ AC_ARG_ENABLE(libsyn123, + ] + ) + ++AC_ARG_ENABLE(programs, ++ [AS_HELP_STRING([--enable-programs], [build (only) programs (with --disable-components)])], ++ [ ++ if test "x$enableval" = xyes ++ then ++ build_programs=yes ++ else ++ build_programs=no ++ fi ++ ], ++ [ ++ build_programs=no ++ ] ++) ++ + if test "x$build_all" = xyes; then + build_programs=yes + build_libmpg123=yes +@@ -447,8 +462,6 @@ if test "x$build_all" = xyes; then + build_libout123_modules=yes + build_libsyn123=yes + components="programs" +-else +- build_programs=no + fi + + AM_CONDITIONAL([BUILD_PROGRAMS], [ test "x$build_programs" = xyes ]) +@@ -474,6 +487,9 @@ fi + if test "x$build_libsyn123" = xyes; then + components="$components libsyn123" + fi ++if test "x$build_programs" = xyes; then ++ components="$components programs" ++fi + components=$(echo $components) + + dnl ############## Configurable Options diff --git a/media-libs/libmpg123/files/mpg123-1.32.3-build-with-installed-libs.patch b/media-libs/libmpg123/files/mpg123-1.32.3-build-with-installed-libs.patch new file mode 100644 index 000000000000..aec0ef87ebbf --- /dev/null +++ b/media-libs/libmpg123/files/mpg123-1.32.3-build-with-installed-libs.patch @@ -0,0 +1,252 @@ +build: allow building with installed libmpg123 libsyn123 libout123 + +From: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> + +Upstream PR: https://github.com/madebr/mpg123/pull/11 +Bug: https://bugs.gentoo.org/915858 +--- + Makefile.am | 18 +++++++++++++++--- + configure.ac | 33 +++++++++++++++++++++++---------- + libmpg123.pc.in | 2 +- + libout123.pc.in | 2 +- + libsyn123.pc.in | 2 +- + src/Makemodule.am | 30 +++++++++++++++++++++++------- + src/libmpg123/Makemodule.am | 2 +- + src/libout123/Makemodule.am | 2 +- + src/libsyn123/Makemodule.am | 2 +- + 9 files changed, 67 insertions(+), 26 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 5b58dc4d..be3bfed0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -37,13 +37,25 @@ AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\"" + AM_CPPFLAGS += \ + $(LTDLINCL) \ + -I$(top_srcdir)/src \ +- -I$(top_srcdir)/src/compat \ ++ -I$(top_srcdir)/src/compat ++ ++if BUILD_LIBMPG123 ++AM_CPPFLAGS += \ + -I$(top_srcdir)/src/libmpg123 \ ++ -I$(top_builddir)/src/libmpg123 ++endif ++ ++if BUILD_LIBSYN123 ++AM_CPPFLAGS += \ + -I$(top_srcdir)/src/libsyn123 \ ++ -I$(top_builddir)/src/libsyn123 ++endif ++ ++if BUILD_LIBOUT123 ++AM_CPPFLAGS += \ + -I$(top_srcdir)/src/libout123 \ +- -I$(top_builddir)/src/libmpg123 \ +- -I$(top_builddir)/src/libsyn123 \ + -I$(top_builddir)/src/libout123 ++endif + + # Include Make modules from subdirectories. + include src/Makemodule.am +diff --git a/configure.ac b/configure.ac +index db37ff9b..d782dbe5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -472,7 +472,7 @@ AM_CONDITIONAL([BUILD_LIBSYN123], [ test "x$build_libsyn123" = xyes ]) + AM_CONDITIONAL([NEED_FMT123], [ test "x$build_libmpg123" = xyes || test "x$build_libout123" = xyes || test "x$build_libsyn123" = xyes ]) + # If we install libraries, prompting pkgconfig and include directories. + AM_CONDITIONAL([NEED_LIB], [ test "x$build_libmpg123" = xyes || test "x$build_libout123" = xyes || test "x$build_libout123_modules" = xyes || test "x$build_libsyn123" = xyes ]) +-AM_CONDITIONAL([NEED_MAINLIB], [ test "x$build_libmpg123" = xyes || test "x$build_libout123" = xyes || test "x$build_libsyn123" = xyes ]) ++AM_CONDITIONAL([NEED_MAINLIB], [ test "x$build_libmpg123" = xyes || test "x$build_libout123" = xyes || test "x$build_libsyn123" = xyes || test "x$build_programs" = xyes ]) + + + if test "x$build_libmpg123" = xyes; then +@@ -2911,15 +2911,28 @@ dnl ############## Library cleanup + + PROG_LIBS=$LIBS + LIBS= +-LIBMPG123_LIBS="$LIBM $COMPAT_LIBS" +-LIBSYN123_LIBS=$LIBM +-LIBOUT123_LIBS="$LIBRT $LIBM $COMPAT_LIBS" ++ ++if test "x$build_libmpg123" = xyes; then ++ LIBMPG123_DEP_LIBS="$LIBM $COMPAT_LIBS" ++else ++ PKG_CHECK_MODULES(LIBMPG123, libmpg123, HAVE_LIBMPG123="yes", HAVE_LIBMPG123="no" check_failed=yes) ++fi ++if test "x$build_libsyn123" = xyes; then ++ LIBSYN123_DEP_LIBS=$LIBM ++else ++ PKG_CHECK_MODULES(LIBSYN123, libsyn123, HAVE_LIBSYN123="yes", HAVE_LIBSYN123="no" check_failed=yes) ++fi ++if test "x$build_libout123" = xyes; then ++ LIBOUT123_DEP_LIBS="$LIBRT $LIBM $COMPAT_LIBS" ++else ++ PKG_CHECK_MODULES(LIBOUT123, libout123, HAVE_LIBOUT123="yes", HAVE_LIBOUT123="no" check_failed=yes) ++fi + + AC_SUBST(PROG_LIBS) + AC_SUBST(LIBM) +-AC_SUBST(LIBMPG123_LIBS) +-AC_SUBST(LIBSYN123_LIBS) +-AC_SUBST(LIBOUT123_LIBS) ++AC_SUBST(LIBMPG123_DEP_LIBS) ++AC_SUBST(LIBSYN123_DEP_LIBS) ++AC_SUBST(LIBOUT123_DEP_LIBS) + + dnl ############## Final Output + +@@ -3034,8 +3047,8 @@ echo " CFLAGS='$CFLAGS'" + echo " PROG_LIBS='$PROG_LIBS'" + echo " (derived from LIBS, only used for end-user binaries and modules)" + echo " LIBDL='$LIBDL'" +-echo " LIBMPG123_LIBS='$LIBMPG123_LIBS'" +-echo " LIBSYN123_LIBS='$LIBSYN123_LIBS'" +-echo " LIBOUT123_LIBS='$LIBOUT123_LIBS'" ++echo " LIBMPG123_DEP_LIBS='$LIBMPG123_DEP_LIBS'" ++echo " LIBSYN123_DEP_LIBS='$LIBSYN123_DEP_LIBS'" ++echo " LIBOUT123_DEP_LIBS='$LIBOUT123_DEP_LIBS'" + echo + echo "Next type 'make' and then 'make install'." +diff --git a/libmpg123.pc.in b/libmpg123.pc.in +index a8f692eb..c980a8c5 100644 +--- a/libmpg123.pc.in ++++ b/libmpg123.pc.in +@@ -8,5 +8,5 @@ Description: An optimised MPEG Audio decoder + Requires: + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lmpg123 +-Libs.private: @LIBMPG123_LIBS@ ++Libs.private: @LIBMPG123_DEP_LIBS@ + Cflags: -I${includedir} +diff --git a/libout123.pc.in b/libout123.pc.in +index fc4713f3..2c09778c 100644 +--- a/libout123.pc.in ++++ b/libout123.pc.in +@@ -8,5 +8,5 @@ Description: A streaming audio output API derived from mpg123 + Requires: + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lout123 +-Libs.private: @LIBOUT123_LIBS@ @LIBDL@ ++Libs.private: @LIBOUT123_DEP_LIBS@ @LIBDL@ + Cflags: -I${includedir} +diff --git a/libsyn123.pc.in b/libsyn123.pc.in +index 7e4ce2ed..60d0a572 100644 +--- a/libsyn123.pc.in ++++ b/libsyn123.pc.in +@@ -8,5 +8,5 @@ Description: A signal synthesis library accompanying mpg123 + Requires: + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lsyn123 +-Libs.private: @LIBSYN123_LIBS@ ++Libs.private: @LIBSYN123_DEP_LIBS@ + Cflags: -I${includedir} +diff --git a/src/Makemodule.am b/src/Makemodule.am +index b894a8aa..14dc8667 100644 +--- a/src/Makemodule.am ++++ b/src/Makemodule.am +@@ -3,10 +3,26 @@ + include src/tests/Makemodule.am + include src/compat/Makemodule.am + if NEED_LIB ++if BUILD_LIBOUT123 + include src/libout123/Makemodule.am ++LIBOUT123_LINK_LIBS = src/libout123/libout123.la ++else ++LIBOUT123_LINK_LIBS = @LIBOUT123_LIBS@ ++endif + if NEED_MAINLIB ++if BUILD_LIBMPG123 + include src/libmpg123/Makemodule.am ++LIBMPG123_LINK_LIBS = src/libmpg123/libmpg123.la ++else ++LIBMPG123_LINK_LIBS = @LIBMPG123_LIBS@ ++endif ++ ++if BUILD_LIBSYN123 + include src/libsyn123/Makemodule.am ++LIBSYN123_LINK_LIBS = src/libsyn123/libsyn123.la ++else ++LIBSYN123_LINK_LIBS = @LIBSYN123_LIBS@ ++endif + endif + endif + +@@ -22,17 +38,17 @@ endif + + src_mpg123_LDADD = \ + src/compat/libcompat.la \ +- src/libmpg123/libmpg123.la \ +- src/libout123/libout123.la \ +- src/libsyn123/libsyn123.la \ ++ ${LIBMPG123_LINK_LIBS} \ ++ ${LIBOUT123_LINK_LIBS} \ ++ ${LIBSYN123_LINK_LIBS} \ + @PROG_LIBS@ + + src_mpg123_LDFLAGS = @EXEC_LT_LDFLAGS@ + + src_out123_LDADD = \ + src/compat/libcompat.la \ +- src/libsyn123/libsyn123.la \ +- src/libout123/libout123.la \ ++ ${LIBSYN123_LINK_LIBS} \ ++ ${LIBOUT123_LINK_LIBS} \ + @PROG_LIBS@ + + src_out123_LDFLAGS = @EXEC_LT_LDFLAGS@ +@@ -46,12 +62,12 @@ CLEANFILES += src/*.a + + src_mpg123_id3dump_LDADD = \ + src/compat/libcompat.la \ +- src/libmpg123/libmpg123.la \ ++ ${LIBMPG123_LINK_LIBS} \ + @PROG_LIBS@ + + src_mpg123_strip_LDADD = \ + src/compat/libcompat.la \ +- src/libmpg123/libmpg123.la \ ++ ${LIBMPG123_LINK_LIBS} \ + @PROG_LIBS@ + + src_mpg123_SOURCES = \ +diff --git a/src/libmpg123/Makemodule.am b/src/libmpg123/Makemodule.am +index 48e3820f..7c64ea68 100644 +--- a/src/libmpg123/Makemodule.am ++++ b/src/libmpg123/Makemodule.am +@@ -34,7 +34,7 @@ src_libmpg123_libmpg123_la_LDFLAGS = \ + -export-symbols-regex '^mpg123_' + src_libmpg123_libmpg123_la_LIBADD = \ + src/compat/libcompat.la \ +- @LIBMPG123_LIBS@ ++ @LIBMPG123_DEP_LIBS@ + src_libmpg123_libmpg123_la_DEPENDENCIES = \ + src/compat/libcompat.la + +diff --git a/src/libout123/Makemodule.am b/src/libout123/Makemodule.am +index fcc5f87d..196b9de6 100644 +--- a/src/libout123/Makemodule.am ++++ b/src/libout123/Makemodule.am +@@ -55,7 +55,7 @@ src_libout123_libout123_la_LDFLAGS = \ + src_libout123_libout123_la_LIBADD = \ + src/libout123/libmodule.la \ + src/compat/libcompat.la \ +- @LIBOUT123_LIBS@ ++ @LIBOUT123_DEP_LIBS@ + + if HAVE_MODULES + +diff --git a/src/libsyn123/Makemodule.am b/src/libsyn123/Makemodule.am +index d85824fa..ff2a4848 100644 +--- a/src/libsyn123/Makemodule.am ++++ b/src/libsyn123/Makemodule.am +@@ -18,7 +18,7 @@ src_libsyn123_libsyn123_la_LDFLAGS = \ + + src_libsyn123_libsyn123_la_LIBADD = \ + src/compat/libcompat_str.la \ +- @LIBSYN123_LIBS@ ++ @LIBSYN123_DEP_LIBS@ + + src_libsyn123_libsyn123_la_SOURCES = \ + src/libsyn123/syn123.h \ diff --git a/media-libs/libmpg123/libmpg123-1.32.3.ebuild b/media-libs/libmpg123/libmpg123-1.32.3.ebuild new file mode 100644 index 000000000000..c431accb6960 --- /dev/null +++ b/media-libs/libmpg123/libmpg123-1.32.3.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN="mpg123" +MY_P="${MY_PN}-${PV}" +inherit autotools flag-o-matic toolchain-funcs multilib-minimal + +DESCRIPTION="Libraries for realtime MPEG 1.0/2.0/2.5 audio player for layers 1, 2 and 3" +HOMEPAGE="https://www.mpg123.org/" +SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.bz2" + +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="int-quality cpu_flags_x86_3dnow cpu_flags_x86_3dnowext cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse" + +# No MULTILIB_USEDEP here since we only build libmpg123 for non native ABIs. +# Note: build system prefers libsdl2 > libsdl. We could in theory add both +# but it's tricky when it comes to handling switching between them properly. +# We'd need a USE flag for both sdl1 and sdl2 and to make them clash. +RDEPEND=" + dev-libs/libltdl:0 + !<media-sound/mpg123-1.32.3-r1 +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/libtool + virtual/pkgconfig +" +IDEPEND="app-eselect/eselect-mpg123" + +DOCS=( AUTHORS ChangeLog NEWS NEWS.libmpg123 README ) + +PATCHES=( + "${FILESDIR}"/mpg123-1.32.3-build-programs-component.patch + "${FILESDIR}"/mpg123-1.32.3-build-with-installed-libs.patch +) + +src_prepare() { + default + + # Rerun autotools with patched configure.ac + eautoreconf +} + +multilib_src_configure() { + local _audio=dummy + local _output=dummy + local _cpu=generic_fpu + + # Build fails without -D_GNU_SOURCE like this: + # error: ‘struct hostent’ has no member named ‘h_addr’ + append-cflags -D_GNU_SOURCE + + append-lfs-flags + + use cpu_flags_ppc_altivec && _cpu=altivec + + if [[ $(tc-arch) == amd64 || ${ARCH} == x64-* ]]; then + use cpu_flags_x86_sse && _cpu=x86-64 + elif use x86 && gcc-specs-pie ; then + # Don't use any mmx, 3dnow, sse and 3dnowext + # bug #164504 + _cpu=generic_fpu + else + use cpu_flags_x86_mmx && _cpu=mmx + use cpu_flags_x86_3dnow && _cpu=3dnow + use cpu_flags_x86_sse && _cpu=x86 + use cpu_flags_x86_3dnowext && _cpu=x86 + fi + + local myconf=( + --with-optimization=0 + --with-cpu=${_cpu} + --enable-int-quality=$(usex int-quality) + --disable-components --enable-libmpg123 --enable-libsyn123 --enable-libout123 + ) + + multilib_is_native_abi || myconf+=( --disable-modules ) + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + if ! $(multilib_is_native_abi) ; then + sed -i -e 's:src doc:src/libmpg123:' Makefile || die + fi +} + +multilib_src_install_all() { + einstalldocs + mv "${ED}"/usr/bin/mpg123{,-mpg123} + find "${ED}" -type f -name '*.la' -delete || die +} + +pkg_postinst() { + eselect mpg123 update ifunset +} + +pkg_postrm() { + eselect mpg123 update ifunset +} diff --git a/media-libs/libmpg123/metadata.xml b/media-libs/libmpg123/metadata.xml new file mode 100644 index 000000000000..120fdf73ceb1 --- /dev/null +++ b/media-libs/libmpg123/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sound@gentoo.org</email> + <name>Gentoo Sound project</name> + </maintainer> + <upstream> + <maintainer> + <email>thomas-forum@orgis.org</email> + <name>Thomas Orgis</name> + </maintainer> + </upstream> + <use> + <flag name="int-quality">Use rounding instead of fast truncation for integer output, where possible</flag> + </use> +</pkgmetadata> |