blob: a3baf88ae1f6964c7803fa6fa9348726019e8baa (
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/gpac/gpac-0.4.1_pre20060122.ebuild,v 1.2 2006/03/05 15:51:08 zypher Exp $
inherit wxwidgets flag-o-matic
DESCRIPTION="GPAC is an implementation of the MPEG-4 Systems standard developed from scratch in ANSI C."
HOMEPAGE="http://gpac.sourceforge.net/"
SRC_URI="mirror://gentoo/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="aac amr debug ffmpeg jpeg mad mozilla ogg opengl oss png sdl svg ssl theora truetype vorbis wxwindows xml2 xvid"
S="${WORKDIR}/${PN}"
RDEPEND="aac? ( media-libs/faad2 )
ffmpeg? ( media-video/ffmpeg )
jpeg? ( media-libs/jpeg )
mad? ( media-libs/libmad )
mozilla? ( dev-lang/spidermonkey )
mpeg? ( media-libs/faad2 )
opengl? ( virtual/opengl )
ogg? ( media-libs/libogg )
png? ( media-libs/libpng )
vorbis? ( media-libs/libvorbis )
theora? ( media-libs/libtheora )
truetype? ( >=media-libs/freetype-2.1 )
wxwindows? ( >=x11-libs/wxGTK-2.6.0 )
xml2? ( >=dev-libs/libxml2-2.6.0 )
xvid? ( >=media-libs/xvid-1.0.1 )
sdl? ( media-libs/libsdl )
|| ( (
x11-libs/libXt
x11-libs/libX11
x11-libs/libXext
) virtual/x11 )"
DEPEND="${RDEPEND}"
pkg_setup() {
if use ffmpeg; then
myconf="${myconf} --use-ffmpeg=system"
else
myconf="${myconf} --use-ffmpeg=no"
fi
if use aac; then
myconf="${myconf} --use-faad=system"
else
myconf="${myconf} --use-faad=no"
fi
if use jpeg; then
myconf="${myconf} --use-jpeg=system"
else
myconf="${myconf} --use-jpeg=no"
fi
if use mad; then
myconf="${myconf} --use-mad=system"
else
myconf="${myconf} --use-mad=no"
fi
if use mozilla; then
myconf="${myconf} --use-js=system"
else
myconf="${myconf} --use-js=no"
fi
if use png; then
myconf="${myconf} --use-png=system"
else
myconf="${myconf} --use-png=no"
fi
if use truetype; then
myconf="${myconf} --use-ft=system"
else
myconf="${myconf} --use-ft=no"
fi
if use xvid; then
myconf="${myconf} --use-xvid=system"
else
myconf="${myconf} --use-xvid=no"
fi
if use ogg; then
myconf="${myconf} --use-ogg=system"
if use vorbis; then
myconf="${myconf} --use-vorbis=system"
fi
if use theora; then
myconf="${myconf} --use-theora=system"
fi
else
myconf="${myconf} --use-ogg=no"
fi
}
src_compile() {
cd ${S}
chmod +x configure
epatch ${FILESDIR}/gpac-${PV}-configure-ogg.patch || die "configure patch failed"
# make sure configure looks for wx-2.6
if use wxwindows; then
sed -i -e 's/wx-config/wx-config-2.6/' configure
else
sed -i 's:^has_wx="yes:has_wx="no:' configure
fi
use !sdl && sed -i 's:^has_sdl=yes:has_sdl=no:' configure
# fix hardcoded paths in source
sed -i -e \
"s:\([^f]\)\ M4_PLUGIN_PATH:\1 \"/usr/$(get_libdir)\":" \
applications/mp4client/main.c \
applications/osmo4_wx/wxOsmo4.cpp \
|| die "path fixation failed"
# make sure mozilla won't be used
if ! use mozilla; then
sed -i -e 's/osmozilla//g' applications/Makefile
fi
# use this to cute down on the warnings noise
append-flags -fno-strict-aliasing
# amd64 compile
[ "${ARCH}" = "amd64" ] && append-flags -fPIC
./configure \
--prefix=${D}/usr \
--host=${CHOST} \
--mandir=${D}/usr/share/man \
--infodir=${D}/usr/share/info \
--datadir=${D}/usr/share \
--sysconfdir=${D}/etc \
--localstatedir=${D}/var/lib \
$(use_enable amr) \
$(use_enable debug) \
$(use_enable opengl) \
$(use_enable svg) \
$(use_enable oss oss-audio) \
$(use_enable ssl) \
${myconf} \
die "configure died"
make OPTFLAGS="${CFLAGS}" || die "emake failed."
}
src_install() {
make OPTFLAGS="${CFLAGS}" install || die
make OPTLFAGS="${CFLAGS}" install-lib || die
dodoc AUTHORS BUGS Changelog README TODO
dodoc doc/*.html doc/*.txt doc/libisomedia_license doc/SGGen
}
|