sci-electronics/qucs: Support USE=debug
authorMichał Górny <mgorny@gentoo.org>
Tue, 15 Nov 2016 16:13:05 +0000 (17:13 +0100)
committerMichał Górny <mgorny@gentoo.org>
Tue, 15 Nov 2016 16:22:30 +0000 (17:22 +0100)
sci-electronics/qucs/qucs-0.0.18.ebuild

index d2ef71f5cd0b6bf2bed10c4a8eb228468cd9a192..7552aa0431ea9b9d91782d5c685a0ed60d8ce337 100644 (file)
@@ -13,7 +13,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="debug"
 
 RDEPEND="dev-qt/qtcore:4[qt3support]
        dev-qt/qtgui:4[qt3support]
@@ -39,6 +39,11 @@ src_prepare() {
 }
 
 src_configure() {
+       local myconf=(
+               # enables asserts and debug codepaths
+               $(use_enable debug)
+       )
+
        # automagic default on clang++
        tc-export CXX
 
@@ -47,7 +52,7 @@ src_configure() {
        append-ldflags $( $(tc-getPKG_CONFIG) --libs-only-L \
                        QtCore QtGui QtScript QtSvg QtXml Qt3Support )
 
-       default
+       econf "${myconf[@]}"
 }
 
 pkg_postinst() {