summaryrefslogtreecommitdiff
path: root/audio/lingot
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-11-29 17:19:19 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-12-04 10:09:05 +0700
commitcc3f6d59859ad98f617bd307c12126d87529b1d1 (patch)
treefcdbb81ae1a0041a433cb3edcf7b4d17c3bc4cc2 /audio/lingot
parenta19b873616fd7577ddfae7b735d04c9ff7a4db3d (diff)
downloadslackbuilds-cc3f6d59859ad98f617bd307c12126d87529b1d1.tar.gz
audio/lingot: Updated for version 1.1.1.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/lingot')
-rw-r--r--audio/lingot/README18
-rw-r--r--audio/lingot/format_string.diff61
-rw-r--r--audio/lingot/lingot.134
-rw-r--r--audio/lingot/lingot.SlackBuild89
-rw-r--r--audio/lingot/lingot.info8
-rw-r--r--audio/lingot/slack-desc2
6 files changed, 79 insertions, 133 deletions
diff --git a/audio/lingot/README b/audio/lingot/README
index fb7aa7eb52..717b3c3696 100644
--- a/audio/lingot/README
+++ b/audio/lingot/README
@@ -4,13 +4,19 @@ Lingot is a musical instrument tuner. It's accurate, easy to use, and
highly configurable. Originally conceived to tune electric guitars,
its configurability gives it a more general character.
-By default, this script builds lingot with JACK support, meaning jack is
-required. Most people who connect musical instruments to their Slackware
-box will want JACK, since it's required by most serious studio apps
-(e.g. ardour).
+lingot can use JACK, PulseAudio, ALSA, or OSS for audio input.
-If you want to build without JACK support, set JACK=no in the script's
-environment. The resulting package will only support OSS and ALSA audio.
+By default, this script builds lingot with JACK support, meaning jack
+is required. Most people who connect musical instruments to their
+Slackware box will want JACK, since it's required by most serious
+studio apps (e.g. ardour). You can disable JACK by setting JACK=no in
+the environment.
+
+PulseAudio is enabled by default. You can disable it with PULSE=no in
+the environment.
+
+OSS is disabled by default, since not many people still use it. You
+can enable it with OSS=yes in the environment.
This package uses POSIX filesystem capabilities to execute with
elevated privileges (required for realtime audio processing). This
diff --git a/audio/lingot/format_string.diff b/audio/lingot/format_string.diff
deleted file mode 100644
index 6255311b76..0000000000
--- a/audio/lingot/format_string.diff
+++ /dev/null
@@ -1,61 +0,0 @@
-From 4247d5d3e88a5d900fc79b900f9fa2ae346a7bfb Mon Sep 17 00:00:00 2001
-From: Niv Sardi <xaiki@evilgiggle.com>
-Date: Wed, 28 Sep 2011 17:42:06 -0300
-Subject: [PATCH] Fixed bug #643435 in debian: error: format not a string
- literal and no format arguments [-Werror=format-security]
- Removed compilation warning [-Wunused-but-set-variable]
-
- Patch Author: Ibán Cereijo Graña <ibancg@gmail.com>
-
-Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>
----
- ChangeLog | 4 ++++
- src/lingot-gui-mainframe.c | 5 ++---
- 2 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 34a56de..1fe3f89 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,4 +1,8 @@
-
-+2011-09-27 Ibán Cereijo <ibancg@gmail.com>
-+
-+ * Fixed bug #643435 in debian
-+
- 2011-08-13 Ibán Cereijo <ibancg@gmail.com>
-
- * Fixed bug #34007 (#637610 in debian).
-diff --git a/src/lingot-gui-mainframe.c b/src/lingot-gui-mainframe.c
-index 30c1b69..6124a44 100644
---- a/src/lingot-gui-mainframe.c
-+++ b/src/lingot-gui-mainframe.c
-@@ -201,7 +201,6 @@ gboolean lingot_gui_mainframe_callback_gauge_computation(gpointer data) {
- unsigned int period;
- double error_cents;
- LingotMainFrame* frame = (LingotMainFrame*) data;
-- unsigned short note_index;
-
- period = 1000 / GAUGE_RATE;
- frame->gauge_computation_uid = g_timeout_add(period,
-@@ -211,7 +210,7 @@ gboolean lingot_gui_mainframe_callback_gauge_computation(gpointer data) {
- < 10.0)) {
- lingot_gauge_compute(frame->gauge, frame->conf->gauge_rest_value);
- } else {
-- note_index = lingot_gui_mainframe_get_closest_note_index(
-+ lingot_gui_mainframe_get_closest_note_index(
- frame->core->freq, frame->conf->scale,
- frame->conf->root_frequency_error, &error_cents);
- lingot_gauge_compute(frame->gauge, error_cents);
-@@ -242,7 +241,7 @@ gboolean lingot_gui_mainframe_callback_error_dispatcher(gpointer data) {
- (message_type == ERROR) ? GTK_MESSAGE_ERROR
- : ((message_type == WARNING) ? GTK_MESSAGE_WARNING
- : GTK_MESSAGE_INFO),
-- GTK_BUTTONS_CLOSE, error_message);
-+ GTK_BUTTONS_CLOSE, "%s", error_message);
- gtk_window_set_title(GTK_WINDOW(message_dialog), (message_type
- == ERROR) ? _("Error")
- : ((message_type == WARNING) ? _("Warning") : _("Info")));
---
-1.7.7.rc1
-
diff --git a/audio/lingot/lingot.1 b/audio/lingot/lingot.1
deleted file mode 100644
index 33cfeb414b..0000000000
--- a/audio/lingot/lingot.1
+++ /dev/null
@@ -1,34 +0,0 @@
-.\" Hey, EMACS: -*- nroff -*-
-.\" First parameter, NAME, should be all caps
-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
-.\" other parameters are allowed: see man(7), man(1)
-.TH LINGOT 1 "August 11, 2006"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh disable hyphenation
-.\" .hy enable hyphenation
-.\" .ad l left justify
-.\" .ad b justify to both left and right margins
-.\" .nf disable filling
-.\" .fi enable filling
-.\" .br insert line break
-.\" .sp <n> insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-lingot \- accurate and easy to use musical instrument tuner
-.SH SYNOPSIS
-.B lingot
-.SH DESCRIPTION
-lingot is a musical instrument tuner. It's accurate, easy to use, and
-highly configurable. Originally conceived to tune electric guitars,
-it can now be used to tune any instrument.
-
-.SH USAGE
-lingot does not have any command line argument and is fully configured
-through its GUI.
-.SH AUTHOR
-lingot was written by Ibán Cereijo Graña <ibancg@gmail.com> and Jairo Chapela Martínez <jairochapela@gmail.com>
-.PP
-This manual page was written by Niv Sardi <xaiki+deb@cxhome.ath.cx>,
-for the Debian project (but may be used by others).
diff --git a/audio/lingot/lingot.SlackBuild b/audio/lingot/lingot.SlackBuild
index f7ce67de47..bd3009c94f 100644
--- a/audio/lingot/lingot.SlackBuild
+++ b/audio/lingot/lingot.SlackBuild
@@ -6,10 +6,18 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211129 bkw:
+# - updated for v1.1.1.
+# - use upstream's man page (identical to the one we used to have here).
+# - *fix* upstream's man page.
+# - get rid of format_string.diff (no longer applies).
+# - lower the default minimum frequency and raise the default
+# max frequency.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lingot
-VERSION=${VERSION:-0.9.1}
+VERSION=${VERSION:-1.1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +30,6 @@ if [ -z "$ARCH" ]; then
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
@@ -57,25 +62,42 @@ rm -rf $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 {} \;
-
-# Slackware doesn't set up the ALSA plughw:0 device by default, so make lingot
-# use hw:0 as its default ALSA device.
-sed -i 's,plug\(hw:0\),\1,g' README src/*.c
-
-# Fix a format string error (unlikely but possible segfault/exploit),
-# patch borrowed from Debian.
-patch -p1 < $CWD/format_string.diff
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# make the .desktop validate
+sed -i 's,\.svg,,' *.desktop
+
+# man page hasn't been updated for new conf file location. also
+# fix "-c config" formatting error.
+sed -i -e 's,\\c$,c,' \
+ -e 's,~/.lingot,~/.config/lingot,' \
+ $PRGNAM.1
+
+# Default minimum frequency is E2 (82.407Hz), which is the low E on a
+# guitar in standard tuning. This kinda sucks: some of us play bass.
+# Or 7- or 8-string guitar. Or 6-string guitar in drop-D or open
+# D/G/etc tunings. Make it default to A0, which is 1 full step lower
+# than the low B on a 5-string bass guitar. Also raise the max. This
+# just changes the defaults; users can adjust as desired from the GUI.
+# Unfortunately, lingot can't actually display the 0 octave, so this
+# still only gets us down to C1 (1/2 step too high for a 5-string
+# bass). Also your audio interface might be cutting off the lows, I've
+# got a cheap one that sharply drops off around 40Hz.
+
+sed -i -e '/->min_frequency *=/s,=.*,= 27.5; // Hz (A0),' \
+ -e '/->max_frequency *=/s,=.*,= 880.0; // Hz (A5),' \
+ src/lingot-config.c
+
+[ "${JACK:-yes}" = "no" ] && EXTRA+="--without-jack "
+[ "${PULSE:-yes}" = "no" ] && EXTRA+="--without-pulseaudio "
+[ "${OSS:-no}" = "no" ] && EXTRA+="--without-oss "
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
+ $EXTRA \
--prefix=/usr \
- --enable-jack=${JACK:-yes} \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
@@ -86,24 +108,37 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-# man page from Debian
-mkdir -p $PKG/usr/man/man1
-gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
-# These are not documentation..
-rm -f $PKG/usr/doc/$PRGNAM-$VERSION/intltool*
+rm -f $PKG/usr/lib*/*.la
-# At least one of the doc files is a zero-length placeholder.
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -a -size 0 -print0 | \
- xargs -0 rm -f
+svgicon="$( /bin/ls icons/*.svg | head -1 )"
+iconname="$( basename $svgicon .svg )"
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert -resize $size $svgicon $dir/$iconname.png
+done
+
+mkdir -p $PKG/usr/share/pixmaps
+ln -s ../icons/hicolor/48x48/apps/$iconname.png $PKG/usr/share/pixmaps/$PRGNAM.png
# `make install' puts the docs in --docdir, just add the SlackBuild
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+P=no; J=no; O=no
+strings $PKG/usr/lib*/lib$PRGNAM.so | grep -q /dev/dsp && O=yes
+objdump -p $PKG/usr/lib*/lib$PRGNAM.so | grep NEEDED > otmp
+grep -q libpulse otmp && P=yes
+grep -q libjack otmp && J=yes
+
+sed -e "s,@P@,$P," -e "s,@J@,$J," -e "s,@O@,$O," $CWD/slack-desc \
+ > $PKG/install/slack-desc
+
if [ "${SETCAP:-yes}" = "yes" ]; then
cat $CWD/setcap.sh >> $PKG/install/doinst.sh
chown root:audio $PKG/usr/bin/$PRGNAM
diff --git a/audio/lingot/lingot.info b/audio/lingot/lingot.info
index 1b9e924ed6..e8b873aa81 100644
--- a/audio/lingot/lingot.info
+++ b/audio/lingot/lingot.info
@@ -1,8 +1,8 @@
PRGNAM="lingot"
-VERSION="0.9.1"
-HOMEPAGE="http://www.nongnu.org/lingot/"
-DOWNLOAD="http://download.savannah.gnu.org/releases/lingot/lingot-0.9.1.tar.gz"
-MD5SUM="5a61c88e3770270246385ab9dbc39793"
+VERSION="1.1.1"
+HOMEPAGE="https://www.nongnu.org/lingot/"
+DOWNLOAD="https://download.savannah.gnu.org/releases/lingot/lingot-1.1.1.tar.gz"
+MD5SUM="a03441322525af6ceaba32b70031bdd5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="jack"
diff --git a/audio/lingot/slack-desc b/audio/lingot/slack-desc
index ba335f4d85..da9e5aa39d 100644
--- a/audio/lingot/slack-desc
+++ b/audio/lingot/slack-desc
@@ -12,7 +12,7 @@ lingot: Lingot is a musical instrument tuner. It's accurate, easy to use, and
lingot: highly configurable. Originally conceived to tune electric guitars,
lingot: its configurability gives it a more general character.
lingot:
-lingot:
+lingot: Build options: JACK=@J@, PulseAudio=@P@, OSS=@O@
lingot:
lingot:
lingot: