/[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.39 - (show annotations) (download)
Wed Jul 13 06:10:47 2011 UTC (6 years, 3 months ago) by leio
Branch: MAIN
Changes since 1.38: +15 -2 lines
Prepare for gst-plugins-bad-0.10.22

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.38 2011/05/04 02:32:35 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 xvid
20 dvb wininet acm vdpau schro zbar resindvd vp8"
21
22 # When adding conditionals like below, be careful about having leading spaces
23
24 # Changes in 0.10.22:
25 # New curlsink element in a new curl plugin
26 # New Blackmagic Decklink source and sink
27 # New Linear Systems SDI plugin
28 if version_is_at_least "0.10.22"; then
29 my_gst_plugins_bad+=" curl decklink linsys"
30 fi
31
32 # Unused ancient theora decoder, better one in -base long ago
33 if ! version_is_at_least "0.10.22"; then
34 my_gst_plugins_bad+=" theoradec"
35 fi
36
37 # Changes in 0.10.21:
38 # New opencv and apple_media plugins
39 # exif for a specific jifmux tests purpose only
40 if version_is_at_least "0.10.21"; then
41 my_gst_plugins_bad+=" opencv apple_media exif"
42 fi
43
44 # jack moved to -good, metadata removed (functionality in base classes)
45 # alsaspdif gone (gst-plugins-alsa from -base can do spdif on its own long ago)
46 if ! version_is_at_least "0.10.21"; then
47 my_gst_plugins_bad+=" jack metadata alsa"
48 fi
49
50 # Changes in 0.10.20:
51 # New split plugins rtmp, gsettings and shm
52 if version_is_at_least "0.10.20"; then
53 my_gst_plugins_bad+=" rtmp gsettings shm"
54 fi
55
56 MY_PN="gst-plugins-bad"
57 MY_P=${MY_PN}-${PV}
58
59 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
60
61 # added to remove circular deps
62 # 6/2/2006 - zaheerm
63 if [ "${PN}" != "${MY_PN}" ]; then
64 RDEPEND="=media-libs/gstreamer-0.10*
65 =media-libs/gst-plugins-base-0.10*
66 >=dev-libs/glib-2.6"
67 DEPEND="${RDEPEND}
68 sys-apps/sed
69 dev-util/pkgconfig
70 sys-devel/gettext"
71
72 # -bad-0.10.20 uses orc optionally instead of liboil unconditionally.
73 # While <0.10.20 configure always check for liboil, it is used only by non-split
74 # plugins in gst/ (legacyresample and mpegdemux), so we only builddep for all
75 # old packages, and have a RDEPEND in old versions of media-libs/gst-plugins-bad
76 if ! version_is_at_least "0.10.20"; then
77 DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
78 fi
79
80 RESTRICT=test
81 fi
82 S=${WORKDIR}/${MY_P}
83
84 gst-plugins-bad_src_unpack() {
85 # local makefiles
86
87 unpack ${A}
88
89 # Link with the syswide installed gst-libs if needed
90 gst-plugins10_find_plugin_dir
91 sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstphotography:${ROOT}/usr/$(get_libdir)/libgstphotography:" \
92 -e "s:\$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor:${ROOT}/usr/$(get_libdir)/libgstsignalprocessor:" \
93 -e "s:\$(top_builddir)/gst-libs/gst/video/libgstbasevideo:${ROOT}/usr/$(get_libdir)/libgstbasevideo:" \
94 -e "s:\$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc:${ROOT}/usr/$(get_libdir)/libgstbasecamerabinsrc:" \
95 -i Makefile.in
96
97 # Remove generation of any other Makefiles except the plugin's Makefile
98 # if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
99 # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
100 # elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
101 # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
102 # fi
103
104 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
105 # -i ${S}/configure
106 }
107
108 gst-plugins-bad_src_configure() {
109 local plugin gst_conf
110
111 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
112
113 for plugin in ${my_gst_plugins_bad} ; do
114 gst_conf="${gst_conf} --disable-${plugin}"
115 done
116
117 for plugin in ${GST_PLUGINS_BUILD} ; do
118 gst_conf="${gst_conf} --enable-${plugin}"
119 done
120
121 cd ${S}
122 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "configure failed"
123 }
124
125 gst-plugins-bad_src_compile() {
126 gst-plugins-bad_src_configure ${@}
127
128 gst-plugins10_find_plugin_dir
129 emake || die "compile failure"
130 }
131
132 gst-plugins-bad_src_install() {
133 gst-plugins10_find_plugin_dir
134 einstall || die "install failed"
135
136 [[ -e README ]] && dodoc README
137 }
138
139 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20