summaryrefslogtreecommitdiff
blob: fe65a25ab85c936a9ecccfaf1adc6cbb8442e8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/audacity/audacity-1.2.3.ebuild,v 1.6 2005/05/15 20:03:34 flameeyes Exp $

IUSE="encode flac mad oggvorbis"

MY_PV="${PV/_/-}"
MY_P="${PN}-src-${MY_PV}"
S="${WORKDIR}/${MY_P}"

DESCRIPTION="A free, crossplatform audio editor."
HOMEPAGE="http://audacity.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"

# amd64: causes xfce pannel to crash...
# Bad x86 assembly: #73248
KEYWORDS="~amd64 ~ppc sparc -x86 ppc64"

DEPEND="=x11-libs/wxGTK-2.4*
	>=app-arch/zip-2.3
	>=media-libs/id3lib-3.8.0
	media-libs/libid3tag
	>=media-libs/libsndfile-1.0.0
	>=media-libs/libsamplerate-0.0.14
	>=media-libs/ladspa-sdk-1.12
	flac? ( media-libs/flac )
	oggvorbis? ( >=media-libs/libvorbis-1.0 )
	mad? ( >=media-sound/madplay-0.14 )
	encode? ( >=media-sound/lame-3.92 )"

pkg_setup() {
	if wx-config --cppflags | grep gtk2u >& /dev/null; then
		einfo "Audacity will not build if wxGTK was compiled"
		einfo "with unicode support.  If you are using a version of"
		einfo "wxGTK <= 2.4.2, you must set USE=-gtk2.  In newer versions,"
		einfo "you must set USE=-unicode."
		die "wxGTK must be re-emerged without unicode suport"
	fi
}

src_compile() {
	local myconf;

	myconf="--with-libsndfile=system --with-id3tag=system"

	# MAD support
	if use mad; then
		myconf="${myconf} --with-libmad=system"
	else
		myconf="${myconf} --with-libmad=none"
	fi

	# FLAC support
	if use flac; then
		myconf="${myconf} --with-libflac=system"
	else
		myconf="${myconf} --with-libflac=none"
	fi

	# Ogg Vorbis support
	if use oggvorbis; then
		myconf="${myconf} --with-vorbis=system"
	else
		myconf="${myconf} --with-vorbis=none"
	fi

	econf ${myconf} || die

	# parallel borks 
	emake -j1 || die
}

src_install() {
	make DESTDIR="${D}" install || die

	# Install our docs
	dodoc LICENSE.txt README.txt audacity-1.2-help.htb

	# Remove bad doc install
	rm -rf ${D}/share/doc

	insinto /usr/share/pixmaps
	newins images/AudacityLogo48x48.xpm audacity.xpm

	insinto /usr/share/applications
	doins ${FILESDIR}/audacity.desktop
}