summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2003-09-07 18:04:20 +0000
committerMarinus Schraal <foser@gentoo.org>2003-09-07 18:04:20 +0000
commit7f556ef73efd7723f0568c86c0220af98d565f48 (patch)
tree7e92257bf6dae60e6f291c44b8d7f6f0910ed395 /eclass/gst-plugins.eclass
parentremoving wget in unpack (diff)
downloadhistorical-7f556ef73efd7723f0568c86c0220af98d565f48.tar.gz
historical-7f556ef73efd7723f0568c86c0220af98d565f48.tar.bz2
historical-7f556ef73efd7723f0568c86c0220af98d565f48.zip
revamp
Diffstat (limited to 'eclass/gst-plugins.eclass')
-rw-r--r--eclass/gst-plugins.eclass62
1 files changed, 45 insertions, 17 deletions
diff --git a/eclass/gst-plugins.eclass b/eclass/gst-plugins.eclass
index 41ff7d696e07..4c92e522fe98 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.2 2003/08/03 02:35:44 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins.eclass,v 1.3 2003/09/07 18:04:20 foser Exp $
# Author : foser <foser@gentoo.org>
@@ -20,6 +20,10 @@ 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'))
@@ -31,17 +35,18 @@ MY_P=gst-plugins-${PV}
my_gst_plugins="dxr3 oss qcam v4l v4l2 vcd vga cdrom xvideo a52dec aalib aalibtest alsa arts artstest artsc audiofile avifile cdparanoia dvdread dvdnav esd esdtest flac ffmpeg gnome_vfs gsm hermes http jack jpeg ladspa lame lcs libdv libfame libfametest libpng mad mikmod libmikmodtest mjpegtools mpeg2dec openquicktime raw1394 rtp sdl sdltest shout shout2 shout2test sidplay smoothwave snapshot swfdec tarkin vorbis vorbistest xmms libmmx atomic tests examples"
-#
# 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_PLUGIN=${PN/gst-plugins-/}
+BUILD_GST_PLUGINS=${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
-#
-DESCRIPTION="${BUILD_GST_PLUGIN} plugin for gstreamer"
+DESCRIPTION="${BUILD_GST_PLUGINS} plugin for gstreamer"
HOMEPAGE="http://www.gstreamer.net/status/"
LICENSE="GPL-2"
@@ -53,6 +58,26 @@ S=${WORKDIR}/${MY_P}
newdepend "=${MY_P}*"
#
+# internal functions
+#
+
+gst-plugins_find_plugin_dir() {
+
+ if [ ! -d ${S}/ext/${GST_PLUGINS_BUILD_DIR} ]; then
+ if [ ! -d ${S}/sys/${GST_PLUGINS_BUILD_DIR} ]; then
+ ewarn "No such plugin directory"
+ die
+ fi
+ einfo "Building system plugin..."
+ cd ${S}/sys/${GST_PLUGINS_BUILD_DIR}
+ else
+ einfo "Building external plugin..."
+ cd ${S}/ext/${GST_PLUGINS_BUILD_DIR}
+ fi
+
+}
+
+#
# public functions
#
@@ -66,11 +91,10 @@ gst-plugins_src_configure() {
local plugin gst_conf
- einfo "${BUILD_GST_PLUGIN}"
+ einfo "Configuring to build ${BUILD_GST_PLUGINS} plugin(s)..."
for plugin in ${my_gst_plugins}; do
- if [ ${plugin} = ${BUILD_GST_PLUGIN} ];
+ if [ ${plugin} = ${BUILD_GST_PLUGINS} ];
then
- einfo "Building ${plugin} plugin(s)..."
gst_conf="${gst_conf} --enable-${plugin} "
else
gst_conf="${gst_conf} --disable-${plugin} "
@@ -81,6 +105,13 @@ gst-plugins_src_configure() {
}
+gst-plugins_update_registry() {
+
+ einfo "Updating gstreamer plugins registry for gstreamer ${SLOT}..."
+ gst-register-${SLOT}
+
+}
+
#
# public inheritable functions
#
@@ -89,14 +120,14 @@ gst-plugins_src_compile() {
gst-plugins_src_configure ${@}
- cd ${S}/ext/${BUILD_GST_PLUGIN}
+ gst-plugins_find_plugin_dir
emake || die "compile failure"
}
gst-plugins_src_install() {
- cd ${S}/ext/${BUILD_GST_PLUGIN}
+ gst-plugins_find_plugin_dir
einstall || die
dodoc README
@@ -105,17 +136,14 @@ gst-plugins_src_install() {
gst-plugins_pkg_postinst() {
- einfo "Updating gstreamer plugins registry..."
- gst-register-${SLOT}
+ gst-plugins_update_registry
}
gst-plugins_pkg_postrm() {
- einfo "Updating gstreamer plugins registry..."
- gst-register-${SLOT}
+ gst-plugins_update_registry
}
-
EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm