app-i18n/librime: Add "debug" USE flag.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Mon, 23 Dec 2019 21:16:10 +0000 (21:16 +0000)
committerMike Gilbert <floppym@gentoo.org>
Sun, 29 Dec 2019 19:31:34 +0000 (14:31 -0500)
Bug: https://bugs.gentoo.org/695702
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
app-i18n/librime/librime-1.5.3.ebuild
app-i18n/librime/metadata.xml

index 074f50244aa833cda3012365db3539c66f01e190..9827ea65ff6646d99b4069df5889b14700db35d4 100644 (file)
@@ -23,7 +23,7 @@ fi
 LICENSE="BSD"
 SLOT="0/1"
 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="test"
+IUSE="debug test"
 RESTRICT="!test? ( test )"
 
 BDEPEND=""
@@ -52,6 +52,12 @@ src_prepare() {
 src_configure() {
        local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp"
 
+       if use debug; then
+               CXXFLAGS+=" -DDCHECK_ALWAYS_ON"
+       else
+               CXXFLAGS+=" -DNDEBUG"
+       fi
+
        local mycmakeargs=(
                -DBOOST_USE_CXX11=ON
                -DBUILD_TEST=$(usex test ON OFF)
index 1ef87e42d3d563be92937fccfe619d7de14dfa33..777c41df84a4b7f9c6385adc9a34a5c8df6ecd06 100644 (file)
@@ -9,6 +9,9 @@
     <email>cjk@gentoo.org</email>
     <name>Cjk</name>
   </maintainer>
+  <use>
+    <flag name="debug">Enable debugging (including logging of input of RIME input methods)</flag>
+  </use>
   <upstream>
     <maintainer>
       <email>chen.sst@gmail.com</email>