diff options
author | 2012-04-30 00:38:55 +0000 | |
---|---|---|
committer | 2012-04-30 00:38:55 +0000 | |
commit | 455099dd6c3ec1fcf5562f87e5f766bb5c4bdac9 (patch) | |
tree | a29c3b265491c8ef9eef87393fb37e06b7da578c /media-video | |
parent | Old. (diff) | |
download | gentoo-2-455099dd6c3ec1fcf5562f87e5f766bb5c4bdac9.tar.gz gentoo-2-455099dd6c3ec1fcf5562f87e5f766bb5c4bdac9.tar.bz2 gentoo-2-455099dd6c3ec1fcf5562f87e5f766bb5c4bdac9.zip |
removed un_ifdef handling breaks vdr-setup compile, readdded un_ifdef handling
(Portage version: 2.1.10.11/cvs/Linux i686)
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/vdr/ChangeLog | 6 | ||||
-rw-r--r-- | media-video/vdr/vdr-1.6.0_p2-r9.ebuild | 64 |
2 files changed, 66 insertions, 4 deletions
diff --git a/media-video/vdr/ChangeLog b/media-video/vdr/ChangeLog index b86d4a036f56..f7d634ea7dd8 100644 --- a/media-video/vdr/ChangeLog +++ b/media-video/vdr/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/vdr # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/ChangeLog,v 1.157 2012/04/29 16:15:55 hd_brummy Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/ChangeLog,v 1.158 2012/04/30 00:38:55 hd_brummy Exp $ + + 30 Apr 2012; Joerg Bornkessel <hd_brummy@gentoo.org> vdr-1.6.0_p2-r9.ebuild: + removed un_ifdef handling breaks vdr-setup compile, readdded un_ifdef + handling *vdr-1.6.0_p2-r9 (29 Apr 2012) diff --git a/media-video/vdr/vdr-1.6.0_p2-r9.ebuild b/media-video/vdr/vdr-1.6.0_p2-r9.ebuild index cc01a7de5056..014c808d87ac 100644 --- a/media-video/vdr/vdr-1.6.0_p2-r9.ebuild +++ b/media-video/vdr/vdr-1.6.0_p2-r9.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-1.6.0_p2-r9.ebuild,v 1.1 2012/04/29 16:15:55 hd_brummy Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-1.6.0_p2-r9.ebuild,v 1.2 2012/04/30 00:38:55 hd_brummy Exp $ EAPI="4" @@ -56,6 +56,7 @@ COMMON_DEPEND="virtual/jpeg DEPEND="${COMMON_DEPEND} >=virtual/linuxtv-dvb-headers-5 + dev-util/unifdef setup? ( >=dev-libs/tinyxml-2.6.1[stl] )" RDEPEND="${COMMON_DEPEND} @@ -116,6 +117,61 @@ extensions_all_defines() { | tr '[:upper:]' '[:lower:]' } +extensions_all_defines_unset() { + # extract all possible settings for extensions-patch + # and convert them to -U... for unifdef + sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?/-UUSE_/' -e 's/ .*//' \ + Make.config.template \ + | tr '\n' ' ' +} + +do_unifdef() { + ebegin "Unifdef sources" + local mf="Makefile.get" + cat <<'EOT' > $mf +include Makefile +show_def: + @echo $(DEFINES) +show_src_files: + @echo $(OBJS:%.o=%.c) +EOT + + local DEFINES=$(extensions_all_defines_unset) + + local RAW_DEFINES=$(make -f "$mf" show_def) + local VDR_SRC_FILES=$(make -f "$mf" show_src_files) + local KEEP_FILES="" + rm "$mf" + + local def + for def in $RAW_DEFINES; do + case "${def}" in + -DUSE*) + DEFINES="${DEFINES} ${def}" + ;; + esac + done + + local f + for f in *.c; do + + # Removing the src files the Makefile does not use for compiling vdr + if ! has $f ${VDR_SRC_FILES} ${KEEP_FILES}; then + rm -f ${f} ${f%.c}.h + continue + fi + + unifdef ${DEFINES} "$f" > "tmp.$f" + mv "tmp.$f" "$f" + done + for f in *.h; do + unifdef ${DEFINES} "$f" > "tmp.$f" + mv "tmp.$f" "$f" + [[ -s $f ]] || rm "$f" + done + eend 0 +} + lang_linguas() { LING1=$( cat /etc/make.conf | grep LINGUAS | sed -e "s:LINGUAS=::" -e "s:\"::g" ) } @@ -185,7 +241,7 @@ src_prepare() { epatch "${FILESDIR}"/vdr-1.6.0-gcc-4.4.diff epatch "${FILESDIR}"/vdr-1.6.0-extensions-72-gcc-4.4.diff epatch "${FILESDIR}"/vdr-1.6.0-shared-tinyxml.diff - epatch "${FILESDIR}/${P}_linguas.diff" + epatch "${FILESDIR}"/vdr-1.6.0_p2_linguas.diff # This allows us to start even if some plugin does not exist # or is not loadable. @@ -235,6 +291,8 @@ src_prepare() { emake .dependencies >/dev/null eend $? "make depend failed" + [[ -z "$NO_UNIFDEF" ]] && do_unifdef + use iptv && sed -i sources.conf -e 's/^#P/P/' fi @@ -249,7 +307,7 @@ src_prepare() { echo -e ${CAPS} > "${CAP_FILE}" - # LINGUAS handling support + # LINGUAS handling einfo "\n \t VDR supports now the LINGUAS values" lang_po |