summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2005-02-12 00:31:09 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2005-02-12 00:31:09 +0000
commit0665359468012b41e21a941abe505c98d30b454c (patch)
tree8cac6215cba4a8ab3a9d89e308f03c73a759e651 /eclass/xmms-plugin.eclass
parentAdd a bunch of misc patches from Fedora. Add a tweaked ipv6 patch #47507 by ... (diff)
downloadhistorical-0665359468012b41e21a941abe505c98d30b454c.tar.gz
historical-0665359468012b41e21a941abe505c98d30b454c.tar.bz2
historical-0665359468012b41e21a941abe505c98d30b454c.zip
xmms-plugin.eclass is an eclass for installing the xmms plugins that are packaged with xmms. This will give users more control over which plugins they install on their system.
Diffstat (limited to 'eclass/xmms-plugin.eclass')
-rw-r--r--eclass/xmms-plugin.eclass296
1 files changed, 55 insertions, 241 deletions
diff --git a/eclass/xmms-plugin.eclass b/eclass/xmms-plugin.eclass
index 66a36db01b50..2ce0c28e5332 100644
--- a/eclass/xmms-plugin.eclass
+++ b/eclass/xmms-plugin.eclass
@@ -1,277 +1,91 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/xmms-plugin.eclass,v 1.11 2004/11/10 01:51:09 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/xmms-plugin.eclass,v 1.12 2005/02/12 00:31:09 eradicator Exp $
#
# Jeremy Huddleston <eradicator@gentoo.org>
-#
-# THIS ECLASS IS DEPRECATED AND WILL BE REMOVED FROM PORTAGE
-# The xmms and bmp APIs have forked too far to make this eclass a viable
-# option.
+# Usage:
+# This eclass is used to create ebuilds for xmms plugins which are contained
+# within the main xmms tarball. Usage:
+# PATCH_VER:
+# GENTOO_URI:
+# Set this variable if you want to use a gentoo specific patchset. This adds
+# ${GENTOO_URI}/xmms-${PV}-gentoo-patches-${PATCH_VER}.tar.bz2 to the SRC_URI
-# Usage:
-# The main purpose of this eclass is to simplify installing xmms plugins
-# which for the various players that support the xmms API (mainly xmms and
-# bmp, but this can be expanded to noxmms as well).
-#
-# The package is assumed to work by default with xmms. If it will not work
-# with BMP, then set NOBMP=1 in the ebuild.
-#
-# Source Code:
-# You have multiple methods with which to specify how we get the source code
-# for the patckages.
-#
-# (1) - Separate tarballs
-# If your package provides separate tarballs for the xmms and bmp plugins,
-# then specify them in the XMMS_SRC_URI and BMP_SRC_URI variables.
-# XMMS_SRC_URI="xmms-plugin.tar.bz2"
-# BMP_SRC_URI="bmp-plugin.tar.bz2"
-# BASE_SRC_URI="common-stuff.tar.bz2"
-#
-# (2) - xmms->bmp patch
-# If you have a patch to turn an xmms plugin into a bmp plugin, specify it
-# in the variable XMMS2BMP_PATCH:
-# XMMS2BMP_PATCH="${FILESDIR}/${P}-xmms2bmp.patch"
-#
-# (3) - automated
-# The eclass will try to do some sedage to get the plugin to work with bmp.
-#
-# Common patches:
-# If you have patches that need to apply to both xmms and bmp sources,
-# Place them in the PATCHES variable:
-# PATCHES="${FILESDIR}/${P}-gcc34.patch ${FILESDIR}/${P}-config.patch"
-#
-# Source Location:
-# By default, we assume a ${S} of ${XMMS_S} or ${BMP_S} for the two packages.
-# These default to ${XMMS_WORKDIR}/${P} or ${BMP_WORKDIR}/${P}.
-# ${XMMS_WORKDIR} and ${BMP_WORKDIR}/${P} default to ${WORKDIR}/xmms and
-# ${WORKDIR}/bmp. You may override ${*_S}, but not the ${*_WORKDIR}.
-#
-# Documentation:
-# Set the DOCS variable to contain the documentation to be dodocd:
-# DOCS="ChangeLog AUTHORS README"
-#
-# Install:
-# Set the XMMS_PLUGIN_INSTALL variable to control how src_install works
-# 'einstall' - use 'einstall' to install
-# 'destdir' - use 'make DESTDIR="${D}" install || die' to install
-# 'doexe' - use 'doexe' to install
-# destdir is default
-#
-# The 'myins_xmms' and 'myins_bmp' variables are used to add extra arguments
-# to the install line. They are optional for einstall and destdir, but they're
-# required for doexe. For doexe, you need to specify the plugin type in the
-# 'xmms_plugin_type' variable' and the location of the plugin in the 'myins_*'
-# variable.
-#
+# PLUGIN_PATH:
+# Set this variable to the plugin location you want to build.
+# Example:
+# PLUGIN_PATH="Input/mpg123"
+
+# SONAME:
+# Set this variable to the filename of the plugin that is copied over
+# Example:
+# SONAME="libmpg123.so"
-inherit eutils libtool gnuconfig
+inherit eutils multilib
ECLASS=xmms-plugin
INHERITED="${INHERITED} ${ECLASS}"
+DESCRIPTION="Xmms Plugin: ${PN}"
+LICENSE="GPL-2"
-if [ "${NOXMMS}" != "1" ]; then
- IUSE="${IUSE} xmms"
- DEPEND="${DEPEND}
- xmms? ( media-sound/xmms )"
-
- RDEPEND="${RDEPEND}
- xmms? ( media-sound/xmms )"
-
- if [ -n "${BMP2XMMS_PATCH}" ]; then
- SRC_URI="${SRC_URI}
- xmms? ( ${XMMS_SRC_URI}
- ${BMP_SRC_URI} )"
- elif [ -n "${XMMS_SRC_URI}" ]; then
- SRC_URI="${SRC_URI}
- xmms? ( ${XMMS_SRC_URI} )"
- fi
+SRC_URI="http://www.xmms.org/files/1.2.x/xmms-${PV}.tar.bz2
+ ${PATCH_VER:+${GENTOO_URI}/xmms-${PV}-gentoo-patches-${PATCH_VER}.tar.bz2}"
- XMMS_WORKDIR="${WORKDIR}/xmms"
- if [ -z "${XMMS_S}" ]; then
- XMMS_S="${XMMS_WORKDIR}/${P}"
- fi
-fi
+# Set S to something which exists
+S="${WORKDIR}/xmms-${PV}"
-if [ "${NOBMP}" != "1" ]; then
- IUSE="${IUSE} bmp"
+if [[ -n "${PATCH_VER}" ]]; then
+ RDEPEND="${RDEPEND+${RDEPEND}}${RDEPEND-${DEPEND}}"
DEPEND="${DEPEND}
- bmp? ( >=media-sound/beep-media-player-0.9.7_rc2-r2
- dev-util/pkgconfig )"
-
- RDEPEND="${RDEPEND}
- bmp? ( >=media-sound/beep-media-player-0.9.7_rc2-r2 )"
-
- if [ -n "${XMMS2BMP_PATCH}" ]; then
- SRC_URI="${SRC_URI}
- bmp? ( ${XMMS_SRC_URI}
- ${BMP_SRC_URI} )"
- elif [ -n "${BMP_SRC_URI}" ]; then
- SRC_URI="${SRC_URI}
- bmp? ( ${BMP_SRC_URI} )"
- fi
-
- BMP_WORKDIR="${WORKDIR}/bmp"
- if [ -z "${BMP_S}" ]; then
- BMP_S="${BMP_WORKDIR}/${P}"
- fi
+ =sys-devel/automake-1.7*
+ =sys-devel/autoconf-2.5*
+ sys-devel/libtool"
fi
-SRC_URI="${BASE_SRC_URI} ${SRC_URI}"
-
-# Set S to something which exists
-S="${WORKDIR}"
-
xmms-plugin_src_unpack() {
- if do_xmms; then
- mkdir ${XMMS_WORKDIR}
- cd ${XMMS_WORKDIR}
+ unpack ${A}
- XMMS_A=""
- if [ -z "${BASE_SRC_URI}${XMMS_SRC_URI}${BMP_SRC_URI}" ]; then
- XMMS_A=${A}
- elif [ -n "${BMP2XMMS_PATCH}" ]; then
- for f in ${XMMS_SRC_URI} ${BMP_SRC_URI} ${BASE_SRC_URI}; do
- XMMS_A="${XMMS_A} `basename ${f}`"
- done
- else
- for f in ${XMMS_SRC_URI} ${BASE_SRC_URI}; do
- XMMS_A="${XMMS_A} `basename ${f}`"
- done
- fi
-
- unpack ${XMMS_A}
+ if [[ -n "${PATCH_VER}" ]]; then
+ cd ${S}
- cd ${XMMS_S}
- if [ -n "${PATCHES}" ]; then
- epatch ${PATCHES}
- fi
- if [ -n "${BMP2XMMS_PATCH}" ]; then
- epatch ${BMP2XMMS_PATCH}
- fi
+ EPATCH_SUFFIX="patch"
+ epatch ${WORKDIR}/patches
- elibtoolize
- gnuconfig_update
- fi
-
- if do_bmp; then
- mkdir ${BMP_WORKDIR}
- cd ${BMP_WORKDIR}
-
- BMP_A=""
- if [ -z "${BASE_SRC_URI}${XMMS_SRC_URI}${BMP_SRC_URI}" ]; then
- BMP_A=${A}
- elif [ -n "${XMMS2BMP_PATCH}" ]; then
- for f in ${XMMS_SRC_URI} ${BMP_SRC_URI} ${BASE_SRC_URI}; do
- BMP_A="${BMP_A} `basename ${f}`"
- done
- else
- for f in ${BMP_SRC_URI} ${BASE_SRC_URI}; do
- BMP_A="${BMP_A} `basename ${f}`"
- done
- fi
-
- unpack ${BMP_A}
+ export WANT_AUTOMAKE=1.7
+ export WANT_AUTOCONF=2.5
- cd ${BMP_S}
- if [ -n "${PATCHES}" ]; then
- epatch ${PATCHES}
- fi
- if [ -n "${XMMS2BMP_PATCH}" ]; then
- epatch ${XMMS2BMP_PATCH}
- elif [ -z "${BMP_SRC_URI}" ]; then
- xmms2bmp_automate
- fi
+ rm acinclude.m4
+ libtoolize --force --copy || die "libtoolize --force --copy failed"
- elibtoolize
- gnuconfig_update
+ [[ ! -f ltmain.sh ]] && ln -s ../ltmain.sh
+ aclocal -I ${PATCHDIR}/m4 || die "aclocal failed"
+ autoheader || die "autoheader failed"
+ automake --gnu --add-missing --include-deps --force-missing --copy || die "automake failed"
+ autoconf || die "autoconf failed"
fi
}
xmms-plugin_src_compile() {
- myconf="${myconf} --disable-static"
+ filter-flags -fforce-addr -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
- if do_xmms; then
- cd ${XMMS_S}
- econf ${myconf} ${xmms_myconf} || die
- emake || die
+ if use !amd64 && { use 3dnow || use mmx; }; then
+ myconf="${myconf} --enable-simd"
+ else
+ myconf="${myconf} --disable-simd"
fi
- if do_bmp; then
- cd ${BMP_S}
- export FAKE_XMMS_VERSION=1.2.10
- econf ${myconf} ${bmp_myconf} || die
- emake || die
- fi
+ econf ${myconf}
+ cd ${S}/${PLUGIN_PATH}
+ emake -j1 || die
}
xmms-plugin_src_install() {
- if [ -z "${XMMS_PLUGIN_INSTALL}" ]; then
- XMMS_PLUGIN_INSTALL="destdir"
- fi
-
- case ${XMMS_PLUGIN_INSTALL} in
- einstall)
- if do_xmms; then
- cd ${XMMS_S}
- einstall ${myins_xmms}
- fi
-
- if do_bmp; then
- cd ${BMP_S}
- einstall ${myins_bmp}
- fi
- ;;
- destdir)
- if do_xmms; then
- cd ${XMMS_S}
- make DESTDIR="${D}" ${myins_xmms} install || die
- fi
-
- if do_bmp; then
- cd ${BMP_S}
- make DESTDIR="${D}" ${myins_bmp} install || die
- fi
- ;;
- doexe)
- if do_xmms; then
- xmms-config --${xmms_plugin_type}-plugin-dir >& /dev/null || die "Invalid xmms_plugin_type specified"
- cd ${XMMS_S}
- exeinto `xmms-config --${xmms_plugin_type}-plugin-dir`
- doexe ${myins_xmms} || die
- fi
-
- if do_bmp; then
- beep-config --${xmms_plugin_type}-plugin-dir >& /dev/null || die "Invalid xmms_plugin_type specified"
- cd ${BMP_S}
- exeinto `beep-config --${xmms_plugin_type}-plugin-dir`
- doexe ${myins_bmp} || die
- fi
- ;;
- *)
- die "Invalid XMMS_PLUGIN_INSTALL specified: ${XMMS_PLUGIN_INSTALL}"
- ;;
- esac
-
- if [ -n "${DOCS}" ]; then
- dodoc ${DOCS}
- fi
-}
-
-xmms2bmp_automate() {
- find . -name Makefile -o -name Makefile.in -o -name configure |
- xargs sed -i -e 's:xmms-config:beep-config:g' \
- -e 's:libdir)/xmms:libdir)/bmp:g' \
- -e 's:-lxmms:-lbeep:g'
-}
-
-do_xmms() {
- use xmms && [ "${NOXMMS}" != "1" ]
-}
-
-do_bmp() {
- use bmp && [ "${NOBMP}" != "1" ]
+ cd ${S}/${PLUGIN_PATH}
+ make DESTDIR="${D}" install || die
+# exeinto $(xmms-config --plugin-dir)"/"${PLUGIN_PATH%%/*}
+# doexe ${SONAME} || die
}
EXPORT_FUNCTIONS src_unpack src_compile src_install