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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 Revision 1.28
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 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.8 2006/05/04 16:30:35 zaheerm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-good.eclass,v 1.28 2012/10/23 07:54:38 tetromino Exp $
4 4
5# Author : foser <foser@gentoo.org>, zaheerm <zaheerm@gentoo.org> 5# Author : foser <foser@gentoo.org>, zaheerm <zaheerm@gentoo.org>
6 6
7# gst-plugins-good eclass 7# gst-plugins-good eclass
8# 8#
12# 3rd party applications using gstreamer now should depend on a set of plugins as 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 13# defined in the source, obtain recommended plugins to use from
14# Gentoo developers responsible for gstreamer <gnome@gentoo.org>, the application developer 14# Gentoo developers responsible for gstreamer <gnome@gentoo.org>, the application developer
15# or the gstreamer team. 15# or the gstreamer team.
16 16
17inherit eutils gst-plugins10 17inherit eutils versionator gst-plugins10
18 18
19GST_EXPF="src_unpack src_compile src_install"
20GST_TARBALL_SUFFIX="bz2"
21GST_LA_PUNT="no"
22case ${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" ;;
29esac
30EXPORT_FUNCTIONS ${GST_EXPF}
19 31
20### 32###
21# variable declarations 33# variable declarations
22### 34###
23 35
24MY_PN=gst-plugins-good 36MY_PN=gst-plugins-good
25MY_P=${MY_PN}-${PV} 37MY_P=${MY_PN}-${PV}
26# All relevant configure options for gst-plugins 38# All relevant configure options for gst-plugins
27# need a better way to extract these 39# need a better way to extract these
28# gst-plugins-base 0.9 40
29my_gst_plugins_good="gconf gconftool oss aalib aalibtest cairo cdio esd esdtest flac jpeg ladspa libcaca libdv libpng dv1394 shout2 shout2test speex annodex hal x taglib" 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:
46my_gst_plugins_good="gconftool zlib bz2
47directsound oss oss4 sunaudio osx_audio osx_video gst_v4l2 x xshm xvideo
48aalib aalibtest annodex cairo esd esdtest flac gconf gdk_pixbuf hal jpeg
49libcaca 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
54if ! version_is_at_least "0.10.31"; then
55 my_gst_plugins_good+=" shout2test"
56fi
57
58# cairooverlay added to the cairo plugin under cairo_gobject
59if version_is_at_least "0.10.29"; then
60 my_gst_plugins_good+=" cairo_gobject"
61fi
62
63# ext/jack moved here since 0.10.27
64if version_is_at_least "0.10.27"; then
65 my_gst_plugins_good+=" jack"
66fi
30 67
31#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2" 68#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
32SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-good/${MY_P}.tar.bz2" 69SRC_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"
33 71
34S=${WORKDIR}/${MY_P} 72S=${WORKDIR}/${MY_P}
35# added to remove circular deps 73# added to remove circular deps
36# 6/2/2006 - zaheerm 74# 6/2/2006 - zaheerm
37if [ "${PN}" != "${MY_PN}" ]; then 75if [ "${PN}" != "${MY_PN}" ]; then
38RDEPEND="=media-libs/gst-plugins-base-0.10*" 76RDEPEND="=media-libs/gst-plugins-base-0.10*"
39DEPEND="${RDEPEND} 77DEPEND="${RDEPEND}
78 ${DEPEND}
40 >=sys-apps/sed-4" 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
86if ! version_is_at_least "0.10.24"; then
87DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
88fi
89
90RESTRICT=test
41fi 91fi
42 92
43### 93###
44# public functions 94# public functions
45### 95###
49 # disable any external plugin besides the plugin we want 99 # disable any external plugin besides the plugin we want
50 local plugin gst_conf 100 local plugin gst_conf
51 101
52 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..." 102 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
53 103
54 for plugin in ${GST_PLUGINS_BUILD}; do
55 my_gst_plugins_good=${my_gst_plugins_good/${plugin}/}
56 done
57 for plugin in ${my_gst_plugins_good}; do 104 for plugin in ${my_gst_plugins_good}; do
58 gst_conf="${gst_conf} --disable-${plugin} " 105 gst_conf="${gst_conf} --disable-${plugin} "
59 done 106 done
107
60 for plugin in ${GST_PLUGINS_BUILD}; do 108 for plugin in ${GST_PLUGINS_BUILD}; do
61 gst_conf="${gst_conf} --enable-${plugin} " 109 gst_conf="${gst_conf} --enable-${plugin} "
62 done 110 done
63 111
64 cd ${S} 112 cd ${S}
65 econf ${@} ${gst_conf} || die "./configure failure" 113 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
66 114
67} 115}
68 116
69### 117###
70# public inheritable functions 118# public inheritable functions
71### 119###
72 120
73gst-plugins-good_src_unpack() { 121gst-plugins-good_src_unpack() {
74 122
75 local makefiles 123# local makefiles
76 124
77 unpack ${A} 125 unpack ${A}
78 126
79 # Link with the syswide installed gst-libs if needed 127 # Link with the syswide installed gst-libs if needed
80 gst-plugins10_find_plugin_dir 128# gst-plugins10_find_plugin_dir
81 cd ${S} 129# cd ${S}
82 130
83 # Remove generation of any other Makefiles except the plugin's Makefile 131 # Remove generation of any other Makefiles except the plugin's Makefile
84 if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then 132# if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
85 makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile" 133# makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
86 elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then 134# elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
87 makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile" 135# makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
88 fi 136# fi
89 sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \ 137# sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
90 -i ${S}/configure 138# -i ${S}/configure
91 139
92} 140}
93 141
94gst-plugins-good_src_compile() { 142gst-plugins-good_src_compile() {
95 143
96 gst-plugins-good_src_configure ${@} 144 has src_configure ${GST_EXPF} || gst-plugins-good_src_configure ${@}
97 145
98 gst-plugins10_find_plugin_dir 146 gst-plugins10_find_plugin_dir
99 emake || die "compile failure" 147 emake || die "compile failure"
100 148
101} 149}
102 150
103gst-plugins-good_src_install() { 151gst-plugins-good_src_install() {
104 152
105 gst-plugins10_find_plugin_dir 153 gst-plugins10_find_plugin_dir
106 einstall || die 154 einstall || die
155 [[ ${GST_LA_PUNT} = "yes" ]] && prune_libtool_files --modules
107 156
108 dodoc README 157 [[ -e README ]] && dodoc README
109} 158}
110
111EXPORT_FUNCTIONS src_unpack src_compile src_install

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.20