sci-biology/mira: Force rebuild of lexer C++ source files
authorNicholas Vinson <nvinson234@gmail.com>
Wed, 11 Jan 2017 15:57:17 +0000 (07:57 -0800)
committerLars Wendler <polynomial-c@gentoo.org>
Wed, 11 Jan 2017 17:16:03 +0000 (18:16 +0100)
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

index 9de22bb71e2a858e4cb88dfdc50a81bc129f67e9..9413101bf2fad6d9f71267de6e07fcbe06db4c85 100644 (file)
@@ -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() {