Skip to contentSkip to conversation

package/sqlitecpp: new package

PATCH In review Michael Nosthoff via buildroot 1 participant 6 messages Jul 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/sqlitecpp: new package

SQLiteC++ (SQLiteCpp) is a lean and easy to use C++ SQLite3 wrapper.

http://srombauts.github.io/SQLiteCpp/

---
 DEVELOPERS                       |  1 +
 package/Config.in                |  1 +
 package/sqlitecpp/Config.in      |  9 +++++++++
 package/sqlitecpp/sqlitecpp.hash |  3 +++
 package/sqlitecpp/sqlitecpp.mk   | 20 ++++++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/sqlitecpp/Config.in
 create mode 100644 package/sqlitecpp/sqlitecpp.hash
 create mode 100644 package/sqlitecpp/sqlitecpp.mk
DEVELOPERS +1 -0
index 90d1a111ab..dca815cdee 100644
@@ -2277,6 +2277,7 @@ F:	package/networkd-dispatcher/
 F:	package/protobuf/
 F:	package/re2/
 F:	package/spdlog/
+F:	package/sqlitecpp/
 
 N:	Michael Trimarchi <[email protected]>
 F:	board/bsh/
package/Config.in +1 -0
index 48ef1a6fdc..27710d18f3 100644
@@ -1611,6 +1611,7 @@ endif
 	source "package/rocksdb/Config.in"
 	source "package/sqlcipher/Config.in"
 	source "package/sqlite/Config.in"
+	source "package/sqlitecpp/Config.in"
 	source "package/timescaledb/Config.in"
 	source "package/unixodbc/Config.in"
 endmenu
package/sqlitecpp/Config.in new file +9 -0
new file mode 100644
index 0000000000..02b2d8989c
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_SQLITECPP
+	bool "SQLiteC++"
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA
+	help
+	  SQLiteC++ (SQLiteCpp) is a lean and easy to use
+	  C++ SQLite3 wrapper.
+
+	  https://github.com/SRombauts/SQLiteCpp
package/sqlitecpp/sqlitecpp.hash new file +3 -0
new file mode 100644
index 0000000000..7b42d38280
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  71f990f9fb4b004533b6859ce40729af823b87fe691dd99ca084a7fd40db54b9  3.3.1.tar.gz
+sha256  635de1440f6064c6ca9ca325c163d4d0771e783c6d77783d9470eaf56e346c67  LICENSE.txt
package/sqlitecpp/sqlitecpp.mk new file +20 -0
new file mode 100644
index 0000000000..bb1caa0f39
@@ -0,0 +1,20 @@
+################################################################################
+#
+# SQLiteC++
+#
+################################################################################
+
+SQLITECPP_VERSION = 3.3.1
+SQLITECPP_SOURCE = $(SQLITECPP_VERSION).tar.gz
+SQLITECPP_SITE = $(call github,SRombauts,SQLiteCpp,$(SQLITECPP_VERSION))
+SQLITECPP_LICENSE = MIT
+SQLITECPP_LICENSE_FILES = LICENSE.txt
+SQLITECPP_DEPENDENCIES = sqlite
+SQLITECPP_INSTALL_STAGING = YES
+
+SQLITECPP_CONF_OPTS = \
+	-DSQLITECPP_INTERNAL_SQLITE=OFF \
+	-DSQLITECPP_RUN_CPPLINT=OFF \
+	-DSQLITECPP_RUN_CPPCHECK=OFF
+
+$(eval $(cmake-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Michael,

Quoted 5 lines · On Wed, 10 Jul 2024 10:13:47 +0200 Michael Nosthoff via buildroot…

SQLiteC++ (SQLiteCpp) is a lean and easy to use C++ SQLite3 wrapper.

http://srombauts.github.io/SQLiteCpp/

Thanks, I have applied after doing some changes, see below.

package/sqlitecpp/Config.in line 2

Quoted 8 lines
package/sqlitecpp/Config.in new file +2 -0
new file mode 100644
index 0000000000..02b2d8989c
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_SQLITECPP
+	bool "SQLiteC++"

Changed to:

bool "sqlitecpp"

Indeed, we really want the prompt to be the same as the package name.

package/sqlitecpp/Config.in line 4

Quoted 2 lines
package/sqlitecpp/Config.in new file +2 -0
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA

Since it's written in C++, you forgot:

depends on BR2_INSTALL_LIBSDCPP

and the corresponding Config.in comment saying that the toolchain needs to have C++ support.

Quoted 6 lines
package/sqlitecpp/sqlitecpp.mk new file +0 -0
new file mode 100644
index 0000000000..bb1caa0f39

package/sqlitecpp/sqlitecpp.mk line 8

Quoted 8 lines
package/sqlitecpp/sqlitecpp.mk new file +8 -0
@@ -0,0 +1,20 @@
+################################################################################
+#
+# SQLiteC++
+#
+################################################################################
+
+SQLITECPP_VERSION = 3.3.1
+SQLITECPP_SOURCE = $(SQLITECPP_VERSION).tar.gz

This _SOURCE variable was not needed, the default is good enough.

package/sqlitecpp/sqlitecpp.mk line 20

Quoted 12 lines
package/sqlitecpp/sqlitecpp.mk new file +12 -0
+SQLITECPP_SITE = $(call github,SRombauts,SQLiteCpp,$(SQLITECPP_VERSION))
+SQLITECPP_LICENSE = MIT
+SQLITECPP_LICENSE_FILES = LICENSE.txt
+SQLITECPP_DEPENDENCIES = sqlite
+SQLITECPP_INSTALL_STAGING = YES
+
+SQLITECPP_CONF_OPTS = \
+	-DSQLITECPP_INTERNAL_SQLITE=OFF \
+	-DSQLITECPP_RUN_CPPLINT=OFF \
+	-DSQLITECPP_RUN_CPPCHECK=OFF
+
+$(eval $(cmake-package))

Again: applied with those changes. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hi Thomas,

thanks for applying so quickly.

Quoted 34 lines · Thomas Petazzoni

Hello Michael,

Quoted 5 lines · On Wed, 10 Jul 2024 10:13:47 +0200 Michael Nosthoff via buildroot…

SQLiteC++ (SQLiteCpp) is a lean and easy to use C++ SQLite3 wrapper.

http://srombauts.github.io/SQLiteCpp/

Thanks, I have applied after doing some changes, see below.

package/sqlitecpp/Config.in line 2

Quoted 8 lines
package/sqlitecpp/Config.in new file +2 -0
new file mode 100644
index 0000000000..02b2d8989c
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_SQLITECPP
+	bool "SQLiteC++"

Changed to:

bool "sqlitecpp"

Indeed, we really want the prompt to be the same as the package name.

package/sqlitecpp/Config.in line 4

Quoted 2 lines
package/sqlitecpp/Config.in new file +2 -0
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA

Since it's written in C++, you forgot:

Quoted 5 lines

depends on BR2_INSTALL_LIBSDCPP

and the corresponding Config.in comment saying that the toolchain needs to have C++ support.

I totally forgot about this, thanks for fixing.

One additional thing: This library requires C++11, I think all compilers we have currently in buildroot should be recent enough to support it. Or do we need a gcc version check here as well?

Related: I'm currently looking at bumping boost. And in the last versions many libs dropped their support for C++98. So if we could just rely on the availability of C++11 this would make this much easier.

Regards,
Michael

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Hello Michael,

Quoted 2 lines · On Wed, 10 Jul 2024 11:16:24 +0200 "Michael Nosthoff" <[email protected]>…

One additional thing: This library requires C++11, I think all compilers we have currently in buildroot should be recent enough to support it. Or do we need a gcc version check here as well?

We need a gcc version check. Which version depends on which C++11 features are used. Some packages need gcc 4.7, some gcc 4.8, some gcc 4.9:

package/cli11/Config.in:        depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
package/clpeak/Config.in:       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
package/cutelyst/Config.in:     depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
package/docopt-cpp/Config.in:   depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
package/edid-decode/Config.in:  depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
package/efl/Config.in:  depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11

etc.

some even need gcc 5.x:

package/qt5/Config.in: depends on BR2_HOST_GCC_AT_LEAST_5 # Full C++11

Quoted 2 lines

Related: I'm currently looking at bumping boost. And in the last versions many libs dropped their support for C++98. So if we could just rely on the availability of C++11 this would make this much easier.

If that also requires a gcc version dependency, then we would have to add it to Boost, and then to all its reverse dependencies:

package/azmq/Config.in: select BR2_PACKAGE_BOOST
package/bitcoin/Config.in:      select BR2_PACKAGE_BOOST
package/cc-tool/Config.in:      select BR2_PACKAGE_BOOST
package/domoticz/Config.in:     select BR2_PACKAGE_BOOST
package/gnuradio/Config.in:     select BR2_PACKAGE_BOOST
package/gqrx/Config.in: select BR2_PACKAGE_BOOST
package/i2pd/Config.in: select BR2_PACKAGE_BOOST
package/libcamera-apps/Config.in:       select BR2_PACKAGE_BOOST
package/libcamera/Config.in:    select BR2_PACKAGE_BOOST
package/libcpprestsdk/Config.in:        select BR2_PACKAGE_BOOST
package/libftdi/Config.in:      select BR2_PACKAGE_BOOST
package/libftdi1/Config.in:     select BR2_PACKAGE_BOOST
package/libosmium/Config.in:    select BR2_PACKAGE_BOOST
package/libserial/Config.in:    select BR2_PACKAGE_BOOST
package/libtorrent-rasterbar/Config.in: select BR2_PACKAGE_BOOST
package/mongodb/Config.in:      select BR2_PACKAGE_BOOST
package/mpd/Config.in:  select BR2_PACKAGE_BOOST
package/osm2pgsql/Config.in:    select BR2_PACKAGE_BOOST
package/pulseview/Config.in:    select BR2_PACKAGE_BOOST
package/python-libconfig/Config.in:     select BR2_PACKAGE_BOOST
package/resiprocate/Config.in:  select BR2_PACKAGE_BOOST
package/supertux/Config.in:     select BR2_PACKAGE_BOOST
package/thrift/Config.in:       select BR2_PACKAGE_BOOST
package/uhd/Config.in:  select BR2_PACKAGE_BOOST
package/zmqpp/Config.in:        select BR2_PACKAGE_BOOST

and then recursively to their reverse dependencies. It's a bit of work, but I believe it's inevitable that at some point Boost, being a complex C++ library, will require a certain version of gcc.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Hi Thomas, all,

Quoted 11 lines · Thomas Petazzoni

Hello Michael,

Quoted 2 lines · On Wed, 10 Jul 2024 11:16:24 +0200 "Michael Nosthoff" <[email protected]>…

One additional thing: This library requires C++11, I think all compilers we have currently in buildroot should be recent enough to support it. Or do we need a gcc version check here as well?

We need a gcc version check. Which version depends on which C++11 features are used. Some packages need gcc 4.7, some gcc 4.8, some gcc 4.9:

then I will prepare a patch for this package.

Quoted 11 lines
package/cli11/Config.in:        depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
package/clpeak/Config.in:       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
package/cutelyst/Config.in:     depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
package/docopt-cpp/Config.in:   depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
package/edid-decode/Config.in:  depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
package/efl/Config.in:  depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11

etc.

some even need gcc 5.x:

Quoted 8 lines

package/qt5/Config.in: depends on BR2_HOST_GCC_AT_LEAST_5 # Full C++11

Quoted 2 lines

Related: I'm currently looking at bumping boost. And in the last versions many libs dropped their support for C++98. So if we could just rely on the availability of C++11 this would make this much easier.

If that also requires a gcc version dependency, then we would have to add it to Boost, and then to all its reverse dependencies:

that's what I feared. Do you have some advice on how to test with gcc 4.7/4.7/4.9? The oldest toolchain on bootlin I can find is gcc 5.4. Is there any other toolchain located somewhere with an older gcc?

Regards,
Michael

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

Hello,

Quoted 5 lines · On Wed, 10 Jul 2024 17:42:28 +0200 "Michael Nosthoff" <[email protected]>…
Quoted 3 lines

We need a gcc version check. Which version depends on which C++11 features are used. Some packages need gcc 4.7, some gcc 4.8, some gcc 4.9:

then I will prepare a patch for this package.

OK. Make sure to figure out exactly which gcc version is needed :-)

Quoted 3 lines

that's what I feared. Do you have some advice on how to test with gcc 4.7/4.7/4.9? The oldest toolchain on bootlin I can find is gcc 5.4. Is there any other toolchain located somewhere with an older gcc?

You can find a collection of old toolchains
at http://autobuild.buildroot.net/toolchains/tarballs/ for example. But not sure they are sufficiently old in fact :/

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot