forked from pool/lucene__
Accepting request 863920 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/863920 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lucene++?expand=0&rev=6
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
From 1987082cf9278a639d772b4f35a8ae2d34944177 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= <vaclav@slavik.io>
|
||||
Date: Mon, 4 May 2015 18:04:46 +0200
|
||||
Subject: [PATCH] Fix compilation with Boost 1.58
|
||||
|
||||
1.58 introduces strict type checking in boost::get() and while that's
|
||||
good in theory, the VariantUtils code makes it impractical to use.
|
||||
Instead, use relaxed_get() to get the old behavior. relaxed_get() didn't
|
||||
exist in older versions of Boost, so the code must check BOOST_VERSION.
|
||||
|
||||
Fixes #93.
|
||||
---
|
||||
include/VariantUtils.h | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/include/VariantUtils.h b/include/VariantUtils.h
|
||||
index 1e6c243..5a72e59 100644
|
||||
--- a/include/VariantUtils.h
|
||||
+++ b/include/VariantUtils.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#define VARIANTUTILS_H
|
||||
|
||||
#include <boost/any.hpp>
|
||||
+#include <boost/version.hpp>
|
||||
#include "Lucene.h"
|
||||
#include "MiscUtils.h"
|
||||
|
||||
@@ -22,7 +23,11 @@ public:
|
||||
|
||||
template <typename TYPE, typename VAR>
|
||||
static TYPE get(VAR var) {
|
||||
+#if BOOST_VERSION < 105800
|
||||
return var.type() == typeid(TYPE) ? boost::get<TYPE>(var) : TYPE();
|
||||
+#else
|
||||
+ return var.type() == typeid(TYPE) ? boost::relaxed_get<TYPE>(var) : TYPE();
|
||||
+#endif
|
||||
}
|
||||
|
||||
template <typename TYPE, typename VAR>
|
||||
--
|
||||
2.4.0
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6c19f203311e4b44a0ccf7b1127db77436eb47159ea1c54f7531a0b1ca585e0c
|
||||
size 2013570
|
||||
147
lucene++-3.0.8-fix-cmake-issues.patch
Normal file
147
lucene++-3.0.8-fix-cmake-issues.patch
Normal file
@@ -0,0 +1,147 @@
|
||||
From 1cd2509ed74ae47965006d16de3c09db029b4efe Mon Sep 17 00:00:00 2001
|
||||
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
|
||||
Date: Mon, 4 Jan 2021 23:45:13 +0100
|
||||
Subject: [PATCH] Fix various cmake issues: "CMAKE_INSTALL_FULL_LIBDIR" not
|
||||
being correctly evaluated and used pkgconfig directory wrongly set to include
|
||||
instead of lib cmake directory wrongly set to include instead of lib
|
||||
core_libname contrib_libname PACKAGE_CMAKE_INSTALL_INCLUDEDIR
|
||||
PACKAGE_CMAKE_INSTALL_LIBDIR variables not being substituted to cmake.in
|
||||
files cmake helpers not being correctly set
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
src/config/CMakeLists.txt | 12 ++++++------
|
||||
src/config/contrib/CMakeLists.txt | 7 ++++---
|
||||
.../contrib/liblucene++-contribConfig.cmake.in | 6 +++---
|
||||
src/config/core/CMakeLists.txt | 7 ++++---
|
||||
src/config/core/liblucene++Config.cmake.in | 6 +++---
|
||||
6 files changed, 21 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 41de688b..71dbbd56 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -21,7 +21,7 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
|
||||
set(LIB_DESTINATION
|
||||
- "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE STRING "Define lib output directory name")
|
||||
+ "${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Define lib output directory name")
|
||||
|
||||
|
||||
####################################
|
||||
diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt
|
||||
index e5e66240..fe8e8b89 100644
|
||||
--- a/src/config/CMakeLists.txt
|
||||
+++ b/src/config/CMakeLists.txt
|
||||
@@ -1,16 +1,16 @@
|
||||
####################################
|
||||
# Set config vars
|
||||
####################################
|
||||
-set(core_libname, "lucene++")
|
||||
-set(contrib_libname, "lucene++-contrib")
|
||||
+set(core_libname "lucene++")
|
||||
+set(contrib_libname "lucene++-contrib")
|
||||
|
||||
set(
|
||||
- PACKAGE_CMAKE_INSTALL_INCLUDEDIR,
|
||||
- "${lucene++_INCLUDE_DIR}/lucene++/")
|
||||
+ PACKAGE_CMAKE_INSTALL_INCLUDEDIR
|
||||
+ "${CMAKE_INSTALL_INCLUDEDIR}/lucene++/")
|
||||
|
||||
set(
|
||||
- PACKAGE_CMAKE_INSTALL_LIBDIR,
|
||||
- "${LIB_INSTALL_DIR}/cmake")
|
||||
+ PACKAGE_CMAKE_INSTALL_LIBDIR
|
||||
+ "${LIB_DESTINATION}")
|
||||
|
||||
|
||||
####################################
|
||||
diff --git a/src/config/contrib/CMakeLists.txt b/src/config/contrib/CMakeLists.txt
|
||||
index c0dd86fc..b4a4391c 100644
|
||||
--- a/src/config/contrib/CMakeLists.txt
|
||||
+++ b/src/config/contrib/CMakeLists.txt
|
||||
@@ -9,7 +9,7 @@ if(NOT WIN32)
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contrib.pc"
|
||||
- DESTINATION "include/pkgconfig")
|
||||
+ DESTINATION "${LIB_DESTINATION}/pkgconfig")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ endif()
|
||||
configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/liblucene++-contribConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfig.cmake"
|
||||
- INSTALL_DESTINATION "${LIB_DESTINATION}/cmake")
|
||||
+ INSTALL_DESTINATION "${LIB_DESTINATION}/cmake/liblucene++-contrib"
|
||||
+ PATH_VARS contrib_libname PACKAGE_CMAKE_INSTALL_INCLUDEDIR PACKAGE_CMAKE_INSTALL_LIBDIR)
|
||||
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfigVersion.cmake"
|
||||
@@ -30,4 +31,4 @@ install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfigVersion.cmake"
|
||||
- DESTINATION "include/cmake")
|
||||
+ DESTINATION "${LIB_DESTINATION}/cmake/liblucene++-contrib")
|
||||
diff --git a/src/config/contrib/liblucene++-contribConfig.cmake.in b/src/config/contrib/liblucene++-contribConfig.cmake.in
|
||||
index f92f6830..85fdfd2e 100644
|
||||
--- a/src/config/contrib/liblucene++-contribConfig.cmake.in
|
||||
+++ b/src/config/contrib/liblucene++-contribConfig.cmake.in
|
||||
@@ -20,6 +20,6 @@ if (NOT DEFINED set_and_check)
|
||||
endif()
|
||||
|
||||
|
||||
-set_and_check(liblucene++-contrib_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@contrib_libname@")
|
||||
-set_and_check(liblucene++-contrib_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
|
||||
-set(liblucene++-contrib_LIBRARIES "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@contrib_libname@")
|
||||
+set_and_check(liblucene++-contrib_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
||||
+set_and_check(liblucene++-contrib_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_LIBDIR@")
|
||||
+set(liblucene++-contrib_LIBRARIES "@contrib_libname@")
|
||||
diff --git a/src/config/core/CMakeLists.txt b/src/config/core/CMakeLists.txt
|
||||
index a3eb17a1..65376f55 100644
|
||||
--- a/src/config/core/CMakeLists.txt
|
||||
+++ b/src/config/core/CMakeLists.txt
|
||||
@@ -9,7 +9,7 @@ if(NOT WIN32)
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++.pc"
|
||||
- DESTINATION "include/pkgconfig")
|
||||
+ DESTINATION "${LIB_DESTINATION}/pkgconfig")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ endif()
|
||||
configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/liblucene++Config.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++Config.cmake"
|
||||
- INSTALL_DESTINATION "${LIB_DESTINATION}/cmake")
|
||||
+ INSTALL_DESTINATION "${LIB_DESTINATION}/cmake/liblucene++"
|
||||
+ PATH_VARS core_libname PACKAGE_CMAKE_INSTALL_INCLUDEDIR PACKAGE_CMAKE_INSTALL_LIBDIR)
|
||||
|
||||
write_basic_package_version_file(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/liblucene++ConfigVersion.cmake
|
||||
@@ -30,4 +31,4 @@ install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++Config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/liblucene++ConfigVersion.cmake"
|
||||
- DESTINATION "include/cmake")
|
||||
+ DESTINATION "${LIB_DESTINATION}/cmake/liblucene++")
|
||||
diff --git a/src/config/core/liblucene++Config.cmake.in b/src/config/core/liblucene++Config.cmake.in
|
||||
index 89b48a3d..574f8129 100644
|
||||
--- a/src/config/core/liblucene++Config.cmake.in
|
||||
+++ b/src/config/core/liblucene++Config.cmake.in
|
||||
@@ -20,8 +20,8 @@ if (NOT DEFINED set_and_check)
|
||||
endif()
|
||||
|
||||
|
||||
-set_and_check(liblucene++_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@core_libname@")
|
||||
-set_and_check(liblucene++_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
|
||||
-set(liblucene++_LIBRARIES "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@core_libname@")
|
||||
+set_and_check(liblucene++_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
||||
+set_and_check(liblucene++_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_LIBDIR@")
|
||||
+set(liblucene++_LIBRARIES "@core_libname@")
|
||||
|
||||
|
||||
24
lucene++-3.0.8-fix-contrib-soname.patch
Normal file
24
lucene++-3.0.8-fix-contrib-soname.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From 5c06dc53560668606b72fa0e673c9eb96948ff39 Mon Sep 17 00:00:00 2001
|
||||
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
|
||||
Date: Mon, 4 Jan 2021 15:47:21 +0100
|
||||
Subject: [PATCH] CMakeLists.txt: fix typo preventing lucene++-contrib library
|
||||
symlink from being created correctly
|
||||
|
||||
The SONAME/SOVERSION weren't evaluated and set correctly because of the wrong target name.
|
||||
---
|
||||
src/contrib/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/contrib/CMakeLists.txt b/src/contrib/CMakeLists.txt
|
||||
index 46ed8a24..afeccb4e 100644
|
||||
--- a/src/contrib/CMakeLists.txt
|
||||
+++ b/src/contrib/CMakeLists.txt
|
||||
@@ -77,7 +77,7 @@ endif()
|
||||
####################################
|
||||
target_compile_options(lucene++-contrib PRIVATE -DLPP_BUILDING_LIB)
|
||||
|
||||
-set_target_properties(lucene++
|
||||
+set_target_properties(lucene++-contrib
|
||||
PROPERTIES
|
||||
COTIRE_CXX_PREFIX_HEADER_INIT "include/ContribInc.h"
|
||||
CXX_VISIBILITY_PRESET hidden
|
||||
49
lucene++-3.0.8-fix-pc-libdir.patch
Normal file
49
lucene++-3.0.8-fix-pc-libdir.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From 39cd44bd54e918d25ee464477992ad0dc234dcba Mon Sep 17 00:00:00 2001
|
||||
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
|
||||
Date: Mon, 4 Jan 2021 16:29:25 +0100
|
||||
Subject: [PATCH] pkgconfig: use correct LIBDIR for destination library
|
||||
|
||||
---
|
||||
src/config/contrib/liblucene++-contrib.pc.in | 4 ++--
|
||||
src/config/core/liblucene++.pc.in | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/config/contrib/liblucene++-contrib.pc.in b/src/config/contrib/liblucene++-contrib.pc.in
|
||||
index 21026e0a..64c3acac 100644
|
||||
--- a/src/config/contrib/liblucene++-contrib.pc.in
|
||||
+++ b/src/config/contrib/liblucene++-contrib.pc.in
|
||||
@@ -1,13 +1,13 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}/bin
|
||||
-libdir=@LIB_DESTINATION@
|
||||
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/include/lucene++
|
||||
lib=lucene++-contrib
|
||||
|
||||
Name: liblucene++-contrib
|
||||
Description: Contributions for Lucene++ - a C++ search engine, ported from the popular Apache Lucene
|
||||
Version: @lucene++_VERSION@
|
||||
-Libs: -L@LIB_DESTINATION@ -l${lib}
|
||||
+Libs: -L${libdir} -l${lib}
|
||||
Cflags: -I${includedir}
|
||||
Requires: liblucene++ = @lucene++_VERSION@
|
||||
|
||||
diff --git a/src/config/core/liblucene++.pc.in b/src/config/core/liblucene++.pc.in
|
||||
index 32d16ad7..690f7d24 100644
|
||||
--- a/src/config/core/liblucene++.pc.in
|
||||
+++ b/src/config/core/liblucene++.pc.in
|
||||
@@ -1,12 +1,12 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}/bin
|
||||
-libdir=@LIB_DESTINATION@
|
||||
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/include/lucene++
|
||||
lib=lucene++
|
||||
|
||||
Name: liblucene++
|
||||
Description: Lucene++ - a C++ search engine, ported from the popular Apache Lucene
|
||||
Version: @lucene++_VERSION@
|
||||
-Libs: -L@LIB_DESTINATION@ -l${lib}
|
||||
+Libs: -L${libdir} -l${lib}
|
||||
Cflags: -I${includedir}
|
||||
|
||||
3
lucene++-3.0.8.tar.gz
Normal file
3
lucene++-3.0.8.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:af5cf59a93cf6dce86828e108e010359517c25ce487152af68520785d183813c
|
||||
size 2456644
|
||||
@@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 16 16:43:36 UTC 2021 - antoine.belvire@opensuse.org
|
||||
|
||||
- Update to version 3.0.8:
|
||||
* No changelog provided.
|
||||
- Remove 0001-Fix-compilation-with-Boost-1.58.patch: Merged
|
||||
upstream.
|
||||
- Add some patches from upstream, mainly build system fixes:
|
||||
* lucene++-3.0.8-fix-contrib-soname.patch
|
||||
* lucene++-3.0.8-fix-pc-libdir.patch
|
||||
* lucene++-3.0.8-fix-cmake-issues.patch
|
||||
- Require CMake >= 3.5 to build.
|
||||
- Run test suite on build.
|
||||
- Add new cmake files to list of installed files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 26 18:09:24 UTC 2020 - antoine.belvire@opensuse.org
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package lucene++
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,15 +17,20 @@
|
||||
|
||||
|
||||
Name: lucene++
|
||||
Version: 3.0.7
|
||||
Version: 3.0.8
|
||||
Release: 0
|
||||
Summary: A high-performance, full-featured text search engine written in C++
|
||||
License: Apache-2.0 OR LGPL-3.0-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/luceneplusplus/LucenePlusPlus
|
||||
Source: https://github.com/luceneplusplus/LucenePlusPlus/archive/rel_%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch1: 0001-Fix-compilation-with-Boost-1.58.patch
|
||||
BuildRequires: cmake >= 2.8.6
|
||||
Source: https://github.com/luceneplusplus/LucenePlusPlus/archive/rel_%{version}/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM lucene++-3.0.8-fix-contrib-soname.patch -- https://github.com/luceneplusplus/LucenePlusPlus/pull/161
|
||||
Patch0: lucene++-3.0.8-fix-contrib-soname.patch
|
||||
# PATCH-FIX-UPSTREAM lucene++-3.0.8-fix-pc-libdir.patch -- https://github.com/luceneplusplus/LucenePlusPlus/pull/162
|
||||
Patch1: lucene++-3.0.8-fix-pc-libdir.patch
|
||||
# PATCH-FIX-UPSTREAM lucene++-3.0.8-fix-cmake-issues.patch -- https://github.com/luceneplusplus/LucenePlusPlus/pull/163
|
||||
Patch2: lucene++-3.0.8-fix-cmake-issues.patch
|
||||
BuildRequires: cmake >= 3.5
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libboost_filesystem-devel
|
||||
BuildRequires: libboost_iostreams-devel
|
||||
@@ -56,16 +61,28 @@ Requires: liblucene++0 = %{version}
|
||||
Development files for lucene++, a high-performance, full-featured text search engine written in C++
|
||||
|
||||
%prep
|
||||
%setup -q -n LucenePlusPlus-rel_%{version}
|
||||
%patch1 -p1
|
||||
%autosetup -p1 -n LucenePlusPlus-rel_%{version}
|
||||
|
||||
%build
|
||||
%cmake
|
||||
%make_build lucene++
|
||||
%make_build lucene++-contrib
|
||||
%make_build lucene++ lucene++-contrib
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
# These gtest files are not meant to be installed
|
||||
rm -r %{buildroot}%{_includedir}/g{mock,test}
|
||||
rm -r %{buildroot}%{_libdir}/cmake/GTest
|
||||
rm %{buildroot}%{_libdir}/libg{mock,test}*.so
|
||||
rm %{buildroot}%{_libdir}/pkgconfig/g{mock,test}*.pc
|
||||
|
||||
%check
|
||||
# Exclude known failing test on ix86 (https://github.com/luceneplusplus/LucenePlusPlus/issues/98)
|
||||
%ifarch %{ix86}
|
||||
%define test_filter -Boolean2Test.testRandomQueries
|
||||
%endif
|
||||
# Tweak path to allow lucene++-tester to find liblucene++ and libgtest
|
||||
export LD_LIBRARY_PATH="$PWD/build/src/core:$PWD/build/src/contrib:$PWD/build/lib"
|
||||
build/src/test/lucene++-tester %{?test_filter:--gtest_filter=%{test_filter}}
|
||||
|
||||
%post -n liblucene++0 -p /sbin/ldconfig
|
||||
%postun -n liblucene++0 -p /sbin/ldconfig
|
||||
@@ -79,6 +96,8 @@ Development files for lucene++, a high-performance, full-featured text search en
|
||||
%files devel
|
||||
%license COPYING APACHE.license GPL.license LGPL.license
|
||||
%{_includedir}/lucene++/
|
||||
%{_libdir}/cmake/liblucene++/
|
||||
%{_libdir}/cmake/liblucene++-contrib/
|
||||
%{_libdir}/liblucene++.so
|
||||
%{_libdir}/liblucene++-contrib.so
|
||||
%{_libdir}/pkgconfig/liblucene++.pc
|
||||
|
||||
Reference in New Issue
Block a user