commit:     fcdf7766b661a2b8c881a728792b25d7eec18f5a
Author:     Nicholas Vinson <nvinson234 <AT> gmail <DOT> com>
AuthorDate: Wed Jan 11 15:57:17 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 17:16:03 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcdf7766

sci-biology/mira: Force rebuild of lexer C++ source files

Upstream ships pregenerated C++ source files for its lexers.  These
files fail to compile under newer versions of GCC.  This update forces
them to be rebuilt by removing them before compilaiton starts.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sci-biology/mira/mira-4.0.2.ebuild | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/sci-biology/mira/mira-4.0.2.ebuild 
b/sci-biology/mira/mira-4.0.2.ebuild
index 9de22bb..9413101 100644
--- a/sci-biology/mira/mira-4.0.2.ebuild
+++ b/sci-biology/mira/mira-4.0.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -49,6 +49,17 @@ src_prepare() {
                -i configure.ac || die
 
        eautoreconf
+
+       # Remove C++ source files that were built with flex by upstream.
+       local f
+       local PREBUILT_CXX_LEXER_FILES=(
+               "$S"/src/io/exp_flexer.cc
+               "$S"/src/mira/parameters_flexer.cc
+       )
+
+       for f in "${PREBUILT_CXX_LEXER_FILES[@]}"; do
+               [[ -f $f ]] && { rm "$f" || die "Failed to remove $f"; } || die 
"$f not found"
+       done
 }
 
 src_configure() {

Reply via email to