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

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

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

Revision 1.5 Revision 1.36
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2009 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-bad.eclass,v 1.5 2006/05/10 11:50:14 zaheerm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.36 2011/04/09 07:24:38 leio Exp $
4 4
5# 5#
6# Original Author: Saleem Abdulrasool <compnerd@gentoo.org> 6# Original Author: Saleem Abdulrasool <compnerd@gentoo.org>
7# Based on the work of foser <foser@gentoo.org> and zaheerm <zaheerm@gentoo.org> 7# Based on the work of foser <foser@gentoo.org> and zaheerm <zaheerm@gentoo.org>
8# Purpose: This elcass is designed to help package external gst-plugins per 8# Purpose: This elcass is designed to help package external gst-plugins per
9# plugin rather than in a single package. 9# plugin rather than in a single package.
10# 10#
11 11
12my_gst_plugins_bad="amrwb bz2 directfb dts divx faac faad gsm gst_v4l2 ivorbis libmms musepack musicbrainz neon opengl sdl sdltest soundtouch swfdec theoradec wavpack xvid" 12inherit eutils versionator gst-plugins10
13#qtdemux spped tta
14 13
15inherit eutils gst-plugins10 14# This list is current for gst-plugins-bad-0.10.18.
15my_gst_plugins_bad="directsound directdraw osx_video quicktime vcd
16alsa assrender amrwb apexsink bz2 cdaudio celt cog dc1394 directfb dirac dts divx
17metadata faac faad fbdev flite gsm jp2k kate ladspa lv2 libmms
18modplug mimic mpeg2enc mplex musepack musicbrainz mythtv nas neon ofa rsvg
19timidity wildmidi sdl sdltest sndfile soundtouch spc gme swfdec theoradec xvid
20dvb wininet acm vdpau schro zbar"
21
22# When adding conditionals like below, be careful about having leading spaces
23
24# Changes in 0.10.21:
25# jack moved to -good
26if ! version_is_at_least "0.10.21"; then
27 my_gst_plugins_bad+=" jack"
28fi
29
30# Changes in 0.10.20:
31# New split plugins rtmp, gsettings and shm
32if version_is_at_least "0.10.20"; then
33 my_gst_plugins_bad+=" rtmp gsettings shm"
34fi
35
36# Changes in 0.10.19:
37# dvdnav configure option changed from --enable-dvdnav to --enable-resindvd
38if version_is_at_least "0.10.19"; then
39 my_gst_plugins_bad+=" resindvd vp8"
40fi
41
42# dvdnav configure option changed from --enable-dvdnav to --enable-resindvd
43# oss4 moved to -good
44if ! version_is_at_least "0.10.19"; then
45 my_gst_plugins_bad+=" dvdnav oss4"
46fi
47
48# Changes in 0.10.18:
49# ivorbis gone (moved to -base-0.10.27 as part of vorbis plugin)
50if ! version_is_at_least "0.10.18"; then
51 my_gst_plugins_bad+=" ivorbis"
52fi
16 53
17MY_PN="gst-plugins-bad" 54MY_PN="gst-plugins-bad"
18MY_P=${MY_PN}-${PV} 55MY_P=${MY_PN}-${PV}
19 56
20SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2" 57SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-bad/${MY_P}.tar.bz2"
58if [ ${PV} == "0.10.14" ]; then
59 SRC_URI="${SRC_URI} http://dev.gentoo.org/~leio/distfiles/gst-plugins-bad-0.10.14-kate-configure-fix.patch.bz2"
60fi
21 61
22# added to remove circular deps 62# added to remove circular deps
23# 6/2/2006 - zaheerm 63# 6/2/2006 - zaheerm
24if [ "${PN}" != "${MY_PN}" ]; then 64if [ "${PN}" != "${MY_PN}" ]; then
25RDEPEND="=media-libs/gstreamer-0.10* 65RDEPEND="=media-libs/gstreamer-0.10*
26 =media-libs/gst-plugins-base-0.10* 66 =media-libs/gst-plugins-base-0.10*
27 >=dev-libs/glib-2.6 67 >=dev-libs/glib-2.6
28 >=dev-libs/liboil-0.3" 68 >=dev-libs/liboil-0.3.8"
29DEPEND="${RDEPEND} 69DEPEND="${RDEPEND}
30 sys-apps/sed 70 sys-apps/sed
71 dev-util/pkgconfig
31 sys-devel/gettext" 72 sys-devel/gettext"
73
74# -bad-0.10.20 uses orc optionally instead of liboil unconditionally.
75# While <0.10.20 configure always check for liboil, it is used only by non-split
76# plugins in gst/ (legacyresample and mpegdemux), so we only builddep for all
77# old packages, and have a RDEPEND in old versions of media-libs/gst-plugins-bad
78if ! version_is_at_least "0.10.20"; then
79DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
80fi
81
82RESTRICT=test
32fi 83fi
33S=${WORKDIR}/${MY_P} 84S=${WORKDIR}/${MY_P}
34 85
35gst-plugins-bad_src_unpack() { 86gst-plugins-bad_src_unpack() {
36 local makefiles 87# local makefiles
37 88
38 unpack ${A} 89 unpack ${A}
39 90
91 # Link with the syswide installed gst-libs if needed
40 gst-plugins10_find_plugin_dir 92 gst-plugins10_find_plugin_dir
93 sed -e "s:\$(top_builddir)/gst-libs/gst/interfaces/libgstphotography:${ROOT}/usr/$(get_libdir)/libgstphotography:" \
94 -e "s:\$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor:${ROOT}/usr/$(get_libdir)/libgstsignalprocessor:" \
95 -e "s:\$(top_builddir)/gst-libs/gst/video/libgstbasevideo:${ROOT}/usr/$(get_libdir)/libgstbasevideo:" \
96 -i Makefile.in
97
98 # 0.10.14 configure errors when --disable-kate is passed:
99 # configure: error: conditional "USE_TIGER" was never defined.
100 # Fix it - this has to stay until any 0.10.14 split or main is in tree:
101 if [ ${PV} == "0.10.14" ]; then
41 cd ${S} 102 cd ${S}
103 epatch "${WORKDIR}/gst-plugins-bad-0.10.14-kate-configure-fix.patch"
104 fi
42 105
43 # Remove generation of any other Makefiles except the plugin's Makefile 106 # Remove generation of any other Makefiles except the plugin's Makefile
44 if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then 107# if [[ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]] ; then
45 makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile" 108# makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
46 elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then 109# elif [[ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]] ; then
47 makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile" 110# makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
48 fi 111# fi
49 112
50 sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \ 113# sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
51 -i ${S}/configure 114# -i ${S}/configure
52} 115}
53 116
54gst-plugins-bad_src_configure() { 117gst-plugins-bad_src_configure() {
55 local plugin gst_conf 118 local plugin gst_conf
56 119
57 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..." 120 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
58
59 for plugin in ${GST_PLUGINS_BUILD} ; do
60 my_gst_plugins_bad="${my_gst_plugins_bad/${plugin}/}"
61 done
62 121
63 for plugin in ${my_gst_plugins_bad} ; do 122 for plugin in ${my_gst_plugins_bad} ; do
64 gst_conf="${gst_conf} --disable-${plugin}" 123 gst_conf="${gst_conf} --disable-${plugin}"
65 done 124 done
66 125
67 for plugin in ${GST_PLUGINS_BUILD} ; do 126 for plugin in ${GST_PLUGINS_BUILD} ; do
68 gst_conf="${gst_conf} --enable-${plugin}" 127 gst_conf="${gst_conf} --enable-${plugin}"
69 done 128 done
70 129
71 cd ${S} 130 cd ${S}
72 econf ${@} ${gst_conf} || die "configure failed" 131 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "configure failed"
73} 132}
74 133
75gst-plugins-bad_src_compile() { 134gst-plugins-bad_src_compile() {
76 gst-plugins-bad_src_configure ${@} 135 gst-plugins-bad_src_configure ${@}
77 136
81 140
82gst-plugins-bad_src_install() { 141gst-plugins-bad_src_install() {
83 gst-plugins10_find_plugin_dir 142 gst-plugins10_find_plugin_dir
84 einstall || die "install failed" 143 einstall || die "install failed"
85 144
86 dodoc README 145 [[ -e README ]] && dodoc README
87} 146}
88 147
89EXPORT_FUNCTIONS src_unpack src_compile src_install 148EXPORT_FUNCTIONS src_unpack src_compile src_install

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.20