| 1 |
zaheerm |
1.1 |
# Copyright 1999-2004 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
leio |
1.4 |
# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins10.eclass,v 1.3 2010/08/12 10:48:59 pva Exp $ |
| 4 |
zaheerm |
1.1 |
|
| 5 |
|
|
# Author : foser <foser@gentoo.org> |
| 6 |
|
|
|
| 7 |
|
|
# gst-plugins 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.2 |
# 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.4 |
# Gentoo developers responsible for gstreamer <gstreamer@gentoo.org> or the application |
| 15 |
|
|
# developer. |
| 16 |
zaheerm |
1.1 |
|
| 17 |
|
|
inherit eutils |
| 18 |
|
|
|
| 19 |
|
|
|
| 20 |
|
|
### |
| 21 |
|
|
# variable declarations |
| 22 |
|
|
### |
| 23 |
|
|
|
| 24 |
|
|
# Create a major/minor combo for our SLOT and executables suffix |
| 25 |
|
|
PVP=(${PV//[-\._]/ }) |
| 26 |
|
|
#PV_MAJ_MIN=${PVP[0]}.${PVP[1]} |
| 27 |
|
|
PV_MAJ_MIN=0.10 |
| 28 |
|
|
|
| 29 |
|
|
# Extract the plugin to build from the ebuild name |
| 30 |
|
|
# May be set by an ebuild and contain more than one indentifier, space seperated |
| 31 |
|
|
# (only src_configure can handle mutiple plugins at this time) |
| 32 |
|
|
GST_PLUGINS_BUILD=${PN/gst-plugins-/} |
| 33 |
|
|
|
| 34 |
|
|
# Actual build dir, is the same as the configure switch name most of the time |
| 35 |
|
|
GST_PLUGINS_BUILD_DIR=${PN/gst-plugins-/} |
| 36 |
|
|
|
| 37 |
swegener |
1.2 |
# general common gst-plugins ebuild entries |
| 38 |
zaheerm |
1.1 |
DESCRIPTION="${BUILD_GST_PLUGINS} plugin for gstreamer" |
| 39 |
|
|
HOMEPAGE="http://gstreamer.freedesktop.org/" |
| 40 |
|
|
LICENSE="GPL-2" |
| 41 |
|
|
|
| 42 |
|
|
#SRC_URI="mirror://gnome/sources/gst-plugins/${PV_MAJ_MIN}/${MY_P}.tar.bz2" |
| 43 |
|
|
SLOT=${PV_MAJ_MIN} |
| 44 |
|
|
### |
| 45 |
|
|
# internal functions |
| 46 |
|
|
### |
| 47 |
|
|
|
| 48 |
|
|
gst-plugins10_find_plugin_dir() { |
| 49 |
|
|
|
| 50 |
pva |
1.3 |
if [[ ! -d ${S}/ext/${GST_PLUGINS_BUILD_DIR} ]]; then |
| 51 |
|
|
if [[ ! -d ${S}/sys/${GST_PLUGINS_BUILD_DIR} ]]; then |
| 52 |
zaheerm |
1.1 |
ewarn "No such plugin directory" |
| 53 |
|
|
die |
| 54 |
|
|
fi |
| 55 |
leio |
1.4 |
einfo "Building system plugin ${GST_PLUGINS_BUILD_DIR} ..." |
| 56 |
pva |
1.3 |
cd "${S}"/sys/${GST_PLUGINS_BUILD_DIR} |
| 57 |
zaheerm |
1.1 |
else |
| 58 |
leio |
1.4 |
einfo "Building external plugin ${GST_PLUGINS_BUILD_DIR} ..." |
| 59 |
pva |
1.3 |
cd "${S}"/ext/${GST_PLUGINS_BUILD_DIR} |
| 60 |
zaheerm |
1.1 |
fi |
| 61 |
|
|
|
| 62 |
|
|
} |
| 63 |
|
|
|
| 64 |
|
|
### |
| 65 |
|
|
# public functions |
| 66 |
|
|
### |
| 67 |
|
|
|
| 68 |
|
|
gst-plugins10_remove_unversioned_binaries() { |
| 69 |
|
|
|
| 70 |
|
|
# remove the unversioned binaries gstreamer provide |
| 71 |
|
|
# this is to prevent these binaries to be owned by several SLOTs |
| 72 |
|
|
|
| 73 |
|
|
cd ${D}/usr/bin |
| 74 |
|
|
for gst_bins in `ls *-${PV_MAJ_MIN}` |
| 75 |
|
|
do |
| 76 |
|
|
rm ${gst_bins/-${PV_MAJ_MIN}/} |
| 77 |
|
|
einfo "Removed ${gst_bins/-${PV_MAJ_MIN}/}" |
| 78 |
|
|
done |
| 79 |
|
|
|
| 80 |
|
|
} |