From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 22 Aug 2017 10:52:41 +0000 (+0200) Subject: app-i18n/opencc: Add live ebuild. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d98aef2054800e6990ae49e817579eb50ddd08d2;p=gentoo.git app-i18n/opencc: Add live ebuild. --- diff --git a/app-i18n/opencc/opencc-1.0.5.ebuild b/app-i18n/opencc/opencc-1.0.5.ebuild index 3e9033333de3..50bab76e2c03 100644 --- a/app-i18n/opencc/opencc-1.0.5.ebuild +++ b/app-i18n/opencc/opencc-1.0.5.ebuild @@ -5,9 +5,19 @@ EAPI="6" inherit cmake-utils +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/BYVoid/OpenCC" +fi + DESCRIPTION="Project for conversion between Traditional and Simplified Chinese" HOMEPAGE="https://github.com/BYVoid/OpenCC" -SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz" +fi LICENSE="Apache-2.0" SLOT="0/2" @@ -17,6 +27,10 @@ IUSE="doc" DEPEND="doc? ( app-doc/doxygen )" RDEPEND="" +if [[ "${PV}" != "9999" ]]; then + S="${WORKDIR}/OpenCC-ver.${PV}" +fi + DOCS=(AUTHORS NEWS.md README.md) src_configure() { diff --git a/app-i18n/opencc/opencc-9999.ebuild b/app-i18n/opencc/opencc-9999.ebuild new file mode 100644 index 000000000000..8664a59261c8 --- /dev/null +++ b/app-i18n/opencc/opencc-9999.ebuild @@ -0,0 +1,53 @@ +# 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" +fi + +DESCRIPTION="Project for conversion between Traditional and Simplified Chinese" +HOMEPAGE="https://github.com/BYVoid/OpenCC" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="Apache-2.0" +SLOT="0/2" +KEYWORDS="" +IUSE="doc" + +DEPEND="doc? ( app-doc/doxygen )" +RDEPEND="" + +if [[ "${PV}" != "9999" ]]; then + S="${WORKDIR}/OpenCC-ver.${PV}" +fi + +DOCS=(AUTHORS NEWS.md README.md) + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DBUILD_SHARED_LIBS=ON + -DENABLE_GTEST=OFF + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + if use doc; then + mv "${ED}usr/share/opencc/doc/html" "${ED}usr/share/doc/${P}/html" || die + rmdir "${ED}usr/share/opencc/doc" || die + fi +}