aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodfall <info@davidwoodfall.co.uk>2010-03-03 14:12:07 -0600
committerErik Hanson <erik@slackbuilds.org>2010-05-13 13:22:17 +0200
commit2b78b21360d951a5995ef5a5c1f5b82613be5577 (patch)
treea1226caa851772c012e1eab65b5fb3d25f5575eb
parentc3e85e72a79b3cddadd6b2d1ec5903ebc05d92a3 (diff)
audio/portmidi: Updated for version 200.
-rw-r--r--audio/portmidi/pmdefaults.desktop13
-rw-r--r--audio/portmidi/portmidi-cmake.diff97
-rw-r--r--audio/portmidi/portmidi-shared.diff68
-rw-r--r--audio/portmidi/portmidi.SlackBuild44
-rw-r--r--audio/portmidi/portmidi.info10
-rw-r--r--audio/portmidi/slack-desc2
6 files changed, 213 insertions, 21 deletions
diff --git a/audio/portmidi/pmdefaults.desktop b/audio/portmidi/pmdefaults.desktop
new file mode 100644
index 0000000000000..175d89f7314a0
--- /dev/null
+++ b/audio/portmidi/pmdefaults.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Comment=Set default input and output devices for PortMidi
+Exec=pmdefaults
+GenericName=PortMidi Settings
+Icon=/usr/share/icons/hicolor/128x128/apps/pmdefaults-icon.png
+Name=PM Defaults
+NoDisplay=false
+StartupNotify=true
+Terminal=0
+TerminalOptions=
+Type=Application
+X-KDE-SubstituteUID=false
+X-KDE-Username=
diff --git a/audio/portmidi/portmidi-cmake.diff b/audio/portmidi/portmidi-cmake.diff
new file mode 100644
index 0000000000000..e677d6e84f63e
--- /dev/null
+++ b/audio/portmidi/portmidi-cmake.diff
@@ -0,0 +1,97 @@
+diff -rupN portmidi.old/pm_common/CMakeLists.txt portmidi.new/pm_common/CMakeLists.txt
+--- portmidi.old/pm_common/CMakeLists.txt 2009-11-20 01:18:06.000000000 -0500
++++ portmidi.new/pm_common/CMakeLists.txt 2010-01-30 00:22:50.000000000 -0500
+@@ -72,11 +72,7 @@ if(UNIX)
+ # JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH
+ # and JAVA_INCLUDE_PATH2 set by user (will need clear documentation
+ # because JAVA_INCLUDE_PATH2 is pretty obscure)
+- set(JAVA_INCLUDE_PATH ${JAVA_INCLUDE_PATH-UNKNOWN}
+- CACHE STRING "where to find Java SDK include directory")
+- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux)
+- # libjvm.so is found relative to JAVA_INCLUDE_PATH:
+- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so)
++ set(JAVAVM_LIB ${JAVA_JVM_LIBRARY})
+
+ set(LINUXSRC pmlinuxalsa pmlinux finddefault)
+ prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
+@@ -125,9 +121,9 @@ set_target_properties(pmjni PROPERTIES E
+ # install the libraries (Linux and Mac OS X command line)
+ if(UNIX)
+ INSTALL(TARGETS portmidi-static pmjni
+- LIBRARY DESTINATION /usr/local/lib
+- ARCHIVE DESTINATION /usr/local/lib)
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+ # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here
+ # INSTALL(FILES portmidi.h ../porttime/porttime.h
+-# DESTINATION /usr/local/include)
++# DESTINATION ${INCLUDE_INSTALL_DIR})
+ endif(UNIX)
+diff -rupN portmidi.old/pm_dylib/CMakeLists.txt portmidi.new/pm_dylib/CMakeLists.txt
+--- portmidi.old/pm_dylib/CMakeLists.txt 2009-11-20 00:41:09.000000000 -0500
++++ portmidi.new/pm_dylib/CMakeLists.txt 2010-01-30 00:26:15.000000000 -0500
+@@ -59,7 +59,7 @@ if(UNIX)
+
+ set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework")
+ set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers)
+- set(INSTALL_NAME_DIR "/usr/local/lib")
++ set(INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
+ message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT})
+ else(APPLE)
+ # LINUX settings...
+@@ -75,11 +75,7 @@ if(UNIX)
+ # JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH
+ # and JAVA_INCLUDE_PATH2 set by user (will need clear documentation
+ # because JAVA_INCLUDE_PATH2 is pretty obscure)
+- set(JAVA_INCLUDE_PATH ${JAVA_INCLUDE_PATH-UNKNOWN}
+- CACHE STRING "where to find Java SDK include directory")
+- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux)
+- # libjvm.so is found relative to JAVA_INCLUDE_PATH:
+- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so)
++ set(JAVAVM_LIB ${JAVA_JVM_LIBRARY})
+
+ set(LINUXSRC pmlinuxalsa pmlinux finddefault)
+ prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
+@@ -114,14 +110,14 @@ prepend_path(SHARED_PATHS ../pm_common/
+ list(APPEND LIBSRC ${SHARED_PATHS})
+
+ add_library(portmidi-dynamic SHARED ${LIBSRC})
+-set_target_properties(portmidi-dynamic PROPERTIES OUTPUT_NAME "portmidi")
++set_target_properties(portmidi-dynamic PROPERTIES LINK_FLAGS "-L${CMAKE_CACHEFILE_DIR}/Release" SOVERSION 0 VERSION 0.${VERSION} OUTPUT_NAME "portmidi")
+ target_link_libraries(portmidi-dynamic ${PM_NEEDED_LIBS})
+
+ # install the libraries (Linux and Mac OS X command line)
+ if(UNIX)
+ INSTALL(TARGETS portmidi-dynamic
+- LIBRARY DESTINATION /usr/local/lib
+- ARCHIVE DESTINATION /usr/local/lib)
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+ INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
+- DESTINATION /usr/local/include)
++ DESTINATION ${INCLUDE_INSTALL_DIR})
+ endif(UNIX)
+diff -rupN portmidi.old/pm_java/CMakeLists.txt portmidi.new/pm_java/CMakeLists.txt
+--- portmidi.old/pm_java/CMakeLists.txt 2009-11-04 10:20:44.000000000 -0500
++++ portmidi.new/pm_java/CMakeLists.txt 2010-01-30 00:28:35.000000000 -0500
+@@ -41,7 +41,7 @@ if(UNIX)
+ INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar
+ DESTINATION /usr/share/java)
+ INSTALL(PROGRAMS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults
+- DESTINATION /usr/local/bin)
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+ endif(APPLE)
+ endif(UNIX)
+ # In windows, use pm_java/make.bat
+diff -rupN portmidi.old/pm_test/CMakeLists.txt portmidi.new/pm_test/CMakeLists.txt
+--- portmidi.old/pm_test/CMakeLists.txt 2009-11-04 10:20:44.000000000 -0500
++++ portmidi.new/pm_test/CMakeLists.txt 2010-01-30 00:41:56.000000000 -0500
+@@ -12,7 +12,7 @@ endif(WIN32)
+
+ macro(make_a_test name)
+ add_executable(${name} ${name}.c)
+- target_link_libraries(${name} portmidi-static ${PM_NEEDED_LIBS})
++ target_link_libraries(${name} portmidi-dynamic ${PM_NEEDED_LIBS})
+ endmacro(make_a_test)
+
+ make_a_test(test)
diff --git a/audio/portmidi/portmidi-shared.diff b/audio/portmidi/portmidi-shared.diff
new file mode 100644
index 0000000000000..a6e7222f02b31
--- /dev/null
+++ b/audio/portmidi/portmidi-shared.diff
@@ -0,0 +1,68 @@
+diff -Naur portmidi-orig/pm_common/CMakeLists.txt portmidi/pm_common/CMakeLists.txt
+--- portmidi-orig/pm_common/CMakeLists.txt 2009-11-20 06:18:06.000000000 +0000
++++ portmidi/pm_common/CMakeLists.txt 2010-02-27 00:43:32.000000000 +0000
+@@ -125,9 +125,9 @@
+ # install the libraries (Linux and Mac OS X command line)
+ if(UNIX)
+ INSTALL(TARGETS portmidi-static pmjni
+- LIBRARY DESTINATION /usr/local/lib
+- ARCHIVE DESTINATION /usr/local/lib)
++ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+ # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here
+ # INSTALL(FILES portmidi.h ../porttime/porttime.h
+-# DESTINATION /usr/local/include)
++# DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
+ endif(UNIX)
+diff -Naur portmidi-orig/pm_dylib/CMakeLists.txt portmidi/pm_dylib/CMakeLists.txt
+--- portmidi-orig/pm_dylib/CMakeLists.txt 2009-11-20 05:41:09.000000000 +0000
++++ portmidi/pm_dylib/CMakeLists.txt 2010-02-27 00:43:32.000000000 +0000
+@@ -59,7 +59,7 @@
+
+ set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework")
+ set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers)
+- set(INSTALL_NAME_DIR "/usr/local/lib")
++ set(INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT})
+ else(APPLE)
+ # LINUX settings...
+@@ -120,8 +120,8 @@
+ # install the libraries (Linux and Mac OS X command line)
+ if(UNIX)
+ INSTALL(TARGETS portmidi-dynamic
+- LIBRARY DESTINATION /usr/local/lib
+- ARCHIVE DESTINATION /usr/local/lib)
++ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
+- DESTINATION /usr/local/include)
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
+ endif(UNIX)
+diff -Naur portmidi-orig/pm_java/CMakeLists.txt portmidi/pm_java/CMakeLists.txt
+--- portmidi-orig/pm_java/CMakeLists.txt 2009-11-04 15:20:44.000000000 +0000
++++ portmidi/pm_java/CMakeLists.txt 2010-02-27 00:43:32.000000000 +0000
+@@ -41,7 +41,7 @@
+ INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar
+ DESTINATION /usr/share/java)
+ INSTALL(PROGRAMS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults
+- DESTINATION /usr/local/bin)
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+ endif(APPLE)
+ endif(UNIX)
+ # In windows, use pm_java/make.bat
+diff -Naur portmidi-orig/pm_linux/Makefile portmidi/pm_linux/Makefile
+--- portmidi-orig/pm_linux/Makefile 2009-01-20 04:01:54.000000000 +0000
++++ portmidi/pm_linux/Makefile 2010-02-27 00:42:47.000000000 +0000
+@@ -147,10 +147,10 @@
+ cd pm_java; chmod +x pmdefaults/pmdefaults
+
+ install:
+- cp pm_java/pmjni/libpmjni.so /usr/local/lib
++ cp pm_java/pmjni/libpmjni.so ${CMAKE_INSTALL_PREFIX}/lib
+ cp pm_java/pmdefaults.jar /usr/share/java
+ # do not chmod +x here since we are probably root
+- cp pm_java/pmdefaults/pmdefaults /usr/local/bin
++ cp pm_java/pmdefaults/pmdefaults ${CMAKE_INSTALL_PREFIX}/bin
+
+ clean:
+ rm -f *.o *~ core* */*.o */*.so */*~ */core* pm_test/*/pm_dll.dll
diff --git a/audio/portmidi/portmidi.SlackBuild b/audio/portmidi/portmidi.SlackBuild
index 22f51979efa87..b47655c882950 100644
--- a/audio/portmidi/portmidi.SlackBuild
+++ b/audio/portmidi/portmidi.SlackBuild
@@ -21,18 +21,16 @@
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. FURTHERMORE I AM NOT LIABLE IF
-# YOUR DATA IS DESTROYED, YOUR HOUSE BURNS DOWN OR YOUR DOG RUNS OFF.
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Thanks to Camarade_Tux, Fire|Bird, and Metrofox for their assistance in
# getting the 64 bit build to work, and for putting up with constant cries
# for help ;-)
-
PRGNAM=portmidi
-VERSION=${VERSION:-184}
+VERSION=${VERSION:-200}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -51,10 +49,10 @@ elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
fi
-set -e
+set -e
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $TMP $PKG/usr/lib$LIBDIRSUFFIX $OUTPUT
cd $TMP
rm -rf $PRGNAM
unzip $CWD/$PRGNAM-src-$VERSION.zip
@@ -74,16 +72,32 @@ sed "s%@LIBDIR@%/usr/lib${LIBDIRSUFFIX}%" $CWD/fixup_java_path.diff | patch -p1
cmake . \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX="/usr"
-
-make
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_CACHEFILE_DIR=$PKG \
+ -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY="$PKG/usr/lib$LIBDIRSUFFIX" \
+ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="$PKG/usr/lib$LIBDIRSUFFIX" \
+ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$PKG/usr/bin
+
+patch -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 -j1 all CFLAGS="-fPIC" PMFLAGS="-DNEWBUFFER"
make install DESTDIR=$PKG
+rm -f $PKG/usr/lib/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 644 pm_common/pmutil.h $PKG/usr/include
+mkdir -p $PKG/usr/share/applications
+install -m 644 $CWD/pmdefaults.desktop $PKG/usr/share/applications
-# Apparently that PREFIX="/usr" above was ignored... no surprise, I guess,
-# considering the fact that pretty much everything else is hardcoded badly
-mv $PKG/usr/local/{bin,include,lib} $PKG/usr
-rm -rf $PKG/usr/local
-[ "$ARCH" = "x86_64" ] && mv $PKG/usr/lib $PKG/usr/lib64
+mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
+install -m 644 pm_java/pmdefaults/pmdefaults-icon.png $PKG/usr/share/icons/hicolor/128x128/apps
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
diff --git a/audio/portmidi/portmidi.info b/audio/portmidi/portmidi.info
index ff90ce0054482..082988d8ebf0a 100644
--- a/audio/portmidi/portmidi.info
+++ b/audio/portmidi/portmidi.info
@@ -1,10 +1,10 @@
PRGNAM="portmidi"
-VERSION="184"
+VERSION="200"
HOMEPAGE="http://portmedia.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/project/portmedia/portmidi/184/portmidi-src-184.zip"
-MD5SUM="6d242a5cfe802cace10af733c185d1b6"
+DOWNLOAD="http://downloads.sourceforge.net/project/portmedia/portmidi/200/portmidi-src-200.zip"
+MD5SUM="26053a105d938395227bb6ae1d78643b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="David Woodfall"
-EMAIL="dave@unrealize.co.uk"
-APPROVED="rworkman"
+EMAIL="info@davidwoodfall.co.uk"
+APPROVED="Erik Hanson"
diff --git a/audio/portmidi/slack-desc b/audio/portmidi/slack-desc
index af8b171e821f5..b50b36f161b72 100644
--- a/audio/portmidi/slack-desc
+++ b/audio/portmidi/slack-desc
@@ -13,7 +13,7 @@ portmidi: of MIDI data.
portmidi:
portmidi: PortMidi is part of the PortMusic project.
portmidi:
-portmidi:
+portmidi: Homepage: http://portmedia.sourceforge.net
portmidi:
portmidi:
portmidi: