/[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.37 - (show annotations) (download)
Wed Apr 13 08:50:24 2011 UTC (7 years, 5 months ago) by leio
Branch: MAIN
Changes since 1.36: +16 -8 lines
Finish gst-plugins-0.10.21 changes

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.36 2011/04/09 07:24:38 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.21.
15 my_gst_plugins_bad="directsound directdraw osx_video quicktime vcd
16 assrender amrwb apexsink bz2 cdaudio celt cog dc1394 directfb dirac dts divx
17 faac faad fbdev flite gsm 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.21:
25 # New opencv and apple_media plugins
26 # exif for a specific jifmux tests purpose only
27 if version_is_at_least "0.10.21"; then
28 my_gst_plugins_bad+=" opencv apple_media exif"
29 fi
30
31 # jack moved to -good, metadata removed (functionality in base classes)
32 # alsaspdif gone (gst-plugins-alsa from -base can do spdif on its own long ago)
33 if ! version_is_at_least "0.10.21"; then
34 my_gst_plugins_bad+=" jack metadata alsa"
35 fi
36
37 # Changes in 0.10.20:
38 # New split plugins rtmp, gsettings and shm
39 if version_is_at_least "0.10.20"; then
40 my_gst_plugins_bad+=" rtmp gsettings shm"
41 fi
42
43 # Changes in 0.10.19:
44 # dvdnav configure option changed from --enable-dvdnav to --enable-resindvd
45 # New vp8 plugin
46 if version_is_at_least "0.10.19"; then
47 my_gst_plugins_bad+=" resindvd vp8"
48 fi
49
50 # dvdnav configure option changed from --enable-dvdnav to --enable-resindvd
51 # oss4 moved to -good
52 if ! version_is_at_least "0.10.19"; then
53 my_gst_plugins_bad+=" dvdnav oss4"
54 fi
55
56 # Changes in 0.10.18:
57 # ivorbis gone (moved to -base-0.10.27 as part of vorbis plugin)
58 if ! version_is_at_least "0.10.18"; then
59 my_gst_plugins_bad+=" ivorbis"
60 fi
61
62 MY_PN="gst-plugins-bad"
63 MY_P=${MY_PN}-${PV}
64
65 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
66 if [ ${PV} == "0.10.14" ]; then
67 SRC_URI="${SRC_URI} http://dev.gentoo.org/~leio/distfiles/gst-plugins-bad-0.10.14-kate-configure-fix.patch.bz2"
68 fi
69
70 # added to remove circular deps
71 # 6/2/2006 - zaheerm
72 if [ "${PN}" != "${MY_PN}" ]; then
73 RDEPEND="=media-libs/gstreamer-0.10*
74 =media-libs/gst-plugins-base-0.10*
75 >=dev-libs/glib-2.6"
76 DEPEND="${RDEPEND}
77 sys-apps/sed
78 dev-util/pkgconfig
79 sys-devel/gettext"
80
81 # -bad-0.10.20 uses orc optionally instead of liboil unconditionally.
82 # While <0.10.20 configure always check for liboil, it is used only by non-split
83 # plugins in gst/ (legacyresample and mpegdemux), so we only builddep for all
84 # old packages, and have a RDEPEND in old versions of media-libs/gst-plugins-bad
85 if ! version_is_at_least "0.10.20"; then
86 DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
87 fi
88
89 RESTRICT=test
90 fi
91 S=${WORKDIR}/${MY_P}
92
93 gst-plugins-bad_src_unpack() {
94 # local makefiles
95
96 unpack ${A}
97
98 # Link with the syswide installed gst-libs if needed
99 gst-plugins10_find_plugin_dir
100 sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstphotography:${ROOT}/usr/$(get_libdir)/libgstphotography:" \
101 -e "s:\$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor:${ROOT}/usr/$(get_libdir)/libgstsignalprocessor:" \
102 -e "s:\$(top_builddir)/gst-libs/gst/video/libgstbasevideo:${ROOT}/usr/$(get_libdir)/libgstbasevideo:" \
103 -e "s:\$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc:${ROOT}/usr/$(get_libdir)/libgstbasecamerabinsrc:" \
104 -i Makefile.in
105
106 # 0.10.14 configure errors when --disable-kate is passed:
107 # configure: error: conditional "USE_TIGER" was never defined.
108 # Fix it - this has to stay until any 0.10.14 split or main is in tree:
109 if [ ${PV} == "0.10.14" ]; then
110 cd ${S}
111 epatch "${WORKDIR}/gst-plugins-bad-0.10.14-kate-configure-fix.patch"
112 fi
113
114 # Remove generation of any other Makefiles except the plugin's Makefile
115 # if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
116 # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
117 # elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
118 # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
119 # fi
120
121 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
122 # -i ${S}/configure
123 }
124
125 gst-plugins-bad_src_configure() {
126 local plugin gst_conf
127
128 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
129
130 for plugin in ${my_gst_plugins_bad} ; do
131 gst_conf="${gst_conf} --disable-${plugin}"
132 done
133
134 for plugin in ${GST_PLUGINS_BUILD} ; do
135 gst_conf="${gst_conf} --enable-${plugin}"
136 done
137
138 cd ${S}
139 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "configure failed"
140 }
141
142 gst-plugins-bad_src_compile() {
143 gst-plugins-bad_src_configure ${@}
144
145 gst-plugins10_find_plugin_dir
146 emake || die "compile failure"
147 }
148
149 gst-plugins-bad_src_install() {
150 gst-plugins10_find_plugin_dir
151 einstall || die "install failed"
152
153 [[ -e README ]] && dodoc README
154 }
155
156 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20