summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2017-08-23 23:23:46 +0900
committerAkinori Hattori <hattya@gentoo.org>2017-08-23 23:25:34 +0900
commit2bc8db79ebabd401fb909b8834d7cb723e510495 (patch)
tree09a3132a7e946b1efaf1f7d9457a970ba1099676
parentapp-i18n/opencc: drop static-libs USE flag (diff)
downloadgentoo-2bc8db79ebabd401fb909b8834d7cb723e510495.tar.gz
gentoo-2bc8db79ebabd401fb909b8834d7cb723e510495.tar.bz2
gentoo-2bc8db79ebabd401fb909b8834d7cb723e510495.zip
app-i18n/opencc: enable tests
Package-Manager: Portage-2.3.6, Repoman-2.3.1
-rw-r--r--app-i18n/opencc/files/opencc-test.patch11
-rw-r--r--app-i18n/opencc/opencc-1.0.4.ebuild9
-rw-r--r--app-i18n/opencc/opencc-1.0.5.ebuild5
-rw-r--r--app-i18n/opencc/opencc-9999.ebuild5
4 files changed, 23 insertions, 7 deletions
diff --git a/app-i18n/opencc/files/opencc-test.patch b/app-i18n/opencc/files/opencc-test.patch
new file mode 100644
index 000000000000..dd6e91b984d2
--- /dev/null
+++ b/app-i18n/opencc/files/opencc-test.patch
@@ -0,0 +1,11 @@
+--- a/src/PhraseExtractTest.cpp
++++ b/src/PhraseExtractTest.cpp
+@@ -16,6 +16,8 @@
+ * limitations under the License.
+ */
+
++#include <cmath>
++
+ #include "PhraseExtract.hpp"
+ #include "TestUtils.hpp"
+
diff --git a/app-i18n/opencc/opencc-1.0.4.ebuild b/app-i18n/opencc/opencc-1.0.4.ebuild
index fa655b4ac0e2..139e1b4bf186 100644
--- a/app-i18n/opencc/opencc-1.0.4.ebuild
+++ b/app-i18n/opencc/opencc-1.0.4.ebuild
@@ -12,18 +12,21 @@ SRC_URI="https://github.com/BYVoid/${PN^^[oc]}/archive/ver.${PV}.tar.gz -> ${P}.
LICENSE="Apache-2.0"
SLOT="0/2"
KEYWORDS="amd64 hppa ppc ppc64 x86"
-IUSE="doc"
+IUSE="doc test"
DEPEND="doc? ( app-doc/doxygen )"
DOCS="AUTHORS *.md"
-PATCHES=( "${FILESDIR}"/${P}-cmake-libdir.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-cmake-libdir.patch
+ "${FILESDIR}"/${PN}-test.patch
+)
src_configure() {
local mycmakeargs=(
-DBUILD_DOCUMENTATION=$(usex doc)
-DBUILD_SHARED_LIBS=ON
- -DENABLE_GTEST=OFF
+ -DENABLE_GTEST=$(usex test)
)
cmake-utils_src_configure
}
diff --git a/app-i18n/opencc/opencc-1.0.5.ebuild b/app-i18n/opencc/opencc-1.0.5.ebuild
index 93e6c7c9ffe3..72a714fbc0c0 100644
--- a/app-i18n/opencc/opencc-1.0.5.ebuild
+++ b/app-i18n/opencc/opencc-1.0.5.ebuild
@@ -21,11 +21,12 @@ HOMEPAGE="https://github.com/BYVoid/OpenCC"
LICENSE="Apache-2.0"
SLOT="0/2"
KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
-IUSE="doc"
+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
@@ -37,7 +38,7 @@ src_configure() {
local mycmakeargs=(
-DBUILD_DOCUMENTATION=$(usex doc)
-DBUILD_SHARED_LIBS=ON
- -DENABLE_GTEST=OFF
+ -DENABLE_GTEST=$(usex test)
)
cmake-utils_src_configure
}
diff --git a/app-i18n/opencc/opencc-9999.ebuild b/app-i18n/opencc/opencc-9999.ebuild
index f98b89451355..9ec1cbd5d8b7 100644
--- a/app-i18n/opencc/opencc-9999.ebuild
+++ b/app-i18n/opencc/opencc-9999.ebuild
@@ -21,11 +21,12 @@ HOMEPAGE="https://github.com/BYVoid/OpenCC"
LICENSE="Apache-2.0"
SLOT="0/2"
KEYWORDS=""
-IUSE="doc"
+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
@@ -37,7 +38,7 @@ src_configure() {
local mycmakeargs=(
-DBUILD_DOCUMENTATION=$(usex doc)
-DBUILD_SHARED_LIBS=ON
- -DENABLE_GTEST=OFF
+ -DENABLE_GTEST=$(usex test)
)
cmake-utils_src_configure
}