audio/bristol: Fix build, add launcher.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
2232e8f31a
commit
d96183adb7
|
@ -2,11 +2,17 @@
|
|||
|
||||
# Slackware build script for bristol
|
||||
|
||||
# Written by Zbigniew Baniewski, <zbigniew.baniewski@gmail.com>
|
||||
# Written by Zbigniew Baniewski, <email removed>
|
||||
# Modified by B. Watson, yalhcru@gmail.com
|
||||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# 20211130 bkw: BUILD=2
|
||||
# - fix build on -current (again).
|
||||
# - new-style icons.
|
||||
# - get rid of .la files.
|
||||
# - add launch-bristol script, so desktop users can choose a synth
|
||||
# instead of only being able to use the B3.
|
||||
# 20170621 bkw: fix build on -current
|
||||
# 20141030 bkw: make VERSION respect environment
|
||||
|
||||
|
@ -14,7 +20,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PRGNAM=bristol
|
||||
VERSION=${VERSION:-0.60.11}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -26,9 +32,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
|
||||
|
@ -61,11 +64,8 @@ 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 {} \;
|
||||
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
|
||||
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
|
||||
|
||||
# Patch from Debian to fix alsa-lib API breakage.
|
||||
patch -p1 < $CWD/03-rm_alsa-iatomic.h.patch
|
||||
|
@ -76,6 +76,7 @@ sed -i "s,/usr/lib,/usr/lib$LIBDIRSUFFIX,g" \
|
|||
sed -i "s,/usr/X11R6/lib,/usr/X11R6/lib$LIBDIRSUFFIX,g" \
|
||||
configure Makefile.* brighton/Makefile.* libbrightonX11/Makefile.*
|
||||
|
||||
SLKCFLAGS+=" -fcommon"
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
@ -91,15 +92,27 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
make
|
||||
make install-strip DESTDIR=$PKG
|
||||
|
||||
install -m0755 -oroot -groot $CWD/launch-bristol $PKG/usr/bin
|
||||
rm -f $PKG/usr/lib*/*.la
|
||||
|
||||
# "install -m0644" rather than "cp -a" so the docs aren't executable!
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
install -m0644 AUTHORS COPYING COPYING.GPL NEWS README ChangeLog \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
# icon rendered from bicon.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 -background none -resize $size bitmaps/bicon.svg $dir/$PRGNAM.png
|
||||
done
|
||||
|
||||
mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps
|
||||
cat bitmaps/bicon.svg > $PKG/usr/share/icons/hicolor/scalable/apps/$PRGNAM.svg
|
||||
|
||||
mkdir -p $PKG/usr/share/pixmaps
|
||||
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
|
||||
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
|
||||
|
||||
# .desktop written for this SlackBuild
|
||||
mkdir -p $PKG/usr/share/applications
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Name=Bristol
|
||||
GenericName=Synthesizer Emulator
|
||||
Type=Application
|
||||
Exec=startBristol
|
||||
Exec=launch-bristol
|
||||
Terminal=false
|
||||
Icon=bristol
|
||||
Categories=AudioVideo;Audio;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
PRGNAM="bristol"
|
||||
VERSION="0.60.11"
|
||||
HOMEPAGE="http://bristol.sourceforge.net/"
|
||||
DOWNLOAD="http://downloads.sourceforge.net/bristol/bristol-0.60.11.tar.gz"
|
||||
DOWNLOAD="https://downloads.sourceforge.net/bristol/bristol-0.60.11.tar.gz"
|
||||
MD5SUM="9ea4dacdac0dba3048156e2f6a5ee4d6"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
|
@ -8,4 +7,3 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
|
|||
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
#!/bin/sh
|
||||
|
||||
# launch-bristol.sh - by B. Watson <yalhcru@gmail.com>, licensed
|
||||
# under the WTFPL. Part of the SlackBuilds.org bristol build.
|
||||
|
||||
# Simple KDialog-based launcher for Bristol synth. Bristol is a
|
||||
# GUI application once it's running, but it emulates 40+ different
|
||||
# synths, and the only way to choose the synth is by passing an
|
||||
# argument to startBristol (e.g. -mini or -prophet).
|
||||
|
||||
# We want to be able to launch it from a .desktop file, which means
|
||||
# one of three things:
|
||||
|
||||
# 1. The .desktop file would have a synth type hardcoded, other emulations
|
||||
# would require CLI startup.
|
||||
# 2. There would have to be 40+ .desktop files, one per synth type (ugh).
|
||||
# 3. The .desktop file would launch some kind of selector to let the user
|
||||
# pick the synth type. That's what this script is for.
|
||||
|
||||
# This works, but doesn't offer a way to set any of the other CLI
|
||||
# options. We have "-jack" hardcoded here, since I doubt many people
|
||||
# ever use "-alsa" with bristol...
|
||||
|
||||
# If this file exists, it contains the last choice the user made,
|
||||
# last time this script was run and its OK button pressed.
|
||||
# Pressing Cancel doesn't create or alter this file.
|
||||
file=~/.launch-bristol
|
||||
|
||||
# This is more complex than it should be, because kdialog's --default
|
||||
# option requires the *text* of the selected item (e.g. 'moog mini'),
|
||||
# but kdialog doesn't print this text (it prints the ID of the option,
|
||||
# e.g. '-mini'). So this script greps itself to find the item text
|
||||
# that goes with the saved item ID.
|
||||
if [ -e $file ]; then
|
||||
dflt="$( cat $file )"
|
||||
dflttxt="$( grep "^ $dflt" $0 | cut -d"'" -f2 )"
|
||||
else
|
||||
dflttxt='hammond B3 (default)'
|
||||
fi
|
||||
|
||||
# Try to center the window. Unfortunately kdialog's not smart enough
|
||||
# to auto-size, I have to hardcode a width and height to avoid having
|
||||
# a tiny window that requires a ton of scrolling. Also I have no idea
|
||||
# how (or if) the font and font-size are chosen...
|
||||
xpos=0; ypos=0
|
||||
width=400; height=800
|
||||
x="$( xwininfo -root | grep Width | sed 's,.* ,,' )"
|
||||
y="$( xwininfo -root | grep Height | sed 's,.* ,,' )"
|
||||
if [ "$x" -gt "$width" -a "$y" -gt "$height" ]; then
|
||||
xpos=$(( $x / 2 - $width / 2 ))
|
||||
ypos=$(( $y / 2 - $height / 2 ))
|
||||
fi
|
||||
|
||||
# The list of synths came from "startBristol --help".
|
||||
kdialog --title 'Bristol Launcher' --menu 'Select Synth Emulation' \
|
||||
--geometry ${width}x${height}+${xpos}+${ypos} \
|
||||
--default "$dflttxt" -- \
|
||||
-b3 'hammond B3 (default)' \
|
||||
-mini 'moog mini' \
|
||||
-explorer 'moog voyager' \
|
||||
-voyager 'moog voyager electric blue' \
|
||||
-memory 'moog memory' \
|
||||
-sonic6 'moog sonic 6' \
|
||||
-mg1 'moog/realistic mg-1 concertmate' \
|
||||
-hammond 'hammond module (deprecated, use -b3)' \
|
||||
-prophet 'sequential circuits prophet-5' \
|
||||
-pro52 'sequential circuits prophet-5/fx' \
|
||||
-pro10 'sequential circuits prophet-10' \
|
||||
-pro1 'sequential circuits pro-one' \
|
||||
-rhodes 'fender rhodes mark-I stage 73' \
|
||||
-rhodesbass 'fender rhodes bass piano' \
|
||||
-roadrunner 'crumar roadrunner electric piano' \
|
||||
-bitone 'crumar bit 01' \
|
||||
-bit99 'crumar bit 99' \
|
||||
-bit100 'crumar bit + mods' \
|
||||
-stratus 'crumar stratus synth/organ combo' \
|
||||
-trilogy 'crumar trilogy synth/organ/string combo' \
|
||||
-obx 'oberheim OB-X' \
|
||||
-obxa 'oberheim OB-Xa' \
|
||||
-axxe 'arp axxe' \
|
||||
-odyssey 'arp odyssey' \
|
||||
-arp2600 'arp 2600' \
|
||||
-solina 'arp/solina string ensemble' \
|
||||
-polysix 'korg polysix' \
|
||||
-poly800 'korg poly-800' \
|
||||
-monopoly 'korg mono/poly' \
|
||||
-ms20 'korg ms20 (unfinished: -libtest only)' \
|
||||
-vox 'vox continental' \
|
||||
-voxM2 'vox continental super/300/II' \
|
||||
-juno 'roland juno-60' \
|
||||
-jupiter 'roland jupiter-8' \
|
||||
-bme700 'baumann bme-700' \
|
||||
-bm 'bristol bassmaker sequencer' \
|
||||
-dx 'yamaha dx-7' \
|
||||
-cs80 'yamaha cs-80 (unfinished)' \
|
||||
-sidney 'commodore-64 SID chip synth' \
|
||||
-melbourne 'commodore-64 SID polysynth (unfinished)' \
|
||||
-granular 'granular synthesiser (unfinished)' \
|
||||
-aks 'ems synthi-a (unfinished)' \
|
||||
-mixer '16 track mixer (unfinished: -libtest only)' \
|
||||
> $file.new
|
||||
|
||||
opt="$( cat $file.new )"
|
||||
if [ "$opt" = "" ]; then
|
||||
rm -f $file.new
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mv $file.new $file
|
||||
if [ "$1" = "--fake" ]; then
|
||||
echo "exec startBristol -jack $opt"
|
||||
else
|
||||
exec startBristol -jack $opt
|
||||
fi
|
Loading…
Reference in New Issue