/[gentoo-x86]/eclass/gst-plugins-bad.eclass
Gentoo

Contents of /eclass/gst-plugins-bad.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.34 - (show annotations) (download)
Fri Jul 30 12:00:43 2010 UTC (7 years, 2 months ago) by leio
Branch: MAIN
Changes since 1.33: +2 -2 lines
The minimum required liboil version has been 0.3.8 for a while now (not 0.3), update

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.33 2010/07/30 09:45:50 leio Exp $
4
5 #
6 # Original Author: Saleem Abdulrasool <compnerd@gentoo.org>
7 # Based on the work of foser <foser@gentoo.org> and zaheerm <zaheerm@gentoo.org>
8 # Purpose: This elcass is designed to help package external gst-plugins per
9 # plugin rather than in a single package.
10 #
11
12 inherit eutils versionator gst-plugins10
13
14 # This list is current for gst-plugins-bad-0.10.18.
15 my_gst_plugins_bad="directsound directdraw osx_video quicktime vcd
16 alsa assrender amrwb apexsink bz2 cdaudio celt cog dc1394 directfb dirac dts divx
17 metadata faac faad fbdev flite gsm jack jp2k kate ladspa lv2 libmms
18 modplug mimic mpeg2enc mplex musepack musicbrainz mythtv nas neon ofa rsvg
19 timidity wildmidi sdl sdltest sndfile soundtouch spc gme swfdec theoradec xvid
20 dvb wininet acm vdpau schro zbar"
21
22 # When adding conditionals like below, be careful about having leading spaces
23
24 # Changes in 0.10.19:
25 # dvdnav configure option changed from --enable-dvdnav to --enable-resindvd
26 if version_is_at_least "0.10.19"; then
27 my_gst_plugins_bad+=" resindvd vp8"
28 fi
29
30 # dvdnav configure option changed from --enable-dvdnav to --enable-resindvd
31 # oss4 moved to -good
32 if ! version_is_at_least "0.10.19"; then
33 my_gst_plugins_bad+=" dvdnav oss4"
34 fi
35
36 # Changes in 0.10.18:
37 # ivorbis gone (moved to -base-0.10.27 as part of vorbis plugin)
38 if ! version_is_at_least "0.10.18"; then
39 my_gst_plugins_bad+=" ivorbis"
40 fi
41
42 MY_PN="gst-plugins-bad"
43 MY_P=${MY_PN}-${PV}
44
45 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
46 if [ ${PV} == "0.10.14" ]; then
47 SRC_URI="${SRC_URI} http://dev.gentoo.org/~leio/distfiles/gst-plugins-bad-0.10.14-kate-configure-fix.patch.bz2"
48 fi
49
50 # added to remove circular deps
51 # 6/2/2006 - zaheerm
52 if [ "${PN}" != "${MY_PN}" ]; then
53 RDEPEND="=media-libs/gstreamer-0.10*
54 =media-libs/gst-plugins-base-0.10*
55 >=dev-libs/glib-2.6
56 >=dev-libs/liboil-0.3.8"
57 DEPEND="${RDEPEND}
58 sys-apps/sed
59 dev-util/pkgconfig
60 sys-devel/gettext"
61 RESTRICT=test
62 fi
63 S=${WORKDIR}/${MY_P}
64
65 gst-plugins-bad_src_unpack() {
66 # local makefiles
67
68 unpack ${A}
69
70 # Link with the syswide installed gst-libs if needed
71 gst-plugins10_find_plugin_dir
72 sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstphotography:${ROOT}/usr/$(get_libdir)/libgstphotography:" \
73 -e "s:\$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor:${ROOT}/usr/$(get_libdir)/libgstsignalprocessor:" \
74 -e "s:\$(top_builddir)/gst-libs/gst/video/libgstbasevideo:${ROOT}/usr/$(get_libdir)/libgstbasevideo:" \
75 -i Makefile.in
76
77 # 0.10.14 configure errors when --disable-kate is passed:
78 # configure: error: conditional "USE_TIGER" was never defined.
79 # Fix it - this has to stay until any 0.10.14 split or main is in tree:
80 if [ ${PV} == "0.10.14" ]; then
81 cd ${S}
82 epatch "${WORKDIR}/gst-plugins-bad-0.10.14-kate-configure-fix.patch"
83 fi
84
85 # Remove generation of any other Makefiles except the plugin's Makefile
86 # if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
87 # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
88 # elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
89 # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
90 # fi
91
92 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
93 # -i ${S}/configure
94 }
95
96 gst-plugins-bad_src_configure() {
97 local plugin gst_conf
98
99 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
100
101 for plugin in ${my_gst_plugins_bad} ; do
102 gst_conf="${gst_conf} --disable-${plugin}"
103 done
104
105 for plugin in ${GST_PLUGINS_BUILD} ; do
106 gst_conf="${gst_conf} --enable-${plugin}"
107 done
108
109 cd ${S}
110 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "configure failed"
111 }
112
113 gst-plugins-bad_src_compile() {
114 gst-plugins-bad_src_configure ${@}
115
116 gst-plugins10_find_plugin_dir
117 emake || die "compile failure"
118 }
119
120 gst-plugins-bad_src_install() {
121 gst-plugins10_find_plugin_dir
122 einstall || die "install failed"
123
124 [[ -e README ]] && dodoc README
125 }
126
127 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20