Gentoo Archives: gentoo-commits

From: "Raúl Porcel" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pandaboard:master commit in: eclass/
Date: Mon, 04 Apr 2011 17:48:38
Message-Id: f5ed72aff3601bc00b48c8ed263f59d0c78dadd7.armin76@gentoo
1 commit: f5ed72aff3601bc00b48c8ed263f59d0c78dadd7
2 Author: Daniel Diaz <ddiaz <AT> ti <DOT> com>
3 AuthorDate: Fri Jan 28 22:15:25 2011 +0000
4 Commit: Raúl Porcel <armin76 <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 22 23:16:12 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pandaboard.git;a=commit;h=f5ed72af
7
8 Add eclass for gst-plugins-good.
9
10 Experimental plug-ins need to be enabled via the configure line.
11 Also, the version of the package includes a patch name which is not
12 considered by the original class.
13
14 Signed-off-by: Daniel Diaz <ddiaz <AT> ti.com>
15
16 ---
17 eclass/gst-plugins-good.eclass | 129 ++++++++++++++++++++++++++++++++++++++++
18 1 files changed, 129 insertions(+), 0 deletions(-)
19
20 diff --git a/eclass/gst-plugins-good.eclass b/eclass/gst-plugins-good.eclass
21 new file mode 100644
22 index 0000000..e421744
23 --- /dev/null
24 +++ b/eclass/gst-plugins-good.eclass
25 @@ -0,0 +1,129 @@
26 +# Copyright 1999-2011 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +# $Header: $
29 +
30 +# Author : foser <foser@g.o>, zaheerm <zaheerm@g.o>
31 +
32 +# gst-plugins-good eclass for pandaboard overlay
33 +#
34 +# eclass to make external gst-plugins emergable on a per-plugin basis
35 +# to solve the problem with gst-plugins generating far too much unneeded deps
36 +#
37 +# 3rd party applications using gstreamer now should depend on a set of plugins as
38 +# defined in the source, obtain recommended plugins to use from
39 +# Gentoo developers responsible for gstreamer <gnome@g.o>, the application developer
40 +# or the gstreamer team.
41 +
42 +inherit eutils versionator gst-plugins10
43 +
44 +
45 +###
46 +# variable declarations
47 +###
48 +
49 +MY_PN=gst-plugins-good
50 +MY_PV=${PV%%_*}
51 +MY_P=${MY_PN}-${MY_PV}
52 +
53 +# All relevant configure options for gst-plugins
54 +# need a better way to extract these
55 +
56 +# First line for non-plugin build related configure options; second line for
57 +# sys/ plugins; rest is split plugin options in order of ./configure --help output.
58 +# Good ways of validation are seeing diff of old and new configure.ac, and ./configure --help
59 +#
60 +# This list is current to gst-plugins-good-0.10.23:
61 +my_gst_plugins_good="gconftool zlib bz2
62 +directsound oss sunaudio osx_audio osx_video gst_v4l2 x xshm xvideo
63 +aalib aalibtest annodex cairo esd esdtest flac gconf gdk_pixbuf hal jpeg
64 +libcaca libdv libpng pulse dv1394 shout2 shout2test soup speex taglib wavpack"
65 +
66 +# When adding conditionals like below, be careful about having leading spaces in concat
67 +
68 +# sys/oss4 moved here since 0.10.23
69 +if version_is_at_least "0.10.23"; then
70 + my_gst_plugins_good+=" oss4"
71 +fi
72 +
73 +
74 +#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
75 +SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-good/${MY_P}.tar.bz2"
76 +
77 +S=${WORKDIR}/${MY_P}
78 +# added to remove circular deps
79 +# 6/2/2006 - zaheerm
80 +if [ "${PN}" != "${MY_PN}" ]; then
81 +RDEPEND="=media-libs/gst-plugins-base-0.10*"
82 +DEPEND="${RDEPEND}
83 + >=sys-apps/sed-4
84 + dev-util/pkgconfig"
85 +RESTRICT=test
86 +fi
87 +
88 +###
89 +# public functions
90 +###
91 +
92 +gst-plugins-good_src_configure() {
93 +
94 + # disable any external plugin besides the plugin we want
95 + local plugin gst_conf
96 +
97 + einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
98 +
99 + for plugin in ${my_gst_plugins_good}; do
100 + gst_conf="${gst_conf} --disable-${plugin} "
101 + done
102 +
103 + for plugin in ${GST_PLUGINS_BUILD}; do
104 + gst_conf="${gst_conf} --enable-${plugin} "
105 + done
106 +
107 + cd ${S}
108 + econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" --enable-experimental ${gst_conf} || die "./configure failure"
109 +
110 +}
111 +
112 +###
113 +# public inheritable functions
114 +###
115 +
116 +gst-plugins-good_src_unpack() {
117 +
118 +# local makefiles
119 +
120 + unpack ${A}
121 +
122 + # Link with the syswide installed gst-libs if needed
123 +# gst-plugins10_find_plugin_dir
124 +# cd ${S}
125 +
126 + # Remove generation of any other Makefiles except the plugin's Makefile
127 +# if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
128 +# makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
129 +# elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
130 +# makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
131 +# fi
132 +# sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
133 +# -i ${S}/configure
134 +
135 +}
136 +
137 +gst-plugins-good_src_compile() {
138 +
139 + gst-plugins-good_src_configure ${@}
140 +
141 + gst-plugins10_find_plugin_dir
142 + emake || die "compile failure"
143 +
144 +}
145 +
146 +gst-plugins-good_src_install() {
147 +
148 + gst-plugins10_find_plugin_dir
149 + einstall || die
150 +
151 + [[ -e README ]] && dodoc README
152 +}
153 +
154 +EXPORT_FUNCTIONS src_unpack src_compile src_install