/[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.30 - (hide annotations) (download)
Wed Jul 28 05:17:58 2010 UTC (7 years, 5 months ago) by leio
Branch: MAIN
Changes since 1.29: +1 -5 lines
Do not filter out the plugins being built from the list in src_configure before creating the --disable-* configure options. ./configure should guarantee us they get enabled nevertheless, as the --enable-* options are appended to it, overriding the --disable for the to be built plugins. This avoids problems in the filtering, e.g "ivorbis vorbis" getting filtered to "i" when building gst-plugins-vorbis. Fixes bug 325613

1 leio 1.22 # Copyright 1999-2009 Gentoo Foundation
2 compnerd 1.1 # Distributed under the terms of the GNU General Public License v2
3 leio 1.30 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.29 2010/07/28 05:01:50 leio Exp $
4 compnerd 1.1
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 leio 1.29 inherit eutils gst-plugins10 versionator
13    
14 leio 1.26 # This list is current for gst-plugins-bad-0.10.18.
15 leio 1.25 my_gst_plugins_bad="directsound directdraw osx_video quicktime vcd
16     alsa assrender amrwb apexsink bz2 cdaudio celt cog directfb dirac dts divx
17 leio 1.26 dvdnav metadata faac faad fbdev flite gsm jack jp2k kate ladspa lv2 libmms
18 leio 1.25 modplug mimic mpeg2enc mplex musepack musicbrainz mythtv nas neon ofa rsvg
19     timidity wildmidi sdl sdltest sndfile soundtouch spc gme swfdec theoradec xvid
20 leio 1.29 dvb oss4 wininet acm vdpau schro zbar"
21    
22     # When adding conditionals like this, be careful about having leading spaces
23     if version_is_at_least "0.10.19"; then
24     my_gst_plugins_bad+=" vp8"
25     fi
26 compnerd 1.1
27 leio 1.29 # ivorbis gone since 0.10.18 (moved to -base-0.10.27 as part of vorbis plugin)
28     if ! version_is_at_least "0.10.18"; then
29     my_gst_plugins_bad+=" ivorbis"
30     fi
31 compnerd 1.1
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 leio 1.24 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 compnerd 1.1
40 zaheerm 1.2 # added to remove circular deps
41     # 6/2/2006 - zaheerm
42     if [ "${PN}" != "${MY_PN}" ]; then
43     RDEPEND="=media-libs/gstreamer-0.10*
44 swegener 1.7 =media-libs/gst-plugins-base-0.10*
45     >=dev-libs/glib-2.6
46     >=dev-libs/liboil-0.3"
47 compnerd 1.1 DEPEND="${RDEPEND}
48     sys-apps/sed
49 tester 1.15 dev-util/pkgconfig
50 compnerd 1.1 sys-devel/gettext"
51 tester 1.17 RESTRICT=test
52 zaheerm 1.2 fi
53 compnerd 1.1 S=${WORKDIR}/${MY_P}
54    
55     gst-plugins-bad_src_unpack() {
56 tester 1.14 # local makefiles
57 compnerd 1.1
58     unpack ${A}
59    
60 tester 1.20 # 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 maekke 1.21
67 leio 1.24 # 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 compnerd 1.1
75     # Remove generation of any other Makefiles except the plugin's Makefile
76 tester 1.14 # 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 compnerd 1.1
82 tester 1.14 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
83     # -i ${S}/configure
84 compnerd 1.1 }
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 zaheerm 1.3 for plugin in ${my_gst_plugins_bad} ; do
92 compnerd 1.1 gst_conf="${gst_conf} --disable-${plugin}"
93     done
94    
95 foser 1.4 for plugin in ${GST_PLUGINS_BUILD} ; do
96 compnerd 1.1 gst_conf="${gst_conf} --enable-${plugin}"
97     done
98    
99     cd ${S}
100 zaheerm 1.6 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "configure failed"
101 compnerd 1.1 }
102    
103     gst-plugins-bad_src_compile() {
104     gst-plugins-bad_src_configure ${@}
105    
106     gst-plugins10_find_plugin_dir
107     emake || die "compile failure"
108     }
109    
110     gst-plugins-bad_src_install() {
111     gst-plugins10_find_plugin_dir
112     einstall || die "install failed"
113    
114 drac 1.10 [[ -e README ]] && dodoc README
115 compnerd 1.1 }
116    
117     EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20