/[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.26 - (show annotations) (download)
Mon Apr 5 01:57:41 2010 UTC (7 years, 8 months ago) by leio
Branch: MAIN
Changes since 1.25: +3 -3 lines
Prepare for gst-plugins-bad-0.10.18 - has new flite split plugin and ivorbis removed

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

  ViewVC Help
Powered by ViewVC 1.1.20