/[gentoo-x86]/eclass/gst-plugins-bad.eclass
Gentoo

Diff of /eclass/gst-plugins-bad.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.45 Revision 1.46
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 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.45 2012/09/27 16:35:41 axs Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.46 2012/12/02 17:16:20 eva Exp $
4 4
5# 5# @ECLASS: gst-plugins10-bad.eclass
6# @MAINTAINER:
7# gstreamer@gentoo.org
8# @AUTHOR:
9# Gilles Dartiguelongue <eva@gentoo.org>
6# Original Author: Saleem Abdulrasool <compnerd@gentoo.org> 10# Saleem Abdulrasool <compnerd@gentoo.org>
7# Based on the work of foser <foser@gentoo.org> and zaheerm <zaheerm@gentoo.org> 11# foser <foser@gentoo.org>
8# Purpose: This elcass is designed to help package external gst-plugins per 12# zaheerm <zaheerm@gentoo.org>
9# plugin rather than in a single package. 13# @BLURB: Manages build for invididual ebuild for gst-plugins-bad.
10# 14# @DESCRIPTION:
15# See gst-plugins10.eclass documentation.
11 16
12inherit eutils multilib versionator gst-plugins10 17GST_ORG_MODULE="gst-plugins-bad"
13 18
14GSTBAD_EXPF="src_unpack src_compile src_install" 19inherit eutils gst-plugins10
20
15case "${EAPI:-0}" in 21case "${EAPI:-0}" in
16 2|3|4|5) GSTBAD_EXPF+=" src_prepare src_configure" ;; 22 1|2|3|4|5)
17 0|1) ;; 23 ;;
24 0)
25 die "EAPI=\"${EAPI}\" is not supported anymore"
26 ;;
27 *)
18 *) die "EAPI=\"${EAPI}\" is not supported yet" ;; 28 die "EAPI=\"${EAPI}\" is not supported yet"
29 ;;
19esac 30esac
20 31
21 32
22EXPORT_FUNCTIONS ${GSTBAD_EXPF} 33if [[ ${PN} != ${GST_ORG_MODULE} ]]; then
23 34# -bad-0.10.20 uses orc optionally instead of liboil unconditionally.
24# This list is current for gst-plugins-bad-0.10.21. 35# While <0.10.20 configure always check for liboil, it is used only by
25my_gst_plugins_bad="directsound directdraw osx_video quicktime vcd 36# non-split plugins in gst/ (legacyresample and mpegdemux), so we only
26assrender amrwb apexsink bz2 cdaudio celt cog dc1394 directfb dirac dts divx 37# builddep for all old packages, and have a RDEPEND in old versions of
27faac faad fbdev flite gsm jp2k kate ladspa lv2 libmms 38# media-libs/gst-plugins-bad
28modplug mimic mpeg2enc mplex musepack musicbrainz mythtv nas neon ofa rsvg 39 if [[ ${SLOT} = "0.10" ]] && ! version_is_at_least "0.10.20"; then
29timidity wildmidi sdl sdltest sndfile soundtouch spc gme swfdec xvid 40 DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
30dvb wininet acm vdpau schro zbar resindvd vp8" 41 fi
31
32# When adding conditionals like below, be careful about having leading spaces
33
34# 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
38if version_is_at_least "0.10.22"; then
39 my_gst_plugins_bad+=" curl decklink linsys"
40fi 42fi
41 43
42# Unused ancient theora decoder, better one in -base long ago
43if ! version_is_at_least "0.10.22"; then
44 my_gst_plugins_bad+=" theoradec"
45fi
46
47# Changes in 0.10.21:
48# New opencv and apple_media plugins
49if version_is_at_least "0.10.21"; then
50 my_gst_plugins_bad+=" opencv apple_media"
51fi
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
55if [ ${PV} == "0.10.21" ]; then
56 my_gst_plugins_bad+=" exif"
57fi
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)
61if ! version_is_at_least "0.10.21"; then
62 my_gst_plugins_bad+=" jack metadata alsa"
63fi
64
65# Changes in 0.10.20:
66# New split plugins rtmp, gsettings and shm
67if version_is_at_least "0.10.20"; then
68 my_gst_plugins_bad+=" rtmp gsettings shm"
69fi
70
71MY_PN="gst-plugins-bad"
72MY_P=${MY_PN}-${PV}
73
74SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
75
76# added to remove circular deps
77# 6/2/2006 - zaheerm
78if [ "${PN}" != "${MY_PN}" ]; then
79RDEPEND="=media-libs/gstreamer-0.10*
80 =media-libs/gst-plugins-base-0.10*
81 >=dev-libs/glib-2.6"
82DEPEND="${RDEPEND}
83 sys-apps/sed
84 virtual/pkgconfig
85 sys-devel/gettext"
86
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
91if ! version_is_at_least "0.10.20"; then
92DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
93fi
94
95RESTRICT=test
96fi
97S=${WORKDIR}/${MY_P}
98
99gst-plugins-bad_src_unpack() {
100# local makefiles
101
102 unpack ${A}
103 has src_prepare ${GSTBAD_EXPF} || gst-plugins-bad_src_prepare
104}
105
106gst-plugins-bad_src_prepare() {
107 # 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 -e "s:\$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc:${ROOT}/usr/$(get_libdir)/libgstbasecamerabinsrc:" \
113 -i Makefile.in
114
115 # Remove generation of any other Makefiles except the plugin's Makefile
116# 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
122# sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
123# -i ${S}/configure
124}
125
126gst-plugins-bad_src_configure() {
127 local plugin gst_conf
128
129 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
130
131 for plugin in ${my_gst_plugins_bad} ; do
132 gst_conf+=" --disable-${plugin}"
133 done
134
135 for plugin in ${GST_PLUGINS_BUILD} ; do
136 gst_conf+=" --enable-${plugin}"
137 done
138
139 cd ${S}
140 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf}
141}
142
143gst-plugins-bad_src_compile() {
144 has src_configure ${GSTBAD_EXPF} || gst-plugins-bad_src_configure ${@}
145
146 gst-plugins10_find_plugin_dir
147 emake || die "compile failure"
148}
149
150gst-plugins-bad_src_install() {
151 gst-plugins10_find_plugin_dir
152 einstall || die "install failed"
153
154 [[ -e README ]] && dodoc README
155}

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

  ViewVC Help
Powered by ViewVC 1.1.20