Skip to content

Commit

Permalink
mpg123: move all "extra" plugings to mpg123-sdl, rename to mpg123-extras
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ahesford committed Dec 28, 2022
1 parent e4235e8 commit 42f462b
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 56 deletions.
69 changes: 69 additions & 0 deletions srcpkgs/mpg123-extras/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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"

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="libmpg123>=${version}_${revision}"
short_desc="${short_desc%% - *} - SDL output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_sdl.so
}
}

mpg123-jack_package() {
depends="libmpg123>=${version}_${revision}"
short_desc="${short_desc%% - *} - JACK output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_jack.so
}
}

mpg123-pulseaudio_package() {
depends="libmpg123>=${version}_${revision}"
short_desc="${short_desc%% - *} - Pulseaudio output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_pulse.so
}
}

mpg123-sndio_package() {
depends="libmpg123>=${version}_${revision}"
short_desc="${short_desc%% - *} - sndio output plugin"
pkg_install() {
vmove usr/lib/mpg123/output_sndio.so
}
}
2 changes: 1 addition & 1 deletion srcpkgs/mpg123-jack
2 changes: 1 addition & 1 deletion srcpkgs/mpg123-pulseaudio
1 change: 1 addition & 0 deletions srcpkgs/mpg123-sdl
28 changes: 0 additions & 28 deletions srcpkgs/mpg123-sdl/template

This file was deleted.

2 changes: 1 addition & 1 deletion srcpkgs/mpg123-sndio
28 changes: 3 additions & 25 deletions srcpkgs/mpg123/template
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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() {
Expand Down

0 comments on commit 42f462b

Please sign in to comment.