Skip to content

Commit

Permalink
app-i18n/opencc: enable tests
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.6, Repoman-2.3.1
  • Loading branch information
hattya committed Aug 23, 2017
1 parent ecab812 commit 2bc8db7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
11 changes: 11 additions & 0 deletions app-i18n/opencc/files/opencc-test.patch
Original file line number Diff line number Diff line change
@@ -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"

9 changes: 6 additions & 3 deletions app-i18n/opencc/opencc-1.0.4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
5 changes: 3 additions & 2 deletions app-i18n/opencc/opencc-1.0.5.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
5 changes: 3 additions & 2 deletions app-i18n/opencc/opencc-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

0 comments on commit 2bc8db7

Please sign in to comment.