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

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

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

Revision 1.10 Revision 1.21
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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-ugly.eclass,v 1.10 2007/09/13 15:38:54 drac Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-ugly.eclass,v 1.21 2010/12/27 03:49:34 leio Exp $
4 4
5# Author : foser <foser@gentoo.org> 5# Author : foser <foser@gentoo.org>
6 6
7# gst-plugins-ugly eclass 7# gst-plugins-ugly 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, in case of spider usage obtain recommended plugins to use from 13# defined in the source, in case of spider usage 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
19 19
20### 20###
21# variable declarations 21# variable declarations
22### 22###
23 23
24MY_PN=gst-plugins-ugly 24MY_PN=gst-plugins-ugly
25MY_P=${MY_PN}-${PV} 25MY_P=${MY_PN}-${PV}
26# All relevant configure options for gst-plugins 26# All relevant configure options for gst-plugins-ugly
27# need a better way to extract these 27# need a better way to extract these.
28# gst-plugins-base 0.9
29my_gst_plugins_ugly="amrnb a52dec dvdread id3tag lame mad mpeg2dec sidplay" 28my_gst_plugins_ugly="a52dec amrnb amrwb cdio dvdread lame mad mpeg2dec sidplay
29twolame x264"
30
31# dvdnav and id3tag disabled/removed since -ugly-0.10.13
32if ! version_is_at_least "0.10.13"; then
33 my_gst_plugins_bad+=" dvdnav id3tag"
34fi
35
36GST_UGLY_EXPORTED_FUNCTIONS="src_unpack src_compile src_install"
37
38case "${EAPI:-0}" in
39 0)
40 if [[ -n ${GST_ORC} ]]; then
41 die "Usage of IUSE=+orc implying GST_ORC variable without EAPI-1"
42 fi
43 ;;
44 1)
45 ;;
46 *)
47 die "Unsupported EAPI ${EAPI}"
48 ;;
49esac
50
51# exports must be ALWAYS after inherit
52EXPORT_FUNCTIONS ${GST_UGLY_EXPORTED_FUNCTIONS}
53
54if version_is_at_least "0.10.16"; then
55 # Ensure GST_ORC is set to a default. This fact is also relied on in
56 # gst-plugins-ugly_src_configure, signalling it's >=0.10.16 and has orc options
57 GST_ORC=${GST_ORC:-"no"}
58 if [[ ${GST_ORC} == "yes" ]]; then
59 IUSE="+orc"
60 fi
61else
62 unset GST_ORC
63fi
30 64
31#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2" 65#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
32SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2" 66SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2"
33 67
34S=${WORKDIR}/${MY_P} 68S=${WORKDIR}/${MY_P}
35 69
70if [[ ${GST_ORC} == "yes" ]]; then
71 RDEPEND="orc? ( >=dev-lang/orc-0.4.5 )"
72 DEPEND="${RDEPEND}"
73fi
74
36# added to remove circular deps 75# added to remove circular deps
37# 6/2/2006 - zaheerm 76# 6/2/2006 - zaheerm
38if [ "${PN}" != "${MY_PN}" ]; then 77if [ "${PN}" != "${MY_PN}" ]; then
78RDEPEND="${RDEPEND}
39RDEPEND="=media-libs/gst-plugins-base-0.10*" 79 =media-libs/gst-plugins-base-0.10*"
40DEPEND="${RDEPEND} 80DEPEND="${RDEPEND}
41 >=sys-apps/sed-4 81 >=sys-apps/sed-4
42 dev-util/pkgconfig" 82 dev-util/pkgconfig"
83
84# -ugly-0.10.16 uses orc optionally instead of liboil unconditionally.
85# While <0.10.16 configure always checks for liboil, it is linked to only by a52dec,
86# so we only builddep for all packages, and have a RDEPEND in old gst-plugins-a52dec
87if ! version_is_at_least "0.10.16"; then
88DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
89fi
90
91RESTRICT=test
43fi 92fi
44 93
45### 94###
46# public functions 95# public functions
47### 96###
48 97
49gst-plugins-ugly_src_configure() { 98gst-plugins-ugly_src_configure() {
50 99
51 # disable any external plugin besides the plugin we want 100 # disable any external plugin besides the plugin we want
52 local plugin gst_conf 101 local plugin gst_conf gst_orc_conf
53 102
54 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..." 103 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
55 104
56 for plugin in ${GST_PLUGINS_BUILD}; do
57 my_gst_plugins_ugly=${my_gst_plugins_ugly/${plugin}/}
58 done
59 for plugin in ${my_gst_plugins_ugly}; do 105 for plugin in ${my_gst_plugins_ugly}; do
60 gst_conf="${gst_conf} --disable-${plugin} " 106 gst_conf="${gst_conf} --disable-${plugin} "
61 done 107 done
108
62 for plugin in ${GST_PLUGINS_BUILD}; do 109 for plugin in ${GST_PLUGINS_BUILD}; do
63 gst_conf="${gst_conf} --enable-${plugin} " 110 gst_conf="${gst_conf} --enable-${plugin} "
64 done 111 done
65 112
113 gst_orc_conf=""
114 if [[ -n ${GST_ORC} ]]; then
115 if [[ ${GST_ORC} == "yes" ]]; then
116 gst_orc_conf="$(use_enable orc)"
117 else
118 gst_orc_conf="--disable-orc"
119 fi
120 fi
121 #else leave gst_orc_conf empty, as $PV is less than 0.10.16, so no --enable/disable-orc yet
122
66 cd ${S} 123 cd ${S}
67 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure" 124 econf ${gst_orc_conf} ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
68 125
69} 126}
70 127
71### 128###
72# public inheritable functions 129# public inheritable functions
73### 130###
74 131
75gst-plugins-ugly_src_unpack() { 132gst-plugins-ugly_src_unpack() {
76 133
77 local makefiles 134# local makefiles
78 135
79 unpack ${A} 136 unpack ${A}
80 137
81 # Link with the syswide installed gst-libs if needed 138 # Link with the syswide installed gst-libs if needed
82 gst-plugins10_find_plugin_dir 139# gst-plugins10_find_plugin_dir
83 cd ${S} 140# cd ${S}
84 141
85 # Remove generation of any other Makefiles except the plugin's Makefile 142 # Remove generation of any other Makefiles except the plugin's Makefile
86 if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then 143# if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
87 makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile" 144# makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
88 elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then 145# elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
89 makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile" 146# makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
90 fi 147# fi
91 sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \ 148# sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
92 -i ${S}/configure 149# -i ${S}/configure
93 150
94} 151}
95 152
96gst-plugins-ugly_src_compile() { 153gst-plugins-ugly_src_compile() {
97 154
107 gst-plugins10_find_plugin_dir 164 gst-plugins10_find_plugin_dir
108 einstall || die 165 einstall || die
109 166
110 [[ -e README ]] && dodoc README 167 [[ -e README ]] && dodoc README
111} 168}
112
113
114EXPORT_FUNCTIONS src_unpack src_compile src_install

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.20