app-i18n/libchewing: Allow to run test suite without installing libchewing.a.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Sat, 16 Sep 2017 20:11:03 +0000 (22:11 +0200)
committerMike Gilbert <floppym@gentoo.org>
Mon, 18 Sep 2017 18:31:02 +0000 (14:31 -0400)
app-i18n/libchewing/libchewing-0.5.1.ebuild

index 99560d8350c2bd25a48d7d39cdd1668bb1a3b931..fb0597f8edb14ec555d631c42ea39e6160897eaa 100644 (file)
@@ -13,16 +13,16 @@ SLOT="0/3"
 LICENSE="LGPL-2.1"
 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
 IUSE="static-libs test"
-REQUIRED_USE="test? ( static-libs )"
 
 RDEPEND="dev-db/sqlite:3"
 DEPEND="${RDEPEND}
        test? ( sys-libs/ncurses[unicode] )"
 
 src_configure() {
+       # libchewing.a is required for building of tests.
        econf \
-               $(use_enable static-libs static) \
-               --with-sqlite3
+               --with-sqlite3 \
+               $(if use static-libs || use test; then echo --enable-static; else echo --disable-static; fi)
 }
 
 src_test() {
@@ -32,4 +32,5 @@ src_test() {
 src_install() {
        default
        prune_libtool_files
+       use static-libs || find "${D}" -name "*.a" -delete || die
 }