/[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 - (hide annotations) (download)
Wed May 4 02:23:40 2011 UTC (3 years, 7 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 leio 1.23 # Copyright 1999-2011 Gentoo Foundation
2 zaheerm 1.1 # Distributed under the terms of the GNU General Public License v2
3 leio 1.23 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-ugly.eclass,v 1.22 2011/03/17 21:12:40 nirbheek Exp $
4 zaheerm 1.1
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 swegener 1.4 # 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 leio 1.23 # Gentoo developers responsible for gstreamer <gstreamer@gentoo.org>.
15 zaheerm 1.1
16 leio 1.19 inherit eutils versionator gst-plugins10
17 zaheerm 1.1
18    
19     ###
20     # variable declarations
21     ###
22    
23     MY_PN=gst-plugins-ugly
24     MY_P=${MY_PN}-${PV}
25 leio 1.23
26 leio 1.17 # All relevant configure options for gst-plugins-ugly
27     # need a better way to extract these.
28 leio 1.19 my_gst_plugins_ugly="a52dec amrnb amrwb cdio dvdread lame mad mpeg2dec sidplay
29     twolame x264"
30    
31 leio 1.21 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 leio 1.23 # Ensure GST_ORC is set to a default.
50     GST_ORC=${GST_ORC:-"no"}
51     if [[ ${GST_ORC} == "yes" ]]; then
52     IUSE="+orc"
53 leio 1.21 fi
54    
55 zaheerm 1.1 #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
56 zaheerm 1.2 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2"
57 zaheerm 1.1
58     S=${WORKDIR}/${MY_P}
59    
60 leio 1.21 if [[ ${GST_ORC} == "yes" ]]; then
61 nirbheek 1.22 RDEPEND="orc? ( >=dev-lang/orc-0.4.6 )"
62 leio 1.21 DEPEND="${RDEPEND}"
63     fi
64    
65 zaheerm 1.5 # added to remove circular deps
66     # 6/2/2006 - zaheerm
67     if [ "${PN}" != "${MY_PN}" ]; then
68 leio 1.21 RDEPEND="${RDEPEND}
69     =media-libs/gst-plugins-base-0.10*"
70 zaheerm 1.1 DEPEND="${RDEPEND}
71 zaheerm 1.7 >=sys-apps/sed-4
72     dev-util/pkgconfig"
73 leio 1.20
74 tester 1.14 RESTRICT=test
75 zaheerm 1.5 fi
76 zaheerm 1.1
77     ###
78     # public functions
79     ###
80    
81     gst-plugins-ugly_src_configure() {
82 swegener 1.4
83 zaheerm 1.1 # disable any external plugin besides the plugin we want
84 leio 1.21 local plugin gst_conf gst_orc_conf
85 zaheerm 1.1
86     einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
87    
88 zaheerm 1.2 for plugin in ${my_gst_plugins_ugly}; do
89 zaheerm 1.1 gst_conf="${gst_conf} --disable-${plugin} "
90     done
91 leio 1.18
92 zaheerm 1.1 for plugin in ${GST_PLUGINS_BUILD}; do
93     gst_conf="${gst_conf} --enable-${plugin} "
94     done
95    
96 leio 1.23 gst_orc_conf="--disable-orc"
97     if [[ ${GST_ORC} == "yes" ]]; then
98     gst_orc_conf="$(use_enable orc)"
99 leio 1.21 fi
100    
101 zaheerm 1.1 cd ${S}
102 leio 1.21 econf ${gst_orc_conf} ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
103 zaheerm 1.1
104     }
105    
106     ###
107     # public inheritable functions
108     ###
109    
110     gst-plugins-ugly_src_unpack() {
111    
112 tester 1.13 # local makefiles
113 zaheerm 1.1
114     unpack ${A}
115    
116     # Link with the syswide installed gst-libs if needed
117 tester 1.13 # gst-plugins10_find_plugin_dir
118     # cd ${S}
119 zaheerm 1.1
120     # Remove generation of any other Makefiles except the plugin's Makefile
121 tester 1.13 # 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 zaheerm 1.1
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 drac 1.10 [[ -e README ]] && dodoc README
146 zaheerm 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20