diff options
Diffstat (limited to 'media-libs/portmidi')
-rw-r--r-- | media-libs/portmidi/Manifest | 1 | ||||
-rw-r--r-- | media-libs/portmidi/portmidi-234-r1.ebuild | 142 |
2 files changed, 143 insertions, 0 deletions
diff --git a/media-libs/portmidi/Manifest b/media-libs/portmidi/Manifest index f99a67cbab9a..3d89850b46dd 100644 --- a/media-libs/portmidi/Manifest +++ b/media-libs/portmidi/Manifest @@ -1,5 +1,6 @@ AUX portmidi-217-r4-python.patch 1540 BLAKE2B a5fe8c48e8d312cead822fc8893f8a610bf5cf280dd2445da04ab42ed13a5a121174afa2e8874dcf3f7a7b89cd60894a819404438c6d5cb2b99a8e2ae6f3aba8 SHA512 d7ded737346f9756450ff3eaf35daf33da941a109d7db07598ea57593ef3272213b889a9ab33bed71bead4583cb080439813bf7fc4a6d1a6cbb84ed4cd25b51f AUX portmidi-234-cmake.patch 13979 BLAKE2B cc6b4193e9008899c89545e2e416c75779d08a6ef100e7a37c21a7c745ac3416c31b044664ba439368c8bb0f3a7fde119343a86d31efe3482c4a88718affdd6d SHA512 b07cd643699084f8e02ffc53d3721a53dd17b421d8ff5b2889a14ab99ff709c14f68b30adc2e7db818cbe7884f93cab8290ff9466ac8616d0db58b3e7aab1f75 DIST portmedia-code-r234.zip 1342298 BLAKE2B 3c3686b79ca0c8cbfaa6c44ae8c4f294630e1c5940576709ff1ca5854bfcfba1af7b067471656f2b39ae28cecea9b6c4403f72d5a2552355760c795eff123243 SHA512 cbc332d89bc465450b38245a83cc300dfd2e1e6de7c62284edf754ff4d8a9aa3dc49a395dcee535ed9688befb019186fa87fd6d8a3698898c2acbf3e6b7a0794 +EBUILD portmidi-234-r1.ebuild 3281 BLAKE2B f2748f19d9f6d76ad64cdf2335abc38b0a32d76424941674f082bb1ba5cd520dd2e91549510193eb781637fec16a828a704ac685e43764202f52dc46f8f904cc SHA512 f80d2541dfd10c13ed31d6e4893f25f743c7e4d704f091e57999d15b0f81027ca2cbe1b59552eb84febf229df0eed9acd6455dd19d665c570276c6204542fd78 EBUILD portmidi-234.ebuild 3290 BLAKE2B 8b8300bf7287b13b020c501fcd3f268a9717e6aed30f27a75e9be26483f6f26ea54dd1fc76040bb2a83e64edad596050b1c277c288daf958d1a1ff8d8bdd1302 SHA512 85d6f546c7d1cf6f7f1fd8e8a95c03753b7a6cdaa41c1ff2913bba5c83905236451c5bd9108d1741897cca44e0d0e98241d71f611d0e49169fcfc98c1fc34cb1 MISC metadata.xml 437 BLAKE2B 8560766f0e6d8f0484374ed827f14ffddc01cd7ee4df2b75ccf62f6b0f4b804eac1dad8f06931328aac3910b0382c0125ea1bd71aa786bcb674531d88ed85de1 SHA512 a932e03068f3971eb8e40c1f18646652f0fe04a898cb10e9b7156cfe2b712285cf83c247a19cb887aaa2e575bc95ffad58d5fcfbb44d9e8d39f3d7b2d0cadd76 diff --git a/media-libs/portmidi/portmidi-234-r1.ebuild b/media-libs/portmidi/portmidi-234-r1.ebuild new file mode 100644 index 000000000000..04c8e493ea61 --- /dev/null +++ b/media-libs/portmidi/portmidi-234-r1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +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 flag-o-matic + +MY_P="portmedia-code-r${PV}" + +DESCRIPTION="Library for real time MIDI input and output" +HOMEPAGE="http://portmedia.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/portmedia/${MY_P}.zip" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv 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[${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}/${MY_P}/${PN}/trunk" +MAKEOPTS+=" -j1" + +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}"/${PN}-217-r4-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 + append-ldflags -L"${BUILD_DIR}" + 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 +} |