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

Contents of /eclass/gst-plugins-base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jan 1 01:14:59 2006 UTC (8 years, 7 months ago) by swegener
Branch: MAIN
Changes since 1.1: +6 -6 lines
Apply whitespace checks from repoman to eclasses.

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-base.eclass,v 1.1 2005/12/02 15:30:15 zaheerm Exp $
4
5 # Author : foser <foser@gentoo.org>
6
7 # gst-plugins eclass
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 <gnome@gentoo.org>, the application developer
15 # or the gstreamer team.
16
17 inherit eutils gst-plugins10
18
19
20 ###
21 # variable declarations
22 ###
23
24 MY_PN=gst-plugins-base
25 MY_P=${MY_PN}-${PV}
26 # All relevant configure options for gst-plugins
27 # need a better way to extract these
28 # gst-plugins-base 0.9
29 my_gst_plugins_base="x xvideo xshm gst_v4l gst_v4l2 alsa cdparanoia gnome_vfs
30 libvisual ogg oggtest theora vorbis vorbistest tests examples freetypetest pango"
31
32 #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
33 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-base/${MY_P}.tar.bz2"
34
35 S=${WORKDIR}/${MY_P}
36
37 RDEPEND="=media-libs/${MY_P}"
38 DEPEND="${RDEPEND}
39 >=sys-apps/sed-4"
40
41
42 ###
43 # public functions
44 ###
45
46 gst-plugins-base_src_configure() {
47
48 # disable any external plugin besides the plugin we want
49 local plugin gst_conf
50
51 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
52
53 for plugin in ${GST_PLUGINS_BUILD}; do
54 my_gst_plugins_base=${my_gst_plugins_base/${plugin}/}
55 done
56 for plugin in ${my_gst_plugins_base}; do
57 gst_conf="${gst_conf} --disable-${plugin} "
58 done
59 for plugin in ${GST_PLUGINS_BUILD}; do
60 gst_conf="${gst_conf} --enable-${plugin} "
61 done
62
63 cd ${S}
64 econf ${@} ${gst_conf} || die "./configure failure"
65
66 }
67
68 ###
69 # public inheritable functions
70 ###
71
72 gst-plugins-base_src_unpack() {
73
74 local makefiles
75
76 unpack ${A}
77
78 # Link with the syswide installed gst-libs if needed
79 gst-plugins10_find_plugin_dir
80 sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces:/usr/$(get_libdir)/libgstinterfaces:" \
81 -e "s:\${top_builddir}/gst-libs/gst/interfaces/libgstinterfaces:/usr/$(get_libdir)/libgstinterfaces:" \
82 -e "s:\$(top_builddir)/gst-libs/gst/audio/libgstaudio:/usr/$(get_libdir)/libgstaudio:" \
83 -e "s:\${top_builddir}/gst-libs/gst/audio/libgstaudio:/usr/$(get_libdir)/libgstaudio:" \
84 -e "s:\$(top_builddir)/gst-libs/gst/riff/libgstriff:/usr/$(get_libdir)/libgstriff:" \
85 -e "s:\${top_builddir}/gst-libs/gst/riff/libgstriff:/usr/$(get_libdir)/libgstriff:" \
86 -e "s:\$(top_builddir)/gst-libs/gst/tag/libgsttag:/usr/$(get_libdir)/libgsttag:" \
87 -e "s:\${top_builddir}/gst-libs/gst/tag/libgsttag:/usr/$(get_libdir)/libgsttag:" \
88 -e "s:\$(top_builddir)/gst-libs/gst/video/libgstvideo:/usr/$(get_libdir)/libgstvideo:" \
89 -e "s:\${top_builddir}/gst-libs/gst/video/libgstvideo:/usr/$(get_libdir)/libgstvideo:" \
90 -e "s:\$(top_builddir)/gst-libs/gst/netbuffer/libgstnetbuffer:/usr/$(get_libdir)/libgstnetbuffer:" \
91 -e "s:\${top_builddir}/gst-libs/gst/netbuffer/libgstnetbuffer:/usr/$(get_libdir)/libgstnetbuffer:" \
92 -e "s:\$(top_builddir)/gst-libs/gst/rtp/libgstrtp:/usr/$(get_libdir)/libgstrtp:" \
93 -e "s:\${top_builddir}/gst-libs/gst/rtp/libgstrtp:/usr/$(get_libdir)/libgstrtp:" \
94 -i Makefile.in
95 cd ${S}
96
97 # Remove generation of any other Makefiles except the plugin's Makefile
98 if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
99 makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
100 elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
101 makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
102 fi
103 sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
104 -i ${S}/configure
105
106 }
107
108 gst-plugins-base_src_compile() {
109
110 gst-plugins-base_src_configure ${@}
111
112 gst-plugins10_find_plugin_dir
113 emake || die "compile failure"
114
115 }
116
117 gst-plugins-base_src_install() {
118
119 gst-plugins10_find_plugin_dir
120 einstall || die
121
122 dodoc README
123 }
124
125
126 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20