| 1 | # Copyright 1999-2012 Gentoo Foundation |
1 | # Copyright 1999-2013 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-plugins10.eclass,v 1.8 2012/12/02 17:16:20 eva Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins10.eclass,v 1.9 2013/01/16 22:52:37 eva Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: gst-plugins10.eclass |
5 | # @ECLASS: gst-plugins10.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # gstreamer@gentoo.org |
7 | # gstreamer@gentoo.org |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| … | |
… | |
| 44 | |
44 | |
| 45 | # @ECLASS-VARIABLE: GST_LA_PUNT |
45 | # @ECLASS-VARIABLE: GST_LA_PUNT |
| 46 | # @DESCRIPTION: |
46 | # @DESCRIPTION: |
| 47 | # Should we delete all the .la files? |
47 | # Should we delete all the .la files? |
| 48 | # NOT to be used without due consideration. |
48 | # NOT to be used without due consideration. |
|
|
49 | # Defaults to no for EAPI < 5. |
| 49 | if has "${EAPI:-0}" 0 1 2 3; then |
50 | if has "${EAPI:-0}" 0 1 2 3; then |
| 50 | : ${GST_LA_PUNT:="no"} |
51 | : ${GST_LA_PUNT:="no"} |
| 51 | else |
52 | else |
| 52 | : ${GST_LA_PUNT:="yes"} |
53 | : ${GST_LA_PUNT:="yes"} |
| 53 | fi |
54 | fi |
| … | |
… | |
| 182 | done |
183 | done |
| 183 | } |
184 | } |
| 184 | |
185 | |
| 185 | # @FUNCTION: gst-plugins10_remove_unversioned_binaries |
186 | # @FUNCTION: gst-plugins10_remove_unversioned_binaries |
| 186 | # @INTERNAL |
187 | # @INTERNAL |
| 187 | # @DEPRECATED |
|
|
| 188 | # @DESCRIPTION: |
188 | # @DESCRIPTION: |
| 189 | # Remove the unversioned binaries gstreamer provides to prevent file collision |
189 | # Remove the unversioned binaries gstreamer provides to prevent file collision |
| 190 | # with other slots. |
190 | # with other slots. DEPRECATED |
| 191 | gst-plugins10_remove_unversioned_binaries() { |
191 | gst-plugins10_remove_unversioned_binaries() { |
| 192 | cd "${D}"/usr/bin |
192 | cd "${D}"/usr/bin |
| 193 | local gst_bins |
193 | local gst_bins |
| 194 | for gst_bins in *-${SLOT} ; do |
194 | for gst_bins in *-${SLOT} ; do |
| 195 | [[ -e ${gst_bins} ]] || continue |
195 | [[ -e ${gst_bins} ]] || continue |
| … | |
… | |
| 197 | einfo "Removed ${gst_bins/-${SLOT}/}" |
197 | einfo "Removed ${gst_bins/-${SLOT}/}" |
| 198 | done |
198 | done |
| 199 | } |
199 | } |
| 200 | |
200 | |
| 201 | # @FUNCTION: gst-plugins10_src_configure |
201 | # @FUNCTION: gst-plugins10_src_configure |
|
|
202 | # @DESCRIPTION: |
|
|
203 | # Handles logic common to configuring gstreamer plugins |
| 202 | gst-plugins10_src_configure() { |
204 | gst-plugins10_src_configure() { |
| 203 | local plugin gst_conf |
205 | local plugin gst_conf |
| 204 | |
206 | |
| 205 | if has ${EAPI:-0} 0 1 2 3 ; then |
207 | if has ${EAPI:-0} 0 1 2 3 ; then |
| 206 | gst_conf="${gst_conf} --disable-dependency-tracking" |
208 | gst_conf="${gst_conf} --disable-dependency-tracking" |
| … | |
… | |
| 246 | --with-package-origin="http://www.gentoo.org" \ |
248 | --with-package-origin="http://www.gentoo.org" \ |
| 247 | ${gst_conf} $@ |
249 | ${gst_conf} $@ |
| 248 | } |
250 | } |
| 249 | |
251 | |
| 250 | # @FUNCTION: gst-plugins10_src_compile |
252 | # @FUNCTION: gst-plugins10_src_compile |
|
|
253 | # @DESCRIPTION: |
|
|
254 | # Compiles requested gstreamer plugin. |
| 251 | gst-plugins10_src_compile() { |
255 | gst-plugins10_src_compile() { |
| 252 | has ${EAPI:-0} 0 1 && gst-plugins10_src_configure "$@" |
256 | has ${EAPI:-0} 0 1 && gst-plugins10_src_configure "$@" |
| 253 | |
257 | |
| 254 | gst-plugins10_find_plugin_dir |
258 | gst-plugins10_find_plugin_dir |
| 255 | |
259 | |
| … | |
… | |
| 259 | default |
263 | default |
| 260 | fi |
264 | fi |
| 261 | } |
265 | } |
| 262 | |
266 | |
| 263 | # @FUNCTION: gst-plugins10_src_install |
267 | # @FUNCTION: gst-plugins10_src_install |
|
|
268 | # @DESCRIPTION: |
|
|
269 | # Installs requested gstreamer plugin. |
| 264 | gst-plugins10_src_install() { |
270 | gst-plugins10_src_install() { |
| 265 | gst-plugins10_find_plugin_dir |
271 | gst-plugins10_find_plugin_dir |
| 266 | |
272 | |
| 267 | if has "${EAPI:-0}" 0 1 2 3 ; then |
273 | if has "${EAPI:-0}" 0 1 2 3 ; then |
| 268 | emake install DESTDIR="${D}" || die |
274 | emake install DESTDIR="${D}" || die |