Gentoo Archives: gentoo-commits

From: Maxim Koltsov <maksbotan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/maksbotan:master commit in: dev-cpp/luceneplusplus/files/, dev-cpp/luceneplusplus/
Date: Thu, 28 Aug 2014 10:28:49
Message-Id: 1409221593.3e1d598922b5ecbea153306ca74f271726fedf9c.maksbotan@gentoo
1 commit: 3e1d598922b5ecbea153306ca74f271726fedf9c
2 Author: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 28 10:26:33 2014 +0000
4 Commit: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 28 10:26:33 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=dev/maksbotan.git;a=commit;h=3e1d5989
7
8 Add dev-cpp/luceneplusplus
9
10 Package-Manager: portage-2.2.12
11 RepoMan-Options: --force
12 Manifest-Sign-Key: F8DBDADE
13
14 ---
15 dev-cpp/luceneplusplus/Manifest | 21 ++++
16 dev-cpp/luceneplusplus/files/install-headers.patch | 42 ++++++++
17 dev-cpp/luceneplusplus/files/system-gtest.patch | 106 +++++++++++++++++++++
18 dev-cpp/luceneplusplus/files/test-fixture-1.patch | 22 +++++
19 dev-cpp/luceneplusplus/files/test-fixture-2.patch | 24 +++++
20 dev-cpp/luceneplusplus/files/test-fixture-3.patch | 21 ++++
21 dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild | 50 ++++++++++
22 7 files changed, 286 insertions(+)
23
24 diff --git a/dev-cpp/luceneplusplus/Manifest b/dev-cpp/luceneplusplus/Manifest
25 new file mode 100644
26 index 0000000..8442d69
27 --- /dev/null
28 +++ b/dev-cpp/luceneplusplus/Manifest
29 @@ -0,0 +1,21 @@
30 +-----BEGIN PGP SIGNED MESSAGE-----
31 +Hash: SHA256
32 +
33 +AUX install-headers.patch 1173 SHA256 1c8bcb9dc519931cb25e3a69562ccd0a0fcf8fd01091e462abfacfb6ad73a867 SHA512 21d5e14538d2a9c65f02467e414c05449f88cc2f2a0a40a752425ad766b817aa8527c5c21e06aae6d006e5294e848f03e0ffd365a824d047d6c9ad343f3417b7 WHIRLPOOL 8332ee9690718c30adfeaee48a096ae1a8aa778ff302766d07e6798cdb4e78625450e4f50df6afec19d064f8840090e667e284a0c8dc3084dda36f5a9924451f
34 +AUX system-gtest.patch 3319 SHA256 07cd78e08ac703a5505c72bf1d3ed93906f5f0d4f770c589379aedab7e25760f SHA512 a2cd1fe82a35d3ef987d321aa6eb6bd74dcaafcd4628326aef4f2a8228eab08964c0a9871e4d45105c31f04deeddacb99b0e1ceb0f897abb7006066acd066fdb WHIRLPOOL 55fb64e793f491a72d70deed91ff2e4f94cf6ba1901de8cca0b1e5bcc560adaf4885ede83e8fc053211910192972e57964c09aedb89f813e3e5c3154b3ccd8f1
35 +AUX test-fixture-1.patch 980 SHA256 92c902761d43f9bcdfeaa4ad94e00d8da08778d48ccac18cd4cf1a7a504da1f1 SHA512 c727c9a530bf30810e3d04c53edb82c65ca1b34c9739ec969b2d8be5a408c8e22a499de59627a251ef1112e8a04dccf63ded1048f82229ea907c8515324ec187 WHIRLPOOL 6983242a94fb8b120a427dca47cf2c339b9073c2694f0e777a7b313ac88d60e3fc1d2dd0bd9846e169058a3791f27704100f7ad0249b57b72ff15231fa55f0a9
36 +AUX test-fixture-2.patch 975 SHA256 8660437a03da21172b7fd2fc5c8b4b9e91959935e04f3a766360a13770e09787 SHA512 ede1dea76c59a022b178039cadfc7fa17a4ae11b94f69ad5ea141fb9a85e1dacdd6376721f867e732fee79cc35b7ee2ac02f69bf71aeda4268fcbf5e7f20c404 WHIRLPOOL 1370ca7b4c012c174be7a8731b96512fb5bf564afa16c3303b51bc9ed6f14e10114fb8aadc69b7952d69467e505912283afbe4b9434f39dc1f3b30f9dbef67d0
37 +AUX test-fixture-3.patch 694 SHA256 48cb58c9164b0deedc0271631fdc2d2541ef0aa8664f4478d858b6b817c26da7 SHA512 2216a7bcf3ca510cb3cf6898ddba9e0a4fb838988c89c57262221e0f9e667ff9008debb0c34a96c15f6be05ee6311ce889d294100e894621514c58d0e28f5f9b WHIRLPOOL 72dd636ffe92486eda417474e39d74ac8a9bbea03d3c655f13cb48e69332d314152b983de910535b815e49697e5592c6c61e4fe689f84b3025ff7c79d546195e
38 +DIST luceneplusplus-3.0.6.tar.gz 1529066 SHA256 3e7092a4935e0d1ad5c6d7ac8f3c6ed2f53e51321237ce83744bbf02e0d61519 SHA512 c65aac4cdc92b4593a7d9996273047ff68cc097b755bacdd424266ffcf9143b491ef91123b8e78d9f1fba3d9ac39078a0c2c97c22a39f646f84a0fef0f2956ef WHIRLPOOL 7064b69214d62e05986c78fee2873222c85c2a7a4c892fcc29a5b47f0b1cb67e64789f3665dc3b8ca3628daf28e05c331a99cd0111062683e9323a6827e7ebf5
39 +EBUILD luceneplusplus-3.0.6.ebuild 1083 SHA256 4ac02f63df5c9d280463616c7e92c129ba9ed467ba17ac3c084c3a5d8c1950a5 SHA512 8e63b2bc58b60b6ac51a063b480710f878205ebc59492535d8306f650ee2b21048682d2bd18d756e82f4991a933fca6a006bc9a64fce4051526f102dcbb5d7ae WHIRLPOOL 517b87101faf2e1f7ef367b42519ef05da82a6d96e6486cdcefcf291a65ee9db876e7d42b90ff31cb2f14ca26097e66c0a9d888c1e0108fd53c77be9d5f0c143
40 +-----BEGIN PGP SIGNATURE-----
41 +Version: GnuPG v2
42 +
43 +iQEcBAEBCAAGBQJT/wPZAAoJEAmJmMX429re0RQH/1KWrB4d1Do6I6XXoJQLdRZZ
44 +yNV4iCJ7mrSoJxYwYVOMYWHETpWaZkGy2+hWypW61A97l10cluxGLdwbvHNxIC6I
45 +hEUdD80SW/76Crn5wO1GDJH7BOKTOoFujrLz7OspXwmt+N6M9rJ2EblZS82OqU9G
46 +piq3knT1Ut5jKu4CulgG8oZrodPWx3vxMcNDTbP0wwB3rc2FJSnkXC0EQEb68lLA
47 +T3sSw0v0+SrtYNbYUIhU/hTiqu7D48vT6KYDW11CKT+1f0F4x7QgMLbfHQvd9Cwb
48 +rgHMyOYy68I74az5Jpx0LaAe3n40+LkpdhdnEWEbpjm3FxjPRugEPFMNSaFDOuw=
49 +=yW9B
50 +-----END PGP SIGNATURE-----
51
52 diff --git a/dev-cpp/luceneplusplus/files/install-headers.patch b/dev-cpp/luceneplusplus/files/install-headers.patch
53 new file mode 100644
54 index 0000000..9d60308
55 --- /dev/null
56 +++ b/dev-cpp/luceneplusplus/files/install-headers.patch
57 @@ -0,0 +1,42 @@
58 +From 994f03cf736229044a168835ae7387696041658f Mon Sep 17 00:00:00 2001
59 +From: rezso <rezso@×××××××.com>
60 +Date: Mon, 19 May 2014 09:20:40 +0100
61 +Subject: [PATCH] fix installing lucene++ headers in 3.0.6
62 +
63 +---
64 + CMakeLists.txt | 8 ++++++++
65 + src/core/CMakeLists.txt | 2 +-
66 + 2 files changed, 9 insertions(+), 1 deletion(-)
67 +
68 +diff --git a/CMakeLists.txt b/CMakeLists.txt
69 +index b0f3f20..6ae96b7 100644
70 +--- a/CMakeLists.txt
71 ++++ b/CMakeLists.txt
72 +@@ -138,6 +138,14 @@ if(NOT WIN32)
73 + DESTINATION "${LIB_DESTINATION}/pkgconfig")
74 + endif()
75 +
76 ++#################################
77 ++# install Config.h
78 ++#################################
79 ++install(
80 ++ FILES
81 ++ "${CMAKE_CURRENT_BINARY_DIR}/include/Config.h"
82 ++ DESTINATION include/lucene++)
83 ++
84 + ####################################
85 + # custom targets
86 + ####################################
87 +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
88 +index 83eb578..7d6153d 100644
89 +--- a/src/core/CMakeLists.txt
90 ++++ b/src/core/CMakeLists.txt
91 +@@ -20,7 +20,7 @@ file(GLOB_RECURSE lucene_internal_headers
92 + )
93 +
94 + file(GLOB_RECURSE lucene_headers
95 +- include/*.h
96 ++ "${lucene++_SOURCE_DIR}/include/*.h"
97 + )
98 +
99 + add_definitions(-DLPP_BUILDING_LIB)
100
101 diff --git a/dev-cpp/luceneplusplus/files/system-gtest.patch b/dev-cpp/luceneplusplus/files/system-gtest.patch
102 new file mode 100644
103 index 0000000..248b6b8
104 --- /dev/null
105 +++ b/dev-cpp/luceneplusplus/files/system-gtest.patch
106 @@ -0,0 +1,106 @@
107 +--- /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
108 ++++ /home/maks/temp/CMakeLists.txt 2014-08-28 12:49:21.173231804 +0400
109 +@@ -45,11 +45,15 @@
110 + OFF
111 + )
112 +
113 ++option(BUILD_TESTS
114 ++ "Build tests"
115 ++ ON
116 ++)
117 ++
118 + ####################################
119 + # bootstrap
120 + ####################################
121 +
122 +-find_package(Subversion REQUIRED)
123 + find_package(Threads REQUIRED)
124 + find_package(Boost COMPONENTS
125 + date_time
126 +@@ -113,13 +117,17 @@
127 + ${CMAKE_CURRENT_BINARY_DIR}/include
128 + )
129 +
130 +-include(CMakeExternal.txt)
131 +-enable_testing()
132 +
133 + add_subdirectory(src/core)
134 + add_subdirectory(src/contrib)
135 + add_subdirectory(src/demo)
136 +-add_subdirectory(src/test)
137 ++
138 ++if(BUILD_TESTS)
139 ++ add_subdirectory(src/test)
140 ++
141 ++ include(CMakeExternal.txt)
142 ++ enable_testing()
143 ++endif()
144 +
145 + #################################
146 + # install pkg-config file
147 +--- /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
148 ++++ /home/maks/temp/CMakeExternal.txt 2014-08-28 12:47:58.888232514 +0400
149 +@@ -1,28 +1,38 @@
150 +-# Enable ExternalProject CMake module
151 +-include(ExternalProject)
152 ++option(USE_SYSTEM_GTEST
153 ++ "Use GTest from the system"
154 ++ OFF
155 ++)
156 +
157 +-# main directory for external projects
158 +-set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty)
159 ++if(USE_SYSTEM_GTEST)
160 ++ find_package(GTest REQUIRED)
161 ++else()
162 ++ find_package(Subversion REQUIRED)
163 ++ # Enable ExternalProject CMake module
164 ++ include(ExternalProject)
165 +
166 +-# GTest external project
167 +-ExternalProject_Add(
168 +- googletest
169 +- SVN_REPOSITORY http://googletest.googlecode.com/svn/tags/release-1.7.0/
170 +- TIMEOUT 10
171 +- CMAKE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
172 +- -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
173 +- -Dgtest_force_shared_crt=ON
174 +- # Disable update
175 +- UPDATE_COMMAND ""
176 +- # Disable install step
177 +- INSTALL_COMMAND ""
178 +- # Wrap download, configure and build steps in a script to log output
179 +- LOG_DOWNLOAD ON
180 +- LOG_CONFIGURE ON
181 +- LOG_BUILD ON)
182 ++ # main directory for external projects
183 ++ set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty)
184 +
185 +-ExternalProject_Get_Property(googletest source_dir)
186 +-set(GTEST_DIR ${source_dir})
187 +-set(GTEST_INCLUDE_DIR ${source_dir}/include)
188 +-ExternalProject_Get_Property(googletest binary_dir)
189 +-set(GTEST_LIB_DIR ${binary_dir})
190 ++ # GTest external project
191 ++ ExternalProject_Add(
192 ++ googletest
193 ++ SVN_REPOSITORY http://googletest.googlecode.com/svn/tags/release-1.7.0/
194 ++ TIMEOUT 10
195 ++ CMAKE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
196 ++ -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
197 ++ -Dgtest_force_shared_crt=ON
198 ++ # Disable update
199 ++ UPDATE_COMMAND ""
200 ++ # Disable install step
201 ++ INSTALL_COMMAND ""
202 ++ # Wrap download, configure and build steps in a script to log output
203 ++ LOG_DOWNLOAD ON
204 ++ LOG_CONFIGURE ON
205 ++ LOG_BUILD ON)
206 ++
207 ++ ExternalProject_Get_Property(googletest source_dir)
208 ++ set(GTEST_DIR ${source_dir})
209 ++ set(GTEST_INCLUDE_DIR ${source_dir}/include)
210 ++ ExternalProject_Get_Property(googletest binary_dir)
211 ++ set(GTEST_LIB_DIR ${binary_dir})
212 ++endif()
213
214 diff --git a/dev-cpp/luceneplusplus/files/test-fixture-1.patch b/dev-cpp/luceneplusplus/files/test-fixture-1.patch
215 new file mode 100644
216 index 0000000..c273ad4
217 --- /dev/null
218 +++ b/dev-cpp/luceneplusplus/files/test-fixture-1.patch
219 @@ -0,0 +1,22 @@
220 +From 4c1f1371e98c387cb07043c26b99beff5b5111a8 Mon Sep 17 00:00:00 2001
221 +From: Alan Wright <alan@×××××××.com>
222 +Date: Mon, 28 Apr 2014 13:53:48 +0100
223 +Subject: [PATCH] Throw exception in fixture destructor instead of FAIL().
224 +
225 +---
226 + src/test/util/LuceneTestFixture.cpp | 2 +-
227 + 1 file changed, 1 insertion(+), 1 deletion(-)
228 +
229 +diff --git a/src/test/util/LuceneTestFixture.cpp b/src/test/util/LuceneTestFixture.cpp
230 +index 27c61e0..e737bdb 100644
231 +--- a/src/test/util/LuceneTestFixture.cpp
232 ++++ b/src/test/util/LuceneTestFixture.cpp
233 +@@ -21,7 +21,7 @@ LuceneTestFixture::~LuceneTestFixture() {
234 + if (ConcurrentMergeScheduler::anyUnhandledExceptions()) {
235 + // Clear the failure so that we don't just keep failing subsequent test cases
236 + ConcurrentMergeScheduler::clearUnhandledExceptions();
237 +- FAIL() << "ConcurrentMergeScheduler hit unhandled exceptions";
238 ++ boost::throw_exception(RuntimeException(L"ConcurrentMergeScheduler hit unhandled exceptions"));
239 + }
240 + }
241 +
242
243 diff --git a/dev-cpp/luceneplusplus/files/test-fixture-2.patch b/dev-cpp/luceneplusplus/files/test-fixture-2.patch
244 new file mode 100644
245 index 0000000..4ebd3f2
246 --- /dev/null
247 +++ b/dev-cpp/luceneplusplus/files/test-fixture-2.patch
248 @@ -0,0 +1,24 @@
249 +From 474d308600aecabfa88c27e691fa13e815e4649f Mon Sep 17 00:00:00 2001
250 +From: Gianfranco Costamagna <costamagnagianfranco@×××××.it>
251 +Date: Wed, 2 Jul 2014 17:23:27 +0200
252 +Subject: [PATCH] Update LuceneTestFixture.cpp
253 +
254 +---
255 + src/test/util/LuceneTestFixture.cpp | 4 ++++
256 + 1 file changed, 4 insertions(+)
257 +
258 +diff --git a/src/test/util/LuceneTestFixture.cpp b/src/test/util/LuceneTestFixture.cpp
259 +index e737bdb..71e16cf 100644
260 +--- a/src/test/util/LuceneTestFixture.cpp
261 ++++ b/src/test/util/LuceneTestFixture.cpp
262 +@@ -17,6 +17,10 @@ LuceneTestFixture::LuceneTestFixture() {
263 + }
264 +
265 + LuceneTestFixture::~LuceneTestFixture() {
266 ++ // Moved out to a separate function since GTEST_FAIL cannot be used in destructors
267 ++ destructorBody();
268 ++}
269 ++void LuceneTestFixture::destructorBody() {
270 + DateTools::setDateOrder(DateTools::DATEORDER_LOCALE);
271 + if (ConcurrentMergeScheduler::anyUnhandledExceptions()) {
272 + // Clear the failure so that we don't just keep failing subsequent test cases
273
274 diff --git a/dev-cpp/luceneplusplus/files/test-fixture-3.patch b/dev-cpp/luceneplusplus/files/test-fixture-3.patch
275 new file mode 100644
276 index 0000000..be77f31
277 --- /dev/null
278 +++ b/dev-cpp/luceneplusplus/files/test-fixture-3.patch
279 @@ -0,0 +1,21 @@
280 +From e349e74f59d4358dad899cdbc355edd6734b51f1 Mon Sep 17 00:00:00 2001
281 +From: Gianfranco Costamagna <costamagnagianfranco@×××××.it>
282 +Date: Wed, 2 Jul 2014 17:25:37 +0200
283 +Subject: [PATCH] Update LuceneTestFixture.h
284 +
285 +---
286 + src/test/include/LuceneTestFixture.h | 1 +
287 + 1 file changed, 1 insertion(+)
288 +
289 +diff --git a/src/test/include/LuceneTestFixture.h b/src/test/include/LuceneTestFixture.h
290 +index fd7371a..5613658 100644
291 +--- a/src/test/include/LuceneTestFixture.h
292 ++++ b/src/test/include/LuceneTestFixture.h
293 +@@ -13,6 +13,7 @@ class LuceneTestFixture : public testing::Test {
294 + /// setup
295 + LuceneTestFixture();
296 +
297 ++ void destructorBody();
298 + /// teardown
299 + virtual ~LuceneTestFixture();
300 + };
301
302 diff --git a/dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild b/dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild
303 new file mode 100644
304 index 0000000..323125a
305 --- /dev/null
306 +++ b/dev-cpp/luceneplusplus/luceneplusplus-3.0.6.ebuild
307 @@ -0,0 +1,50 @@
308 +# Copyright 1999-2014 Gentoo Foundation
309 +# Distributed under the terms of the GNU General Public License v2
310 +# $Header: $
311 +
312 +EAPI=5
313 +
314 +inherit cmake-utils
315 +
316 +MY_PN="LucenePlusPlus"
317 +
318 +DESCRIPTION="Up to date C++ port of the popular Java Lucene library"
319 +HOMEPAGE="https://github.com/luceneplusplus/LucenePlusPlus"
320 +SRC_URI="https://github.com/${PN}/${PN}/archive/rel_${PV}.tar.gz -> ${P}.tar.gz"
321 +
322 +LICENSE="LGPL-3 Apache-2.0"
323 +SLOT="0"
324 +KEYWORDS="~amd64"
325 +IUSE="doc test"
326 +
327 +RDEPEND="
328 + dev-libs/boost[threads]
329 +"
330 +DEPEND="${DEPEND}
331 + doc? ( app-doc/doxygen )
332 + test? ( dev-cpp/gtest )
333 +"
334 +
335 +S="${WORKDIR}/${MY_PN}-rel_${PV}/"
336 +
337 +PATCHES=(
338 + "${FILESDIR}/test-fixture-1.patch"
339 + "${FILESDIR}/test-fixture-2.patch"
340 + "${FILESDIR}/test-fixture-3.patch"
341 + "${FILESDIR}/install-headers.patch"
342 + "${FILESDIR}/system-gtest.patch"
343 +)
344 +
345 +src_configure() {
346 + local mycmakeargs=(
347 + $(cmake-utils_use_build test TESTS)
348 + $(cmake-utils_use_enable doc DOCS)
349 + -DUSE_SYSTEM_GTEST=ON
350 + )
351 +
352 + cmake-utils_src_configure
353 +}
354 +
355 +src_test() {
356 + "${BUILD_DIR}"/src/test/lucenec++-tester --test_dir="${S}"/src/test/testfiles/ || die "tests failed"
357 +}