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

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

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

Revision 1.13 Revision 1.23
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2011 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-ugly.eclass,v 1.13 2009/03/30 04:24:15 tester Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-ugly.eclass,v 1.23 2011/05/04 02:23:40 leio Exp $
4 4
5# Author : foser <foser@gentoo.org> 5# Author : foser <foser@gentoo.org>
6 6
7# gst-plugins-ugly eclass 7# gst-plugins-ugly eclass
8# 8#
9# eclass to make external gst-plugins emergable on a per-plugin basis 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 10# to solve the problem with gst-plugins generating far too much unneeded deps
11# 11#
12# 3rd party applications using gstreamer now should depend on a set of plugins as 12# 3rd party applications using gstreamer now should depend on a set of plugins as
13# defined in the source, in case of spider usage obtain recommended plugins to use from 13# defined in the source, in case of spider usage obtain recommended plugins to use from
14# Gentoo developers responsible for gstreamer <gnome@gentoo.org>, the application developer 14# Gentoo developers responsible for gstreamer <gstreamer@gentoo.org>.
15# or the gstreamer team.
16 15
17inherit eutils gst-plugins10 16inherit eutils versionator gst-plugins10
18 17
19 18
20### 19###
21# variable declarations 20# variable declarations
22### 21###
23 22
24MY_PN=gst-plugins-ugly 23MY_PN=gst-plugins-ugly
25MY_P=${MY_PN}-${PV} 24MY_P=${MY_PN}-${PV}
25
26# All relevant configure options for gst-plugins 26# All relevant configure options for gst-plugins-ugly
27# need a better way to extract these 27# need a better way to extract these.
28# gst-plugins-base 0.9
29my_gst_plugins_ugly="a52dec amrnb cdio dvdread dvdnav lame id3tag mad mpeg2dec sidplay twolame" 28my_gst_plugins_ugly="a52dec amrnb amrwb cdio dvdread lame mad mpeg2dec sidplay
29twolame x264"
30
31GST_UGLY_EXPORTED_FUNCTIONS="src_unpack src_compile src_install"
32
33case "${EAPI:-0}" in
34 0)
35 if [[ -n ${GST_ORC} ]]; then
36 die "Usage of IUSE=+orc implying GST_ORC variable without EAPI-1"
37 fi
38 ;;
39 1)
40 ;;
41 *)
42 die "Unsupported EAPI ${EAPI}"
43 ;;
44esac
45
46# exports must be ALWAYS after inherit
47EXPORT_FUNCTIONS ${GST_UGLY_EXPORTED_FUNCTIONS}
48
49# Ensure GST_ORC is set to a default.
50GST_ORC=${GST_ORC:-"no"}
51if [[ ${GST_ORC} == "yes" ]]; then
52 IUSE="+orc"
53fi
30 54
31#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2" 55#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
32SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2" 56SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2"
33 57
34S=${WORKDIR}/${MY_P} 58S=${WORKDIR}/${MY_P}
35 59
60if [[ ${GST_ORC} == "yes" ]]; then
61 RDEPEND="orc? ( >=dev-lang/orc-0.4.6 )"
62 DEPEND="${RDEPEND}"
63fi
64
36# added to remove circular deps 65# added to remove circular deps
37# 6/2/2006 - zaheerm 66# 6/2/2006 - zaheerm
38if [ "${PN}" != "${MY_PN}" ]; then 67if [ "${PN}" != "${MY_PN}" ]; then
68RDEPEND="${RDEPEND}
39RDEPEND="=media-libs/gst-plugins-base-0.10*" 69 =media-libs/gst-plugins-base-0.10*"
40DEPEND="${RDEPEND} 70DEPEND="${RDEPEND}
41 >=sys-apps/sed-4 71 >=sys-apps/sed-4
42 dev-util/pkgconfig" 72 dev-util/pkgconfig"
73
74RESTRICT=test
43fi 75fi
44 76
45### 77###
46# public functions 78# public functions
47### 79###
48 80
49gst-plugins-ugly_src_configure() { 81gst-plugins-ugly_src_configure() {
50 82
51 # disable any external plugin besides the plugin we want 83 # disable any external plugin besides the plugin we want
52 local plugin gst_conf 84 local plugin gst_conf gst_orc_conf
53 85
54 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..." 86 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
55 87
56 for plugin in ${GST_PLUGINS_BUILD}; do
57 my_gst_plugins_ugly=${my_gst_plugins_ugly/${plugin}/}
58 done
59 for plugin in ${my_gst_plugins_ugly}; do 88 for plugin in ${my_gst_plugins_ugly}; do
60 gst_conf="${gst_conf} --disable-${plugin} " 89 gst_conf="${gst_conf} --disable-${plugin} "
61 done 90 done
91
62 for plugin in ${GST_PLUGINS_BUILD}; do 92 for plugin in ${GST_PLUGINS_BUILD}; do
63 gst_conf="${gst_conf} --enable-${plugin} " 93 gst_conf="${gst_conf} --enable-${plugin} "
64 done 94 done
65 95
96 gst_orc_conf="--disable-orc"
97 if [[ ${GST_ORC} == "yes" ]]; then
98 gst_orc_conf="$(use_enable orc)"
99 fi
100
66 cd ${S} 101 cd ${S}
67 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure" 102 econf ${gst_orc_conf} ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
68 103
69} 104}
70 105
71### 106###
72# public inheritable functions 107# public inheritable functions
107 gst-plugins10_find_plugin_dir 142 gst-plugins10_find_plugin_dir
108 einstall || die 143 einstall || die
109 144
110 [[ -e README ]] && dodoc README 145 [[ -e README ]] && dodoc README
111} 146}
112
113
114EXPORT_FUNCTIONS src_unpack src_compile src_install

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20