/[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.5 - (hide annotations) (download)
Thu Sep 14 21:16:37 2006 UTC (7 years, 11 months ago) by zaheerm
Branch: MAIN
Changes since 1.4: +2 -2 lines
Set package origin and name

1 zaheerm 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 zaheerm 1.5 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-base.eclass,v 1.4 2006/09/01 16:46:28 zaheerm Exp $
4 zaheerm 1.1
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 swegener 1.2 # 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 zaheerm 1.1 # 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 zaheerm 1.3 # added to remove circular deps
38     # 6/2/2006 - zaheerm
39     if [ "${PN}" != "${MY_PN}" ]; then
40     RDEPEND="=media-libs/gst-plugins-base-0.10*"
41 zaheerm 1.1 DEPEND="${RDEPEND}
42 zaheerm 1.4 >=sys-apps/sed-4
43     dev-util/pkgconfig"
44 zaheerm 1.3 fi
45 zaheerm 1.1
46     ###
47     # public functions
48     ###
49    
50     gst-plugins-base_src_configure() {
51 swegener 1.2
52 zaheerm 1.1 # disable any external plugin besides the plugin we want
53     local plugin gst_conf
54    
55     einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
56    
57     for plugin in ${GST_PLUGINS_BUILD}; do
58     my_gst_plugins_base=${my_gst_plugins_base/${plugin}/}
59     done
60     for plugin in ${my_gst_plugins_base}; do
61     gst_conf="${gst_conf} --disable-${plugin} "
62     done
63     for plugin in ${GST_PLUGINS_BUILD}; do
64     gst_conf="${gst_conf} --enable-${plugin} "
65     done
66    
67     cd ${S}
68 zaheerm 1.5 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
69 zaheerm 1.1
70     }
71    
72     ###
73     # public inheritable functions
74     ###
75    
76     gst-plugins-base_src_unpack() {
77    
78     local makefiles
79    
80     unpack ${A}
81    
82     # Link with the syswide installed gst-libs if needed
83     gst-plugins10_find_plugin_dir
84     sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces:/usr/$(get_libdir)/libgstinterfaces:" \
85     -e "s:\${top_builddir}/gst-libs/gst/interfaces/libgstinterfaces:/usr/$(get_libdir)/libgstinterfaces:" \
86     -e "s:\$(top_builddir)/gst-libs/gst/audio/libgstaudio:/usr/$(get_libdir)/libgstaudio:" \
87     -e "s:\${top_builddir}/gst-libs/gst/audio/libgstaudio:/usr/$(get_libdir)/libgstaudio:" \
88     -e "s:\$(top_builddir)/gst-libs/gst/riff/libgstriff:/usr/$(get_libdir)/libgstriff:" \
89     -e "s:\${top_builddir}/gst-libs/gst/riff/libgstriff:/usr/$(get_libdir)/libgstriff:" \
90     -e "s:\$(top_builddir)/gst-libs/gst/tag/libgsttag:/usr/$(get_libdir)/libgsttag:" \
91     -e "s:\${top_builddir}/gst-libs/gst/tag/libgsttag:/usr/$(get_libdir)/libgsttag:" \
92     -e "s:\$(top_builddir)/gst-libs/gst/video/libgstvideo:/usr/$(get_libdir)/libgstvideo:" \
93     -e "s:\${top_builddir}/gst-libs/gst/video/libgstvideo:/usr/$(get_libdir)/libgstvideo:" \
94     -e "s:\$(top_builddir)/gst-libs/gst/netbuffer/libgstnetbuffer:/usr/$(get_libdir)/libgstnetbuffer:" \
95     -e "s:\${top_builddir}/gst-libs/gst/netbuffer/libgstnetbuffer:/usr/$(get_libdir)/libgstnetbuffer:" \
96     -e "s:\$(top_builddir)/gst-libs/gst/rtp/libgstrtp:/usr/$(get_libdir)/libgstrtp:" \
97     -e "s:\${top_builddir}/gst-libs/gst/rtp/libgstrtp:/usr/$(get_libdir)/libgstrtp:" \
98     -i Makefile.in
99     cd ${S}
100    
101     # Remove generation of any other Makefiles except the plugin's Makefile
102     if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
103     makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
104     elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
105     makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
106 swegener 1.2 fi
107 zaheerm 1.1 sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
108     -i ${S}/configure
109    
110     }
111    
112     gst-plugins-base_src_compile() {
113    
114     gst-plugins-base_src_configure ${@}
115    
116     gst-plugins10_find_plugin_dir
117     emake || die "compile failure"
118    
119     }
120    
121     gst-plugins-base_src_install() {
122    
123     gst-plugins10_find_plugin_dir
124     einstall || die
125    
126     dodoc README
127     }
128    
129    
130     EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20