/[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.45 - (hide annotations) (download)
Thu Sep 27 16:35:41 2012 UTC (18 months, 2 weeks ago) by axs
Branch: MAIN
Changes since 1.44: +2 -2 lines
naive bump of all EAPI-specific checks in eclasses to permit EAPI=5 where EAPI=4 was previously allowed

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 axs 1.45 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.44 2012/06/20 08:49:27 scarabeus 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 zmedico 1.43 inherit eutils multilib versionator gst-plugins10
13 leio 1.29
14 scarabeus 1.44 GSTBAD_EXPF="src_unpack src_compile src_install"
15     case "${EAPI:-0}" in
16 axs 1.45 2|3|4|5) GSTBAD_EXPF+=" src_prepare src_configure" ;;
17 scarabeus 1.44 0|1) ;;
18     *) die "EAPI=\"${EAPI}\" is not supported yet" ;;
19     esac
20    
21    
22     EXPORT_FUNCTIONS ${GSTBAD_EXPF}
23    
24 leio 1.37 # This list is current for gst-plugins-bad-0.10.21.
25 leio 1.25 my_gst_plugins_bad="directsound directdraw osx_video quicktime vcd
26 leio 1.37 assrender amrwb apexsink bz2 cdaudio celt cog dc1394 directfb dirac dts divx
27     faac faad fbdev flite gsm jp2k kate ladspa lv2 libmms
28 leio 1.25 modplug mimic mpeg2enc mplex musepack musicbrainz mythtv nas neon ofa rsvg
29 leio 1.39 timidity wildmidi sdl sdltest sndfile soundtouch spc gme swfdec xvid
30 leio 1.38 dvb wininet acm vdpau schro zbar resindvd vp8"
31 leio 1.29
32 leio 1.32 # When adding conditionals like below, be careful about having leading spaces
33    
34 leio 1.39 # Changes in 0.10.22:
35     # New curlsink element in a new curl plugin
36     # New Blackmagic Decklink source and sink
37     # New Linear Systems SDI plugin
38     if version_is_at_least "0.10.22"; then
39     my_gst_plugins_bad+=" curl decklink linsys"
40     fi
41    
42     # Unused ancient theora decoder, better one in -base long ago
43     if ! version_is_at_least "0.10.22"; then
44     my_gst_plugins_bad+=" theoradec"
45     fi
46    
47 leio 1.35 # Changes in 0.10.21:
48 leio 1.37 # New opencv and apple_media plugins
49     if version_is_at_least "0.10.21"; then
50 leio 1.40 my_gst_plugins_bad+=" opencv apple_media"
51     fi
52    
53     # exif for a specific jifmux tests purpose only.
54     # Made automagic in 0.10.22, which is fine as a non-installed test
55     if [ ${PV} == "0.10.21" ]; then
56     my_gst_plugins_bad+=" exif"
57 leio 1.37 fi
58    
59     # jack moved to -good, metadata removed (functionality in base classes)
60     # alsaspdif gone (gst-plugins-alsa from -base can do spdif on its own long ago)
61 leio 1.35 if ! version_is_at_least "0.10.21"; then
62 leio 1.37 my_gst_plugins_bad+=" jack metadata alsa"
63 leio 1.35 fi
64    
65 leio 1.36 # Changes in 0.10.20:
66     # New split plugins rtmp, gsettings and shm
67     if version_is_at_least "0.10.20"; then
68     my_gst_plugins_bad+=" rtmp gsettings shm"
69     fi
70    
71 compnerd 1.1 MY_PN="gst-plugins-bad"
72     MY_P=${MY_PN}-${PV}
73    
74     SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
75    
76 zaheerm 1.2 # added to remove circular deps
77     # 6/2/2006 - zaheerm
78     if [ "${PN}" != "${MY_PN}" ]; then
79     RDEPEND="=media-libs/gstreamer-0.10*
80 swegener 1.7 =media-libs/gst-plugins-base-0.10*
81 leio 1.37 >=dev-libs/glib-2.6"
82 compnerd 1.1 DEPEND="${RDEPEND}
83     sys-apps/sed
84 jdhore 1.42 virtual/pkgconfig
85 compnerd 1.1 sys-devel/gettext"
86 leio 1.36
87     # -bad-0.10.20 uses orc optionally instead of liboil unconditionally.
88     # While <0.10.20 configure always check for liboil, it is used only by non-split
89     # plugins in gst/ (legacyresample and mpegdemux), so we only builddep for all
90     # old packages, and have a RDEPEND in old versions of media-libs/gst-plugins-bad
91     if ! version_is_at_least "0.10.20"; then
92     DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
93     fi
94    
95 tester 1.17 RESTRICT=test
96 zaheerm 1.2 fi
97 compnerd 1.1 S=${WORKDIR}/${MY_P}
98    
99     gst-plugins-bad_src_unpack() {
100 tester 1.14 # local makefiles
101 compnerd 1.1
102     unpack ${A}
103 scarabeus 1.44 has src_prepare ${GSTBAD_EXPF} || gst-plugins-bad_src_prepare
104     }
105 compnerd 1.1
106 scarabeus 1.44 gst-plugins-bad_src_prepare() {
107 tester 1.20 # Link with the syswide installed gst-libs if needed
108     gst-plugins10_find_plugin_dir
109     sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstphotography:${ROOT}/usr/$(get_libdir)/libgstphotography:" \
110     -e "s:\$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor:${ROOT}/usr/$(get_libdir)/libgstsignalprocessor:" \
111     -e "s:\$(top_builddir)/gst-libs/gst/video/libgstbasevideo:${ROOT}/usr/$(get_libdir)/libgstbasevideo:" \
112 leio 1.37 -e "s:\$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc:${ROOT}/usr/$(get_libdir)/libgstbasecamerabinsrc:" \
113 tester 1.20 -i Makefile.in
114 maekke 1.21
115 compnerd 1.1 # Remove generation of any other Makefiles except the plugin's Makefile
116 tester 1.14 # if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
117     # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
118     # elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
119     # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
120     # fi
121 compnerd 1.1
122 tester 1.14 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
123     # -i ${S}/configure
124 compnerd 1.1 }
125    
126     gst-plugins-bad_src_configure() {
127     local plugin gst_conf
128    
129     einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
130    
131 zaheerm 1.3 for plugin in ${my_gst_plugins_bad} ; do
132 scarabeus 1.44 gst_conf+=" --disable-${plugin}"
133 compnerd 1.1 done
134    
135 foser 1.4 for plugin in ${GST_PLUGINS_BUILD} ; do
136 scarabeus 1.44 gst_conf+=" --enable-${plugin}"
137 compnerd 1.1 done
138    
139     cd ${S}
140 scarabeus 1.44 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf}
141 compnerd 1.1 }
142    
143     gst-plugins-bad_src_compile() {
144 scarabeus 1.44 has src_configure ${GSTBAD_EXPF} || gst-plugins-bad_src_configure ${@}
145 compnerd 1.1
146     gst-plugins10_find_plugin_dir
147     emake || die "compile failure"
148     }
149    
150     gst-plugins-bad_src_install() {
151     gst-plugins10_find_plugin_dir
152     einstall || die "install failed"
153    
154 drac 1.10 [[ -e README ]] && dodoc README
155 compnerd 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20