diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-11-30 10:46:00 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-11-30 10:46:00 +0000 |
commit | c0c7c1b95b0f2cc232622aa765e92e8b515518d6 (patch) | |
tree | 0fffee1484ea0830d3b55380c081ee7c45fe4018 /media-libs | |
parent | Bump version. Fixes #525914. Thanks to freak132 for the ifconfig patch. (diff) | |
download | gentoo-2-c0c7c1b95b0f2cc232622aa765e92e8b515518d6.tar.gz gentoo-2-c0c7c1b95b0f2cc232622aa765e92e8b515518d6.tar.bz2 gentoo-2-c0c7c1b95b0f2cc232622aa765e92e8b515518d6.zip |
Convert to distutils-r1.
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/portmidi/ChangeLog | 10 | ||||
-rw-r--r-- | media-libs/portmidi/portmidi-217-r1.ebuild | 128 |
2 files changed, 135 insertions, 3 deletions
diff --git a/media-libs/portmidi/ChangeLog b/media-libs/portmidi/ChangeLog index 574967905fff..2e83ec44f121 100644 --- a/media-libs/portmidi/ChangeLog +++ b/media-libs/portmidi/ChangeLog @@ -1,6 +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.4 2012/06/13 12:58:07 johu Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/portmidi/ChangeLog,v 1.5 2014/11/30 10:46:00 mgorny Exp $ + +*portmidi-217-r1 (30 Nov 2014) + + 30 Nov 2014; Michał Górny <mgorny@gentoo.org> +portmidi-217-r1.ebuild: + Convert to distutils-r1. 13 Jun 2012; Johannes Huber <johu@gentoo.org> portmidi-217.ebuild: Stable for x86, wrt bug #417127 @@ -17,4 +22,3 @@ +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/portmidi-217-r1.ebuild b/media-libs/portmidi/portmidi-217-r1.ebuild new file mode 100644 index 000000000000..c366b9cdc42a --- /dev/null +++ b/media-libs/portmidi/portmidi-217-r1.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/portmidi/portmidi-217-r1.ebuild,v 1.1 2014/11/30 10:46:00 mgorny Exp $ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_OPTIONAL=1 + +inherit cmake-utils distutils-r1 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? ( ${PYTHON_DEPS} + >=dev-python/cython-0.12.1[${PYTHON_USEDEP}] ) + doc? ( + app-doc/doxygen + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-latexextra + dev-tex/xcolor + virtual/latex-base + )" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S=${WORKDIR}/${PN} + +pkg_setup() { + use java && java-pkg-opt-2_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 +} + +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-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-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-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 "${CMAKE_BUILD_DIR}"/${app} + done + fi +} |