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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Wed Jun 13 12:58:07 2012 UTC (7 years, 8 months ago) by johu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Stable for x86, wrt bug #417127

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20