* [gentoo-commits] dev/maksbotan:master commit in: dev-cpp/luceneplusplus/files/, dev-cpp/luceneplusplus/
@ 2014-08-28 10:28 Maxim Koltsov
0 siblings, 0 replies; only message in thread
From: Maxim Koltsov @ 2014-08-28 10:28 UTC (permalink / raw
To: gentoo-commits
commit: 3e1d598922b5ecbea153306ca74f271726fedf9c
Author: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 10:26:33 2014 +0000
Commit: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 10:26:33 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=3e1d5989
Add dev-cpp/luceneplusplus
Package-Manager: portage-2.2.12
RepoMan-Options: --force
Manifest-Sign-Key: F8DBDADE
---
dev-cpp/luceneplusplus/Manifest | 21 ++++
| 42 ++++++++
dev-cpp/luceneplusplus/files/system-gtest.patch | 106 +++++++++++++++++++++
dev-cpp/luceneplusplus/files/test-fixture-1.patch | 22 +++++
dev-cpp/luceneplusplus/files/test-fixture-2.patch | 24 +++++
dev-cpp/luceneplusplus/files/test-fixture-3.patch | 21 ++++
dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild | 50 ++++++++++
7 files changed, 286 insertions(+)
diff --git a/dev-cpp/luceneplusplus/Manifest b/dev-cpp/luceneplusplus/Manifest
new file mode 100644
index 0000000..8442d69
--- /dev/null
+++ b/dev-cpp/luceneplusplus/Manifest
@@ -0,0 +1,21 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX install-headers.patch 1173 SHA256 1c8bcb9dc519931cb25e3a69562ccd0a0fcf8fd01091e462abfacfb6ad73a867 SHA512 21d5e14538d2a9c65f02467e414c05449f88cc2f2a0a40a752425ad766b817aa8527c5c21e06aae6d006e5294e848f03e0ffd365a824d047d6c9ad343f3417b7 WHIRLPOOL 8332ee9690718c30adfeaee48a096ae1a8aa778ff302766d07e6798cdb4e78625450e4f50df6afec19d064f8840090e667e284a0c8dc3084dda36f5a9924451f
+AUX system-gtest.patch 3319 SHA256 07cd78e08ac703a5505c72bf1d3ed93906f5f0d4f770c589379aedab7e25760f SHA512 a2cd1fe82a35d3ef987d321aa6eb6bd74dcaafcd4628326aef4f2a8228eab08964c0a9871e4d45105c31f04deeddacb99b0e1ceb0f897abb7006066acd066fdb WHIRLPOOL 55fb64e793f491a72d70deed91ff2e4f94cf6ba1901de8cca0b1e5bcc560adaf4885ede83e8fc053211910192972e57964c09aedb89f813e3e5c3154b3ccd8f1
+AUX test-fixture-1.patch 980 SHA256 92c902761d43f9bcdfeaa4ad94e00d8da08778d48ccac18cd4cf1a7a504da1f1 SHA512 c727c9a530bf30810e3d04c53edb82c65ca1b34c9739ec969b2d8be5a408c8e22a499de59627a251ef1112e8a04dccf63ded1048f82229ea907c8515324ec187 WHIRLPOOL 6983242a94fb8b120a427dca47cf2c339b9073c2694f0e777a7b313ac88d60e3fc1d2dd0bd9846e169058a3791f27704100f7ad0249b57b72ff15231fa55f0a9
+AUX test-fixture-2.patch 975 SHA256 8660437a03da21172b7fd2fc5c8b4b9e91959935e04f3a766360a13770e09787 SHA512 ede1dea76c59a022b178039cadfc7fa17a4ae11b94f69ad5ea141fb9a85e1dacdd6376721f867e732fee79cc35b7ee2ac02f69bf71aeda4268fcbf5e7f20c404 WHIRLPOOL 1370ca7b4c012c174be7a8731b96512fb5bf564afa16c3303b51bc9ed6f14e10114fb8aadc69b7952d69467e505912283afbe4b9434f39dc1f3b30f9dbef67d0
+AUX test-fixture-3.patch 694 SHA256 48cb58c9164b0deedc0271631fdc2d2541ef0aa8664f4478d858b6b817c26da7 SHA512 2216a7bcf3ca510cb3cf6898ddba9e0a4fb838988c89c57262221e0f9e667ff9008debb0c34a96c15f6be05ee6311ce889d294100e894621514c58d0e28f5f9b WHIRLPOOL 72dd636ffe92486eda417474e39d74ac8a9bbea03d3c655f13cb48e69332d314152b983de910535b815e49697e5592c6c61e4fe689f84b3025ff7c79d546195e
+DIST luceneplusplus-3.0.6.tar.gz 1529066 SHA256 3e7092a4935e0d1ad5c6d7ac8f3c6ed2f53e51321237ce83744bbf02e0d61519 SHA512 c65aac4cdc92b4593a7d9996273047ff68cc097b755bacdd424266ffcf9143b491ef91123b8e78d9f1fba3d9ac39078a0c2c97c22a39f646f84a0fef0f2956ef WHIRLPOOL 7064b69214d62e05986c78fee2873222c85c2a7a4c892fcc29a5b47f0b1cb67e64789f3665dc3b8ca3628daf28e05c331a99cd0111062683e9323a6827e7ebf5
+EBUILD luceneplusplus-3.0.6.ebuild 1083 SHA256 4ac02f63df5c9d280463616c7e92c129ba9ed467ba17ac3c084c3a5d8c1950a5 SHA512 8e63b2bc58b60b6ac51a063b480710f878205ebc59492535d8306f650ee2b21048682d2bd18d756e82f4991a933fca6a006bc9a64fce4051526f102dcbb5d7ae WHIRLPOOL 517b87101faf2e1f7ef367b42519ef05da82a6d96e6486cdcefcf291a65ee9db876e7d42b90ff31cb2f14ca26097e66c0a9d888c1e0108fd53c77be9d5f0c143
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQEcBAEBCAAGBQJT/wPZAAoJEAmJmMX429re0RQH/1KWrB4d1Do6I6XXoJQLdRZZ
+yNV4iCJ7mrSoJxYwYVOMYWHETpWaZkGy2+hWypW61A97l10cluxGLdwbvHNxIC6I
+hEUdD80SW/76Crn5wO1GDJH7BOKTOoFujrLz7OspXwmt+N6M9rJ2EblZS82OqU9G
+piq3knT1Ut5jKu4CulgG8oZrodPWx3vxMcNDTbP0wwB3rc2FJSnkXC0EQEb68lLA
+T3sSw0v0+SrtYNbYUIhU/hTiqu7D48vT6KYDW11CKT+1f0F4x7QgMLbfHQvd9Cwb
+rgHMyOYy68I74az5Jpx0LaAe3n40+LkpdhdnEWEbpjm3FxjPRugEPFMNSaFDOuw=
+=yW9B
+-----END PGP SIGNATURE-----
--git a/dev-cpp/luceneplusplus/files/install-headers.patch b/dev-cpp/luceneplusplus/files/install-headers.patch
new file mode 100644
index 0000000..9d60308
--- /dev/null
+++ b/dev-cpp/luceneplusplus/files/install-headers.patch
@@ -0,0 +1,42 @@
+From 994f03cf736229044a168835ae7387696041658f Mon Sep 17 00:00:00 2001
+From: rezso <rezso@example.com>
+Date: Mon, 19 May 2014 09:20:40 +0100
+Subject: [PATCH] fix installing lucene++ headers in 3.0.6
+
+---
+ CMakeLists.txt | 8 ++++++++
+ src/core/CMakeLists.txt | 2 +-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b0f3f20..6ae96b7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,6 +138,14 @@ if(NOT WIN32)
+ DESTINATION "${LIB_DESTINATION}/pkgconfig")
+ endif()
+
++#################################
++# install Config.h
++#################################
++install(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/include/Config.h"
++ DESTINATION include/lucene++)
++
+ ####################################
+ # custom targets
+ ####################################
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 83eb578..7d6153d 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -20,7 +20,7 @@ file(GLOB_RECURSE lucene_internal_headers
+ )
+
+ file(GLOB_RECURSE lucene_headers
+- include/*.h
++ "${lucene++_SOURCE_DIR}/include/*.h"
+ )
+
+ add_definitions(-DLPP_BUILDING_LIB)
diff --git a/dev-cpp/luceneplusplus/files/system-gtest.patch b/dev-cpp/luceneplusplus/files/system-gtest.patch
new file mode 100644
index 0000000..248b6b8
--- /dev/null
+++ b/dev-cpp/luceneplusplus/files/system-gtest.patch
@@ -0,0 +1,106 @@
+--- /var/tmp/portage/dev-cpp/luceneplusplus-3.0.6/work/LucenePlusPlus-rel_3.0.6/CMakeLists.txt 2014-04-19 22:26:40.000000000 +0400
++++ /home/maks/temp/CMakeLists.txt 2014-08-28 12:49:21.173231804 +0400
+@@ -45,11 +45,15 @@
+ OFF
+ )
+
++option(BUILD_TESTS
++ "Build tests"
++ ON
++)
++
+ ####################################
+ # bootstrap
+ ####################################
+
+-find_package(Subversion REQUIRED)
+ find_package(Threads REQUIRED)
+ find_package(Boost COMPONENTS
+ date_time
+@@ -113,13 +117,17 @@
+ ${CMAKE_CURRENT_BINARY_DIR}/include
+ )
+
+-include(CMakeExternal.txt)
+-enable_testing()
+
+ add_subdirectory(src/core)
+ add_subdirectory(src/contrib)
+ add_subdirectory(src/demo)
+-add_subdirectory(src/test)
++
++if(BUILD_TESTS)
++ add_subdirectory(src/test)
++
++ include(CMakeExternal.txt)
++ enable_testing()
++endif()
+
+ #################################
+ # install pkg-config file
+--- /var/tmp/portage/dev-cpp/luceneplusplus-3.0.6/work/LucenePlusPlus-rel_3.0.6/CMakeExternal.txt 2014-04-19 22:26:40.000000000 +0400
++++ /home/maks/temp/CMakeExternal.txt 2014-08-28 12:47:58.888232514 +0400
+@@ -1,28 +1,38 @@
+-# Enable ExternalProject CMake module
+-include(ExternalProject)
++option(USE_SYSTEM_GTEST
++ "Use GTest from the system"
++ OFF
++)
+
+-# main directory for external projects
+-set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty)
++if(USE_SYSTEM_GTEST)
++ find_package(GTest REQUIRED)
++else()
++ find_package(Subversion REQUIRED)
++ # Enable ExternalProject CMake module
++ include(ExternalProject)
+
+-# GTest external project
+-ExternalProject_Add(
+- googletest
+- SVN_REPOSITORY http://googletest.googlecode.com/svn/tags/release-1.7.0/
+- TIMEOUT 10
+- CMAKE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+- -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+- -Dgtest_force_shared_crt=ON
+- # Disable update
+- UPDATE_COMMAND ""
+- # Disable install step
+- INSTALL_COMMAND ""
+- # Wrap download, configure and build steps in a script to log output
+- LOG_DOWNLOAD ON
+- LOG_CONFIGURE ON
+- LOG_BUILD ON)
++ # main directory for external projects
++ set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty)
+
+-ExternalProject_Get_Property(googletest source_dir)
+-set(GTEST_DIR ${source_dir})
+-set(GTEST_INCLUDE_DIR ${source_dir}/include)
+-ExternalProject_Get_Property(googletest binary_dir)
+-set(GTEST_LIB_DIR ${binary_dir})
++ # GTest external project
++ ExternalProject_Add(
++ googletest
++ SVN_REPOSITORY http://googletest.googlecode.com/svn/tags/release-1.7.0/
++ TIMEOUT 10
++ CMAKE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
++ -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
++ -Dgtest_force_shared_crt=ON
++ # Disable update
++ UPDATE_COMMAND ""
++ # Disable install step
++ INSTALL_COMMAND ""
++ # Wrap download, configure and build steps in a script to log output
++ LOG_DOWNLOAD ON
++ LOG_CONFIGURE ON
++ LOG_BUILD ON)
++
++ ExternalProject_Get_Property(googletest source_dir)
++ set(GTEST_DIR ${source_dir})
++ set(GTEST_INCLUDE_DIR ${source_dir}/include)
++ ExternalProject_Get_Property(googletest binary_dir)
++ set(GTEST_LIB_DIR ${binary_dir})
++endif()
diff --git a/dev-cpp/luceneplusplus/files/test-fixture-1.patch b/dev-cpp/luceneplusplus/files/test-fixture-1.patch
new file mode 100644
index 0000000..c273ad4
--- /dev/null
+++ b/dev-cpp/luceneplusplus/files/test-fixture-1.patch
@@ -0,0 +1,22 @@
+From 4c1f1371e98c387cb07043c26b99beff5b5111a8 Mon Sep 17 00:00:00 2001
+From: Alan Wright <alan@spotify.com>
+Date: Mon, 28 Apr 2014 13:53:48 +0100
+Subject: [PATCH] Throw exception in fixture destructor instead of FAIL().
+
+---
+ src/test/util/LuceneTestFixture.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/util/LuceneTestFixture.cpp b/src/test/util/LuceneTestFixture.cpp
+index 27c61e0..e737bdb 100644
+--- a/src/test/util/LuceneTestFixture.cpp
++++ b/src/test/util/LuceneTestFixture.cpp
+@@ -21,7 +21,7 @@ LuceneTestFixture::~LuceneTestFixture() {
+ if (ConcurrentMergeScheduler::anyUnhandledExceptions()) {
+ // Clear the failure so that we don't just keep failing subsequent test cases
+ ConcurrentMergeScheduler::clearUnhandledExceptions();
+- FAIL() << "ConcurrentMergeScheduler hit unhandled exceptions";
++ boost::throw_exception(RuntimeException(L"ConcurrentMergeScheduler hit unhandled exceptions"));
+ }
+ }
+
diff --git a/dev-cpp/luceneplusplus/files/test-fixture-2.patch b/dev-cpp/luceneplusplus/files/test-fixture-2.patch
new file mode 100644
index 0000000..4ebd3f2
--- /dev/null
+++ b/dev-cpp/luceneplusplus/files/test-fixture-2.patch
@@ -0,0 +1,24 @@
+From 474d308600aecabfa88c27e691fa13e815e4649f Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Wed, 2 Jul 2014 17:23:27 +0200
+Subject: [PATCH] Update LuceneTestFixture.cpp
+
+---
+ src/test/util/LuceneTestFixture.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/test/util/LuceneTestFixture.cpp b/src/test/util/LuceneTestFixture.cpp
+index e737bdb..71e16cf 100644
+--- a/src/test/util/LuceneTestFixture.cpp
++++ b/src/test/util/LuceneTestFixture.cpp
+@@ -17,6 +17,10 @@ LuceneTestFixture::LuceneTestFixture() {
+ }
+
+ LuceneTestFixture::~LuceneTestFixture() {
++ // Moved out to a separate function since GTEST_FAIL cannot be used in destructors
++ destructorBody();
++}
++void LuceneTestFixture::destructorBody() {
+ DateTools::setDateOrder(DateTools::DATEORDER_LOCALE);
+ if (ConcurrentMergeScheduler::anyUnhandledExceptions()) {
+ // Clear the failure so that we don't just keep failing subsequent test cases
diff --git a/dev-cpp/luceneplusplus/files/test-fixture-3.patch b/dev-cpp/luceneplusplus/files/test-fixture-3.patch
new file mode 100644
index 0000000..be77f31
--- /dev/null
+++ b/dev-cpp/luceneplusplus/files/test-fixture-3.patch
@@ -0,0 +1,21 @@
+From e349e74f59d4358dad899cdbc355edd6734b51f1 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Wed, 2 Jul 2014 17:25:37 +0200
+Subject: [PATCH] Update LuceneTestFixture.h
+
+---
+ src/test/include/LuceneTestFixture.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/test/include/LuceneTestFixture.h b/src/test/include/LuceneTestFixture.h
+index fd7371a..5613658 100644
+--- a/src/test/include/LuceneTestFixture.h
++++ b/src/test/include/LuceneTestFixture.h
+@@ -13,6 +13,7 @@ class LuceneTestFixture : public testing::Test {
+ /// setup
+ LuceneTestFixture();
+
++ void destructorBody();
+ /// teardown
+ virtual ~LuceneTestFixture();
+ };
diff --git a/dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild b/dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild
new file mode 100644
index 0000000..323125a
--- /dev/null
+++ b/dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit cmake-utils
+
+MY_PN="LucenePlusPlus"
+
+DESCRIPTION="Up to date C++ port of the popular Java Lucene library"
+HOMEPAGE="https://github.com/luceneplusplus/LucenePlusPlus"
+SRC_URI="https://github.com/${PN}/${PN}/archive/rel_${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc test"
+
+RDEPEND="
+ dev-libs/boost[threads]
+"
+DEPEND="${DEPEND}
+ doc? ( app-doc/doxygen )
+ test? ( dev-cpp/gtest )
+"
+
+S="${WORKDIR}/${MY_PN}-rel_${PV}/"
+
+PATCHES=(
+ "${FILESDIR}/test-fixture-1.patch"
+ "${FILESDIR}/test-fixture-2.patch"
+ "${FILESDIR}/test-fixture-3.patch"
+ "${FILESDIR}/install-headers.patch"
+ "${FILESDIR}/system-gtest.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_enable doc DOCS)
+ -DUSE_SYSTEM_GTEST=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ "${BUILD_DIR}"/src/test/lucenec++-tester --test_dir="${S}"/src/test/testfiles/ || die "tests failed"
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-28 10:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 10:28 [gentoo-commits] dev/maksbotan:master commit in: dev-cpp/luceneplusplus/files/, dev-cpp/luceneplusplus/ Maxim Koltsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox