From 4bbb141c9bb04e9476ac4eabc95200a87b707198 Mon Sep 17 00:00:00 2001 From: Matthias Schwarzott Date: Sat, 22 Oct 2005 20:39:21 +0000 Subject: Better source installation for debugging --- eclass/vdr-plugin.eclass | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'eclass/vdr-plugin.eclass') diff --git a/eclass/vdr-plugin.eclass b/eclass/vdr-plugin.eclass index 657eb2d5cf7e..5a28bd412554 100644 --- a/eclass/vdr-plugin.eclass +++ b/eclass/vdr-plugin.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.5 2005/10/09 20:13:07 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.6 2005/10/22 20:39:21 zzam Exp $ # # Author: # Matthias Schwarzott @@ -116,7 +116,7 @@ vdr-plugin_src_unpack() { cd ${S} ebegin "Patching Makefile" - sed -i Makefile \ + sed -i.orig Makefile \ -e "s:^VDRDIR.*$:VDRDIR = ${VDR_INCLUDE_DIR}:" \ -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \ -e "s:^LIBDIR.*$:LIBDIR = ${S}:" \ @@ -134,13 +134,36 @@ vdr-plugin_src_unpack() { done } +vdr-plugin_copy_source_tree() { + cp -r ${S} ${T}/source-tree + cd ${T}/source-tree + mv Makefile.orig Makefile + sed -i Makefile \ + -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \ + -e 's:^CXXFLAGS:#CXXFLAGS:' \ + -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' \ + -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):' +} + +vdr-plugin_install_source_tree() { + einfo "Installing sources" + destdir=${VDRSOURCE_DIR}/vdr-${VDRVERSION}/PLUGINS/src/${VDRPLUGIN} + insinto ${destdir}-${PV} + doins -r ${T}/source-tree/* + + dosym ${VDRPLUGIN}-${PV} ${destdir} +} + vdr-plugin_src_compile() { + [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin_copy_source_tree + cd ${S} emake ${VDRPLUGIN_MAKE_TARGET:-all} || die "emake failed" } vdr-plugin_src_install() { + [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin_install_source_tree cd ${S} insinto "${VDR_PLUGIN_DIR}" -- cgit v1.2.3-65-gdbad