summaryrefslogtreecommitdiff
path: root/app-i18n/opencc/opencc-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'app-i18n/opencc/opencc-9999.ebuild')
-rw-r--r--app-i18n/opencc/opencc-9999.ebuild44
1 files changed, 44 insertions, 0 deletions
diff --git a/app-i18n/opencc/opencc-9999.ebuild b/app-i18n/opencc/opencc-9999.ebuild
new file mode 100644
index 000000000000..9ec1cbd5d8b7
--- /dev/null
+++ b/app-i18n/opencc/opencc-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit cmake-utils
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/BYVoid/OpenCC"
+else
+ inherit vcs-snapshot
+
+ SRC_URI="https://github.com/BYVoid/${PN^^[oc]}/archive/ver.${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+DESCRIPTION="Libraries for conversion between Traditional and Simplified Chinese"
+HOMEPAGE="https://github.com/BYVoid/OpenCC"
+
+LICENSE="Apache-2.0"
+SLOT="0/2"
+KEYWORDS=""
+IUSE="doc test"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+DOCS="AUTHORS *.md"
+PATCHES=( "${FILESDIR}"/${PN}-test.patch )
+
+src_prepare() {
+ sed -i "s|\${DIR_SHARE_OPENCC}/doc|share/doc/${PF}|" doc/CMakeLists.txt
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DOCUMENTATION=$(usex doc)
+ -DBUILD_SHARED_LIBS=ON
+ -DENABLE_GTEST=$(usex test)
+ )
+ cmake-utils_src_configure
+}