/[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.8 - (hide annotations) (download)
Mon Jun 8 22:12:24 2009 UTC (10 years, 6 months ago) by jer
Branch: MAIN
Changes since 1.7: +2 -2 lines
Stable for HPPA (bug #271780).
(Portage version: 2.2_rc33/cvs/Linux i686)

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

  ViewVC Help
Powered by ViewVC 1.1.20