/[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.24 Revision 1.25
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-ugly.eclass,v 1.24 2012/05/02 18:31:42 jdhore Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-ugly.eclass,v 1.25 2012/12/02 17:16:20 eva Exp $
4 4
5# @ECLASS: gst-plugins-ugly.eclass
6# @MAINTAINER:
7# gstreamer@gentoo.org
8# @AUTHOR:
9# Gilles Dartiguelongue <eva@gentoo.org>
10# Saleem Abdulrasool <compnerd@gentoo.org>
5# Author : foser <foser@gentoo.org> 11# foser <foser@gentoo.org>
12# zaheerm <zaheerm@gentoo.org>
13# @BLURB: Manages build for invididual ebuild for gst-plugins-ugly.
14# @DESCRIPTION:
15# See gst-plugins10.eclass documentation.
6 16
7# gst-plugins-ugly eclass 17GST_ORG_MODULE="gst-plugins-ugly"
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, in case of spider usage obtain recommended plugins to use from
14# Gentoo developers responsible for gstreamer <gstreamer@gentoo.org>.
15 18
16inherit eutils versionator gst-plugins10 19inherit gst-plugins10
17
18
19###
20# variable declarations
21###
22
23MY_PN=gst-plugins-ugly
24MY_P=${MY_PN}-${PV}
25
26# All relevant configure options for gst-plugins-ugly
27# need a better way to extract these.
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 20
33case "${EAPI:-0}" in 21case "${EAPI:-0}" in
22 1|2|3|4|5)
23 ;;
34 0) 24 0)
35 if [[ -n ${GST_ORC} ]]; then 25 die "EAPI=\"${EAPI}\" is not supported anymore"
36 die "Usage of IUSE=+orc implying GST_ORC variable without EAPI-1"
37 fi
38 ;;
39 1)
40 ;; 26 ;;
41 *) 27 *)
42 die "Unsupported EAPI ${EAPI}" 28 die "EAPI=\"${EAPI}\" is not supported yet"
43 ;; 29 ;;
44esac 30esac
45 31
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
54
55#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
56SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2"
57
58S=${WORKDIR}/${MY_P}
59
60if [[ ${GST_ORC} == "yes" ]]; then
61 RDEPEND="orc? ( >=dev-lang/orc-0.4.6 )"
62 DEPEND="${RDEPEND}"
63fi
64
65# added to remove circular deps
66# 6/2/2006 - zaheerm
67if [ "${PN}" != "${MY_PN}" ]; then
68RDEPEND="${RDEPEND}
69 =media-libs/gst-plugins-base-0.10*"
70DEPEND="${RDEPEND}
71 >=sys-apps/sed-4
72 virtual/pkgconfig"
73
74RESTRICT=test
75fi
76
77###
78# public functions
79###
80
81gst-plugins-ugly_src_configure() {
82
83 # disable any external plugin besides the plugin we want
84 local plugin gst_conf gst_orc_conf
85
86 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
87
88 for plugin in ${my_gst_plugins_ugly}; do
89 gst_conf="${gst_conf} --disable-${plugin} "
90 done
91
92 for plugin in ${GST_PLUGINS_BUILD}; do
93 gst_conf="${gst_conf} --enable-${plugin} "
94 done
95
96 gst_orc_conf="--disable-orc"
97 if [[ ${GST_ORC} == "yes" ]]; then
98 gst_orc_conf="$(use_enable orc)"
99 fi
100
101 cd ${S}
102 econf ${gst_orc_conf} ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
103
104}
105
106###
107# public inheritable functions
108###
109
110gst-plugins-ugly_src_unpack() {
111
112# local makefiles
113
114 unpack ${A}
115
116 # Link with the syswide installed gst-libs if needed
117# gst-plugins10_find_plugin_dir
118# cd ${S}
119
120 # Remove generation of any other Makefiles except the plugin's Makefile
121# if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
122# makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
123# elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
124# makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
125# fi
126# sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
127# -i ${S}/configure
128
129}
130
131gst-plugins-ugly_src_compile() {
132
133 gst-plugins-ugly_src_configure ${@}
134
135 gst-plugins10_find_plugin_dir
136 emake || die "compile failure"
137
138}
139
140gst-plugins-ugly_src_install() {
141
142 gst-plugins10_find_plugin_dir
143 einstall || die
144
145 [[ -e README ]] && dodoc README
146}

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20