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

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

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

Revision 1.28 Revision 1.29
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-good.eclass,v 1.28 2012/10/23 07:54:38 tetromino Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-good.eclass,v 1.29 2012/12/02 17:16:20 eva Exp $
4 4
5# Author : foser <foser@gentoo.org>, zaheerm <zaheerm@gentoo.org> 5# @ECLASS: gst-plugins-good.eclass
6# @MAINTAINER:
7# gstreamer@gentoo.org
8# @AUTHOR:
9# Gilles Dartiguelongue <eva@gentoo.org>
10# Saleem Abdulrasool <compnerd@gentoo.org>
11# foser <foser@gentoo.org>
12# zaheerm <zaheerm@gentoo.org>
13# @BLURB: Manages build for invididual ebuild for gst-plugins-good.
14# @DESCRIPTION:
15# See gst-plugins10.eclass documentation.
6 16
7# gst-plugins-good eclass 17GST_ORG_MODULE="gst-plugins-good"
8#
9# eclass to make external gst-plugins emergable on a per-plugin basis
10# to solve the problem with gst-plugins generating far too much unneeded deps
11#
12# 3rd party applications using gstreamer now should depend on a set of plugins as
13# defined in the source, obtain recommended plugins to use from
14# Gentoo developers responsible for gstreamer <gnome@gentoo.org>, the application developer
15# or the gstreamer team.
16 18
17inherit eutils versionator gst-plugins10 19inherit eutils gst-plugins10
18 20
19GST_EXPF="src_unpack src_compile src_install"
20GST_TARBALL_SUFFIX="bz2"
21GST_LA_PUNT="no"
22case ${EAPI:-0} in 21case "${EAPI:-0}" in
23 4) GST_EXPF="${GST_EXPF} src_configure" 22 1|2|3|4|5)
24 GST_TARBALL_SUFFIX="xz" 23 ;;
25 GST_LA_PUNT="yes" ;; 24 0)
26 2|3) GST_EXPF="${GST_EXPF} src_configure" ;; 25 die "EAPI=\"${EAPI}\" is not supported anymore"
27 1|0) ;; 26 ;;
28 *) die "Unknown EAPI" ;; 27 *)
28 die "EAPI=\"${EAPI}\" is not supported yet"
29 ;;
29esac 30esac
30EXPORT_FUNCTIONS ${GST_EXPF}
31 31
32###
33# variable declarations
34###
35 32
36MY_PN=gst-plugins-good 33if [[ ${PN} != ${GST_ORG_MODULE} ]]; then
37MY_P=${MY_PN}-${PV} 34# -good-0.10.24 uses orc optionally instead of liboil unconditionally.
38# All relevant configure options for gst-plugins 35# While <0.10.24 configure always checks for liboil, it is linked to only by
39# need a better way to extract these 36# non-split plugins in gst/, so we only builddep for all old packages, and have
40 37# a RDEPEND in old versions of media-libs/gst-plugins-good
41# First line for non-plugin build related configure options; second line for 38 if [[ ${SLOT} = "0.10" ]] && ! version_is_at_least "0.10.24"; then
42# sys/ plugins; rest is split plugin options in order of ./configure --help output. 39 DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
43# Good ways of validation are seeing diff of old and new configure.ac, and ./configure --help 40 fi
44#
45# This list is current to gst-plugins-good-0.10.31:
46my_gst_plugins_good="gconftool zlib bz2
47directsound oss oss4 sunaudio osx_audio osx_video gst_v4l2 x xshm xvideo
48aalib aalibtest annodex cairo esd esdtest flac gconf gdk_pixbuf hal jpeg
49libcaca libdv libpng pulse dv1394 shout2 soup speex taglib wavpack"
50
51# When adding conditionals like below, be careful about having leading spaces in concat
52
53# --enable-shout2test option was removed in 0.10.31
54if ! version_is_at_least "0.10.31"; then
55 my_gst_plugins_good+=" shout2test"
56fi 41fi
57 42
58# cairooverlay added to the cairo plugin under cairo_gobject
59if version_is_at_least "0.10.29"; then
60 my_gst_plugins_good+=" cairo_gobject"
61fi
62
63# ext/jack moved here since 0.10.27
64if version_is_at_least "0.10.27"; then
65 my_gst_plugins_good+=" jack"
66fi
67
68#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
69SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-good/${MY_P}.tar.${GST_TARBALL_SUFFIX}"
70[[ ${GST_TARBALL_SUFFIX} = "xz" ]] && DEPEND="${DEPEND} app-arch/xz-utils"
71
72S=${WORKDIR}/${MY_P}
73# added to remove circular deps
74# 6/2/2006 - zaheerm
75if [ "${PN}" != "${MY_PN}" ]; then
76RDEPEND="=media-libs/gst-plugins-base-0.10*"
77DEPEND="${RDEPEND}
78 ${DEPEND}
79 >=sys-apps/sed-4
80 virtual/pkgconfig"
81
82# -good-0.10.24 uses orc optionally instead of liboil unconditionally.
83# While <0.10.24 configure always checks for liboil, it is linked to only by non-split
84# plugins in gst/, so we only builddep for all old packages, and have a RDEPEND in old
85# versions of media-libs/gst-plugins-good
86if ! version_is_at_least "0.10.24"; then
87DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
88fi
89
90RESTRICT=test
91fi
92
93###
94# public functions
95###
96
97gst-plugins-good_src_configure() {
98
99 # disable any external plugin besides the plugin we want
100 local plugin gst_conf
101
102 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
103
104 for plugin in ${my_gst_plugins_good}; do
105 gst_conf="${gst_conf} --disable-${plugin} "
106 done
107
108 for plugin in ${GST_PLUGINS_BUILD}; do
109 gst_conf="${gst_conf} --enable-${plugin} "
110 done
111
112 cd ${S}
113 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
114
115}
116
117###
118# public inheritable functions
119###
120
121gst-plugins-good_src_unpack() {
122
123# local makefiles
124
125 unpack ${A}
126
127 # Link with the syswide installed gst-libs if needed
128# gst-plugins10_find_plugin_dir
129# cd ${S}
130
131 # Remove generation of any other Makefiles except the plugin's Makefile
132# if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
133# makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
134# elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
135# makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
136# fi
137# sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
138# -i ${S}/configure
139
140}
141
142gst-plugins-good_src_compile() {
143
144 has src_configure ${GST_EXPF} || gst-plugins-good_src_configure ${@}
145
146 gst-plugins10_find_plugin_dir
147 emake || die "compile failure"
148
149}
150
151gst-plugins-good_src_install() {
152
153 gst-plugins10_find_plugin_dir
154 einstall || die
155 [[ ${GST_LA_PUNT} = "yes" ]] && prune_libtool_files --modules
156
157 [[ -e README ]] && dodoc README
158}

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20