/[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.24 - (show annotations) (download)
Mon Nov 9 02:43:05 2009 UTC (7 years, 11 months ago) by leio
Branch: MAIN
Changes since 1.23: +12 -3 lines
Add kate back to the plugin list while fixing compilation with --disable-kate for split plugins

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.23 2009/11/09 01:31:16 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 # This list is current to gst-plugins-bad-0.10.4 except for:
13 # gst_v4l2 - moved to gst-plugins-bad-0.10.5 (not in >=gst-plugins-bad-0.10.4)
14 # But it must stay in this list until all <gst-plugins-bad-0.10.4
15 # are removed
16 # drac at gentoo.org:
17 # This list is current to gst-plugins-bad-0.10.5 except for:
18 # Not present in 0.10.5 - wavpack
19 # This list is current for gst-plugins-bad-0.10.14 and is only getting entries
20 # added to it, and never removed for longer backwards compatibility.
21 my_gst_plugins_bad="alsa amrwb apexsink assrender bz2 cdaudio celt dc1394 dirac
22 directfb divx dts dvb dvdnav faac faad fbdev gme gsm gst_v4l2 ivorbis jack jp2k
23 kate ladspa libmms lv2 metadata mimic modplug mpeg2enc mplex musepack
24 musicbrainz mythtv nas neon ofa opengl oss4 quicktime schro sdl sdltest sndfile
25 soundtouch soup spc swfdec theoradec timidity twolame vcd vdpau wavpack wildmidi
26 x x264 xvid"
27
28 #qtdemux spped tta
29
30 inherit eutils gst-plugins10
31
32 MY_PN="gst-plugins-bad"
33 MY_P=${MY_PN}-${PV}
34
35 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
36 if [ ${PV} == "0.10.14" ]; then
37 SRC_URI="${SRC_URI} http://dev.gentoo.org/~leio/distfiles/gst-plugins-bad-0.10.14-kate-configure-fix.patch.bz2"
38 fi
39
40 # added to remove circular deps
41 # 6/2/2006 - zaheerm
42 if [ "${PN}" != "${MY_PN}" ]; then
43 RDEPEND="=media-libs/gstreamer-0.10*
44 =media-libs/gst-plugins-base-0.10*
45 >=dev-libs/glib-2.6
46 >=dev-libs/liboil-0.3"
47 DEPEND="${RDEPEND}
48 sys-apps/sed
49 dev-util/pkgconfig
50 sys-devel/gettext"
51 RESTRICT=test
52 fi
53 S=${WORKDIR}/${MY_P}
54
55 gst-plugins-bad_src_unpack() {
56 # local makefiles
57
58 unpack ${A}
59
60 # Link with the syswide installed gst-libs if needed
61 gst-plugins10_find_plugin_dir
62 sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstphotography:${ROOT}/usr/$(get_libdir)/libgstphotography:" \
63 -e "s:\$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor:${ROOT}/usr/$(get_libdir)/libgstsignalprocessor:" \
64 -e "s:\$(top_builddir)/gst-libs/gst/video/libgstbasevideo:${ROOT}/usr/$(get_libdir)/libgstbasevideo:" \
65 -i Makefile.in
66
67 # 0.10.14 configure errors when --disable-kate is passed:
68 # configure: error: conditional "USE_TIGER" was never defined.
69 # Fix it - this has to stay until any 0.10.14 split or main is in tree:
70 if [ ${PV} == "0.10.14" ]; then
71 cd ${S}
72 epatch "${WORKDIR}/gst-plugins-bad-0.10.14-kate-configure-fix.patch"
73 fi
74
75 # Remove generation of any other Makefiles except the plugin's Makefile
76 # if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
77 # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
78 # elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
79 # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
80 # fi
81
82 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
83 # -i ${S}/configure
84 }
85
86 gst-plugins-bad_src_configure() {
87 local plugin gst_conf
88
89 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
90
91 for plugin in ${GST_PLUGINS_BUILD} ; do
92 my_gst_plugins_bad="${my_gst_plugins_bad/${plugin}/}"
93 done
94
95 for plugin in ${my_gst_plugins_bad} ; do
96 gst_conf="${gst_conf} --disable-${plugin}"
97 done
98
99 for plugin in ${GST_PLUGINS_BUILD} ; do
100 gst_conf="${gst_conf} --enable-${plugin}"
101 done
102
103 cd ${S}
104 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "configure failed"
105 }
106
107 gst-plugins-bad_src_compile() {
108 gst-plugins-bad_src_configure ${@}
109
110 gst-plugins10_find_plugin_dir
111 emake || die "compile failure"
112 }
113
114 gst-plugins-bad_src_install() {
115 gst-plugins10_find_plugin_dir
116 einstall || die "install failed"
117
118 [[ -e README ]] && dodoc README
119 }
120
121 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20