diff options
Diffstat (limited to 'media-libs/portmidi')
-rw-r--r-- | media-libs/portmidi/Manifest | 4 | ||||
-rw-r--r-- | media-libs/portmidi/files/portmidi-217-cmake.patch | 66 | ||||
-rw-r--r-- | media-libs/portmidi/files/portmidi-217-r3-python.patch | 50 | ||||
-rw-r--r-- | media-libs/portmidi/portmidi-217-r3.ebuild | 138 |
4 files changed, 231 insertions, 27 deletions
diff --git a/media-libs/portmidi/Manifest b/media-libs/portmidi/Manifest index b6ee70d6de4d..1c34c9546314 100644 --- a/media-libs/portmidi/Manifest +++ b/media-libs/portmidi/Manifest @@ -1,5 +1,7 @@ -AUX portmidi-217-cmake.patch 13124 BLAKE2B ccbc53bd6a740fd87789931869aa29d66c3e4b404851f8f465f713fb0bdad2756ba77267396e5f966ae266c1f05b7972f5abd5559ba7f1358e50cf65e3825e63 SHA512 36392c6e5e9f21d8791866f22345569346e4827bbb3525c119f2a28d8ec1d055988a360c2f53323f1d12f8294896656044c5890cabedd7fb6c2f730f5d72e4cb +AUX portmidi-217-cmake.patch 13905 BLAKE2B faa559f25b1acec63f17a6b6dcbd228eff2cb50447ba72ea4108c86f36b8142fac54c90e5480d74278e0fa0b28bad68f4f1bfac192434840893dc9039243284f SHA512 b60da799041d6dc4a1bf82981d904cf9bbbaed021397cd2235dc25b18b7c830576ecce8fa0c6992249e03ab84579eff795ae33a8e0d091dcda8ee856491420d4 AUX portmidi-217-python.patch 764 BLAKE2B bcf569bab2c105f99b7a3b10c0124fa22b7fb0d9d494024c17c01f3bb6641441f1942b4dae76725835e880c4ed90c03e151f218b4eec78b29fdefc343cc00b30 SHA512 5f5e582d1769c995038d1b073eb603e313f1a49b5d7cb832de9f2aef003dfcf34bcd848337dc180ee23bf87ad631887584d339474c45e57b6a78d179c929ec43 +AUX portmidi-217-r3-python.patch 1568 BLAKE2B 039c2bde15d5aaef1f255a0166c3563fcbfe3439dc2dced93b5228e5f5b747c47b70b7a25574d3116652aa3ae7177fbdd95aa03e29f65a05cddbe056b7b7e9e9 SHA512 210db5901f5d31c2e686aaca850f972ae2083834b3599e5e71acbb21374f8136306e087f62d2307767c8f0eb2fddf5a6115486258aaa16aefd4199b6d21f42e2 DIST portmidi-src-217.zip 1030830 BLAKE2B ab197c7f9a5c2b4d2740d56841459fbac97d510e4d12e5d0cd7cecc0ba6035929b6596140d42c575a9513862a66127d19253dbee1d3a7b7b84b69c88fec7fcae SHA512 d08d4d57429d26d292b5fe6868b7c7a32f2f1d2428f6695cd403a697e2d91629bd4380242ab2720e8f21c895bb75cb56b709fb663a20e8e623120e50bfc5d90b EBUILD portmidi-217-r2.ebuild 3050 BLAKE2B ea034c6366908edeab906b8cd5ee58f1bf75aa1f2a29d7766db7ae94d3576c587a409a96d54704cd8b84e34d4430b0c1e557e2f93be5607bec40803d40afe1eb SHA512 a69e6ca91231cbce5efa1cff3c305ff34ec029c1a113fcf1090dd3ea232f2050dc0e8dd60bae225e20e5c93d1aefd2c568dab897a020485f92b61b0c0ab5dabe +EBUILD portmidi-217-r3.ebuild 3157 BLAKE2B b61c1d362aacaea932666f97e9cea5554db4c67fc81395eafb6b6ed8c03834a5b9f9bdc3b913c6448a12fbc21d29b4939c4aa559239920659226f1cf2378a968 SHA512 517a5528d1fe9f8451b4d9e60664d7f3414d0d0f1febc838cd1bc3dd9229cfe8c4cc0cb0052a10c78bd8f057e1bc7e0d61e7b737dd2dbbb45fcd797124b3c105 MISC metadata.xml 436 BLAKE2B abc47a4c2597048c3e2037006db7811d99cb1ce5c35d83dec30fc415f6d419344bf283d580c153309bb7934b6a12fae878cd480f6c12be76deb52bd5494e2c5c SHA512 a7f6997ff7647e20526181189d5d38ebd944648a508a90ab42ada4dfec84f5165a25b07f5738880a9dcbf424e2b74ac7c3224f6b8d47d9c8a7f3fa7c02c02cbc diff --git a/media-libs/portmidi/files/portmidi-217-cmake.patch b/media-libs/portmidi/files/portmidi-217-cmake.patch index e741e6576f66..7618ee5af952 100644 --- a/media-libs/portmidi/files/portmidi-217-cmake.patch +++ b/media-libs/portmidi/files/portmidi-217-cmake.patch @@ -1,6 +1,8 @@ ---- portmidi/CMakeLists.txt -+++ portmidi/CMakeLists.txt -@@ -9,12 +9,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4919b78..9dc6e58 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,12 +9,11 @@ if(UNIX) set(CMAKE_BUILD_TYPE Release CACHE STRING "Semicolon-separate list of supported configuration types") # set default directories but don't override cached values... @@ -16,7 +18,7 @@ CACHE STRING "executables go here") else(UNIX) -@@ -68,10 +67,20 @@ +@@ -68,10 +67,20 @@ endif(UNIX) include_directories(pm_common porttime) add_subdirectory(pm_common) @@ -39,9 +41,11 @@ + add_subdirectory(pm_java) +endif(PORTMIDI_ENABLE_JAVA) ---- portmidi/pm_common/CMakeLists.txt -+++ portmidi/pm_common/CMakeLists.txt -@@ -44,9 +44,6 @@ +diff --git a/pm_common/CMakeLists.txt b/pm_common/CMakeLists.txt +index e171047..d23442d 100644 +--- a/pm_common/CMakeLists.txt ++++ b/pm_common/CMakeLists.txt +@@ -44,9 +44,6 @@ set(CMAKE_C_FLAGS_RELEASE "${DEFAULT_RELEASE_FLAGS} ${LINUX_FLAGS}" # first include the appropriate system-dependent file: if(UNIX) @@ -51,7 +55,7 @@ if(APPLE) set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault) prepend_path(LIBSRC ../pm_mac/ ${MACSRC}) -@@ -62,19 +59,23 @@ +@@ -62,19 +59,23 @@ if(UNIX) ${COREMIDI_LIB} ${CORESERVICES_LIB} CACHE INTERNAL "") @@ -85,7 +89,7 @@ set(LINUXSRC pmlinuxalsa pmlinux finddefault) prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC}) -@@ -88,10 +89,12 @@ +@@ -88,10 +89,12 @@ else(UNIX) # /MD is multithread DLL, /MT is multithread. Change to static: include(../pm_win/static.cmake) @@ -101,7 +105,7 @@ set(WINSRC pmwin pmwinmm) prepend_path(LIBSRC ../pm_win/ ${WINSRC}) -@@ -99,29 +102,43 @@ +@@ -99,29 +102,43 @@ else(UNIX) set(PM_NEEDED_LIBS winmm.lib) endif(WIN32) endif(UNIX) @@ -160,9 +164,11 @@ # .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 @@ +diff --git a/pm_dylib/CMakeLists.txt b/pm_dylib/CMakeLists.txt +index f693dd6..c0e1449 100644 +--- a/pm_dylib/CMakeLists.txt ++++ b/pm_dylib/CMakeLists.txt +@@ -39,9 +39,6 @@ set(CMAKE_C_FLAGS_RELEASE "${DEFAULT_RELEASE_FLAGS} ${LINUX_FLAGS}" # first include the appropriate system-dependent file: if(UNIX) @@ -172,7 +178,7 @@ if(APPLE) set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault) prepend_path(LIBSRC ../pm_mac/ ${MACSRC}) -@@ -63,7 +60,8 @@ +@@ -63,7 +60,8 @@ if(UNIX) message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT}) else(APPLE) # LINUX settings... @@ -182,7 +188,7 @@ # 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 @@ +@@ -75,11 +73,8 @@ 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) @@ -196,7 +202,7 @@ set(LINUXSRC pmlinuxalsa pmlinux finddefault) prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC}) -@@ -91,13 +86,15 @@ +@@ -91,13 +86,15 @@ else(UNIX) if(WIN32) # /MDd is multithread debug DLL, /MTd is multithread debug # /MD is multithread DLL, /MT is multithread @@ -218,7 +224,7 @@ set(WINSRC pmwin pmwinmm) prepend_path(LIBSRC ../pm_win/ ${WINSRC}) -@@ -106,7 +103,10 @@ +@@ -106,7 +103,10 @@ else(UNIX) # message(STATUS "JAVAVM_LIB: " ${JAVAVM_LIB}) endif(WIN32) endif(UNIX) @@ -229,7 +235,7 @@ # this completes the list of library sources by adding shared code set(SHARED_FILES pmutil portmidi) -@@ -120,8 +120,8 @@ +@@ -120,8 +120,8 @@ target_link_libraries(portmidi-dynamic ${PM_NEEDED_LIBS}) # install the libraries (Linux and Mac OS X command line) if(UNIX) INSTALL(TARGETS portmidi-dynamic @@ -241,9 +247,11 @@ - DESTINATION /usr/local/include) + DESTINATION include) endif(UNIX) ---- portmidi/pm_java/CMakeLists.txt -+++ portmidi/pm_java/CMakeLists.txt -@@ -5,43 +5,24 @@ +diff --git a/pm_java/CMakeLists.txt b/pm_java/CMakeLists.txt +index a350620..9cbee1c 100644 +--- a/pm_java/CMakeLists.txt ++++ b/pm_java/CMakeLists.txt +@@ -5,43 +5,24 @@ if(UNIX) # java not dealt with in CMake -- see pm_mac/pm_mac.xcodeproj else(APPLE) # linux @@ -303,16 +311,22 @@ 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 @@ +diff --git a/pm_test/CMakeLists.txt b/pm_test/CMakeLists.txt +index b89074b..236ff49 100644 +--- a/pm_test/CMakeLists.txt ++++ b/pm_test/CMakeLists.txt +@@ -10,10 +10,12 @@ if(WIN32) + include(../pm_win/static.cmake) + endif(WIN32) ++set(CMAKE_SKIP_BUILD_RPATH TRUE) ++ 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) ++ target_link_libraries(${name} portmidi-dynamic ${PM_NEEDED_LIBS}) ++ add_dependencies(${name} portmidi-dynamic) endmacro(make_a_test) make_a_test(test) diff --git a/media-libs/portmidi/files/portmidi-217-r3-python.patch b/media-libs/portmidi/files/portmidi-217-r3-python.patch new file mode 100644 index 000000000000..cfc6b24e9487 --- /dev/null +++ b/media-libs/portmidi/files/portmidi-217-r3-python.patch @@ -0,0 +1,50 @@ +diff --git a/pm_python/setup.py b/pm_python/setup.py +index 14ab1c7..5b1e7c0 100644 +--- a/pm_python/setup.py ++++ b/pm_python/setup.py +@@ -15,12 +15,10 @@ except ImportError: + + + 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 +@@ -142,7 +140,7 @@ PACKAGEDATA.update(EXTRAS) + + + if sys.platform == 'win32': +- print "Found Win32 platform" ++ print("Found Win32 platform") + EXTENSION = dict( + ext_modules=[ + Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")], +@@ -154,7 +152,7 @@ if sys.platform == 'win32': + ] + ) + elif sys.platform == 'darwin': +- print "Found darwin (OS X) platform" ++ print("Found darwin (OS X) platform") + library_dirs = ["/usr/local/lib"] + include_dirs = ["/usr/local/include"] + EXTENSION = dict( +@@ -169,11 +167,12 @@ elif sys.platform == 'darwin': + ] + ) + else: +- print "Assuming Linux platform" ++ print("Assuming Linux platform") + 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/portmidi-217-r3.ebuild b/media-libs/portmidi/portmidi-217-r3.ebuild new file mode 100644 index 000000000000..27dd06fd49d7 --- /dev/null +++ b/media-libs/portmidi/portmidi-217-r3.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_OPTIONAL=1 +# ninja: error: build.ninja:521: multiple rules generate pm_java/pmdefaults.jar [-w dupbuild=err] +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake desktop xdg distutils-r1 java-pkg-opt-2 + +DESCRIPTION="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="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" +IUSE="debug doc java python static-libs test-programs" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +BDEPEND=" + app-arch/unzip + doc? ( + app-doc/doxygen + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-latexextra + virtual/latex-base + ) + python? ( >=dev-python/cython-0.12.1[${PYTHON_USEDEP}] ) +" +CDEPEND=" + media-libs/alsa-lib + python? ( ${PYTHON_DEPS} ) +" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.8 ) +" +DEPEND=" + ${CDEPEND} + java? ( >=virtual/jdk-1.8 ) +" + +S="${WORKDIR}/${PN}" + +PATCHES=( + # fix parallel make failures, fix java support, and allow optional + # components like test programs and static libs to be skipped + "${FILESDIR}"/${P}-cmake.patch + + # add include directories and remove references to missing files + "${FILESDIR}"/${PF}-python.patch +) + +pkg_setup() { + use java && java-pkg-opt-2_pkg_setup +} + +src_prepare() { + cmake_src_prepare + + # 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 +} + +src_configure() { + if use debug ; then + CMAKE_BUILD_TYPE=Debug + else + CMAKE_BUILD_TYPE=Release + fi + + local mycmakeargs=( + -DPORTMIDI_ENABLE_JAVA=$(usex java) + -DPORTMIDI_ENABLE_STATIC=$(usex static-libs) + -DPORTMIDI_ENABLE_TEST=$(usex test-programs) + ) + + if use java ; then + mycmakeargs+=(-DJAR_INSTALL_DIR="${EPREFIX}/usr/share/${PN}/lib") + fi + + cmake_src_configure +} + +src_compile() { + cmake_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-r1_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_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-r1_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 "${BUILD_DIR}"/${app} + done + fi +} |