Date: Sunday, January 8, 2023 @ 21:01:09 Author: andyrtr Revision: 466263
upgpkg: clucene 2.3.3.4-13: fix build - FS#77036 Added: clucene/trunk/0001-Fix-missing-include-time.h.patch Modified: clucene/trunk/PKGBUILD ---------------------------------------+ 0001-Fix-missing-include-time.h.patch | 49 ++++++++++++++++++++++++++++++++ PKGBUILD | 17 +++++++++-- 2 files changed, 64 insertions(+), 2 deletions(-) Added: 0001-Fix-missing-include-time.h.patch =================================================================== --- 0001-Fix-missing-include-time.h.patch (rev 0) +++ 0001-Fix-missing-include-time.h.patch 2023-01-08 21:01:09 UTC (rev 466263) @@ -0,0 +1,49 @@ +From c1c2000c35ff39b09cb70fbdf66a107d3b17a674 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <[email protected]> +Date: Wed, 12 Oct 2022 08:40:49 +0200 +Subject: [PATCH] Fix missing #include <time.h> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +At least on recent Fedora 37 beta, building now failed with + +> CLucene/document/DateTools.cpp:26:19: error: ‘gmtime’ was not declared in this scope +> 26 | tm *ptm = gmtime(&secs); +> | ^~~~~~ + +etc. + +As it turns out, after 22f9d40320e3deeaa8d6aaa7a770077c20a21dae "git-svn-id: +https://clucene.svn.sourceforge.net/svnroot/clucene/branches/lucene2_3_2@2672 +20ef185c-fe11-0410-a618-ba9304b01011" on 2008-06-26 had commented out +_CL_TIME_WITH_SYS_TIME in clucene-config.h.cmake as "not actually used for +anything", then cceccfb52917b5f4da447f1cf20c135952d41442 "Presenting DateTools +and deprecating DateField. DateTools still requires some testing and its own +unit testing" on 2008-06-29 had introduced this use of it (into then +src/CLucene/document/DateTools.H). And apparently most build environments have +silently been happy ever since when the dead leading check for +_CL_TIME_WITH_SYS_TIME didn't include both <sys/time.h> and <time.h>, but the +following check for _CL_HAVE_SYS_TIME_H only included <sys/time.h> but not +<time.h>. +--- + src/shared/CLucene/clucene-config.h.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/shared/CLucene/clucene-config.h.cmake b/src/shared/CLucene/clucene-config.h.cmake +index bd8683a5..6fe0f92b 100644 +--- a/src/shared/CLucene/clucene-config.h.cmake ++++ b/src/shared/CLucene/clucene-config.h.cmake +@@ -100,8 +100,7 @@ ${SYMBOL__T} + //#cmakedefine _CL_STAT_MACROS_BROKEN + + /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +-//not actually used for anything... +-//#cmakedefine _CL_TIME_WITH_SYS_TIME 1 ++#cmakedefine _CL_TIME_WITH_SYS_TIME 1 + + /* Define that we will be using -fvisibility=hidden, and + * make public classes visible using __attribute__ ((visibility("default"))) +-- +2.37.3 + Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-01-08 21:01:06 UTC (rev 466262) +++ PKGBUILD 2023-01-08 21:01:09 UTC (rev 466263) @@ -2,9 +2,10 @@ # Contributor: Alexander Rødseth # Contributor: Alois Nespor <[email protected]> # Contributor: Tobias Powalowski <[email protected]> + pkgname=clucene pkgver=2.3.3.4 -pkgrel=12 +pkgrel=13 pkgdesc="C++ port of the high-performance text search engine Lucene" arch=('x86_64') url="http://clucene.sourceforge.net/" @@ -15,6 +16,7 @@ # Fedora patches clucene-core-2.3.3.4-pkgconfig.patch clucene-core-2.3.3.4-install_contribs_lib.patch + 0001-Fix-missing-include-time.h.patch # upstream patch fix_zlib_detections.diff # LibreOffice patches @@ -26,6 +28,7 @@ sha512sums=('1c9da9077edcebd46563bd9e47d330518e0b30061016650a759cfe051e9748fdad8932a472b1cca53a6adafed5f41656527271fc5f55ddfcefb558f0d83286b4' 'b357cb5a1c5d66219f3168724a71af3ebf5c45c752a612d3a69c170b739acc065dc17c261c3a730298ea6c637fe820637a100f73ab03d931734f80bb598fbf55' '0aa92635949089196e4e7c579e78761e8751987ef5036320a161a4aaa67da3c63756398c903419c76ea0fbdc8a949e871fcb65be98179a9853a24a5a4cacfde3' + 'f606481b3bae44487a05e81da1e19dfa0bc5db8b10832d5b84c4e269fecb99ad010b90c5132e618c300f32b8c5bf28cfd0038c4ca2ddb4870c5a3f5113a18e64' '883cdd389a1f6f9483250cf55030b944f5a0b5e82607f9a71ead0abaa2a9a0f08bc339ffe0518c78b65ad543e659a9eee35555a7bd9abbdae9d5204499ac039f' 'd74c3e4cccbb05b576c063c8e25a67546b70c5bc59f2ee62be8a7095ae90020278709df79316b0f233153a76968abf465d933a81706ee2e68583f6bf921e6604' 'c2ed8a7e7612a47e1f49266f0ea07a2a29a9d5db2b7d6f5079c031cd6edef7f39b0d771ee6f88665957d798be05ff83fd8a93cc9a84b414d84ed3344034bd0de' @@ -33,7 +36,7 @@ 'f39f36b385f09722026a7759ee49b89ec6b5f06db0d56b472628cc68fd9badd35cc6b977122eb8e6ae108fa71b075315377ee83e9fc85e2d1722c434cfdc18b4' '07c8b496045e5d9d4256ad854734d6228abb67455f2349b20173d42fc733cb0663559818542c257ef2cdd84e6d08f673bfea38591087498e2e2466f555af3b04') -build() { +prepare() { cd "$srcdir"/$pkgname-core-$pkgver # add missing contrib-libs needed by LibO 3.6, patch by FC @@ -49,7 +52,17 @@ patch -Np0 -i "${srcdir}"/clucene-narrowing-conversions.patch patch -Np0 -i "${srcdir}"/clucene-multimap-put.patch + # FS#77036 / https://sourceforge.net/p/clucene/bugs/235/ + patch -Np1 -i ../0001-Fix-missing-include-time.h.patch + + # nuke bundled code + rm -rfv src/ext/{boost/,zlib/} + mkdir build +} + +build() { + cd "$srcdir"/$pkgname-core-$pkgver pushd build cmake .. \ -DCMAKE_BUILD_TYPE=Release \
