diff options
author | B. Watson <yalhcru@gmail.com> | 2021-03-02 01:50:51 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-03-06 11:11:58 +0700 |
commit | 0b5fcab2a2dc7c875036cd8d3d47ca86da48af67 (patch) | |
tree | 6efe0567e922bab08a5a0f00d4da14765ab85328 /audio/apulse | |
parent | 6cb808c8bb85984ad0d9c565ec55185cc965f0d0 (diff) | |
download | slackbuilds-0b5fcab2a2dc7c875036cd8d3d47ca86da48af67.tar.gz |
audio/apulse: Updated for version 0.1.13, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/apulse')
-rw-r--r-- | audio/apulse/README | 62 | ||||
-rw-r--r-- | audio/apulse/apulse.SlackBuild | 121 | ||||
-rw-r--r-- | audio/apulse/apulse.info | 10 | ||||
-rw-r--r-- | audio/apulse/libpulse.pc | 9 | ||||
-rw-r--r-- | audio/apulse/libpulse64.pc | 9 | ||||
-rw-r--r-- | audio/apulse/pc/libpulse-mainloop-glib.pc | 11 | ||||
-rw-r--r-- | audio/apulse/pc/libpulse-simple.pc | 11 | ||||
-rw-r--r-- | audio/apulse/pc/libpulse.pc | 10 | ||||
-rw-r--r-- | audio/apulse/slack-desc | 10 |
9 files changed, 163 insertions, 90 deletions
diff --git a/audio/apulse/README b/audio/apulse/README index c072bfde14..516ac721e5 100644 --- a/audio/apulse/README +++ b/audio/apulse/README @@ -1,17 +1,45 @@ -PulseAudio emulation for ALSA. - -The program provides an alternative partial implementation of the -PulseAudio API. It consists of a loader script and a number of -shared libraries with the same names as from original PulseAudio, -so applications could dynamically load them and think they are -talking to PulseAudio. Internally, no separate sound mixing daemon is -used. Instead, apulse relies on ALSA's dmix, dsnoop, and plug plugins -to handle multiple sound sources and capture streams running at the -same time. dmix plugin muxes multiple playback streams; dsnoop plugin -allow multiple applications to capture from a single microphone; -and plug plugin transparently converts audio between various sample -formats, sample rates and channel numbers. For more than a decade now, -ALSA comes with these plugins enabled and configured by default. Cmake -is required to build it. - -Note: It's recommended to uninstall PulseAudio before install apulse. +apulse (PulseAudio emulation for ALSA) + +Any app that requires pulseaudio can be run as such: + + $ apulse <program> [parameters] + +PulseAudio is not required. + +This script supports 3 build types, controlled by the SYSTEM +environment variable: + +- SYSTEM=no is the default and recommended setting. Libraries will be + installed in a private directory, and headers will not be + installed. This allows apulse to coexist safely with Slackware's + pulseaudio package. apulse will only be used via the wrapper script, + as in the example above. + +- SYSTEM=yes installs the apulse libraries to /usr/lib(64). This would + conflict with Slackware's pulseaudio package, so only use this + option on a system where pulseaudio is not installed. The wrapper + script won't be required; all applications that use PulseAudio + will use apulse instead (although compatibility isn't 100% perfect, + so some apps may fail to run, or fail to make sound). This option + allows running software that's been built to use PulseAudio, but + doesn't allow compiling software to use PulseAudio. + +- SYSTEM=devel is like SYSTEM=yes, plus it installs pulseaudio headers + and pkg-config support files. This option allows you to (possibly) + compile software that uses PulseAudio, using apulse instead. Like + SYSTEM=yes, this option conflicts with Slackware's pulseaudio + package. You probably don't want SYSTEM=devel; it's pretty + niche-market. If you want to compile PulseAudio apps, you should + really be using actual PulseAudio. + +*DON'T* use SYSTEM=yes or SYSTEM=devel if you have pulseaudio +installed! You'll make a mess. If you ignore this advice, you can +probably clean up the mess by removing both apulse and pulseaudio, +then reinstalling pulseaudio. Or not, YMMV. + +Note for multilib users: The SlackBuild now detects a multilib machine +and will build 32-bit libraries. Do NOT set ARCH to i586 or i686 in +the environment (leave it unset, or set it to "x86_64"), and do NOT +use 32dev.sh or linux32. If you don't want to build 32-bit libraries: + + # COMPAT32=no sh apulse.SlackBuild diff --git a/audio/apulse/apulse.SlackBuild b/audio/apulse/apulse.SlackBuild index 5694cca7b0..df8421d879 100644 --- a/audio/apulse/apulse.SlackBuild +++ b/audio/apulse/apulse.SlackBuild @@ -1,34 +1,42 @@ #!/bin/sh # Slackware build script for apulse -# Copyright 2019 Capi X. <capi_x@haibane.org> -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# 20191029 cpx: -# - Initial version + +# Originally written by: Ryan P.C. McQuen | Everett, WA | <email removed> +# Heavily modified and now maintained by B. Watson <yalhcru@gmail.com> + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20210301 bkw: +# - Take over maintenance. +# - Replace Capi X's version (submitted in 2019) with Ryan's (removed +# in 2016), since it supports multilib and by default doesn't stomp +# on the system pulseaudio libs. Add the ability to install the +# headers and .pc files, like Capi's build did, but disable it by +# default (SYSTEM variable). +# - Relicense as WTFPL, with permission from original author (Ryan). +# - i486 => i586. +# - Rewrite README to document the new stuffs. +# - Simplify the script a bit. +# - Actually use SLKCFLAGS. +# - Upstream ships a man page now, install it to /usr/man. PRGNAM=apulse -VERSION=${VERSION:-0.1.12} +VERSION=${VERSION:-0.1.13} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +SYSTEM=${SYSTEM:-no} +[ "$SYSTEM" = "devel" ] && HEADERS=yes +case "$SYSTEM" in + yes|devel) AP_SUBDIR=${AP_SUBDIR:-/} + COEXIST="CONFLICTS" ;; + no) AP_SUBDIR=${AP_SUBDIR:-/apulse} + COEXIST="can safely coexist" ;; + *) echo "*** Invalid SYSTEM setting '$SYSTEM', use one of: no yes devel" 1>&2 + exit 1 ;; +esac + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -51,6 +59,8 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" + # automatically detect multilib, can override with COMPAT32=no + [ -e /lib/libc.so.6 ] && COMPAT32="${COMPAT32:-yes}" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" @@ -58,44 +68,65 @@ fi set -e +buildit() { + rm -rf build + mkdir -p build + cd build + cmake \ + -DAPULSEPATH=/usr/lib$2${AP_SUBDIR} \ + -DAPULSE_SEARCH_PATHS=/usr/lib${AP_SUBDIR}:/usr/lib${LIBDIRSUFFIX}${AP_SUBDIR} \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="$SLKCFLAGS $1 -DNDEBUG" \ + -DCMAKE_C_FLAGS_RELEASE="$SLKCFLAGS $1 -DNDEBUG" \ + .. + make VERBOSE=1 + make install/strip DESTDIR=$PKG + cd - +} + +install_pc() { + mkdir -p $PKG/usr/lib$1/pkgconfig + for i in $CWD/pc/*.pc; do + sed "s,@64@,$1,g" $i > $PKG/usr/lib$1/pkgconfig/$( basename $i ) + done +} + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -mkdir $PRGNAM-$VERSION -cd $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -mkdir -p build -cd build -cmake .. -make +# hardcoded, can't override on cmake command line. +sed -i 's,share/man/,man/,' CMakeLists.txt -mkdir -p $PKG/usr/include -cp -fra ../3rdparty/pulseaudio-headers/pulse $PKG/usr/include +# for compat32, we assume x86_64 CPUs handle i686 instructions. also, +# unlike normal 32-bit packages, this one gets -fPIC (which won't hurt). +[ "$COMPAT32" = "yes" ] && buildit "-m32 -march=i686 -mtune=i686" "" -mkdir -p $PKG/usr/bin -install -m755 apulse $PKG/usr/bin +# either way, build the normal libraries with normal cflags. +buildit "" "$LIBDIRSUFFIX" -mkdir -p $PKG/usr/lib$LIBDIRSUFFIX -cp -a libpulse*so* $PKG/usr/lib$LIBDIRSUFFIX +gzip -9 $PKG/usr/man/*/* -mkdir -p $PKG/usr/share/pkgconfig -install -m644 $CWD/libpulse$LIBDIRSUFFIX.pc $PKG/usr/share/pkgconfig/libpulse.pc +if [ "$HEADERS" = "yes" ]; then + mkdir -p $PKG/usr/include + cp -a 3rdparty/pulseaudio-headers/pulse $PKG/usr/include + install_pc "$LIBDIRSUFFIX" + [ "$COMPAT32" = "yes" ] && install_pc "" +fi -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/ +cp -a LICENSE.MIT README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s,@COEXIST@,$COEXIST," $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/apulse/apulse.info b/audio/apulse/apulse.info index f785ec63f3..03868d7e81 100644 --- a/audio/apulse/apulse.info +++ b/audio/apulse/apulse.info @@ -1,10 +1,10 @@ PRGNAM="apulse" -VERSION="0.1.12" +VERSION="0.1.13" HOMEPAGE="https://github.com/i-rinat/apulse" -DOWNLOAD="https://github.com/i-rinat/apulse/archive/v0.1.12/apulse-0.1.12.tar.gz" -MD5SUM="9745e6ee3391f44a30c6a7642de19186" +DOWNLOAD="https://github.com/i-rinat/apulse/archive/v0.1.13/apulse-0.1.13.tar.gz" +MD5SUM="90a9608a1b30f221925fb363dc2580a6" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Capi X." -EMAIL="capi_x@haibane.org" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/audio/apulse/libpulse.pc b/audio/apulse/libpulse.pc deleted file mode 100644 index 4a25c323aa..0000000000 --- a/audio/apulse/libpulse.pc +++ /dev/null @@ -1,9 +0,0 @@ -prefix=/usr -exec_prefix=${prefix} -libdir=/usr/lib -includedir=${prefix}/include - -Name: libpulse -Description: libpulse compiling helper for apulse users -Version: 0.1.12 -Cflags: -I${includedir} diff --git a/audio/apulse/libpulse64.pc b/audio/apulse/libpulse64.pc deleted file mode 100644 index 8021c4fa6e..0000000000 --- a/audio/apulse/libpulse64.pc +++ /dev/null @@ -1,9 +0,0 @@ -prefix=/usr -exec_prefix=${prefix} -libdir=/usr/lib64 -includedir=${prefix}/include - -Name: libpulse -Description: libpulse compiling helper for apulse users -Version: 0.1.12 -Cflags: -I${includedir} diff --git a/audio/apulse/pc/libpulse-mainloop-glib.pc b/audio/apulse/pc/libpulse-mainloop-glib.pc new file mode 100644 index 0000000000..3b7eaa219c --- /dev/null +++ b/audio/apulse/pc/libpulse-mainloop-glib.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib@64@ +includedir=${prefix}/include + +Name: libpulse-mainloop-glib +Description: PulseAudio GLib 2.0 Main Loop Wrapper [apulse] +Version: 0.1.13 +Libs: -L${libdir} -lpulse-mainloop-glib +Cflags: -I${includedir} +Requires: libpulse glib-2.0 diff --git a/audio/apulse/pc/libpulse-simple.pc b/audio/apulse/pc/libpulse-simple.pc new file mode 100644 index 0000000000..f951da9150 --- /dev/null +++ b/audio/apulse/pc/libpulse-simple.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib@64@ +includedir=${prefix}/include + +Name: libpulse-simple +Description: PulseAudio Simplified Synchronous Client Interface [apulse] +Version: 0.1.13 +Libs: -L${libdir} -lpulse-simple +Cflags: -I${includedir} +Requires: libpulse diff --git a/audio/apulse/pc/libpulse.pc b/audio/apulse/pc/libpulse.pc new file mode 100644 index 0000000000..f1a89f0c41 --- /dev/null +++ b/audio/apulse/pc/libpulse.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib@64@ +includedir=${prefix}/include + +Name: libpulse +Description: PulseAudio Client Interface [apulse] +Version: 0.1.13 +Libs: -L${libdir} -lpulse +Cflags: -I${includedir} diff --git a/audio/apulse/slack-desc b/audio/apulse/slack-desc index 4f80739bb2..d131fc8eb3 100644 --- a/audio/apulse/slack-desc +++ b/audio/apulse/slack-desc @@ -8,12 +8,12 @@ |-----handy-ruler------------------------------------------------------| apulse: apulse (PulseAudio emulation for ALSA) apulse: -apulse: The program provides an alternative partial implementation of the -apulse: PulseAudio API. It consists of a loader script and a number of shared -apulse: libraries with the same names as from original PulseAudio, so -apulse: applications could dynamically load them and think they are talking -apulse: to PulseAudio. Internally, no separate sound mixing daemon is used. +apulse: Run any program that requires pulseaudio simply by preceding it +apulse: with 'apulse'. apulse: +apulse: $ apulse <program> [parameters] apulse: +apulse: This package @COEXIST@ with Slackware's pulseaudio package. apulse: +apulse: Homepage: https://github.com/i-rinat/apulse apulse: |