summaryrefslogtreecommitdiff
path: root/audio/portmidi/portmidi.SlackBuild
diff options
context:
space:
mode:
authorDavid Woodfall <info@davidwoodfall.co.uk>2010-10-17 20:37:54 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-10-17 20:17:23 -0500
commit36b13e8cdca126de226658052253c53596447386 (patch)
tree8ceb12e9143addd00f14885689c6f1cb07b01669 /audio/portmidi/portmidi.SlackBuild
parent9e485e37910caccec3dd62a6fa4191ed41b51c71 (diff)
downloadslackbuilds-36b13e8cdca126de226658052253c53596447386.tar.gz
audio/portmidi: Various script cleanups.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'audio/portmidi/portmidi.SlackBuild')
-rw-r--r--audio/portmidi/portmidi.SlackBuild28
1 files changed, 13 insertions, 15 deletions
diff --git a/audio/portmidi/portmidi.SlackBuild b/audio/portmidi/portmidi.SlackBuild
index e83e8efce6..0ca202fe3a 100644
--- a/audio/portmidi/portmidi.SlackBuild
+++ b/audio/portmidi/portmidi.SlackBuild
@@ -22,9 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Modified by SlackBuilds.org
+
PRGNAM=portmidi
VERSION=${VERSION:-200}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
@@ -75,41 +77,37 @@ find . \
# Fix the libjvm.so path. This is *really* only needed on x86_64, but fixing
# it on both arches looks prettier :-) --rworkman
sed "s%@LIBDIR@%/usr/lib${LIBDIRSUFFIX}%" $CWD/fixup_java_path.diff | patch --verbose -p1
+# cmake install dir & 64 bit fixes
+patch -p1 -i $CWD/portmidi-cmake.patch
cmake . \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_CACHEFILE_DIR=$PKG \
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY="$PKG/usr/lib$LIBDIRSUFFIX" \
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="$PKG/usr/lib$LIBDIRSUFFIX" \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$PKG/usr/bin \
-DJAVA_AWT_INCLUDE_PATH="/usr/lib$LIBDIRSUFFIX/java/include" \
-DJAVA_INCLUDE_PATH="/usr/lib$LIBDIRSUFFIX/java/include" \
-DJAVA_INCLUDE_PATH2="/usr/lib$LIBDIRSUFFIX/java/include/linux" \
-DJAVA_JVM_LIBRARY="/usr/lib$LIBDIRSUFFIX/libjvm.so"
-patch --verbose -p1 < $CWD/portmidi-shared.diff
-
-# Fixup for hardcoded usr/local
-find . \( -name cmake_install.cmake -o -name CMakeLists.txt -o -name Makefile \) \
- -exec sed -i 's%/local%%g' '{}' \;
+make \
+ CFLAGS="-fPIC" \
+ PMFLAGS="-DNEWBUFFER" \
+ all
-make all CFLAGS="-fPIC" PMFLAGS="-DNEWBUFFER"
make install DESTDIR=$PKG
-rm -f $PKG/usr/lib/libportmidi_s.a
+
+rm -f $PKG/usr/lib$LIBDIRSUFFIX/libportmidi_s.a
# I think this may cause problems unless it's renamed
mv $PKG/usr/bin/test $PKG/usr/bin/portmiditest
-# Pinched from fc spec
install -m 0644 -D pm_common/pmutil.h $PKG/usr/include
-mkdir -p $PKG/usr/share/applications
install -m 0644 -D $CWD/pmdefaults.desktop $PKG/usr/share/applications/pmdefaults.desktop
-mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
install -m 0644 -D pm_java/pmdefaults/pmdefaults-icon.png \
- $PKG/usr/share/icons/hicolor/128x128/apps/pmdefaults-icon.png
+ $PKG/usr/share/icons/hicolor/128x128/apps/pmdefaults-icon.png
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true