sci-electronics/qucs: Un-force -g, -O0 and -s flag mangling
authorMichał Górny <mgorny@gentoo.org>
Tue, 15 Nov 2016 16:05:03 +0000 (17:05 +0100)
committerMichał Górny <mgorny@gentoo.org>
Tue, 15 Nov 2016 16:22:29 +0000 (17:22 +0100)
sci-electronics/qucs/qucs-0.0.18.ebuild

index 1bd51193a65305b3ec9fcfb03cacbc53ef612007..d2ef71f5cd0b6bf2bed10c4a8eb228468cd9a192 100644 (file)
@@ -23,6 +23,21 @@ RDEPEND="dev-qt/qtcore:4[qt3support]
        x11-libs/libX11:0="
 DEPEND="${RDEPEND}"
 
+src_prepare() {
+       default
+
+       # oh my, they strip -g out of C*FLAGS and force -s into LDFLAGS
+       # note: edit .ac first, then generated files, so that the latter
+       # have newer timestamp and not trigger regen
+       sed -i \
+               -e 's/C.*FLAGS.*sed.*-g.*$/:/' \
+               -e 's/C.*FLAGS.*-O0.*$/:/' \
+               -e 's/LDFLAGS.*-s.*$/:/' \
+               configure.ac asco/configure.ac qucs-core/configure.ac \
+               configure asco/configure qucs-core/configure \
+               || die "C*FLAGS and LDFLAGS sanitization sed failed"
+}
+
 src_configure() {
        # automagic default on clang++
        tc-export CXX