summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2004-03-24 01:09:28 +0000
committerMarinus Schraal <foser@gentoo.org>2004-03-24 01:09:28 +0000
commit0cc951ec8b44000c2680fc1189ac0d37ca994ee2 (patch)
treef8619012717ccffd79031377b985038731396819 /eclass
parent~ppc (diff)
downloadhistorical-0cc951ec8b44000c2680fc1189ac0d37ca994ee2.tar.gz
historical-0cc951ec8b44000c2680fc1189ac0d37ca994ee2.tar.bz2
historical-0cc951ec8b44000c2680fc1189ac0d37ca994ee2.zip
rewrite of some stuff
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gst-plugins.eclass71
1 files changed, 40 insertions, 31 deletions
diff --git a/eclass/gst-plugins.eclass b/eclass/gst-plugins.eclass
index 0a0ef686ef0b..4e68d0590069 100644
--- a/eclass/gst-plugins.eclass
+++ b/eclass/gst-plugins.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins.eclass,v 1.7 2004/03/21 23:58:15 foser Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins.eclass,v 1.8 2004/03/24 01:09:28 foser Exp $
# Author : foser <foser@gentoo.org>
@@ -20,12 +20,11 @@ INHERITED="$INHERITED $ECLASS"
inherit libtool
[ `use debug` ] && inherit debug
-#
+###
# variable declarations
-#
+###
# Create a major/minor combo for our SLOT and executables suffix
-
PVP=($(echo " $PV " | sed 's:[-\._]: :g'))
PV_MAJ_MIN=${PVP[0]}.${PVP[1]}
@@ -39,16 +38,17 @@ my_gst_plugins="dxr3 oss qcam v4l v4l2 vcd vga cdrom xvideo a52dec aalib aalibte
my_gst_plugins="${my_gst_plugins} divx faad gdk_pixbuf ogg sndfile x pango speex xvid mpeg2enc mplex musicbrainz nas librfb libcaca ivorbis faac"
# Extract the plugin to build from the ebuild name
-# May be set by an ebuild and contain more than one indentifier, seperated by a space
-
-BUILD_GST_PLUGINS=${PN/gst-plugins-/}
+# May be set by an ebuild and contain more than one indentifier, space seperated
+# (only src_configure can handle mutiple plugins at this time)
+GST_PLUGINS_BUILD=${PN/gst-plugins-/}
# Actual build dir, is the same as the configure switch name most of the time
-
GST_PLUGINS_BUILD_DIR=${PN/gst-plugins-/}
-# general common gst-plugins ebuild entries
+# Set to 1 if we need interfaces to build against
+GST_NEED_INTERFACE=""
+# general common gst-plugins ebuild entries
DESCRIPTION="${BUILD_GST_PLUGINS} plugin for gstreamer"
HOMEPAGE="http://www.gstreamer.net/status/"
LICENSE="GPL-2"
@@ -60,9 +60,9 @@ S=${WORKDIR}/${MY_P}
newdepend "=media-libs/${MY_P}*" ">=sys-apps/sed-4"
-#
+###
# internal functions
-#
+###
gst-plugins_find_plugin_dir() {
@@ -80,30 +80,30 @@ gst-plugins_find_plugin_dir() {
}
-#
+###
# public functions
-#
+###
gst-plugins_src_configure() {
elibtoolize ${ELTCONF}
- #
# disable any external plugin besides the plugin we want
- #
-
local plugin gst_conf
- einfo "Configuring to build ${BUILD_GST_PLUGINS} plugin(s)..."
+ einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s)..."
+
+ for plugin in ${GST_PLUGINS_BUILD}; do
+ my_gst_plugins=${my_gst_plugins/plugin/}
+ done
for plugin in ${my_gst_plugins}; do
- if [ ${plugin} = ${BUILD_GST_PLUGINS} ];
- then
- gst_conf="${gst_conf} --enable-${plugin} "
- else
- gst_conf="${gst_conf} --disable-${plugin} "
- fi
+ gst_conf="${gst_conf} --disable-${plugin} "
+ done
+ for plugin in ${GST_PLUGINS_BUILD}; do
+ gst_conf="${gst_conf} --enable-${plugin} "
done
+ cd ${S}
econf ${@} ${gst_conf} || die "./configure failure"
}
@@ -117,12 +117,8 @@ gst-plugins_update_registry() {
gst-plugins_remove_unversioned_binaries() {
- #
# remove the unversioned binaries gstreamer provide
# this is to prevent these binaries to be owned by several SLOTs
- #
- # note : this is still a point of dispute
- #
cd ${D}/usr/bin
for gst_bins in `ls *-${PV_MAJ_MIN}`
@@ -133,29 +129,42 @@ gst-plugins_remove_unversioned_binaries() {
}
-#
+###
# public inheritable functions
-#
+###
gst-plugins_src_unpack() {
+
local makefiles
+
unpack ${A}
- #
+
+ # When working with interfaces we need more than only the plugin
+ if ! [ -z ${GST_NEED_INTERFACE} ]; then
+ return 0;
+ fi
+
# Remove generation of any other Makefiles except the plugin's Makefile
- #
if [ -d "${S}/sys/${GST_PLUGINS_BUILD_DIR}" ]; then
makefiles="Makefile sys/Makefile sys/${GST_PLUGINS_BUILD_DIR}/Makefile"
elif [ -d "${S}/ext/${GST_PLUGINS_BUILD_DIR}" ]; then
makefiles="Makefile ext/Makefile ext/${GST_PLUGINS_BUILD_DIR}/Makefile"
fi
+
sed -e "s:ac_config_files=.*:ac_config_files='${makefiles}':" \
-i ${S}/configure
+
}
gst-plugins_src_compile() {
gst-plugins_src_configure ${@}
+ if ! [ -z ${NEED_INTERFACE} ]; then
+ cd ${S}/gst-libs
+ emake
+ fi
+
gst-plugins_find_plugin_dir
emake || die "compile failure"