/[gentoo-x86]/media-libs/portmidi/portmidi-217-r1.ebuild
Gentoo

Contents of /media-libs/portmidi/portmidi-217-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Nov 30 10:46:00 2014 UTC (5 years, 1 month ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Convert to distutils-r1.

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/portmidi/portmidi-217.ebuild,v 1.4 2012/06/13 12:58:07 johu Exp $
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python2_7 )
8 DISTUTILS_OPTIONAL=1
9
10 inherit cmake-utils distutils-r1 eutils multilib java-pkg-opt-2
11
12 DESCRIPTION="A library for real time MIDI input and output"
13 HOMEPAGE="http://portmedia.sourceforge.net/"
14 SRC_URI="mirror://sourceforge/portmedia/${PN}-src-${PV}.zip"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="debug doc java python static-libs test-programs"
20
21 CDEPEND="media-libs/alsa-lib"
22 RDEPEND="${CDEPEND}
23 java? ( >=virtual/jre-1.6 )"
24 DEPEND="${CDEPEND}
25 app-arch/unzip
26 java? ( >=virtual/jdk-1.6 )
27 python? ( ${PYTHON_DEPS}
28 >=dev-python/cython-0.12.1[${PYTHON_USEDEP}] )
29 doc? (
30 app-doc/doxygen
31 dev-texlive/texlive-fontsrecommended
32 dev-texlive/texlive-latexextra
33 dev-tex/xcolor
34 virtual/latex-base
35 )"
36
37 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
38
39 S=${WORKDIR}/${PN}
40
41 pkg_setup() {
42 use java && java-pkg-opt-2_pkg_setup
43 }
44
45 src_prepare() {
46 # fix parallel make failures, fix java support, and allow optional
47 # components like test programs and static libs to be skipped
48 epatch "${FILESDIR}"/${P}-cmake.patch
49
50 # add include directories and remove references to missing files
51 epatch "${FILESDIR}"/${P}-python.patch
52
53 # install wrapper for pmdefaults
54 if use java ; then
55 cat > pm_java/pmdefaults/pmdefaults <<-EOF
56 #!/bin/sh
57 java -Djava.library.path="${EPREFIX}/usr/$(get_libdir)/" \\
58 -jar "${EPREFIX}/usr/share/${PN}/lib/pmdefaults.jar"
59 EOF
60 [[ $? -ne 0 ]] && die "cat pmdefaults failed"
61 fi
62 }
63
64 src_configure() {
65 if use debug ; then
66 CMAKE_BUILD_TYPE=Debug
67 else
68 CMAKE_BUILD_TYPE=Release
69 fi
70
71 local mycmakeargs=(
72 $(cmake-utils_use java PORTMIDI_ENABLE_JAVA)
73 $(cmake-utils_use static-libs PORTMIDI_ENABLE_STATIC)
74 $(cmake-utils_use test-programs PORTMIDI_ENABLE_TEST)
75 )
76
77 if use java ; then
78 mycmakeargs+=(-DJAR_INSTALL_DIR="${EPREFIX}/usr/share/${PN}/lib")
79 fi
80
81 cmake-utils_src_configure
82 }
83
84 src_compile() {
85 cmake-utils_src_compile
86
87 if use python ; then
88 sed -i -e "/library_dirs=.*linux/s#./linux#${CMAKE_BUILD_DIR}#" pm_python/setup.py || die
89 pushd pm_python > /dev/null
90 distutils-r1_src_compile
91 popd > /dev/null
92 fi
93
94 if use doc ; then
95 doxygen || die "doxygen failed"
96 pushd latex > /dev/null
97 VARTEXFONTS="${T}"/fonts emake
98 popd > /dev/null
99 fi
100 }
101
102 src_install() {
103 cmake-utils_src_install
104
105 dodoc CHANGELOG.txt README.txt pm_linux/README_LINUX.txt
106
107 use doc && dodoc latex/refman.pdf
108
109 if use python ; then
110 pushd pm_python > /dev/null
111 distutils-r1_src_install
112 popd > /dev/null
113 fi
114
115 if use java ; then
116 newdoc pm_java/README.txt README_JAVA.txt
117 newicon pm_java/pmdefaults/pmdefaults-icon.png pmdefaults.png
118 make_desktop_entry pmdefaults Pmdefaults pmdefaults "AudioVideo;Audio;Midi;"
119 fi
120
121 if use test-programs ; then
122 exeinto /usr/$(get_libdir)/${PN}
123 local app
124 for app in latency midiclock midithread midithru mm qtest sysex test ; do
125 doexe "${CMAKE_BUILD_DIR}"/${app}
126 done
127 fi
128 }

  ViewVC Help
Powered by ViewVC 1.1.20