mpg123: move all "extra" plugings to mpg123-sdl, rename to mpg123-extras

mpg123-jack introduces a build cycle, so let's minimize the dependencies
of the base mpg123 package by moving all "extras" to an mpg123-extras
package that manages the individual subpackages. The mpg123-extras
package can act as a meta that pulls in all the others.

Closes #41301.
This commit is contained in:
Andrew J. Hesford 2022-12-27 19:08:06 -05:00 committed by Đoàn Trần Công Danh
parent 8137911078
commit 5024cb1bf4
7 changed files with 79 additions and 56 deletions

View File

@ -0,0 +1,72 @@
# Template file for 'mpg123-extras'
# Sync with mpg123
pkgname=mpg123-extras
version=1.31.1
revision=3
build_style=gnu-configure
# --with-cpu not necessary, upstream detects features correctly
configure_args="--with-optimization=0 --with-default-audio=alsa"
hostmakedepends="pkg-config"
makedepends="alsa-lib-devel SDL2-devel jack-devel pulseaudio-devel sndio-devel"
depends="mpg123-sdl mpg123-jack mpg123-pulseaudio mpg123-sndio"
short_desc="Fast console MPEG audio decoder/player - extra plugins"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-only"
homepage="https://www.mpg123.org/"
changelog="https://www.mpg123.org/cgi-bin/scm/mpg123/trunk/NEWS"
distfiles="${SOURCEFORGE_SITE}/mpg123/mpg123-${version}.tar.bz2
https://www.mpg123.org/download/mpg123-${version}.tar.bz2"
checksum="5dcb0936efd44cb583498b6585845206f002a7b19d5066a2683be361954d955a
5dcb0936efd44cb583498b6585845206f002a7b19d5066a2683be361954d955a"
# Restrict extras to the same matching version, ignore revision
_depends="libmpg123>=${version}_1<=${version}_9999"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
configure_args+=" --disable-lfs-alias"
fi
post_install() {
# Prune everything except the plugins that will be installed
find ${DESTDIR} \
'(' -name output_sdl.so \
-o -name output_jack.so \
-o -name output_pulse.so \
-o -name output_sndio.so \
')' -o '(' -not -type d -delete ')'
# Main package cannot be empty
vdoc README
}
mpg123-sdl_package() {
depends="${_depends}"
short_desc="${short_desc%% - *} - SDL output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_sdl.so
}
}
mpg123-jack_package() {
depends="${_depends}"
short_desc="${short_desc%% - *} - JACK output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_jack.so
}
}
mpg123-pulseaudio_package() {
depends="${_depends}"
short_desc="${short_desc%% - *} - Pulseaudio output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_pulse.so
}
}
mpg123-sndio_package() {
depends="${_depends}"
short_desc="${short_desc%% - *} - sndio output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_sndio.so
}
}

View File

@ -1 +1 @@
mpg123
mpg123-extras

View File

@ -1 +1 @@
mpg123
mpg123-extras

1
srcpkgs/mpg123-sdl Symbolic link
View File

@ -0,0 +1 @@
mpg123-extras

View File

@ -1,28 +0,0 @@
# Template file for 'mpg123-sdl'
# Sync with mpg123
pkgname=mpg123-sdl
version=1.31.1
revision=2
build_style=gnu-configure
# --with-cpu not necessary, upstream detects features correctly
configure_args="--with-optimization=0 --with-default-audio=alsa"
hostmakedepends="pkg-config"
makedepends="alsa-lib-devel SDL2-devel"
depends="libmpg123>=${version}<=${version}_9999"
short_desc="Fast console MPEG audio decoder/player - SDL output plugin"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-only"
homepage="https://www.mpg123.org/"
changelog="https://www.mpg123.org/cgi-bin/scm/mpg123/trunk/NEWS"
distfiles="${SOURCEFORGE_SITE}/mpg123/mpg123-${version}.tar.bz2
https://www.mpg123.org/download/mpg123-${version}.tar.bz2"
checksum="5dcb0936efd44cb583498b6585845206f002a7b19d5066a2683be361954d955a
5dcb0936efd44cb583498b6585845206f002a7b19d5066a2683be361954d955a"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
configure_args+=" --disable-lfs-alias"
fi
post_install() {
find ${DESTDIR} -name output_sdl.so -o '(' -not -type d -delete ')'
}

View File

@ -1 +1 @@
mpg123
mpg123-extras

View File

@ -1,13 +1,13 @@
# Template file for 'mpg123'
# Sync with mpg123-sdl
# Sync with mpg123-extras
pkgname=mpg123
version=1.31.1
revision=2
revision=3
build_style=gnu-configure
# --with-cpu not necessary, upstream detects features correctly
configure_args="--with-optimization=0 --with-default-audio=alsa"
hostmakedepends="pkg-config"
makedepends="alsa-lib-devel jack-devel pulseaudio-devel sndio-devel"
makedepends="alsa-lib-devel"
short_desc="Fast console MPEG audio decoder/player"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-only"
@ -23,28 +23,6 @@ if [ "$XBPS_TARGET_LIBC" = musl ]; then
configure_args+=" --disable-lfs-alias"
fi
mpg123-jack_package() {
depends="libmpg123-${version}_${revision}"
short_desc+=" - JACK output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_jack.so
}
}
mpg123-pulseaudio_package() {
depends="libmpg123-${version}_${revision}"
short_desc+=" - Pulseaudio output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_pulse.so
}
}
mpg123-sndio_package() {
depends="libmpg123-${version}_${revision}"
short_desc+=" - sndio output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_sndio.so
}
}
libmpg123_package() {
short_desc+=" - Runtime library"
pkg_install() {