Lines 1-21
Link Here
|
1 |
# Copyright 1999-2008 Gentoo Foundation |
1 |
# Copyright 1999-2008 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-sound/ecasound/ecasound-2.4.5.ebuild,v 1.4 2008/01/16 18:22:20 grobian Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-sound/ecasound/ecasound-2.4.5.ebuild,v 1.4 2008/01/16 18:22:20 grobian Exp $ |
4 |
|
4 |
|
5 |
inherit multilib eutils |
5 |
inherit multilib eutils python |
6 |
|
6 |
|
7 |
DESCRIPTION="a package for multitrack audio processing" |
7 |
DESCRIPTION="a package for multitrack audio processing" |
8 |
SRC_URI="http://${PN}.seul.org/download/${P}.tar.gz" |
8 |
SRC_URI="http://${PN}.seul.org/download/${P}.tar.gz" |
9 |
HOMEPAGE="http://eca.cx" |
9 |
HOMEPAGE="http://ecasound.seul.org/ecasound/" |
10 |
|
10 |
|
11 |
LICENSE="GPL-2" |
11 |
LICENSE="GPL-2" |
12 |
SLOT="1" |
12 |
SLOT="1" |
13 |
KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
13 |
KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
14 |
IUSE="alsa arts audiofile debug doc jack libsamplerate mikmod ncurses vorbis oss python ruby sndfile" |
14 |
IUSE="alsa arts audiofile debug doc jack libsamplerate mikmod ncurses vorbis oss python ruby sndfile" |
15 |
|
15 |
|
16 |
RDEPEND="jack? ( media-sound/jack-audio-connection-kit ) |
16 |
RDEPEND="virtual/python |
|
|
17 |
jack? ( media-sound/jack-audio-connection-kit ) |
17 |
media-libs/ladspa-sdk |
18 |
media-libs/ladspa-sdk |
18 |
audiofile? ( media-libs/audiofile ) |
19 |
audiofile? ( media-libs/audiofile ) |
19 |
alsa? ( media-libs/alsa-lib ) |
20 |
alsa? ( media-libs/alsa-lib ) |
20 |
vorbis? ( media-libs/libvorbis ) |
21 |
vorbis? ( media-libs/libvorbis ) |
21 |
arts? ( kde-base/arts ) |
22 |
arts? ( kde-base/arts ) |
Lines 38-108
Link Here
|
38 |
eerror "need to have built media-libs/alsa-lib with midi USE flag." |
39 |
eerror "need to have built media-libs/alsa-lib with midi USE flag." |
39 |
die "Missing midi USE flag on media-libs/alsa-lib" |
40 |
die "Missing midi USE flag on media-libs/alsa-lib" |
40 |
fi |
41 |
fi |
41 |
} |
42 |
} |
42 |
|
43 |
|
43 |
src_compile () { |
44 |
src_unpack() { |
44 |
local myconf |
45 |
unpack ${A} |
45 |
|
46 |
cd "${S}" |
46 |
myconf="${myconf} --enable-shared --with-largefile --enable-sys-readline" |
47 |
epatch "${FILESDIR}/${P}-gcc43.patch" |
|
|
48 |
} |
47 |
|
49 |
|
|
|
50 |
src_compile() { |
51 |
local PYConf |
48 |
if use python; then |
52 |
if use python; then |
49 |
# ecasound is braindead about finding python includes/libdirs and |
53 |
python_version |
50 |
# about where to install modules. Luckily, it allows us to specify |
54 |
PYConf="--enable-pyecasound=c |
51 |
# all this. |
55 |
--with-python-includes=${ROOT}usr/include/python${PYVER} |
52 |
local python_version python_prefix python_includes python_modules |
56 |
--with-python-modules=${ROOT}usr/$(get_libdir)/python${PYVER}" |
53 |
if use userland_Darwin ; then |
|
|
54 |
myconf="$myconf --enable-pyecasound=python" |
55 |
else |
56 |
myconf="$myconf --enable-pyecasound=c" |
57 |
fi |
58 |
python_version="`python -c 'import sys; print sys.version[:3]'`" |
59 |
python_prefix="`python -c 'import sys; print sys.prefix'`" |
60 |
|
61 |
python_includes="$python_prefix/include/python$python_version" |
62 |
python_modules="$python_prefix/$(get_libdir)/python$python_version" |
63 |
|
64 |
myconf="$myconf --with-python-includes=$python_includes" |
65 |
myconf="$myconf --with-python-modules=$python_modules" |
66 |
else |
57 |
else |
67 |
myconf="$myconf --disable-pyecasound" |
58 |
PYConf="$myconf --disable-pyecasound" |
68 |
fi |
59 |
fi |
69 |
|
60 |
|
70 |
econf \ |
61 |
econf $(use_enable alsa) \ |
71 |
$(use_enable alsa) \ |
|
|
72 |
$(use_enable arts) \ |
62 |
$(use_enable arts) \ |
73 |
$(use_enable audiofile) \ |
63 |
$(use_enable audiofile) \ |
74 |
$(use_enable debug) \ |
64 |
$(use_enable debug) \ |
75 |
$(use_enable jack) \ |
65 |
$(use_enable jack) \ |
76 |
$(use_enable libsamplerate) \ |
66 |
$(use_enable libsamplerate) \ |
77 |
$(use_enable ncurses) \ |
67 |
$(use_enable ncurses) \ |
78 |
$(use_enable oss) \ |
68 |
$(use_enable oss) \ |
79 |
$(use_enable ruby rubyecasound) \ |
69 |
$(use_enable ruby rubyecasound) \ |
80 |
$(use_enable sndfile) \ |
70 |
$(use_enable sndfile) \ |
81 |
${myconf} |
71 |
--enable-shared \ |
|
|
72 |
--with-largefile \ |
73 |
--enable-sys-readline \ |
74 |
${PYConf} || die "econf failed" |
82 |
|
75 |
|
83 |
emake || die "emake failed." |
76 |
emake || die "emake failed" |
84 |
} |
77 |
} |
85 |
|
78 |
|
86 |
src_install () { |
79 |
src_install() { |
87 |
emake DESTDIR="${D}" install || die "emake install failed." |
80 |
emake DESTDIR="${D}" install || die "emake install failed" |
88 |
|
|
|
89 |
if use python; then |
90 |
cd pyecasound |
91 |
python -c "import compileall; compileall.compile_dir('.')" || die |
92 |
python -O -c "import compileall; compileall.compile_dir('.')" || die |
93 |
python_sitepkgsdir="`python -c "import sys; print (sys.prefix + '/lib/python' + sys.version[:3] + '/site-packages/')"`" |
94 |
install *.pyc *.pyo "${D}/${python_sitepkgsdir}" |
95 |
cd .. |
96 |
fi |
97 |
|
98 |
dodoc BUGS NEWS README TODO Documentation/*.txt |
81 |
dodoc BUGS NEWS README TODO Documentation/*.txt |
99 |
use doc && dohtml Documentation/*.html |
82 |
use doc && dohtml Documentation/*.html |
100 |
} |
83 |
} |
101 |
|
84 |
|
102 |
pkg_postinst() { |
85 |
pkg_postinst() { |
|
|
86 |
if use python; then |
87 |
ebegin "Byte-compiling ${CATEGORY}/${PF} python modules" |
88 |
python_version |
89 |
local PYMODULE |
90 |
for PYMODULE in ecacontrol.py pyeca.py eci.py; do |
91 |
python_mod_compile "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${PYMODULE}" || die "Compiling ${PYMODULE} failed" |
92 |
done |
93 |
eend $? |
94 |
fi |
103 |
if use arts; then |
95 |
if use arts; then |
104 |
ewarn "WARNING: You have requested ecasound ARTS support," |
96 |
ewarn "WARNING: You have requested ecasound ARTS support," |
105 |
ewarn "this is no longer supported and will go away in" |
97 |
ewarn "this is no longer supported and will go away in" |
106 |
ewarn "future releases." |
98 |
ewarn "future releases." |
107 |
fi |
99 |
fi |
108 |
} |
100 |
} |
|
|
101 |
|
102 |
pkg_postrm() { |
103 |
python_version |
104 |
python_mod_cleanup |
105 |
} |