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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (show annotations) (download)
Wed May 4 02:23:40 2011 UTC (3 years, 3 months ago) by leio
Branch: MAIN
Changes since 1.22: +11 -33 lines
All liboil using versions are now gone from the tree, so simply the orc handling logic and remove support for econfing those removed old versions.

1 # Copyright 1999-2011 Gentoo Foundation
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.22 2011/03/17 21:12:40 nirbheek Exp $
4
5 # Author : foser <foser@gentoo.org>
6
7 # gst-plugins-ugly 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, in case of spider usage obtain recommended plugins to use from
14 # Gentoo developers responsible for gstreamer <gstreamer@gentoo.org>.
15
16 inherit eutils versionator gst-plugins10
17
18
19 ###
20 # variable declarations
21 ###
22
23 MY_PN=gst-plugins-ugly
24 MY_P=${MY_PN}-${PV}
25
26 # All relevant configure options for gst-plugins-ugly
27 # need a better way to extract these.
28 my_gst_plugins_ugly="a52dec amrnb amrwb cdio dvdread lame mad mpeg2dec sidplay
29 twolame x264"
30
31 GST_UGLY_EXPORTED_FUNCTIONS="src_unpack src_compile src_install"
32
33 case "${EAPI:-0}" in
34 0)
35 if [[ -n ${GST_ORC} ]]; then
36 die "Usage of IUSE=+orc implying GST_ORC variable without EAPI-1"
37 fi
38 ;;
39 1)
40 ;;
41 *)
42 die "Unsupported EAPI ${EAPI}"
43 ;;
44 esac
45
46 # exports must be ALWAYS after inherit
47 EXPORT_FUNCTIONS ${GST_UGLY_EXPORTED_FUNCTIONS}
48
49 # Ensure GST_ORC is set to a default.
50 GST_ORC=${GST_ORC:-"no"}
51 if [[ ${GST_ORC} == "yes" ]]; then
52 IUSE="+orc"
53 fi
54
55 #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
56 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2"
57
58 S=${WORKDIR}/${MY_P}
59
60 if [[ ${GST_ORC} == "yes" ]]; then
61 RDEPEND="orc? ( >=dev-lang/orc-0.4.6 )"
62 DEPEND="${RDEPEND}"
63 fi
64
65 # added to remove circular deps
66 # 6/2/2006 - zaheerm
67 if [ "${PN}" != "${MY_PN}" ]; then
68 RDEPEND="${RDEPEND}
69 =media-libs/gst-plugins-base-0.10*"
70 DEPEND="${RDEPEND}
71 >=sys-apps/sed-4
72 dev-util/pkgconfig"
73
74 RESTRICT=test
75 fi
76
77 ###
78 # public functions
79 ###
80
81 gst-plugins-ugly_src_configure() {
82
83 # disable any external plugin besides the plugin we want
84 local plugin gst_conf gst_orc_conf
85
86 einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
87
88 for plugin in ${my_gst_plugins_ugly}; do
89 gst_conf="${gst_conf} --disable-${plugin} "
90 done
91
92 for plugin in ${GST_PLUGINS_BUILD}; do
93 gst_conf="${gst_conf} --enable-${plugin} "
94 done
95
96 gst_orc_conf="--disable-orc"
97 if [[ ${GST_ORC} == "yes" ]]; then
98 gst_orc_conf="$(use_enable orc)"
99 fi
100
101 cd ${S}
102 econf ${gst_orc_conf} ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
103
104 }
105
106 ###
107 # public inheritable functions
108 ###
109
110 gst-plugins-ugly_src_unpack() {
111
112 # local makefiles
113
114 unpack ${A}
115
116 # Link with the syswide installed gst-libs if needed
117 # gst-plugins10_find_plugin_dir
118 # cd ${S}
119
120 # Remove generation of any other Makefiles except the plugin's Makefile
121 # if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
122 # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
123 # elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
124 # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
125 # fi
126 # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
127 # -i ${S}/configure
128
129 }
130
131 gst-plugins-ugly_src_compile() {
132
133 gst-plugins-ugly_src_configure ${@}
134
135 gst-plugins10_find_plugin_dir
136 emake || die "compile failure"
137
138 }
139
140 gst-plugins-ugly_src_install() {
141
142 gst-plugins10_find_plugin_dir
143 einstall || die
144
145 [[ -e README ]] && dodoc README
146 }

  ViewVC Help
Powered by ViewVC 1.1.20