/[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.5 Revision 1.46
1# Copyright 1999-2006 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.5 2006/05/10 11:50:14 zaheerm 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
12my_gst_plugins_bad="amrwb bz2 directfb dts divx faac faad gsm gst_v4l2 ivorbis libmms musepack musicbrainz neon opengl sdl sdltest soundtouch swfdec theoradec wavpack xvid" 17GST_ORG_MODULE="gst-plugins-bad"
13#qtdemux spped tta
14 18
15inherit eutils gst-plugins10 19inherit eutils gst-plugins10
16 20
17MY_PN="gst-plugins-bad" 21case "${EAPI:-0}" in
18MY_P=${MY_PN}-${PV} 22 1|2|3|4|5)
23 ;;
24 0)
25 die "EAPI=\"${EAPI}\" is not supported anymore"
26 ;;
27 *)
28 die "EAPI=\"${EAPI}\" is not supported yet"
29 ;;
30esac
19 31
20SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
21 32
22# added to remove circular deps 33if [[ ${PN} != ${GST_ORG_MODULE} ]]; then
23# 6/2/2006 - zaheerm 34# -bad-0.10.20 uses orc optionally instead of liboil unconditionally.
24if [ "${PN}" != "${MY_PN}" ]; then 35# While <0.10.20 configure always check for liboil, it is used only by
25RDEPEND="=media-libs/gstreamer-0.10* 36# non-split plugins in gst/ (legacyresample and mpegdemux), so we only
37# builddep for all old packages, and have a RDEPEND in old versions of
26 =media-libs/gst-plugins-base-0.10* 38# media-libs/gst-plugins-bad
27 >=dev-libs/glib-2.6 39 if [[ ${SLOT} = "0.10" ]] && ! version_is_at_least "0.10.20"; then
28 >=dev-libs/liboil-0.3" 40 DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
29DEPEND="${RDEPEND} 41 fi
30 sys-apps/sed
31 sys-devel/gettext"
32fi 42fi
33S=${WORKDIR}/${MY_P}
34 43
35gst-plugins-bad_src_unpack() {
36 local makefiles
37
38 unpack ${A}
39
40 gst-plugins10_find_plugin_dir
41 cd ${S}
42
43 # Remove generation of any other Makefiles except the plugin's Makefile
44 if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
45 makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
46 elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
47 makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
48 fi
49
50 sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
51 -i ${S}/configure
52}
53
54gst-plugins-bad_src_configure() {
55 local plugin gst_conf
56
57 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
58
59 for plugin in ${GST_PLUGINS_BUILD} ; do
60 my_gst_plugins_bad="${my_gst_plugins_bad/${plugin}/}"
61 done
62
63 for plugin in ${my_gst_plugins_bad} ; do
64 gst_conf="${gst_conf} --disable-${plugin}"
65 done
66
67 for plugin in ${GST_PLUGINS_BUILD} ; do
68 gst_conf="${gst_conf} --enable-${plugin}"
69 done
70
71 cd ${S}
72 econf ${@} ${gst_conf} || die "configure failed"
73}
74
75gst-plugins-bad_src_compile() {
76 gst-plugins-bad_src_configure ${@}
77
78 gst-plugins10_find_plugin_dir
79 emake || die "compile failure"
80}
81
82gst-plugins-bad_src_install() {
83 gst-plugins10_find_plugin_dir
84 einstall || die "install failed"
85
86 dodoc README
87}
88
89EXPORT_FUNCTIONS src_unpack src_compile src_install

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

  ViewVC Help
Powered by ViewVC 1.1.20