/[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.36 - (hide annotations) (download)
Sat Apr 9 07:24:38 2011 UTC (6 years, 9 months ago) by leio
Branch: MAIN
Changes since 1.35: +16 -1 lines
Prepare for gst-plugins-bad-0.10.21 - changes from 0.10.20; new rtmp, gsettings and shm configure options for splits; move away from liboil

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

  ViewVC Help
Powered by ViewVC 1.1.20