wok-next rev 6917

Added portmidi. Needed for mixxx.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Oct 22 05:08:14 2010 +0000 (2010-10-22)
parents 5d1cf327756e
children 7d8bcdc389d3
files portmidi/receipt portmidi/stuff/portmidi-217-Makefile.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/portmidi/receipt	Fri Oct 22 05:08:14 2010 +0000
     1.3 @@ -0,0 +1,46 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="portmidi"
     1.7 +VERSION="217"
     1.8 +CATEGORY="multimedia"
     1.9 +SHORT_DESC="Platform Independent Library for MIDI I/O"
    1.10 +MAINTAINER="slaxemulator@gmail.com"
    1.11 +DEPENDS="alsa-lib"
    1.12 +BUILD_DEPENDS="alsa-lib-dev cmake"
    1.13 +TARBALL="$PACKAGE-src-$VERSION.zip"
    1.14 +WEB_SITE="http://portmedia.sourceforge.net/portmidi/"
    1.15 +WGET_URL="$SF_MIRROR/portmedia/$PACKAGE/$VERSION/$TARBALL"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +compile_rules()
    1.19 +{
    1.20 +	src=$WOK/$PACKAGE/$PACKAGE
    1.21 +	cd $src
    1.22 +	patch -Np1 -i ../stuff/portmidi-217-Makefile.patch
    1.23 +
    1.24 +	 # Prefix Fix
    1.25 +	sed -i "s_\(/usr\)/local_\1_" \
    1.26 +	*/CMakeLists.txt \
    1.27 +	pm_python/setup.py
    1.28 +
    1.29 +	 # Installation Fix
    1.30 +	#mkdir -p pm_java/Release
    1.31 +
    1.32 +	 # CMake configuration
    1.33 +	cmake . \
    1.34 +	-DCMAKE_INSTALL_PREFIX=/usr \
    1.35 +	-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release \
    1.36 +	-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release \
    1.37 +	-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release
    1.38 +
    1.39 +	make && make DESTDIR=$PWD/_pkg install
    1.40 +}
    1.41 +
    1.42 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.43 +genpkg_rules()
    1.44 +{
    1.45 +	_pkg=$WOK/$PACKAGE/$PACKAGE/_pkg
    1.46 +	mkdir -p $fs/usr
    1.47 +	cp -a $_pkg/usr/* $fs/usr
    1.48 +}
    1.49 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/portmidi/stuff/portmidi-217-Makefile.patch	Fri Oct 22 05:08:14 2010 +0000
     2.3 @@ -0,0 +1,77 @@
     2.4 +diff -Naur portmidi/CMakeLists.txt portmidi_patched/CMakeLists.txt
     2.5 +--- portmidi/CMakeLists.txt	2010-09-20 12:57:48.000000000 -0700
     2.6 ++++ portmidi_patched/CMakeLists.txt	2010-10-18 11:56:28.000000000 -0700
     2.7 +@@ -73,5 +73,4 @@
     2.8 + add_subdirectory(pm_dylib)
     2.9 + 
    2.10 + # Cannot figure out how to make an xcode Java application with CMake
    2.11 +-add_subdirectory(pm_java)
    2.12 + 
    2.13 +diff -Naur portmidi/pm_common/CMakeLists.txt portmidi_patched/pm_common/CMakeLists.txt
    2.14 +--- portmidi/pm_common/CMakeLists.txt	2010-09-20 12:57:48.000000000 -0700
    2.15 ++++ portmidi_patched/pm_common/CMakeLists.txt	2010-10-18 11:57:21.000000000 -0700
    2.16 +@@ -67,14 +67,6 @@
    2.17 +     message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT})
    2.18 +   else(APPLE)
    2.19 +     # LINUX settings...
    2.20 +-    include(FindJNI)
    2.21 +-    message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH})
    2.22 +-    message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH})
    2.23 +-    message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2})
    2.24 +-    message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY})
    2.25 +-    set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
    2.26 +-    # libjvm.so is found relative to JAVA_INCLUDE_PATH:
    2.27 +-    set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so)
    2.28 + 
    2.29 +     set(LINUXSRC pmlinuxalsa pmlinux finddefault)
    2.30 +     prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
    2.31 +@@ -99,7 +91,6 @@
    2.32 +     set(PM_NEEDED_LIBS winmm.lib)
    2.33 +   endif(WIN32)
    2.34 + endif(UNIX)
    2.35 +-set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY})
    2.36 + 
    2.37 + # this completes the list of library sources by adding shared code
    2.38 + list(APPEND LIBSRC pmutil portmidi)
    2.39 +@@ -110,18 +101,10 @@
    2.40 + target_link_libraries(portmidi-static ${PM_NEEDED_LIBS})
    2.41 + 
    2.42 + # define the jni library
    2.43 +-include_directories(${JAVA_INCLUDE_PATHS})
    2.44 + 
    2.45 +-set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c)
    2.46 +-add_library(pmjni SHARED ${JNISRC})
    2.47 +-target_link_libraries(pmjni ${JNI_EXTRA_LIBS})
    2.48 +-set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib")
    2.49 + 
    2.50 + # install the libraries (Linux and Mac OS X command line)
    2.51 + if(UNIX)
    2.52 +-  INSTALL(TARGETS portmidi-static pmjni
    2.53 +-    LIBRARY DESTINATION /usr/local/lib
    2.54 +-    ARCHIVE DESTINATION /usr/local/lib)
    2.55 + # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here
    2.56 + #  INSTALL(FILES portmidi.h ../porttime/porttime.h
    2.57 + #    DESTINATION /usr/local/include)
    2.58 +diff -Naur portmidi/pm_dylib/CMakeLists.txt portmidi_patched/pm_dylib/CMakeLists.txt
    2.59 +--- portmidi/pm_dylib/CMakeLists.txt	2009-11-19 21:41:09.000000000 -0800
    2.60 ++++ portmidi_patched/pm_dylib/CMakeLists.txt	2010-10-18 11:58:16.000000000 -0700
    2.61 +@@ -63,7 +63,6 @@
    2.62 +     message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT})
    2.63 +   else(APPLE)
    2.64 +     # LINUX settings...
    2.65 +-    include(FindJNI)
    2.66 +     # message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH})
    2.67 +     # message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH})
    2.68 +     # note: should use JAVA_JVM_LIB_PATH, but it is not set properly
    2.69 +@@ -75,11 +74,7 @@
    2.70 +     # JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH
    2.71 +     # and JAVA_INCLUDE_PATH2 set by user (will need clear documentation
    2.72 +     # because JAVA_INCLUDE_PATH2 is pretty obscure)
    2.73 +-    set(JAVA_INCLUDE_PATH  ${JAVA_INCLUDE_PATH-UNKNOWN}
    2.74 +-        CACHE STRING "where to find Java SDK include directory")
    2.75 +-    set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux)
    2.76 +     # libjvm.so is found relative to JAVA_INCLUDE_PATH:
    2.77 +-    set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so)
    2.78 + 
    2.79 +     set(LINUXSRC pmlinuxalsa pmlinux finddefault)
    2.80 +     prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})