| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2011 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.18 2010/07/28 05:17:58 leio Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-ugly.eclass,v 1.23 2011/05/04 02:23:40 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 | # |
| 9 | # eclass to make external gst-plugins emergable on a per-plugin basis |
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 |
10 | # to solve the problem with gst-plugins generating far too much unneeded deps |
| 11 | # |
11 | # |
| 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 <gstreamer@gentoo.org>. |
| 15 | # or the gstreamer team. |
|
|
| 16 | |
15 | |
| 17 | inherit eutils gst-plugins10 |
16 | inherit eutils versionator gst-plugins10 |
| 18 | |
17 | |
| 19 | |
18 | |
| 20 | ### |
19 | ### |
| 21 | # variable declarations |
20 | # variable declarations |
| 22 | ### |
21 | ### |
| 23 | |
22 | |
| 24 | MY_PN=gst-plugins-ugly |
23 | MY_PN=gst-plugins-ugly |
| 25 | MY_P=${MY_PN}-${PV} |
24 | MY_P=${MY_PN}-${PV} |
|
|
25 | |
| 26 | # All relevant configure options for gst-plugins-ugly |
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 | # Not necessary since -ugly-0.10.13: id3tag dvdnav |
|
|
| 29 | my_gst_plugins_ugly="a52dec amrnb amrwb cdio dvdread dvdnav lame id3tag mad |
28 | my_gst_plugins_ugly="a52dec amrnb amrwb cdio dvdread lame mad mpeg2dec sidplay |
| 30 | mpeg2dec sidplay twolame x264" |
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 |
| 31 | |
54 | |
| 32 | #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2" |
55 | #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2" |
| 33 | SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2" |
56 | SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/${MY_P}.tar.bz2" |
| 34 | |
57 | |
| 35 | S=${WORKDIR}/${MY_P} |
58 | S=${WORKDIR}/${MY_P} |
| 36 | |
59 | |
|
|
60 | if [[ ${GST_ORC} == "yes" ]]; then |
|
|
61 | RDEPEND="orc? ( >=dev-lang/orc-0.4.6 )" |
|
|
62 | DEPEND="${RDEPEND}" |
|
|
63 | fi |
|
|
64 | |
| 37 | # added to remove circular deps |
65 | # added to remove circular deps |
| 38 | # 6/2/2006 - zaheerm |
66 | # 6/2/2006 - zaheerm |
| 39 | if [ "${PN}" != "${MY_PN}" ]; then |
67 | if [ "${PN}" != "${MY_PN}" ]; then |
|
|
68 | RDEPEND="${RDEPEND} |
| 40 | RDEPEND="=media-libs/gst-plugins-base-0.10*" |
69 | =media-libs/gst-plugins-base-0.10*" |
| 41 | DEPEND="${RDEPEND} |
70 | DEPEND="${RDEPEND} |
| 42 | >=sys-apps/sed-4 |
71 | >=sys-apps/sed-4 |
| 43 | dev-util/pkgconfig" |
72 | dev-util/pkgconfig" |
|
|
73 | |
| 44 | RESTRICT=test |
74 | RESTRICT=test |
| 45 | fi |
75 | fi |
| 46 | |
76 | |
| 47 | ### |
77 | ### |
| 48 | # public functions |
78 | # public functions |
| 49 | ### |
79 | ### |
| 50 | |
80 | |
| 51 | gst-plugins-ugly_src_configure() { |
81 | gst-plugins-ugly_src_configure() { |
| 52 | |
82 | |
| 53 | # disable any external plugin besides the plugin we want |
83 | # disable any external plugin besides the plugin we want |
| 54 | local plugin gst_conf |
84 | local plugin gst_conf gst_orc_conf |
| 55 | |
85 | |
| 56 | einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..." |
86 | einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..." |
| 57 | |
87 | |
| 58 | for plugin in ${my_gst_plugins_ugly}; do |
88 | for plugin in ${my_gst_plugins_ugly}; do |
| 59 | gst_conf="${gst_conf} --disable-${plugin} " |
89 | gst_conf="${gst_conf} --disable-${plugin} " |
| … | |
… | |
| 61 | |
91 | |
| 62 | for plugin in ${GST_PLUGINS_BUILD}; do |
92 | for plugin in ${GST_PLUGINS_BUILD}; do |
| 63 | gst_conf="${gst_conf} --enable-${plugin} " |
93 | gst_conf="${gst_conf} --enable-${plugin} " |
| 64 | done |
94 | done |
| 65 | |
95 | |
|
|
96 | gst_orc_conf="--disable-orc" |
|
|
97 | if [[ ${GST_ORC} == "yes" ]]; then |
|
|
98 | gst_orc_conf="$(use_enable orc)" |
|
|
99 | fi |
|
|
100 | |
| 66 | cd ${S} |
101 | cd ${S} |
| 67 | econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure" |
102 | econf ${gst_orc_conf} ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure" |
| 68 | |
103 | |
| 69 | } |
104 | } |
| 70 | |
105 | |
| 71 | ### |
106 | ### |
| 72 | # public inheritable functions |
107 | # public inheritable functions |
| … | |
… | |
| 107 | gst-plugins10_find_plugin_dir |
142 | gst-plugins10_find_plugin_dir |
| 108 | einstall || die |
143 | einstall || die |
| 109 | |
144 | |
| 110 | [[ -e README ]] && dodoc README |
145 | [[ -e README ]] && dodoc README |
| 111 | } |
146 | } |
| 112 | |
|
|
| 113 | |
|
|
| 114 | EXPORT_FUNCTIONS src_unpack src_compile src_install |
|
|