/[gentoo-x86]/media-sound/timidity++/timidity++-2.13.2-r10.ebuild
Gentoo

Contents of /media-sound/timidity++/timidity++-2.13.2-r10.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun May 31 14:56:18 2009 UTC (10 years, 6 months ago) by maekke
Branch: MAIN
Changes since 1.4: +2 -2 lines
amd64/x86 stable, bug #271780
(Portage version: 2.1.6.11/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-sound/timidity++/timidity++-2.13.2-r10.ebuild,v 1.4 2009/05/31 14:04:47 nixnut Exp $
4
5 EAPI=2
6 inherit eutils elisp-common
7
8 MY_PV=${PV/_/-}
9 MY_P=TiMidity++-${MY_PV}
10 S=${WORKDIR}/${MY_P}
11
12 DESCRIPTION="A handy MIDI to WAV converter with OSS and ALSA output support"
13 HOMEPAGE="http://timidity.sourceforge.net/"
14 SRC_URI="mirror://sourceforge/timidity/${MY_P}.tar.bz2 mirror://gentoo/${P}-exiterror.patch"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 ~arm ~hppa ppc ~ppc64 sparc x86 ~x86-fbsd"
19 IUSE="oss nas esd motif X gtk vorbis tk slang alsa jack emacs ao speex flac ncurses"
20
21 DEPEND="ncurses? ( >=sys-libs/ncurses-5 )
22 emacs? ( virtual/emacs )
23 gtk? ( >=x11-libs/gtk+-2 )
24 tk? ( >=dev-lang/tk-8.1 )
25 motif? ( x11-libs/openmotif )
26 esd? ( >=media-sound/esound-0.2.22 )
27 nas? ( >=media-libs/nas-1.4 )
28 alsa? ( media-libs/alsa-lib[midi] )
29 slang? ( sys-libs/slang )
30 jack? ( media-sound/jack-audio-connection-kit )
31 vorbis? ( media-libs/libvorbis )
32 flac? ( media-libs/flac )
33 speex? ( media-libs/speex )
34 ao? ( >=media-libs/libao-0.8.5 )"
35 RDEPEND="${DEPEND}
36 alsa? ( media-sound/alsa-utils )
37 app-admin/eselect-timidity"
38
39 PDEPEND="|| ( media-sound/timidity-eawpatches media-sound/timidity-shompatches media-sound/timidity-freepats )"
40
41 SITEFILE=50${PN}-gentoo.el
42
43 pkg_setup() {
44 enewgroup audio 18 # Just make sure it exists
45 enewuser timidity -1 -1 /var/lib/timidity audio
46 }
47
48 src_prepare() {
49 epatch "${DISTDIR}"/${P}-exiterror.patch \
50 "${FILESDIR}"/${P}-gtk26.patch \
51 "${FILESDIR}"/${P}-gcc4.patch \
52 "${FILESDIR}"/${P}-flac.patch \
53 "${FILESDIR}"/${P}-flac113.patch \
54 "${FILESDIR}"/${P}-protos.patch \
55 "${FILESDIR}"/${P}-polling.patch \
56
57 # fix header location of speex
58 sed -i -e "s:#include <speex:#include <speex/speex:g" configure* timidity/speex_a.c
59 }
60
61 src_configure() {
62 local myconf
63 local audios
64
65 use flac && audios="${audios},flac"
66 use speex && audios="${audios},speex"
67 use vorbis && audios="${audios},vorbis"
68
69 use oss && audios="${audios},oss"
70 use esd && audios="${audios},esd"
71 use jack && audios="${audios},jack"
72 use ao && audios="${audios},ao"
73
74 if use nas; then
75 audios="${audios},nas"
76 myconf="${myconf} --with-nas-library=/usr/$(get_libdir)/libaudio.so --with-x"
77 use X || ewarn "Basic X11 support will be enabled because required by nas."
78 fi
79
80 if use alsa; then
81 audios="${audios},alsa"
82 myconf="${myconf} --with-default-output=alsa --enable-alsaseq"
83 fi
84
85 # We disable motif by default and then only enable it if it's requested.
86 if use motif; then
87 myconf="${myconf} --enable-motif --with-x"
88 use X || ewarn "Basic X11 support will be enabled because required by motif."
89 fi
90
91 econf \
92 --localstatedir=/var/state/timidity++ \
93 --with-lispdir="${SITELISP}/${PN}" \
94 --with-elf \
95 --enable-audio=${audios} \
96 --enable-server \
97 --enable-network \
98 --enable-dynamic \
99 --enable-vt100 \
100 --enable-spline=cubic \
101 $(use_enable emacs) \
102 $(use_enable slang) \
103 $(use_enable ncurses) \
104 $(use_with X x) \
105 $(use_enable X spectrogram) \
106 $(use_enable X wrd) \
107 $(use_enable X xskin) \
108 $(use_enable X xaw) \
109 $(use_enable gtk) \
110 $(use_enable tk tcltk) \
111 --disable-motif \
112 ${myconf}
113 }
114
115 src_install() {
116 emake DESTDIR="${D}" install || die "emake install failed"
117
118 dodoc AUTHORS ChangeLog*
119 dodoc NEWS README* "${FILESDIR}/timidity.cfg-r1"
120
121 # these are only for the ALSA sequencer mode
122 if use alsa; then
123 newconfd "${FILESDIR}/conf.d.timidity" timidity
124 newinitd "${FILESDIR}/init.d.timidity.3" timidity
125 fi
126
127 insinto /etc
128 newins "${FILESDIR}/timidity.cfg-r1" timidity.cfg
129
130 dodir /usr/share/timidity
131 dosym /etc/timidity.cfg /usr/share/timidity/timidity.cfg
132
133 if use emacs ; then
134 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
135 fi
136
137 diropts -o timidity -g nobody -m 0700
138 keepdir /var/lib/timidity
139
140 doicon "${FILESDIR}"/timidity.xpm
141 domenu "${FILESDIR}"/timidity.desktop
142 }
143
144 pkg_postinst() {
145 use emacs && elisp-site-regen
146
147 elog "A timidity config file has been installed in /etc/timidity.cfg."
148 elog "Do not edit this file as it will interfere with the eselect timidity tool."
149 elog "The tool 'eselect timidity' can be used to switch between installed patchsets."
150
151 if use alsa; then
152 elog "An init script for the alsa timidity sequencer has been installed."
153 elog "If you wish to use the timidity virtual sequencer, edit /etc/conf.d/timidity"
154 elog "and run 'rc-update add timidity <runlevel> && /etc/init.d/timidity start'"
155 fi
156
157 if use sparc; then
158 ewarn "sparc support is experimental. oss, alsa, and esd do not work."
159 ewarn "-Ow (save to wave file) does..."
160 fi
161 }
162
163 pkg_postrm() {
164 use emacs && elisp-site-regen
165 }

  ViewVC Help
Powered by ViewVC 1.1.20