diff options
author | David Woodfall <info@davidwoodfall.co.uk> | 2010-10-17 20:37:54 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-10-17 20:17:23 -0500 |
commit | 36b13e8cdca126de226658052253c53596447386 (patch) | |
tree | 8ceb12e9143addd00f14885689c6f1cb07b01669 /audio | |
parent | 9e485e37910caccec3dd62a6fa4191ed41b51c71 (diff) |
audio/portmidi: Various script cleanups.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/portmidi/portmidi-cmake.diff | 97 | ||||
-rw-r--r-- | audio/portmidi/portmidi-cmake.patch | 55 | ||||
-rw-r--r-- | audio/portmidi/portmidi-shared.diff | 68 | ||||
-rw-r--r-- | audio/portmidi/portmidi.SlackBuild | 28 | ||||
-rw-r--r-- | audio/portmidi/portmidi.info | 2 |
5 files changed, 69 insertions, 181 deletions
diff --git a/audio/portmidi/portmidi-cmake.diff b/audio/portmidi/portmidi-cmake.diff deleted file mode 100644 index e677d6e84f63e..0000000000000 --- a/audio/portmidi/portmidi-cmake.diff +++ /dev/null @@ -1,97 +0,0 @@ -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-cmake.patch b/audio/portmidi/portmidi-cmake.patch new file mode 100644 index 0000000000000..7c5f772f453c5 --- /dev/null +++ b/audio/portmidi/portmidi-cmake.patch @@ -0,0 +1,55 @@ +diff -U 3 -H -d -r -N -- portmidi-old/pm_common/CMakeLists.txt portmidi/pm_common/CMakeLists.txt +--- portmidi-old/pm_common/CMakeLists.txt 2009-11-20 07:18:06.000000000 +0100 ++++ portmidi/pm_common/CMakeLists.txt 2010-10-17 20:02:53.278000042 +0200 +@@ -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${LIB_SUFFIX} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + # .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 -U 3 -H -d -r -N -- portmidi-old/pm_dylib/CMakeLists.txt portmidi/pm_dylib/CMakeLists.txt +--- portmidi-old/pm_dylib/CMakeLists.txt 2009-11-20 06:41:09.000000000 +0100 ++++ portmidi/pm_dylib/CMakeLists.txt 2010-10-17 20:02:53.279000042 +0200 +@@ -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${LIB_SUFFIX}") + 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${LIB_SUFFIX} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h +- DESTINATION /usr/local/include) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include) + endif(UNIX) +diff -U 3 -H -d -r -N -- portmidi-old/pm_java/CMakeLists.txt portmidi/pm_java/CMakeLists.txt +--- portmidi-old/pm_java/CMakeLists.txt 2009-11-04 16:20:44.000000000 +0100 ++++ portmidi/pm_java/CMakeLists.txt 2010-10-17 20:10:46.411000043 +0200 +@@ -39,9 +39,9 @@ + + # install the libraries (Linux only) + INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar +- DESTINATION /usr/share/java) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/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 --git a/audio/portmidi/portmidi-shared.diff b/audio/portmidi/portmidi-shared.diff deleted file mode 100644 index f706744ea619f..0000000000000 --- a/audio/portmidi/portmidi-shared.diff +++ /dev/null @@ -1,68 +0,0 @@ -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 e83e8efce6b51..0ca202fe3aeaf 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 diff --git a/audio/portmidi/portmidi.info b/audio/portmidi/portmidi.info index 1e6752845a143..48a3f318bc9e3 100644 --- a/audio/portmidi/portmidi.info +++ b/audio/portmidi/portmidi.info @@ -7,4 +7,4 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="David Woodfall" EMAIL="info@davidwoodfall.co.uk" -APPROVED="rworkman" +APPROVED="pprkut" |