summaryrefslogtreecommitdiffstats
path: root/audio/fmit
diff options
context:
space:
mode:
Diffstat (limited to 'audio/fmit')
-rw-r--r--audio/fmit/README30
-rw-r--r--audio/fmit/fmit.SlackBuild136
-rw-r--r--audio/fmit/fmit.info10
-rw-r--r--audio/fmit/setcap.sh1
-rw-r--r--audio/fmit/slack-desc14
5 files changed, 98 insertions, 93 deletions
diff --git a/audio/fmit/README b/audio/fmit/README
index 0ecb16fe55..b13545d8a2 100644
--- a/audio/fmit/README
+++ b/audio/fmit/README
@@ -1,9 +1,21 @@
-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-audio-connection-kit, oss or
-portaudio support is desired, pass JACK="ON", OSS="ON" or PORTAUDIO="ON" to
-the SlackBuild.
+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,
+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 93459b38b8..a280035b4d 100644
--- a/audio/fmit/fmit.SlackBuild
+++ b/audio/fmit/fmit.SlackBuild
@@ -1,63 +1,69 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for fmit (Free Musical Instrument Tuner)
-# Copyright 2013 Josiah Boothby, Seattle
-# 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.
+# Originally written by Josiah Boothby
+# Modified and now maintained by B. Watson <urchlay@slackware.uk>
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20240103 bkw:
+# - New maintainer.
+# - Relicense as WTFPL with permission.
+# - Add missing setcap.sh. This has been broken (by me) for 2 years,
+# and nobody reported it...
+# - Move the "=== CONFIG" message down, so it doesn't interfere
+# with PRINT_PACKAGE_NAME.
+
+# 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"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+echo "=== CONFIG='$CONFIG'"
+
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
@@ -65,45 +71,31 @@ 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 \
- \( -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
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -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:-tgz}
+/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 66264752b0..ba16f10d95 100644
--- a/audio/fmit/fmit.info
+++ b/audio/fmit/fmit.info
@@ -1,10 +1,10 @@
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=""
-MAINTAINER="Josiah Boothby"
-EMAIL="josiahb@gmail.com"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/audio/fmit/setcap.sh b/audio/fmit/setcap.sh
new file mode 100644
index 0000000000..9652ecc699
--- /dev/null
+++ b/audio/fmit/setcap.sh
@@ -0,0 +1 @@
+[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/fmit
diff --git a/audio/fmit/slack-desc b/audio/fmit/slack-desc
index f5062556df..9dcfc14058 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: