commit:     42348d0e8a8705f2ff5877933ffc291df85b81b2
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 14 04:04:58 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jan 14 04:04:58 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42348d0e

dev-util/hfstospell: fix compiling with clang

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-util/hfstospell/hfstospell-0.5.2-r1.ebuild | 45 ++++++++++++++++++++++++++
 dev-util/hfstospell/metadata.xml               |  3 ++
 2 files changed, 48 insertions(+)

diff --git a/dev-util/hfstospell/hfstospell-0.5.2-r1.ebuild 
b/dev-util/hfstospell/hfstospell-0.5.2-r1.ebuild
new file mode 100644
index 00000000000..3b6cb8750ad
--- /dev/null
+++ b/dev-util/hfstospell/hfstospell-0.5.2-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="HFST spell checker library and command line tool"
+HOMEPAGE="https://github.com/hfst/hfst-ospell";
+SRC_URI="https://github.com/hfst/hfst-ospell/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="clang"
+
+DEPEND="app-arch/libarchive
+       dev-libs/icu:=
+       !clang? (
+               dev-cpp/libxmlpp:2.6
+               dev-libs/tinyxml2
+       )"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/hfst-ospell-${PV}"
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       # https://github.com/hfst/hfst-ospell/issues/48
+       if tc-is-clang; then
+               econf --without-libxmlpp --without-tinyxml2
+       else
+               default
+       fi
+}
+
+src_install() {
+       default
+       find "${D}" -name '*.la' -delete -o -name '*.a' -delete || die
+}

diff --git a/dev-util/hfstospell/metadata.xml b/dev-util/hfstospell/metadata.xml
index 6b0a0fb3a72..79d3d066cce 100644
--- a/dev-util/hfstospell/metadata.xml
+++ b/dev-util/hfstospell/metadata.xml
@@ -5,4 +5,7 @@
     <email>juip...@gentoo.org</email>
     <name>Joonas Niilola</name>
   </maintainer>
+  <use>
+    <flag name="clang">Use different logic in ebuild when clang is used</flag>
+  </use>
 </pkgmetadata>

Reply via email to