diff options
author | Tim Harder <radhermit@gentoo.org> | 2012-02-27 04:14:00 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2012-02-27 04:14:00 +0000 |
commit | 7d714bf799b9a7b8aa837f4ac6d7a2de14f8b4a7 (patch) | |
tree | b6de1940f1204e7a9d55476372d3ecc3e387d858 /media-libs/portmidi | |
parent | Stable for HPPA (bug #400493). (diff) | |
download | gentoo-2-7d714bf799b9a7b8aa837f4ac6d7a2de14f8b4a7.tar.gz gentoo-2-7d714bf799b9a7b8aa837f4ac6d7a2de14f8b4a7.tar.bz2 gentoo-2-7d714bf799b9a7b8aa837f4ac6d7a2de14f8b4a7.zip |
Initial import from sunrise (bug #90614, thanks to all contributors).
(Portage version: 2.2.0_alpha87/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/portmidi')
-rw-r--r-- | media-libs/portmidi/ChangeLog | 11 | ||||
-rw-r--r-- | media-libs/portmidi/Manifest | 6 | ||||
-rw-r--r-- | media-libs/portmidi/files/portmidi-217-cmake.patch | 318 | ||||
-rw-r--r-- | media-libs/portmidi/files/portmidi-217-python.patch | 25 | ||||
-rw-r--r-- | media-libs/portmidi/metadata.xml | 8 | ||||
-rw-r--r-- | media-libs/portmidi/portmidi-217.ebuild | 132 |
6 files changed, 500 insertions, 0 deletions
diff --git a/media-libs/portmidi/ChangeLog b/media-libs/portmidi/ChangeLog new file mode 100644 index 000000000000..0010a03d6107 --- /dev/null +++ b/media-libs/portmidi/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for media-libs/portmidi +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/portmidi/ChangeLog,v 1.1 2012/02/27 04:14:00 radhermit Exp $ + +*portmidi-217 (27 Feb 2012) + + 27 Feb 2012; Tim Harder <radhermit@gentoo.org> +portmidi-217.ebuild, + +files/portmidi-217-cmake.patch, +files/portmidi-217-python.patch, + +metadata.xml: + Initial import from sunrise (bug #90614, thanks to all contributors). + diff --git a/media-libs/portmidi/Manifest b/media-libs/portmidi/Manifest new file mode 100644 index 000000000000..16f5c0ab60f6 --- /dev/null +++ b/media-libs/portmidi/Manifest @@ -0,0 +1,6 @@ +AUX portmidi-217-cmake.patch 13124 RMD160 e90549f9eda7e0620f4d744a56d8ed73a19bcce8 SHA1 7fe10874ea8689e1ba51e8f50da38e79d10b76e1 SHA256 ac124aff85997f82556a29a752a1953c9501b6c70689559d3f29bda4ef35cd1e +AUX portmidi-217-python.patch 764 RMD160 2c3d47ffc0faa1336cc34ab50cdccd2c24855b68 SHA1 0dd19ce0171fd483e538458d9061f9dbad1089b9 SHA256 d9456d71f35792ecaffbf1251f4a92704be579fd411b10041b7d2e2bdd9f2f19 +DIST portmidi-src-217.zip 1030830 RMD160 f83aa8288063690ff60654fa291e2982ba637633 SHA1 f45bf4e247c0d7617deacd6a65d23d9fddae6117 SHA256 08e9a892bd80bdb1115213fb72dc29a7bf2ff108b378180586aa65f3cfd42e0f +EBUILD portmidi-217.ebuild 3078 RMD160 f9a16b186ee1fdd2fec9fc4ab1577e9d1bf59af7 SHA1 e223b59b4e9a649bfef68f2f1ce1af8c932db2f5 SHA256 0bf7c7fddf609457abdd664a22b1185c04b4cb2520ca2b5a1f19f3dee0f901f5 +MISC ChangeLog 379 RMD160 9cb848de85d37ee5bc8f57e913c1c2fd60257671 SHA1 cecb66b9aabb4ab9b2967481a82250b01285510b SHA256 b27d5506c52416bfc3625423e5e5e52137b2fcbac4761744b66a07a5851df455 +MISC metadata.xml 251 RMD160 4f300c9ca754c341781909f26f808374d079b2b5 SHA1 03dde846210a3c57c408aa86ee36551dd512e863 SHA256 18a09603378a33811622bcdecb5cd33b152f2b7c7d65e7291b4b564fc35c6560 diff --git a/media-libs/portmidi/files/portmidi-217-cmake.patch b/media-libs/portmidi/files/portmidi-217-cmake.patch new file mode 100644 index 000000000000..e741e6576f66 --- /dev/null +++ b/media-libs/portmidi/files/portmidi-217-cmake.patch @@ -0,0 +1,318 @@ +--- portmidi/CMakeLists.txt ++++ portmidi/CMakeLists.txt +@@ -9,12 +9,11 @@ + set(CMAKE_BUILD_TYPE Release CACHE STRING + "Semicolon-separate list of supported configuration types") + # set default directories but don't override cached values... +- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE} ++ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + CACHE STRING "libraries go here") +- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE} ++ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + CACHE STRING "libraries go here") +- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY +- ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE} ++ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + CACHE STRING "executables go here") + + else(UNIX) +@@ -68,10 +67,20 @@ + include_directories(pm_common porttime) + add_subdirectory(pm_common) + +-add_subdirectory(pm_test) ++option(PORTMIDI_ENABLE_JAVA "Enable Java bindings support" ON) ++option(PORTMIDI_ENABLE_STATIC "Build and install static libraries" OFF) ++option(PORTMIDI_ENABLE_TEST "Build test programs" ON) ++ ++if(PORTMIDI_ENABLE_TEST) ++ add_subdirectory(pm_test) ++endif(PORTMIDI_ENABLE_TEST) + + add_subdirectory(pm_dylib) + + # Cannot figure out how to make an xcode Java application with CMake +-add_subdirectory(pm_java) ++if(PORTMIDI_ENABLE_JAVA) ++ set(JAR_INSTALL_DIR share/java ++ CACHE STRING "Define directory name for jar installation") ++ add_subdirectory(pm_java) ++endif(PORTMIDI_ENABLE_JAVA) + +--- portmidi/pm_common/CMakeLists.txt ++++ portmidi/pm_common/CMakeLists.txt +@@ -44,9 +44,6 @@ + + # first include the appropriate system-dependent file: + if(UNIX) +- # add the -g switch for Linux and Mac OS X (not used in Win32) +- set (CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_C_FLAGS_DEBUG}" +- CACHE STRING "enable extra checks for debugging" FORCE) + if(APPLE) + set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault) + prepend_path(LIBSRC ../pm_mac/ ${MACSRC}) +@@ -62,19 +59,23 @@ + ${COREMIDI_LIB} ${CORESERVICES_LIB} + CACHE INTERNAL "") + +- set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework") +- set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers) ++ if(PORTMIDI_ENABLE_JAVA) ++ set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework") ++ set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers) ++ endif(PORTMIDI_ENABLE_JAVA) + message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT}) + else(APPLE) + # LINUX settings... +- include(FindJNI) +- message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH}) +- message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH}) +- message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2}) +- message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY}) +- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) +- # libjvm.so is found relative to JAVA_INCLUDE_PATH: +- set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) ++ message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH}) ++ message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH}) ++ message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2}) ++ message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY}) ++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) ++ # libjvm.so is found relative to JAVA_INCLUDE_PATH: ++ set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(LINUXSRC pmlinuxalsa pmlinux finddefault) + prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC}) +@@ -88,10 +89,12 @@ + # /MD is multithread DLL, /MT is multithread. Change to static: + include(../pm_win/static.cmake) + +- include(FindJNI) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) + +- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) +- # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) ++ # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(WINSRC pmwin pmwinmm) + prepend_path(LIBSRC ../pm_win/ ${WINSRC}) +@@ -99,29 +102,43 @@ + set(PM_NEEDED_LIBS winmm.lib) + endif(WIN32) + endif(UNIX) +-set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY}) ++ ++if(PORTMIDI_ENABLE_JAVA) ++ set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY}) ++endif(PORTMIDI_ENABLE_JAVA) + + # this completes the list of library sources by adding shared code + list(APPEND LIBSRC pmutil portmidi) + + # now add the shared files to make the complete list of library sources +-add_library(portmidi-static ${LIBSRC}) +-set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s") +-target_link_libraries(portmidi-static ${PM_NEEDED_LIBS}) +- +-# define the jni library +-include_directories(${JAVA_INCLUDE_PATHS}) +- +-set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c) +-add_library(pmjni SHARED ${JNISRC}) +-target_link_libraries(pmjni ${JNI_EXTRA_LIBS}) +-set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib") ++if(PORTMIDI_ENABLE_STATIC) ++ add_library(portmidi-static ${LIBSRC}) ++ set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi") ++ target_link_libraries(portmidi-static ${PM_NEEDED_LIBS}) ++endif(PORTMIDI_ENABLE_STATIC) ++ ++if(PORTMIDI_ENABLE_JAVA) ++ # define the jni library ++ include_directories(${JAVA_INCLUDE_PATHS}) ++ ++ set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c) ++ add_library(pmjni SHARED ${JNISRC}) ++ target_link_libraries(pmjni ${JNI_EXTRA_LIBS}) ++ set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib") ++endif(PORTMIDI_ENABLE_JAVA) + + # 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) ++ if(PORTMIDI_ENABLE_STATIC) ++ INSTALL(TARGETS portmidi-static ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ endif(PORTMIDI_ENABLE_STATIC) ++ if(PORTMIDI_ENABLE_JAVA) ++ INSTALL(TARGETS pmjni ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ endif(PORTMIDI_ENABLE_JAVA) + # .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) +--- portmidi/pm_dylib/CMakeLists.txt ++++ portmidi/pm_dylib/CMakeLists.txt +@@ -39,9 +39,6 @@ + + # first include the appropriate system-dependent file: + if(UNIX) +- # add the -g switch for Linux and Mac OS X (not used in Win32) +- set (CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_C_FLAGS_DEBUG}" +- CACHE STRING "enable extra checks for debugging" FORCE) + if(APPLE) + set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault) + prepend_path(LIBSRC ../pm_mac/ ${MACSRC}) +@@ -63,7 +60,8 @@ + message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT}) + else(APPLE) + # LINUX settings... +- include(FindJNI) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) + # message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH}) + # message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH}) + # note: should use JAVA_JVM_LIB_PATH, but it is not set properly +@@ -75,11 +73,8 @@ + # 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}) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(LINUXSRC pmlinuxalsa pmlinux finddefault) + prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC}) +@@ -91,13 +86,15 @@ + if(WIN32) + # /MDd is multithread debug DLL, /MTd is multithread debug + # /MD is multithread DLL, /MT is multithread +- +- include(FindJNI) +- # note: should use JAVA_JVM_LIB_PATH, but it is not set properly +- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../lib/jvm.lib) + +- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) +- # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) ++ # note: should use JAVA_JVM_LIB_PATH, but it is not set properly ++ set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../lib/jvm.lib) ++ ++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) ++ # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(WINSRC pmwin pmwinmm) + prepend_path(LIBSRC ../pm_win/ ${WINSRC}) +@@ -106,7 +103,10 @@ + # message(STATUS "JAVAVM_LIB: " ${JAVAVM_LIB}) + endif(WIN32) + endif(UNIX) ++ ++if(PORTMIDI_ENABLE_JAVA) + set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVAVM_LIB}) ++endif(PORTMIDI_ENABLE_JAVA) + + # this completes the list of library sources by adding shared code + set(SHARED_FILES pmutil portmidi) +@@ -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 lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h +- DESTINATION /usr/local/include) ++ DESTINATION include) + endif(UNIX) +--- portmidi/pm_java/CMakeLists.txt ++++ portmidi/pm_java/CMakeLists.txt +@@ -5,43 +5,24 @@ + # java not dealt with in CMake -- see pm_mac/pm_mac.xcodeproj + else(APPLE) + # linux +- set(JPORTMIDICLASS JPortMidi.class JPortMidiException.class +- JPortMidiApi.class) +- set(PMDEFAULTSCLASS PmDefaultsFrame.class PmDefaults.class) +- prepend_path(JPORTMIDICLASS2 jportmidi/ ${JPORTMIDICLASS}) +- prepend_path(PMDEFAULTSCLASS2 pmdefaults/ ${PMDEFAULTSCLASS}) +- set(PMDEFAULTS_ALL_CLASSES ${JPORTMIDICLASS2} ${PMDEFAULTSCLASS2}) +- # message(STATUS "PMDEFAULTS_ALL_CLASSES is " ${PMDEFAULTS_ALL_CLASSES}) +- add_custom_command(OUTPUT pmdefaults/PmDefaultsFrame.class +- COMMAND javac -classpath . pmdefaults/PmDefaultsFrame.java +- MAIN_DEPENDENCY pmdefaults/PmDefaultsFrame.java +- DEPENDS pmdefaults/PmDefaults.java +- WORKING_DIRECTORY pm_java) +- add_custom_command(OUTPUT pmdefaults/PmDefaults.class +- COMMAND javac -classpath . pmdefaults/PmDefaults.java +- MAIN_DEPENDENCY pmdefaults/PmDefaults.java +- DEPENDS pmdefaults/PmDefaultsFrame.java +- WORKING_DIRECTORY pm_java) +- add_custom_command(OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar +- COMMAND cp pmdefaults/portmusic_logo.png . +- COMMAND jar cmf pmdefaults/manifest.txt pmdefaults.jar +- pmdefaults/*.class portmusic_logo.png jportmidi/*.class +- COMMAND chmod +x pmdefaults/pmdefaults +- COMMAND cp pmdefaults/pmdefaults ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +- COMMAND mv pmdefaults.jar ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +- COMMAND rm portmusic_logo.png +- MAIN_DEPENDENCY pmdefaults/PmDefaults.class +- DEPENDS ${PMDEFAULTS_ALL_CLASSES} +- WORKING_DIRECTORY pm_java) +- add_custom_target(pmdefaults_target ALL +- DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar) +- # message(STATUS "add_custom_target: pmdefaults.jar") ++ set(JAVA_CLASSES jportmidi pmdefaults) ++ add_custom_command(OUTPUT ${JAVA_CLASSES} ++ COMMAND javac -d ${CMAKE_CURRENT_BINARY_DIR} jportmidi/*.java pmdefaults/*.java ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ++ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar ++ DEPENDS ${JAVA_CLASSES} ++ COMMAND jar cmf pmdefaults/manifest.txt ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar ++ -C pmdefaults portmusic_logo.png -C ${CMAKE_CURRENT_BINARY_DIR} jportmidi ++ -C ${CMAKE_CURRENT_BINARY_DIR} pmdefaults ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ++ add_custom_target(pmdefaults.jar ALL ++ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar) + + # install the libraries (Linux only) +- INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar +- DESTINATION /usr/share/java) +- INSTALL(PROGRAMS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults +- DESTINATION /usr/local/bin) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar ++ DESTINATION ${JAR_INSTALL_DIR}) ++ INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/pmdefaults/pmdefaults ++ DESTINATION bin) + endif(APPLE) + endif(UNIX) + # In windows, use pm_java/make.bat +--- portmidi/pm_test/CMakeLists.txt ++++ portmidi/pm_test/CMakeLists.txt +@@ -12,8 +12,8 @@ + + macro(make_a_test name) + add_executable(${name} ${name}.c) +- target_link_libraries(${name} portmidi-static ${PM_NEEDED_LIBS}) +- add_dependencies(${name} portmidi-static) ++ target_link_libraries(${name} portmidi ${PM_NEEDED_LIBS}) ++ add_dependencies(${name} portmidi) + endmacro(make_a_test) + + make_a_test(test) diff --git a/media-libs/portmidi/files/portmidi-217-python.patch b/media-libs/portmidi/files/portmidi-217-python.patch new file mode 100644 index 000000000000..5682c3344358 --- /dev/null +++ b/media-libs/portmidi/files/portmidi-217-python.patch @@ -0,0 +1,25 @@ +--- portmidi/pm_python/setup.py ++++ portmidi/pm_python/setup.py +@@ -15,12 +15,10 @@ + + + DESCRIPTION = open('README_PYTHON.txt').read() +-CHANGES = open('CHANGES.txt').read() +-TODO = open('TODO.txt').read() + + EXTRAS = {} + +-long_description = DESCRIPTION + CHANGES + TODO ++long_description = DESCRIPTION + #import sys + #if "checkdocs" in sys.argv: + # print long_description +@@ -173,7 +171,8 @@ + EXTENSION = dict( + ext_modules=[ + Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")], + library_dirs=["./linux"], ++ include_dirs=["../pm_common", "../porttime"], + libraries = ["portmidi", "asound", "pthread"] + ) + ] diff --git a/media-libs/portmidi/metadata.xml b/media-libs/portmidi/metadata.xml new file mode 100644 index 000000000000..4b117174daed --- /dev/null +++ b/media-libs/portmidi/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proaudio</herd> + <use> + <flag name="test-programs">Install various example programs</flag> + </use> +</pkgmetadata> diff --git a/media-libs/portmidi/portmidi-217.ebuild b/media-libs/portmidi/portmidi-217.ebuild new file mode 100644 index 000000000000..921948fa9ec0 --- /dev/null +++ b/media-libs/portmidi/portmidi-217.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/portmidi/portmidi-217.ebuild,v 1.1 2012/02/27 04:14:00 radhermit Exp $ + +EAPI="4" +PYTHON_DEPEND="python? 2:2.6" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" +PYTHON_MODNAME="pyportmidi" + +inherit cmake-utils distutils eutils multilib java-pkg-opt-2 + +DESCRIPTION="A library for real time MIDI input and output" +HOMEPAGE="http://portmedia.sourceforge.net/" +SRC_URI="mirror://sourceforge/portmedia/${PN}-src-${PV}.zip" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc java python static-libs test-programs" + +CDEPEND="media-libs/alsa-lib" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.6 )" +DEPEND="${CDEPEND} + app-arch/unzip + java? ( >=virtual/jdk-1.6 ) + python? ( >=dev-python/cython-0.12.1 ) + doc? ( app-doc/doxygen + virtual/latex-base )" + +S=${WORKDIR}/${PN} + +pkg_setup() { + use java && java-pkg-opt-2_pkg_setup + use python && python_pkg_setup +} + +src_prepare() { + # fix parallel make failures, fix java support, and allow optional + # components like test programs and static libs to be skipped + epatch "${FILESDIR}"/${P}-cmake.patch + + # add include directories and remove references to missing files + epatch "${FILESDIR}"/${P}-python.patch + + # install wrapper for pmdefaults + if use java ; then + cat > pm_java/pmdefaults/pmdefaults <<-EOF + #!/bin/sh + java -Djava.library.path="${EPREFIX}/usr/$(get_libdir)/" \\ + -jar "${EPREFIX}/usr/share/${PN}/lib/pmdefaults.jar" + EOF + [[ $? -ne 0 ]] && die "cat pmdefaults failed" + fi + + use python && python_copy_sources +} + +src_configure() { + if use debug ; then + CMAKE_BUILD_TYPE=Debug + else + CMAKE_BUILD_TYPE=Release + fi + + local mycmakeargs=( + $(cmake-utils_use java PORTMIDI_ENABLE_JAVA) + $(cmake-utils_use static-libs PORTMIDI_ENABLE_STATIC) + $(cmake-utils_use test-programs PORTMIDI_ENABLE_TEST) + ) + + if use java ; then + mycmakeargs+=(-DJAR_INSTALL_DIR="${EPREFIX}/usr/share/${PN}/lib") + fi + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + + if use python ; then + sed -i -e "/library_dirs=.*linux/s#./linux#${CMAKE_BUILD_DIR}#" pm_python/setup.py || die + pushd pm_python > /dev/null + distutils_src_compile + popd > /dev/null + fi + + if use doc ; then + doxygen || die "doxygen failed" + pushd latex > /dev/null + VARTEXFONTS="${T}"/fonts emake + popd > /dev/null + fi +} + +src_install() { + cmake-utils_src_install + + dodoc CHANGELOG.txt README.txt pm_linux/README_LINUX.txt + + use doc && dodoc latex/refman.pdf + + if use python ; then + pushd pm_python > /dev/null + distutils_src_install + popd > /dev/null + fi + + if use java ; then + newdoc pm_java/README.txt README_JAVA.txt + newicon pm_java/pmdefaults/pmdefaults-icon.png pmdefaults.png + make_desktop_entry pmdefaults Pmdefaults pmdefaults "AudioVideo;Audio;Midi;" + fi + + if use test-programs ; then + exeinto /usr/$(get_libdir)/${PN} + local app + for app in latency midiclock midithread midithru mm qtest sysex test ; do + doexe "${CMAKE_BUILD_DIR}"/${app} + done + fi +} + +pkg_postinst() { + use python && distutils_pkg_postinst +} + +pkg_postrm() { + use python && distutils_pkg_postrm +} |