/[gentoo-x86]/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild
Gentoo

Contents of /media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide annotations) (download)
Tue Apr 17 21:15:44 2012 UTC (2 years, 4 months ago) by mr_bones_
Branch: MAIN
Changes since 1.11: +7 -7 lines
link the midi-related use flags more (bug #412407)

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 mr_bones_ 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mr_bones_ 1.12 # $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild,v 1.11 2012/04/17 14:46:13 mr_bones_ Exp $
4 mr_bones_ 1.1
5     EAPI=4
6 mr_bones_ 1.4 inherit eutils
7 mr_bones_ 1.1
8     MY_P=${P/sdl-/SDL_}
9     DESCRIPTION="Simple Direct Media Layer Mixer Library"
10     HOMEPAGE="http://www.libsdl.org/projects/SDL_mixer/"
11     SRC_URI="http://www.libsdl.org/projects/SDL_mixer/release/${MY_P}.tar.gz"
12    
13     LICENSE="ZLIB"
14     SLOT="0"
15 maekke 1.10 KEYWORDS="~alpha amd64 arm hppa ~mips ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
16 mr_bones_ 1.2 IUSE="flac fluidsynth mad midi mikmod modplug mp3 playtools static-libs timidity vorbis +wav"
17 mr_bones_ 1.12 REQUIRED_USE="
18     midi? ( || ( timidity fluidsynth ) )
19     timidity? ( midi )
20     fluidsynth? ( midi )
21     "
22 mr_bones_ 1.1
23     DEPEND=">=media-libs/libsdl-1.2.10
24     flac? ( media-libs/flac )
25 mr_bones_ 1.11 midi? (
26     fluidsynth? ( media-sound/fluidsynth )
27     timidity? ( media-sound/timidity++ )
28     )
29 mr_bones_ 1.1 mad? ( media-libs/libmad )
30     !mad? ( mp3? ( >=media-libs/smpeg-0.4.4-r1 ) )
31     modplug? ( media-libs/libmodplug )
32     mikmod? ( >=media-libs/libmikmod-3.1.10 )
33     vorbis? ( >=media-libs/libvorbis-1.0_beta4 media-libs/libogg )"
34    
35     S=${WORKDIR}/${MY_P}
36    
37 mr_bones_ 1.4 src_prepare() {
38     epatch "${FILESDIR}"/${P}-wav.patch
39 mr_bones_ 1.8 sed -i \
40     -e '/link.*play/s/-o/$(LDFLAGS) -o/' \
41     Makefile.in || die
42 mr_bones_ 1.4 }
43    
44 mr_bones_ 1.1 src_configure() {
45 mr_bones_ 1.12 local myconf=$(use_enable timidity music-timidity-midi) \
46 mr_bones_ 1.11 $(use_enable fluidsynth music-fluidsynth-midi)
47    
48 mr_bones_ 1.1 econf \
49     --disable-dependency-tracking \
50     --disable-music-flac-shared \
51     --disable-music-fluidsynth-shared \
52     --disable-music-mod-shared \
53     --disable-music-mp3-shared \
54     --disable-music-ogg-shared \
55     $(use_enable wav music-wave) \
56     $(use_enable vorbis music-ogg) \
57     $(use_enable mikmod music-mod) \
58 mr_bones_ 1.3 $(use_enable modplug music-mod-modplug) \
59 mr_bones_ 1.1 $(use_enable flac music-flac) \
60     $(use_enable static-libs static) \
61     $(use mad && echo --disable-music-mp3 || use_enable mp3 music-mp3) \
62 mr_bones_ 1.11 $(use_enable mad music-mp3-mad-gpl) \
63     ${myconf}
64 mr_bones_ 1.1 }
65    
66     src_install() {
67     emake DESTDIR="${D}" install
68     if use playtools; then
69     emake DESTDIR="${D}" install-bin
70     fi
71     dodoc CHANGES README
72     if ! use static-libs ; then
73     find "${D}" -type f -name '*.la' -exec rm {} + \
74     || die "la removal failed"
75     fi
76     }
77 mr_bones_ 1.11
78     pkg_postinst() {
79     # bug 412035
80     # https://bugs.gentoo.org/show_bug.cgi?id=412035
81     if use midi ; then
82     if use fluidsynth; then
83     ewarn "FluidSynth support requires you to set the SDL_SOUNDFONTS"
84     ewarn "environment variable to the location of a SoundFont file"
85     ewarn "unless the game or application happens to do this for you."
86    
87     if use timidity; then
88     ewarn "Failing to do so will result in Timidity being used instead."
89     else
90     ewarn "Failing to do so will result in silence."
91     fi
92     fi
93     fi
94     }

  ViewVC Help
Powered by ViewVC 1.1.20