1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
#!/bin/bash
# Slackware build script for rakarrack
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20250807 bkw: BUILD=2, fix compile with fltk-1.4.
# 20241206 bkw:
# - update for last git commit, 0.6.2+20150813_a620840.
# - add some patches, including one that fixes a segfault on startup.
# apparently, the previous version has segfaulted on startup ever
# since Slackware 15.0 came out, and nobody mentioned it (and I
# haven't used rakarrack in a while either).
# - add SSE=no option.
# - touch up README and slack-desc (mention guitar).
# 20211205 bkw: BUILD=3, new-style icons.
# 20140114 bkw: add 64-bit distortion fix and setcap stuff.
# 20151126 bkw: fix build on -current, preparing for 14.2.
# Note: Please don't remove this from the repo just because it's
# no longer maintained upstream. It's useful, it works, it makes
# interesting sounds, and some of us actually use it.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rakarrack
VERSION=${VERSION:-0.6.2+20150813_a620840}
COMMIT=${COMMIT:-a6208406d94a1da978f435605072ee5caefe1491}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -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
set -e
SRC=$PRGNAM-git-$COMMIT
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRC
unzip $CWD/$SRC.zip
cd $SRC
chown -R root:root .
# 20250807 bkw: someone forgot to include a fltk header, I dunno if this
# was considered OK in fltk-1.3 or if it just happened to work, but it
# has to be explicit now:
sed -i '/Fl_PNG_Image/a#include <FL/Fl_Shared_Image.H>' src/rakarrack.h
# 20241206 bkw: Every file is +x, do not revert to template.
find . -type f -a -exec chmod 644 {} + -o -type d -a -exec chmod 755 {} +
# 20241206 bkw: patches mostly came from AUR and Debian.
# format-security.diff had to be reworked (some of it had been applied
# upstream, but not all), and 64bit_distortion.diff comes from:
# http://sourceforge.net/p/rakarrack/discussion/778862/thread/e9559a34/
for i in $CWD/patches/*; do
echo "===> applying $( basename $i )"
patch -p1 < $i
done
autoreconf -if
# 20241207 bkw: Normally, it autodetects SSE and SSE2. Allow SSE=no
# to disable them both. Not sure why anyone in 2025 wants to run this
# on a box that's old enough to not support SSE... This option is
# provided for building on a box *with* SSE/SSE2, for deployment on a
# box that lacks it.
# Setting SSE to a non-empty value in configure's env is required, to
# make the --disable-sse --disable-sse2 work. No idea why; found this
# in the debian/rules file, and it works.
if [ "${SSE:-yes}" = "no" ]; then
OPTS="--disable-sse --disable-sse2"
SSE=" "
else
SSE=""
fi
# 20241207 bkw: --enable-docdir makes it look in --docdir for the
# HTML help files; otherwise, it looks in /usr/share/doc/rakarrack/,
# and doesn't find them.
SSE="$SSE" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
$OPTS \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--enable-docdir \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
gzip $PKG/usr/man/man?/*.?
# 20241206 bkw: Upstream now installs icons, but there's no 48x48 one,
# which is still the standard for /usr/share/pixmaps.
mkdir -p $PKG/usr/share/{icons/hicolor/48x48/apps,pixmaps}
convert -resize 48x48 \
icons/icono_rakarrack_128x128.png \
$PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
ln -s ../../share/licenses/$PRGNAM/COPYING $PKGDOC/COPYING
# 20241207 bkw: Record in the slack-desc whether SSE/SSE2 are required.
WITHSSE="does not require SSE or SSE2"
grep -q -- -mfpmath=sse config.status && WITHSSE="requires SSE"
grep -q -- -msse2 config.status && WITHSSE="requires SSE and SSE2"
mkdir -p $PKG/install
sed "s,@WITHSSE@,$WITHSSE," < $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# 20241207 bkw: Only the rakarrack binary needs setcap in doinst.sh.
# The others (rakverb, rakconvert, etc) are file format conversion
# tools, and don't play audio via jack even though they're linked with
# libjack.
# Only add capability stuff if not disabled:
if [ "${SETCAP:-yes}" = "yes" ]; then
cat $CWD/setcap.sh >> $PKG/install/doinst.sh
# Only allow execution by audio group
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
|