/[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.42 - (hide annotations) (download)
Wed May 2 18:31:42 2012 UTC (5 years, 11 months ago) by jdhore
Branch: MAIN
Changes since 1.41: +3 -3 lines
dev-util/pkgconfig -> virtual/pkgconfig

1 jdhore 1.42 # Copyright 1999-2012 Gentoo Foundation
2 compnerd 1.1 # Distributed under the terms of the GNU General Public License v2
3 jdhore 1.42 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.41 2011/12/27 17:55:12 fauli 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.37 # This list is current for gst-plugins-bad-0.10.21.
15 leio 1.25 my_gst_plugins_bad="directsound directdraw osx_video quicktime vcd
16 leio 1.37 assrender amrwb apexsink bz2 cdaudio celt cog dc1394 directfb dirac dts divx
17     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 leio 1.39 timidity wildmidi sdl sdltest sndfile soundtouch spc gme swfdec xvid
20 leio 1.38 dvb wininet acm vdpau schro zbar resindvd vp8"
21 leio 1.29
22 leio 1.32 # When adding conditionals like below, be careful about having leading spaces
23    
24 leio 1.39 # 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 leio 1.35 # Changes in 0.10.21:
38 leio 1.37 # New opencv and apple_media plugins
39     if version_is_at_least "0.10.21"; then
40 leio 1.40 my_gst_plugins_bad+=" opencv apple_media"
41     fi
42    
43     # exif for a specific jifmux tests purpose only.
44     # Made automagic in 0.10.22, which is fine as a non-installed test
45     if [ ${PV} == "0.10.21" ]; then
46     my_gst_plugins_bad+=" exif"
47 leio 1.37 fi
48    
49     # jack moved to -good, metadata removed (functionality in base classes)
50     # alsaspdif gone (gst-plugins-alsa from -base can do spdif on its own long ago)
51 leio 1.35 if ! version_is_at_least "0.10.21"; then
52 leio 1.37 my_gst_plugins_bad+=" jack metadata alsa"
53 leio 1.35 fi
54    
55 leio 1.36 # Changes in 0.10.20:
56     # New split plugins rtmp, gsettings and shm
57     if version_is_at_least "0.10.20"; then
58     my_gst_plugins_bad+=" rtmp gsettings shm"
59     fi
60    
61 compnerd 1.1 MY_PN="gst-plugins-bad"
62     MY_P=${MY_PN}-${PV}
63    
64     SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
65    
66 zaheerm 1.2 # added to remove circular deps
67     # 6/2/2006 - zaheerm
68     if [ "${PN}" != "${MY_PN}" ]; then
69     RDEPEND="=media-libs/gstreamer-0.10*
70 swegener 1.7 =media-libs/gst-plugins-base-0.10*
71 leio 1.37 >=dev-libs/glib-2.6"
72 compnerd 1.1 DEPEND="${RDEPEND}
73     sys-apps/sed
74 jdhore 1.42 virtual/pkgconfig
75 compnerd 1.1 sys-devel/gettext"
76 leio 1.36
77     # -bad-0.10.20 uses orc optionally instead of liboil unconditionally.
78     # While <0.10.20 configure always check for liboil, it is used only by non-split
79     # plugins in gst/ (legacyresample and mpegdemux), so we only builddep for all
80     # old packages, and have a RDEPEND in old versions of media-libs/gst-plugins-bad
81     if ! version_is_at_least "0.10.20"; then
82     DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
83     fi
84    
85 tester 1.17 RESTRICT=test
86 zaheerm 1.2 fi
87 compnerd 1.1 S=${WORKDIR}/${MY_P}
88    
89     gst-plugins-bad_src_unpack() {
90 tester 1.14 # local makefiles
91 compnerd 1.1
92     unpack ${A}
93    
94 tester 1.20 # Link with the syswide installed gst-libs if needed
95     gst-plugins10_find_plugin_dir
96     sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstphotography:${ROOT}/usr/$(get_libdir)/libgstphotography:" \
97     -e "s:\$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor:${ROOT}/usr/$(get_libdir)/libgstsignalprocessor:" \
98     -e "s:\$(top_builddir)/gst-libs/gst/video/libgstbasevideo:${ROOT}/usr/$(get_libdir)/libgstbasevideo:" \
99 leio 1.37 -e "s:\$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc:${ROOT}/usr/$(get_libdir)/libgstbasecamerabinsrc:" \
100 tester 1.20 -i Makefile.in
101 maekke 1.21
102 compnerd 1.1 # Remove generation of any other Makefiles except the plugin's Makefile
103 tester 1.14 # if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
104     # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
105     # elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
106     # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
107     # fi
108 compnerd 1.1
109 tester 1.14 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
110     # -i ${S}/configure
111 compnerd 1.1 }
112    
113     gst-plugins-bad_src_configure() {
114     local plugin gst_conf
115    
116     einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
117    
118 zaheerm 1.3 for plugin in ${my_gst_plugins_bad} ; do
119 compnerd 1.1 gst_conf="${gst_conf} --disable-${plugin}"
120     done
121    
122 foser 1.4 for plugin in ${GST_PLUGINS_BUILD} ; do
123 compnerd 1.1 gst_conf="${gst_conf} --enable-${plugin}"
124     done
125    
126     cd ${S}
127 zaheerm 1.6 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "configure failed"
128 compnerd 1.1 }
129    
130     gst-plugins-bad_src_compile() {
131     gst-plugins-bad_src_configure ${@}
132    
133     gst-plugins10_find_plugin_dir
134     emake || die "compile failure"
135     }
136    
137     gst-plugins-bad_src_install() {
138     gst-plugins10_find_plugin_dir
139     einstall || die "install failed"
140    
141 drac 1.10 [[ -e README ]] && dodoc README
142 compnerd 1.1 }
143    
144     EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20