/[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.10 - (hide annotations) (download)
Thu Jun 25 18:21:11 2009 UTC (10 years, 5 months ago) by armin76
Branch: MAIN
Changes since 1.9: +2 -2 lines
arm stable wrt #271780
(Portage version: 2.1.6.13/cvs/Linux ia64)

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

  ViewVC Help
Powered by ViewVC 1.1.20