aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2012-07-30 00:24:43 -0500
committerRobby Workman <rworkman@slackbuilds.org>2012-07-30 00:24:43 -0500
commite6ef2f60bb28ba88c1e5bdc18dfb4104f695434b (patch)
tree97c561d9ba975589d545a350486fd25f2b4b4bd2
parentc1986a4f498b5472277bc7174b591c37efe866d2 (diff)
audio/lingot: Updated for version 0.9.1.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--audio/lingot/README12
-rw-r--r--audio/lingot/doinst.sh6
-rw-r--r--audio/lingot/format_string.diff61
-rw-r--r--audio/lingot/lingot.134
-rw-r--r--audio/lingot/lingot.SlackBuild34
-rw-r--r--audio/lingot/lingot.info8
-rw-r--r--audio/lingot/mksrctarball.sh27
-rw-r--r--audio/lingot/setcap.sh1
8 files changed, 141 insertions, 42 deletions
diff --git a/audio/lingot/README b/audio/lingot/README
index 2d8842c43504..64f8baf17764 100644
--- a/audio/lingot/README
+++ b/audio/lingot/README
@@ -9,7 +9,11 @@ jack-audio-connection-kit 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).
-If you want to build without JACK support, set USE_JACK=no in the
-script's environment. The resulting package will only support OSS audio,
-since lingot doesn't have native ALSA support (but works OK with ALSA's
-OSS emulation).
+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.
+
+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.
diff --git a/audio/lingot/doinst.sh b/audio/lingot/doinst.sh
index 5fb28930db0b..3e5691a052b5 100644
--- a/audio/lingot/doinst.sh
+++ b/audio/lingot/doinst.sh
@@ -1,3 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/audio/lingot/format_string.diff b/audio/lingot/format_string.diff
new file mode 100644
index 000000000000..6255311b76e3
--- /dev/null
+++ b/audio/lingot/format_string.diff
@@ -0,0 +1,61 @@
+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
new file mode 100644
index 000000000000..33cfeb414bd7
--- /dev/null
+++ b/audio/lingot/lingot.1
@@ -0,0 +1,34 @@
+.\" 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 4cf4e9ae3acc..0c91449a99d8 100644
--- a/audio/lingot/lingot.SlackBuild
+++ b/audio/lingot/lingot.SlackBuild
@@ -1,20 +1,20 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for lingot
# Written by B. Watson (yalhcru@gmail.com)
+# Licensed under the WTFPL. See http://sam.zoy.org/wtfpl/ for details.
+
PRGNAM=lingot
-VERSION=${VERSION:-20091225}
+VERSION=${VERSION:-0.9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -44,7 +44,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
@@ -53,11 +53,19 @@ find . \
\( -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
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-jack=${USE_JACK:-yes} \
+ --enable-jack=${JACK:-yes} \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
@@ -68,11 +76,17 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+# man page from Debian
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
# These are not documentation..
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/intltool*
+# 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
+
# `make install' puts the docs in --docdir, just add the SlackBuild
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -80,5 +94,11 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+if [ "${SETCAP:-yes}" = "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}
diff --git a/audio/lingot/lingot.info b/audio/lingot/lingot.info
index 0f5cb83d5693..0c91ddb0d7bb 100644
--- a/audio/lingot/lingot.info
+++ b/audio/lingot/lingot.info
@@ -1,10 +1,10 @@
PRGNAM="lingot"
-VERSION="20091225"
+VERSION="0.9.1"
HOMEPAGE="http://www.nongnu.org/lingot/"
-DOWNLOAD="http://www.liwjatan.at/files/src/lingot/lingot-20091225.tar.xz"
-MD5SUM="235124e2846491114b7cbab6f7613ba5"
+DOWNLOAD="http://download.savannah.gnu.org/releases-noredirect/lingot/lingot-0.9.1.tar.gz"
+MD5SUM="5a61c88e3770270246385ab9dbc39793"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"
-APPROVED="dsomero"
+APPROVED="rworkman"
diff --git a/audio/lingot/mksrctarball.sh b/audio/lingot/mksrctarball.sh
deleted file mode 100644
index 9364d2bb84a0..000000000000
--- a/audio/lingot/mksrctarball.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# Create a source tarball from the lingot CVS repository.
-# The result will be /tmp/lingot-$VERSION.tar.xz
-
-REV=${1:-20091225}
-
-TMP=${TMP:-/tmp}
-WORKDIR=$TMP/tarball.$$.$RANDOM
-
-set -e
-
-rm -rf $WORKDIR
-mkdir -p $WORKDIR
-cd $WORKDIR
-
-cvs \
- -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/lingot \
- export \
- -D "$REV" \
- lingot
-
-mv lingot lingot-$REV
-tar cvfJ $TMP/lingot-$REV.tar.xz lingot-$REV
-md5sum $TMP/lingot-$REV.tar.xz
-cd $TMP
-rm -rf $WORKDIR
diff --git a/audio/lingot/setcap.sh b/audio/lingot/setcap.sh
new file mode 100644
index 000000000000..203b40fa5c01
--- /dev/null
+++ b/audio/lingot/setcap.sh
@@ -0,0 +1 @@
+[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/lingot