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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.28 - (hide annotations) (download)
Tue Oct 23 07:54:38 2012 UTC (23 months ago) by tetromino
Branch: MAIN
Changes since 1.27: +25 -7 lines
Update for gst-plugins-good-0.10.31: use .xz tarballs, punt .la files.

1 jdhore 1.27 # Copyright 1999-2012 Gentoo Foundation
2 zaheerm 1.1 # Distributed under the terms of the GNU General Public License v2
3 tetromino 1.28 # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-good.eclass,v 1.27 2012/05/02 18:31:42 jdhore Exp $
4 zaheerm 1.1
5     # Author : foser <foser@gentoo.org>, zaheerm <zaheerm@gentoo.org>
6    
7     # gst-plugins-good 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.3 # 3rd party applications using gstreamer now should depend on a set of plugins as
13     # defined in the source, obtain recommended plugins to use from
14     # Gentoo developers responsible for gstreamer <gnome@gentoo.org>, the application developer
15 zaheerm 1.1 # or the gstreamer team.
16    
17 leio 1.21 inherit eutils versionator gst-plugins10
18 zaheerm 1.1
19 tetromino 1.28 GST_EXPF="src_unpack src_compile src_install"
20     GST_TARBALL_SUFFIX="bz2"
21     GST_LA_PUNT="no"
22     case ${EAPI:-0} in
23     4) GST_EXPF="${GST_EXPF} src_configure"
24     GST_TARBALL_SUFFIX="xz"
25     GST_LA_PUNT="yes" ;;
26     2|3) GST_EXPF="${GST_EXPF} src_configure" ;;
27     1|0) ;;
28     *) die "Unknown EAPI" ;;
29     esac
30     EXPORT_FUNCTIONS ${GST_EXPF}
31 zaheerm 1.1
32     ###
33     # variable declarations
34     ###
35    
36     MY_PN=gst-plugins-good
37     MY_P=${MY_PN}-${PV}
38     # All relevant configure options for gst-plugins
39     # need a better way to extract these
40 lack 1.12
41 leio 1.19 # First line for non-plugin build related configure options; second line for
42     # sys/ plugins; rest is split plugin options in order of ./configure --help output.
43     # Good ways of validation are seeing diff of old and new configure.ac, and ./configure --help
44     #
45 tetromino 1.28 # This list is current to gst-plugins-good-0.10.31:
46 leio 1.19 my_gst_plugins_good="gconftool zlib bz2
47 leio 1.24 directsound oss oss4 sunaudio osx_audio osx_video gst_v4l2 x xshm xvideo
48 leio 1.19 aalib aalibtest annodex cairo esd esdtest flac gconf gdk_pixbuf hal jpeg
49 tetromino 1.28 libcaca libdv libpng pulse dv1394 shout2 soup speex taglib wavpack"
50 zaheerm 1.1
51 leio 1.21 # When adding conditionals like below, be careful about having leading spaces in concat
52    
53 tetromino 1.28 # --enable-shout2test option was removed in 0.10.31
54     if ! version_is_at_least "0.10.31"; then
55     my_gst_plugins_good+=" shout2test"
56     fi
57    
58 leio 1.25 # cairooverlay added to the cairo plugin under cairo_gobject
59     if version_is_at_least "0.10.29"; then
60     my_gst_plugins_good+=" cairo_gobject"
61     fi
62    
63 leio 1.23 # ext/jack moved here since 0.10.27
64     if version_is_at_least "0.10.27"; then
65     my_gst_plugins_good+=" jack"
66     fi
67 leio 1.21
68 zaheerm 1.1 #SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2"
69 tetromino 1.28 SRC_URI="http://gstreamer.freedesktop.org/src/gst-plugins-good/${MY_P}.tar.${GST_TARBALL_SUFFIX}"
70     [[ ${GST_TARBALL_SUFFIX} = "xz" ]] && DEPEND="${DEPEND} app-arch/xz-utils"
71 zaheerm 1.1
72     S=${WORKDIR}/${MY_P}
73 zaheerm 1.4 # added to remove circular deps
74     # 6/2/2006 - zaheerm
75     if [ "${PN}" != "${MY_PN}" ]; then
76     RDEPEND="=media-libs/gst-plugins-base-0.10*"
77 zaheerm 1.1 DEPEND="${RDEPEND}
78 tetromino 1.28 ${DEPEND}
79 zaheerm 1.10 >=sys-apps/sed-4
80 jdhore 1.27 virtual/pkgconfig"
81 leio 1.22
82     # -good-0.10.24 uses orc optionally instead of liboil unconditionally.
83     # While <0.10.24 configure always checks for liboil, it is linked to only by non-split
84     # plugins in gst/, so we only builddep for all old packages, and have a RDEPEND in old
85     # versions of media-libs/gst-plugins-good
86     if ! version_is_at_least "0.10.24"; then
87     DEPEND="${DEPEND} >=dev-libs/liboil-0.3.8"
88     fi
89    
90 tester 1.18 RESTRICT=test
91 zaheerm 1.4 fi
92 zaheerm 1.1
93     ###
94     # public functions
95     ###
96    
97     gst-plugins-good_src_configure() {
98 swegener 1.3
99 zaheerm 1.1 # disable any external plugin besides the plugin we want
100     local plugin gst_conf
101    
102     einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
103    
104     for plugin in ${my_gst_plugins_good}; do
105     gst_conf="${gst_conf} --disable-${plugin} "
106     done
107 leio 1.20
108 zaheerm 1.1 for plugin in ${GST_PLUGINS_BUILD}; do
109     gst_conf="${gst_conf} --enable-${plugin} "
110     done
111    
112     cd ${S}
113 zaheerm 1.11 econf ${@} --with-package-name="Gentoo GStreamer Ebuild" --with-package-origin="http://www.gentoo.org" ${gst_conf} || die "./configure failure"
114 zaheerm 1.1
115     }
116    
117     ###
118     # public inheritable functions
119     ###
120    
121     gst-plugins-good_src_unpack() {
122    
123 tester 1.17 # local makefiles
124 zaheerm 1.1
125     unpack ${A}
126    
127     # Link with the syswide installed gst-libs if needed
128 tester 1.17 # gst-plugins10_find_plugin_dir
129     # cd ${S}
130 zaheerm 1.1
131     # Remove generation of any other Makefiles except the plugin's Makefile
132 tester 1.17 # if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
133     # makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
134     # elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
135     # makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
136     # fi
137     # sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
138     # -i ${S}/configure
139 zaheerm 1.1
140     }
141    
142     gst-plugins-good_src_compile() {
143    
144 tetromino 1.28 has src_configure ${GST_EXPF} || gst-plugins-good_src_configure ${@}
145 zaheerm 1.1
146     gst-plugins10_find_plugin_dir
147     emake || die "compile failure"
148    
149     }
150    
151     gst-plugins-good_src_install() {
152    
153     gst-plugins10_find_plugin_dir
154     einstall || die
155 tetromino 1.28 [[ ${GST_LA_PUNT} = "yes" ]] && prune_libtool_files --modules
156 zaheerm 1.1
157 drac 1.14 [[ -e README ]] && dodoc README
158 zaheerm 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20