aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-18 14:34:44 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-19 12:09:29 +0700
commit9f1456da15ead149942ae71cab1b965b796d1a46 (patch)
tree6a6ccf4bea135e620f1d70a5815d8690df8725cc
parent7295146619a8e5a320060911820f223599a6ca9c (diff)
audio/fmit: Updated for version 1.2.14.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--audio/fmit/README28
-rw-r--r--audio/fmit/fmit.SlackBuild92
-rw-r--r--audio/fmit/fmit.info6
-rw-r--r--audio/fmit/slack-desc14
4 files changed, 72 insertions, 68 deletions
diff --git a/audio/fmit/README b/audio/fmit/README
index 85f33d9871a8..b13545d8a2e2 100644
--- a/audio/fmit/README
+++ b/audio/fmit/README
@@ -1,9 +1,21 @@
+fmit (Free Music Instrument Tuner)
+
fmit (Free Music Instrument Tuner) is a piece of software for tuning
-musical instruments, using Qt as a GUI library, supporting ALSA, JACK,
-OSS, or PortAudio for audio input. Features error and volume history,
-tuning scales using Scala (.scl) files, microtonal tuning, harmonic
-ratios, wave shapes, and more.
-
-fmit will automatically detect ALSA and if jack, oss or portaudio
-support is desired, pass JACK="ON", OSS="ON" or PORTAUDIO="ON" to the
-SlackBuild.
+musical instruments, using Qt as a GUI library, supporting ALSA,
+PulseAudio, JACK, OSS, or PortAudio for audio input. Features error
+and volume history, tuning scales using Scala (.scl) files, microtonal
+tuning, harmonic ratios, wave shapes, and more.
+
+fmit will always be built with support for ALSA and PulseAudio. If
+jack and/or portaudio are installed, they will be autodetected
+(but may be disabled via JACK=no and/or PORTAUDIO=no in the
+environment).
+
+If OSS support is desired, export OSS=yes in the environment.
+
+When built with jack support, this package uses POSIX
+filesystem capabilities to execute with elevated privileges
+(required for realtime audio processing). This may be considered a
+security/stability risk. Please read http://www.slackbuilds.org/caps/
+for more information. To disable capabilities, pass SETCAP=no to the
+script (or JACK=no if you don't need jack).
diff --git a/audio/fmit/fmit.SlackBuild b/audio/fmit/fmit.SlackBuild
index f6c0fb6e5eac..78d118627f40 100644
--- a/audio/fmit/fmit.SlackBuild
+++ b/audio/fmit/fmit.SlackBuild
@@ -22,30 +22,44 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220218 bkw: Modified by SlackBuilds.org:
+# - update for v1.2.14 (the old download disappeared).
+# - autodetect jack and portaudio, instead of making the user manually
+# set environment variables (can still disable with environment).
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=fmit
-VERSION=${VERSION:-0.99.2}
+VERSION=${VERSION:-1.2.14}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# To support OSS or PortAudio, pass OSS="ON" or PORTAUDIO="ON".
-JACK=${JACK:-OFF}
-OSS=${OSS:-OFF}
-PORTAUDIO=${PORTAUDIO:-OFF}
+# 20220218 bkw: always include qt (aka PulseAudio) and ALSA support.
+CONFIG="acs_qt acs_alsa"
+
+# 20220218 bkw: autodetect jack and portaudio, allow disabling in env.
+pkg-config --exists jack && \
+ [ "${JACK:-yes}" != "no" ] && \
+ CONFIG+=" acs_jack" && \
+ SETCAP="${SETCAP:-yes}"
+pkg-config --exists portaudio-2.0 && \
+ [ "${PORTAUDIO:-yes}" != "no" ] && \
+ CONFIG+=" acs_portaudio"
+
+# 20220218 bkw: build without OSS, allow enabling in env.
+[ "${OSS:-no}" = "yes" ] && CONFIG+=" acs_oss"
+
+echo "=== CONFIG='$CONFIG'"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -55,19 +69,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+# 20220218 bkw: SLKCFLAGS and LIBDIRSUFFIX not needed (qmake uses
+# the ones qt5 was compiled with, which is correct).
set -e
@@ -75,45 +78,34 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION-Source.tar.bz2
-mv $PRGNAM-$VERSION-Source $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 \
+ -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-mkdir -p build
-cd build
- cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DSOUNDSYSTEM_USE_JACK=$JACK \
- -DSOUNDSYSTEM_USE_OSS=$OSS \
- -DSOUNDSYSTEM_USE_PORTAUDIO=$PORTAUDIO \
- -DCMAKE_BUILD_TYPE=Release ..
- make
- make install DESTDIR=$PKG
-cd ..
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+ -exec chmod 644 {} \+
+
+qmake-qt5 PREFIX=/usr CONFIG+="$CONFIG"
+make
+make install INSTALL_ROOT=$PKG
+
+# 20220218 bkw: binary already stripped.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- COPYING \
- ChangeLog \
- README.txt \
- TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING* README.txt $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,@CONFIG@,$CONFIG," < $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+if [ "$SETCAP" = "yes" ]; then
+ cat $CWD/setcap.sh >> $PKG/install/doinst.sh
+ chown root:audio $PKG/usr/bin/$PRGNAM
+ chmod 0750 $PKG/usr/bin/$PRGNAM
+fi
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/audio/fmit/fmit.info b/audio/fmit/fmit.info
index 66264752b005..2655dec353b4 100644
--- a/audio/fmit/fmit.info
+++ b/audio/fmit/fmit.info
@@ -1,8 +1,8 @@
PRGNAM="fmit"
-VERSION="0.99.2"
+VERSION="1.2.14"
HOMEPAGE="https://github.com/gillesdegottex/fmit"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/fmit-0.99.2-Source.tar.bz2"
-MD5SUM="cacc8b7fdf2439143f9279c4417293c6"
+DOWNLOAD="https://github.com/gillesdegottex/fmit/archive/v1.2.14/fmit-1.2.14.tar.gz"
+MD5SUM="9f7561942c400e49297e03374119e845"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/audio/fmit/slack-desc b/audio/fmit/slack-desc
index f5062556dfb6..9dcfc1405846 100644
--- a/audio/fmit/slack-desc
+++ b/audio/fmit/slack-desc
@@ -8,12 +8,12 @@
|-----handy-ruler------------------------------------------------------|
fmit: fmit (Free Music Instrument Tuner)
fmit:
-fmit: fmit is a piece of software for tuning musical instruments, using Qt
-fmit: as a GUI library, supporting ALSA, JACK, OSS, or PortAudio for audio
-fmit: input. Features error and volume history, tuning scales using Scala
-fmit: (.scl) files, microtonal tuning, harmonic ratios, wave shapes, and
-fmit: more.
-fmit:
-fmit:
+fmit: fmit (Free Music Instrument Tuner) is a piece of software for tuning
+fmit: musical instruments, using Qt as a GUI library, supporting ALSA,
+fmit: PulseAudio, JACK, OSS, or PortAudio for audio input. Features error
+fmit: and volume history, tuning scales using Scala (.scl) files, microtonal
+fmit: tuning, harmonic ratios, wave shapes, and more.
fmit:
+fmit: This package was built with these audio capture systems:
+fmit: @CONFIG@
fmit: