- Change build system from meson to CMake. Some dependent packages
(e.g. OpenMS) require CMake config files. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/SQLiteCpp?expand=0&rev=11
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 3 22:30:04 UTC 2026 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Change build system from meson to CMake. Some dependent packages
|
||||
(e.g. OpenMS) require CMake config files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 21 15:22:28 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Update to version 3.3.3:
|
||||
* Replace all double-quoted string literals by single quotes in
|
||||
unit test (gh#SRombauts/SQLiteCpp#483).
|
||||
* Add logic to use different FindPackage for python if cmake is
|
||||
above 3.12 (gh#SRombauts/SQLiteCpp#454).
|
||||
* tests/Database_test.cpp: fix a warning around #endif
|
||||
(gh#SRombauts/SQLiteCpp#489).
|
||||
* SQLiteCpp/Statement.h: add missing <cstdint> include
|
||||
(gh#SRombauts/SQLiteCpp#488).
|
||||
* sqlite3: set SQLITE_OMIT_LOAD_EXTENSION
|
||||
(gh#SRombauts/SQLiteCpp#496).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 17 13:59:46 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Update to version 3.3.2:
|
||||
* Explicitly =delete; Statement::bindNoCopy(..., std::string&&)
|
||||
(gh#SRombauts/SQLiteCpp#469).
|
||||
* Update SQLite from 3.43.0 to 3.45.3 (2024-04-15)
|
||||
(gh#SRombauts/SQLiteCpp#461).
|
||||
* Update SQLite from 3.45.3 to 3.46.1 (2024-08-13)
|
||||
(gh#SRombauts/SQLiteCpp#477).
|
||||
* Update SQLiteCpp meson wrap file to latest release 3.3.1
|
||||
(gh#SRombauts/SQLiteCpp#447).
|
||||
* [Meson] update meson dependencies
|
||||
(gh#SRombauts/SQLiteCpp#448).
|
||||
* Update meson dependencies [Meson only]
|
||||
(gh#SRombauts/SQLiteCpp#475).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 25 10:18:18 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Use c++14 standard to build, to avoid build failures against
|
||||
gtest >= 1.14
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 6 19:06:49 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Initial package.
|
||||
@@ -0,0 +1,93 @@
|
||||
#
|
||||
# spec file for package SQLiteCpp
|
||||
#
|
||||
# Copyright (c) 2026 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define shlib libsqlitecpp0
|
||||
Name: SQLiteCpp
|
||||
Version: 3.3.3
|
||||
Release: 0
|
||||
Summary: A C++ SQLite3 wrapper
|
||||
License: MIT
|
||||
URL: https://srombauts.github.io/SQLiteCpp
|
||||
Source: https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch0: 0001-Fix-required-C-version-for-CMake-builds.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: 0001-Generate-pkgconfig-file-also-from-CMake-build.patch
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gtest
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
|
||||
%description
|
||||
SQLiteC++ (SQLiteCpp) is a C++ SQLite3 wrapper. It offers
|
||||
an encapsulation around the native C APIs of SQLite, with a few intuitive and
|
||||
well documented C++ classes.
|
||||
|
||||
%package -n %{shlib}
|
||||
Summary: C++ wrapper for SQLite3
|
||||
|
||||
%description -n %{shlib}
|
||||
This package provides the shared library for SQLiteCpp.
|
||||
|
||||
%package devel
|
||||
Summary: Headers and sources for SQLiteCpp, a C++ SQLite wrapper
|
||||
Requires: %{shlib} = %{version}
|
||||
Requires: pkgconfig(sqlite3)
|
||||
|
||||
%description devel
|
||||
This package provides the headers and sources for developing against SQLiteCpp.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
sed -iE "s/\r$//" README.md
|
||||
# Make SONAME lowercase for compatibility with meson build - https://github.com/SRombauts/SQLiteCpp/issues/542
|
||||
echo 'set_property(TARGET SQLiteCpp PROPERTY OUTPUT_NAME "sqlitecpp")' >> CMakeLists.txt
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DSQLITECPP_INTERNAL_SQLITE:BOOL=false \
|
||||
-DSQLITE_ENABLE_COLUMN_METADATA=true \
|
||||
-DSQLITECPP_BUILD_TESTS=true \
|
||||
-DSQLITECPP_BUILD_EXAMPLES=true \
|
||||
%{nil}
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
# Remove ROS specific file
|
||||
rm %{buildroot}%{_datadir}/%{name}/package.xml
|
||||
|
||||
%check
|
||||
%ctest --parallel 1
|
||||
|
||||
%ldconfig_scriptlets -n %{shlib}
|
||||
|
||||
%files -n %{shlib}
|
||||
%license LICENSE.txt
|
||||
%{_libdir}/lib*.so.0
|
||||
|
||||
%files devel
|
||||
%license LICENSE.txt
|
||||
%doc CHANGELOG.md README.md
|
||||
%{_includedir}/%{name}/
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_libdir}/cmake/SQLiteCpp
|
||||
|
||||
%changelog
|
||||
@@ -0,0 +1,24 @@
|
||||
*.changes merge=merge-changes
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -0,0 +1,4 @@
|
||||
*.obscpio
|
||||
*.osc
|
||||
_build.*
|
||||
.pbuild
|
||||
@@ -0,0 +1,75 @@
|
||||
From 242cec703bbae5ac33862db483e7a9c968deb133 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Fri, 3 Apr 2026 21:59:14 +0200
|
||||
Subject: [PATCH] Fix required C++ version for CMake builds
|
||||
|
||||
Current GTest versions required C++14 or C++17, so set the appropriate
|
||||
version in the compile_features.
|
||||
|
||||
Also change the library from using CMAKE_CXX_STANDARD to the equivalent
|
||||
target_compile_features. This avoids downgrading the used standard
|
||||
version and is properly exported to CMake Target.
|
||||
---
|
||||
CMakeLists.txt | 23 +++++++++++------------
|
||||
1 file changed, 11 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c23d634..9d853c9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -8,15 +8,6 @@ cmake_minimum_required(VERSION 3.5...4.0)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # custom CMake modules like FindSQLiteCpp
|
||||
project(SQLiteCpp VERSION 3.3.3)
|
||||
|
||||
-# SQLiteC++ 3.x requires C++11 features
|
||||
-if (NOT CMAKE_CXX_STANDARD)
|
||||
- set(CMAKE_CXX_STANDARD 11)
|
||||
-elseif (CMAKE_CXX_STANDARD LESS 11)
|
||||
- message(WARNING "CMAKE_CXX_STANDARD has been set to '${CMAKE_CXX_STANDARD}' which is lower than the minimum required standard (c++11).")
|
||||
-endif ()
|
||||
-message(STATUS "Using c++ standard c++${CMAKE_CXX_STANDARD}")
|
||||
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
-
|
||||
message (STATUS "CMake version: ${CMAKE_VERSION}")
|
||||
message (STATUS "Project version: ${PROJECT_VERSION}")
|
||||
|
||||
@@ -212,6 +203,8 @@ endif()
|
||||
|
||||
# add sources of the wrapper as a "SQLiteCpp" static library
|
||||
add_library(SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})
|
||||
+# SQLiteC++ 3.x requires C++11 features
|
||||
+target_compile_features(SQLiteCpp PUBLIC cxx_std_11)
|
||||
|
||||
# Options relative to SQLite and SQLiteC++ functions
|
||||
|
||||
@@ -475,10 +468,15 @@ if (SQLITECPP_BUILD_TESTS)
|
||||
target_link_libraries(SQLiteCpp_tests SQLiteCpp)
|
||||
|
||||
find_package(GTest)
|
||||
- if (GTEST_FOUND)
|
||||
+ if (GTest_FOUND)
|
||||
message(STATUS "Link to GTest system library")
|
||||
target_link_libraries(SQLiteCpp_tests GTest::GTest GTest::Main)
|
||||
- else (GTEST_FOUND)
|
||||
+ if (GTest_VERSION AND (GTest_VERSION VERSION_LESS 1.17))
|
||||
+ target_compile_features(SQLiteCpp_tests PRIVATE cxx_std_14)
|
||||
+ else()
|
||||
+ target_compile_features(SQLiteCpp_tests PRIVATE cxx_std_17)
|
||||
+ endif()
|
||||
+ else (GTest_FOUND)
|
||||
message(STATUS "Compile googletest from source in submodule")
|
||||
# deactivate some warnings for compiling the googletest library
|
||||
if (NOT MSVC)
|
||||
@@ -505,7 +503,8 @@ if (SQLITECPP_BUILD_TESTS)
|
||||
endif (MSVC)
|
||||
|
||||
target_link_libraries(SQLiteCpp_tests gtest_main)
|
||||
- endif (GTEST_FOUND)
|
||||
+ target_compile_features(SQLiteCpp_tests PUBLIC cxx_std_17)
|
||||
+ endif (GTest_FOUND)
|
||||
|
||||
# add a "test" target:
|
||||
enable_testing()
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 613e338c59aa92d53d7a88f96aabc684dc1eeac4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Fri, 3 Apr 2026 22:31:16 +0200
|
||||
Subject: [PATCH] Generate pkgconfig file also from CMake build
|
||||
|
||||
---
|
||||
CMakeLists.txt | 10 ++++++++++
|
||||
cmake/sqlitecpp.pc.in | 11 +++++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
create mode 100644 cmake/sqlitecpp.pc.in
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9d853c9..c2b048d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -381,6 +381,17 @@ if (SQLITECPP_INSTALL)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||
+
|
||||
+cmake_path(
|
||||
+ RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR
|
||||
+ BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX}
|
||||
+ OUTPUT_VARIABLE PC_RELATIVE_LIBDIR)
|
||||
+string(JOIN " -l" PC_LIBS_PRIVATE "" ${CMAKE_DL_LIBS})
|
||||
+string(PREPEND PC_LIBS_PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
||||
+configure_file(cmake/sqlitecpp.pc.in cmake/sqlitecpp.pc @ONLY)
|
||||
+install(FILES
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake/sqlitecpp.pc
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/)
|
||||
|
||||
# Optional additional targets:
|
||||
|
||||
diff --git a/cmake/sqlitecpp.pc.in b/cmake/sqlitecpp.pc.in
|
||||
new file mode 100644
|
||||
index 0000000..d964000
|
||||
--- /dev/null
|
||||
+++ b/cmake/sqlitecpp.pc.in
|
||||
@@ -0,0 +1,11 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+includedir=${prefix}/include
|
||||
+libdir=${prefix}/@PC_RELATIVE_LIBDIR@
|
||||
+
|
||||
+Name: sqlitecpp
|
||||
+Description: a smart and easy to use C++ SQLite3 wrapper.
|
||||
+Version: @PROJECT_VERSION@
|
||||
+Requires.private: sqlite3
|
||||
+Libs: -L${libdir} -lsqlitecpp
|
||||
+Libs.private: @PC_LIBS_PRIVATE@
|
||||
+Cflags: -I${includedir}
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:33bd4372d83bc43117928ee842be64d05e7807f511b5195f85d30015cad9cac6
|
||||
size 2733063
|
||||
Reference in New Issue
Block a user