libraries/rtmidi: Added (API for realtime MIDI).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-03-13 06:44:38 +07:00 committed by Willy Sudiarto Raharjo
parent e6b53ffde7
commit 740ec88e01
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 129 additions and 0 deletions

13
libraries/rtmidi/README Normal file
View file

@ -0,0 +1,13 @@
rtmidi (crossplatform realtime MIDI library)
RtMidi is a set of C++ classes (RtMidiIn, RtMidiOut, and API specific
classes) that provide a common API for realtime MIDI input/output
across Linux (ALSA, JACK), Macintosh OS X (CoreMIDI, JACK), and
Windows (Multimedia Library) operating systems. RtMidi significantly
simplifies the process of interacting with computer MIDI hardware and
software.
Optional dependency: jack (autodetected). If jack is installed when
rtmidi is built, rtmidi will be built with jack support. If you have
jack installed and don't want to build rtmidi jack support, export
JACK=no in the environment.

View file

@ -0,0 +1,87 @@
#!/bin/bash
# Slackware build script for rtmidi
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rtmidi
VERSION=${VERSION:-6.0.0}
BUILD=${BUILD:-1}
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"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
else
SLKCFLAGS="-O2"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
# Claims to need cmake-3.24, but our 3.21.4 worx fine. Upstream
# notified, no response yet.
sed -i '/cmake_minimum_required/s,3\.24,3.21.4,' CMakeLists.txt
[ "${JACK:-yes}" = "no" ] && JACKOPT="-DRTMIDI_API_JACK=OFF"
mkdir -p build
cd build
cmake \
$JACKOPT \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
cd ..
# This goes in the slack-desc.
WITHJACK="WITHOUT"
objdump -p build/librtmidi.so | grep -q 'NEEDED.*libjack' && WITHJACK="WITH"
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a LICENSE README* $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
sed "s,@WITHJACK@,$WITHJACK," < $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View file

@ -0,0 +1,10 @@
PRGNAM="rtmidi"
VERSION="6.0.0"
HOMEPAGE="https://github.com/thestk/rtmidi/"
DOWNLOAD="https://github.com/thestk/rtmidi/archive/6.0.0/rtmidi-6.0.0.tar.gz"
MD5SUM="5d15802402e4b8e26745c6b7da8b8575"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
rtmidi: rtmidi (crossplatform realtime MIDI library)
rtmidi:
rtmidi: RtMidi is a set of C++ classes (RtMidiIn, RtMidiOut, and API specific
rtmidi: classes) that provide a common API for realtime MIDI input/output
rtmidi: across Linux (ALSA, JACK), Macintosh OS X (CoreMIDI, JACK), and
rtmidi: Windows (Multimedia Library) operating systems. RtMidi significantly
rtmidi: simplifies the process of interacting with computer MIDI hardware and
rtmidi: software.
rtmidi:
rtmidi: This package is built @WITHJACK@ jack support.
rtmidi: