/[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.28 - (show annotations) (download)
Tue Oct 23 07:54:38 2012 UTC (22 months, 3 weeks ago) by tetromino
Branch: MAIN
Changes since 1.27: +25 -7 lines
Update for gst-plugins-good-0.10.31: use .xz tarballs, punt .la files.

1 # Copyright 1999-2012 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.27 2012/05/02 18:31:42 jdhore 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 versionator gst-plugins10
18
19 GST_EXPF="src_unpack src_compile src_install"
20 GST_TARBALL_SUFFIX="bz2"
21 GST_LA_PUNT="no"
22 case ${EAPI:-0} in
23 4) GST_EXPF="${GST_EXPF} src_configure"
24 GST_TARBALL_SUFFIX="xz"
25 GST_LA_PUNT="yes" ;;
26 2|3) GST_EXPF="${GST_EXPF} src_configure" ;;
27 1|0) ;;
28 *) die "Unknown EAPI" ;;
29 esac
30 EXPORT_FUNCTIONS ${GST_EXPF}
31
32 ###
33 # variable declarations
34 ###
35
36 MY_PN=gst-plugins-good
37 MY_P=${MY_PN}-${PV}
38 # All relevant configure options for gst-plugins
39 # need a better way to extract these
40
41 # First line for non-plugin build related configure options; second line for
42 # sys/ plugins; rest is split plugin options in order of ./configure --help output.
43 # Good ways of validation are seeing diff of old and new configure.ac, and ./configure --help
44 #
45 # This list is current to gst-plugins-good-0.10.31:
46 my_gst_plugins_good="gconftool zlib bz2
47 directsound oss oss4 sunaudio osx_audio osx_video gst_v4l2 x xshm xvideo
48 aalib aalibtest annodex cairo esd esdtest flac gconf gdk_pixbuf hal jpeg
49 libcaca libdv libpng pulse dv1394 shout2 soup speex taglib wavpack"
50
51 # When adding conditionals like below, be careful about having leading spaces in concat
52
53 # --enable-shout2test option was removed in 0.10.31
54 if ! version_is_at_least "0.10.31"; then
55 my_gst_plugins_good+=" shout2test"
56 fi
57
58 # cairooverlay added to the cairo plugin under cairo_gobject
59 if version_is_at_least "0.10.29"; then
60 my_gst_plugins_good+=" cairo_gobject"
61 fi
62
63 # ext/jack moved here since 0.10.27
64 if version_is_at_least "0.10.27"; then
65 my_gst_plugins_good+=" jack"
66 fi
67
68 #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
69 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-good/${MY_P}.tar.${GST_TARBALL_SUFFIX}"
70 [[ ${GST_TARBALL_SUFFIX} = "xz" ]] && DEPEND="${DEPEND} app-arch/xz-utils"
71
72 S=${WORKDIR}/${MY_P}
73 # added to remove circular deps
74 # 6/2/2006 - zaheerm
75 if [ "${PN}" != "${MY_PN}" ]; then
76 RDEPEND="=media-libs/gst-plugins-base-0.10*"
77 DEPEND="${RDEPEND}
78 ${DEPEND}
79 >=sys-apps/sed-4
80 virtual/pkgconfig"
81
82 # -good-0.10.24 uses orc optionally instead of liboil unconditionally.
83 # While <0.10.24 configure always checks for liboil, it is linked to only by non-split
84 # plugins in gst/, so we only builddep for all old packages, and have a RDEPEND in old
85 # versions of media-libs/gst-plugins-good
86 if ! version_is_at_least "0.10.24"; then
87 DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
88 fi
89
90 RESTRICT=test
91 fi
92
93 ###
94 # public functions
95 ###
96
97 gst-plugins-good_src_configure() {
98
99 # disable any external plugin besides the plugin we want
100 local plugin gst_conf
101
102 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
103
104 for plugin in ${my_gst_plugins_good}; do
105 gst_conf="${gst_conf} --disable-${plugin} "
106 done
107
108 for plugin in ${GST_PLUGINS_BUILD}; do
109 gst_conf="${gst_conf} --enable-${plugin} "
110 done
111
112 cd ${S}
113 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
114
115 }
116
117 ###
118 # public inheritable functions
119 ###
120
121 gst-plugins-good_src_unpack() {
122
123 # local makefiles
124
125 unpack ${A}
126
127 # Link with the syswide installed gst-libs if needed
128 # gst-plugins10_find_plugin_dir
129 # cd ${S}
130
131 # Remove generation of any other Makefiles except the plugin's Makefile
132 # if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
133 # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
134 # elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
135 # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
136 # fi
137 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
138 # -i ${S}/configure
139
140 }
141
142 gst-plugins-good_src_compile() {
143
144 has src_configure ${GST_EXPF} || gst-plugins-good_src_configure ${@}
145
146 gst-plugins10_find_plugin_dir
147 emake || die "compile failure"
148
149 }
150
151 gst-plugins-good_src_install() {
152
153 gst-plugins10_find_plugin_dir
154 einstall || die
155 [[ ${GST_LA_PUNT} = "yes" ]] && prune_libtool_files --modules
156
157 [[ -e README ]] && dodoc README
158 }

  ViewVC Help
Powered by ViewVC 1.1.20