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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (show annotations) (download)
Sat Apr 3 05:49:50 2010 UTC (4 years, 5 months ago) by leio
Branch: MAIN
Changes since 1.18: +10 -6 lines
Fully validate and clean up plugin list for current versions. Reorder them per configure --help output, in order of global/sys/ext switches. Add directsound, osx_audio and osx_video to avoid useless header/linking configure checks for all -good plugins and save some configure time. Remove ladspa and cdio from the list, they have not been part of -good since 0.10.8 and 0.10.10 respectively, so safe to remove and avoid the unrecognized configure option QA warnings.

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-good.eclass,v 1.18 2009/05/16 22:08:09 tester Exp $
4
5 # Author : foser <foser@gentoo.org>, zaheerm <zaheerm@gentoo.org>
6
7 # gst-plugins-good 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, 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-good
25 MY_P=${MY_PN}-${PV}
26 # All relevant configure options for gst-plugins
27 # need a better way to extract these
28
29 # First line for non-plugin build related configure options; second line for
30 # sys/ plugins; rest is split plugin options in order of ./configure --help output.
31 # Good ways of validation are seeing diff of old and new configure.ac, and ./configure --help
32 #
33 # This list is current to gst-plugins-good-0.10.21:
34 my_gst_plugins_good="gconftool zlib bz2
35 directsound oss sunaudio osx_audio osx_video gst_v4l2 x xshm xvideo
36 aalib aalibtest annodex cairo esd esdtest flac gconf gdk_pixbuf hal jpeg
37 libcaca libdv libpng pulse dv1394 shout2 shout2test soup speex taglib wavpack"
38
39 #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
40 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-good/${MY_P}.tar.bz2"
41
42 S=${WORKDIR}/${MY_P}
43 # added to remove circular deps
44 # 6/2/2006 - zaheerm
45 if [ "${PN}" != "${MY_PN}" ]; then
46 RDEPEND="=media-libs/gst-plugins-base-0.10*"
47 DEPEND="${RDEPEND}
48 >=sys-apps/sed-4
49 dev-util/pkgconfig"
50 RESTRICT=test
51 fi
52
53 ###
54 # public functions
55 ###
56
57 gst-plugins-good_src_configure() {
58
59 # disable any external plugin besides the plugin we want
60 local plugin gst_conf
61
62 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
63
64 for plugin in ${GST_PLUGINS_BUILD}; do
65 my_gst_plugins_good=${my_gst_plugins_good/${plugin}/}
66 done
67 for plugin in ${my_gst_plugins_good}; do
68 gst_conf="${gst_conf} --disable-${plugin} "
69 done
70 for plugin in ${GST_PLUGINS_BUILD}; do
71 gst_conf="${gst_conf} --enable-${plugin} "
72 done
73
74 cd ${S}
75 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
76
77 }
78
79 ###
80 # public inheritable functions
81 ###
82
83 gst-plugins-good_src_unpack() {
84
85 # local makefiles
86
87 unpack ${A}
88
89 # Link with the syswide installed gst-libs if needed
90 # gst-plugins10_find_plugin_dir
91 # cd ${S}
92
93 # Remove generation of any other Makefiles except the plugin's Makefile
94 # if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
95 # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
96 # elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
97 # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
98 # fi
99 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
100 # -i ${S}/configure
101
102 }
103
104 gst-plugins-good_src_compile() {
105
106 gst-plugins-good_src_configure ${@}
107
108 gst-plugins10_find_plugin_dir
109 emake || die "compile failure"
110
111 }
112
113 gst-plugins-good_src_install() {
114
115 gst-plugins10_find_plugin_dir
116 einstall || die
117
118 [[ -e README ]] && dodoc README
119 }
120
121 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20