Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/mpg123/
Date: Mon, 27 Jun 2022 03:41:43
Message-Id: 1656301293.511653e2d3d117013731d296399830d79e34d889.fordfrog@gentoo
1 commit: 511653e2d3d117013731d296399830d79e34d889
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 27 03:41:33 2022 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 27 03:41:33 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=511653e2
7
8 media-sound/mpg123: bump to 1.30.0
9
10 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
11
12 media-sound/mpg123/Manifest | 1 +
13 media-sound/mpg123/mpg123-1.30.0.ebuild | 108 ++++++++++++++++++++++++++++++++
14 2 files changed, 109 insertions(+)
15
16 diff --git a/media-sound/mpg123/Manifest b/media-sound/mpg123/Manifest
17 index 5e4d7b578dfa..ce2ca19d0968 100644
18 --- a/media-sound/mpg123/Manifest
19 +++ b/media-sound/mpg123/Manifest
20 @@ -1 +1,2 @@
21 DIST mpg123-1.29.3.tar.bz2 1069979 BLAKE2B d01a8d77ffb6c344592d1b90026ee25ae12eb2e063446e88370e0aa508705a843b987f1a400351b5ed87d211251057b7b31a2e653401b800fe9871ac2a5756fc SHA512 0d8db63f9bae1507887bc5241a56abccfeb767b7ba8362eb0fce9de2f63369e57fdd6f25a953f8ef5f9ead4f400237db51914816e278566fdf8e6f205ebca5d6
22 +DIST mpg123-1.30.0.tar.bz2 1091578 BLAKE2B 6acdbfcc1119507c63d9da95afc747c43698ef385368b417e1716eadde6b74fc0618c3aa03a495e4415b5f14aef26d85f98832b3ba5f5bd17083651808a7f53b SHA512 cf508bdff1f75320c7c4d77653ba8170cc0dd8c565390cfb6ba745ce3853816071c86becff3ce304b80481d220cac2113ad244930832ccc78d3d8da74112562f
23
24 diff --git a/media-sound/mpg123/mpg123-1.30.0.ebuild b/media-sound/mpg123/mpg123-1.30.0.ebuild
25 new file mode 100644
26 index 000000000000..ccb28a07fd63
27 --- /dev/null
28 +++ b/media-sound/mpg123/mpg123-1.30.0.ebuild
29 @@ -0,0 +1,108 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +inherit flag-o-matic toolchain-funcs libtool multilib-minimal
36 +
37 +DESCRIPTION="a realtime MPEG 1.0/2.0/2.5 audio player for layers 1, 2 and 3"
38 +HOMEPAGE="https://www.mpg123.org/"
39 +SRC_URI="https://www.mpg123.org/download/${P}.tar.bz2"
40 +
41 +LICENSE="GPL-2 LGPL-2.1"
42 +SLOT="0"
43 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
44 +IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext cpu_flags_ppc_altivec alsa coreaudio int-quality ipv6 jack cpu_flags_x86_mmx nas oss portaudio pulseaudio sdl cpu_flags_x86_sse"
45 +
46 +# No MULTILIB_USEDEP here since we only build libmpg123 for non native ABIs.
47 +# Note: build system prefers libsdl2 > libsdl. We could in theory add both
48 +# but it's tricky when it comes to handling switching between them properly.
49 +# We'd need a USE flag for both sdl1 and sdl2 and to make them clash.
50 +RDEPEND="
51 + dev-libs/libltdl:0
52 + alsa? ( media-libs/alsa-lib )
53 + jack? ( virtual/jack )
54 + nas? ( media-libs/nas )
55 + portaudio? ( media-libs/portaudio )
56 + pulseaudio? ( media-sound/pulseaudio )
57 + sdl? ( media-libs/libsdl2 )"
58 +DEPEND="${RDEPEND}"
59 +BDEPEND="
60 + sys-devel/libtool
61 + virtual/pkgconfig
62 +"
63 +IDEPEND="app-eselect/eselect-mpg123"
64 +
65 +DOCS=( AUTHORS ChangeLog NEWS NEWS.libmpg123 README )
66 +
67 +src_prepare() {
68 + default
69 + elibtoolize # for Darwin bundles
70 +}
71 +
72 +multilib_src_configure() {
73 + local _audio=dummy
74 + local _output=dummy
75 + local _cpu=generic_fpu
76 +
77 + # Build fails without -D_GNU_SOURCE like this:
78 + # error: ‘struct hostent’ has no member named ‘h_addr’
79 + append-cflags -D_GNU_SOURCE
80 +
81 + if $(multilib_is_native_abi) ; then
82 + local flag
83 + for flag in nas portaudio sdl oss jack alsa pulseaudio coreaudio; do
84 + if use ${flag}; then
85 + _audio+=" ${flag/pulseaudio/pulse}"
86 + _output=${flag/pulseaudio/pulse}
87 + fi
88 + done
89 + fi
90 +
91 + use cpu_flags_ppc_altivec && _cpu=altivec
92 +
93 + if [[ $(tc-arch) == amd64 || ${ARCH} == x64-* ]]; then
94 + use cpu_flags_x86_sse && _cpu=x86-64
95 + elif use x86 && gcc-specs-pie ; then
96 + # Don't use any mmx, 3dnow, sse and 3dnowext
97 + # bug #164504
98 + _cpu=generic_fpu
99 + else
100 + use cpu_flags_x86_mmx && _cpu=mmx
101 + use cpu_flags_x86_3dnow && _cpu=3dnow
102 + use cpu_flags_x86_sse && _cpu=x86
103 + use cpu_flags_x86_3dnowext && _cpu=x86
104 + fi
105 +
106 + local myconf=(
107 + --with-optimization=0
108 + --with-audio="${_audio}"
109 + --with-default-audio=${_output}
110 + --with-cpu=${_cpu}
111 + --enable-network
112 + $(use_enable ipv6)
113 + --enable-int-quality=$(usex int-quality)
114 + )
115 +
116 + multilib_is_native_abi || myconf+=( --disable-modules )
117 +
118 + ECONF_SOURCE="${S}" econf "${myconf[@]}"
119 +
120 + if ! $(multilib_is_native_abi) ; then
121 + sed -i -e 's:src doc:src/libmpg123:' Makefile || die
122 + fi
123 +}
124 +
125 +multilib_src_install_all() {
126 + einstalldocs
127 + mv "${ED}"/usr/bin/mpg123{,-mpg123}
128 + find "${ED}" -type f -name '*.la' -delete || die
129 +}
130 +
131 +pkg_postinst() {
132 + eselect mpg123 update ifunset
133 +}
134 +
135 +pkg_postrm() {
136 + eselect mpg123 update ifunset
137 +}