Skip to contentSkip to conversation

ODB: C++ Object-Relational Mapping (ORM): New packages.

PATCH Superseded Kamel Bouhara 2 participants 11 messages May 19, 2020 – May 25, 2020

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover ODB: C++ Object-Relational Mapping (ORM): New packages.

ODB is an open-source, cross-platform, and cross-database object-relational mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL and without manually writing any mapping code. ODB supports MySQL, SQLite, PostgreSQL, Oracle, and Microsoft SQL Server relational databases as well as C++98/03 and C++11 language standards.

It also comes with optional profiles for Boost and Qt which allow you to seamlessly use value types, containers, and smart pointers from these libraries in your persistent C++ classes.

There are three main components to use ODB (and a single dependency):

- libcutl: This library is ODB's only dependency.

- odb: This is a compiler that takes a specially crafted c++ header file and auto-generates a schema that works with libodb and the subsequent libodb-database library.

It would be used as such: odb -d <database> --generate-query --generate-schema file.hxx

- libodb: This package contains the common ODB runtime library. Every application that includes code generated by the ODB compiler will need to link to this library.

- libodb-pgsql: This package contains the PostgreSQL ODB runtime library.

- libodb-mysql: This package contains the MySQL ODB runtime library.

- libodb-boost: This package contains the Boost ODB runtime library.

Every application that includes code generated for the PostgreSQL, MySQL or Boost, will need to link to those libraries.

Adam Duskett (4):
package/libcutl: new package
package/odb: new package
package/libodb: new package
package/libodb-pgsql: new package

Kamel Bouhara (4):
support/dependencies: check that host have gcc plugin headers Config.in: add BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT package/libodb-mysql: new package package/libodb-boost: new package

 Config.in                                     |   5 +
 DEVELOPERS                                    |   8 +
 package/Config.in                             |   4 +
 package/Config.in.host                        |   1 +
 package/libcutl/libcutl.hash                  |   6 +
 package/libcutl/libcutl.mk                    |  15 +
 package/libodb-boost/Config.in                |  16 +
 package/libodb-boost/libodb-boost.hash        |   7 +
 package/libodb-boost/libodb-boost.mk          |  16 +
 ...-syntax-issue-while-checking-ldflags.patch |  35 ++
 package/libodb-mysql/Config.in                |  16 +
 package/libodb-mysql/libodb-mysql.hash        |   4 +
 package/libodb-mysql/libodb-mysql.mk          |  16 +
 package/libodb-pgsql/Config.in                |  16 +
 package/libodb-pgsql/libodb-pgsql.hash        |   6 +
 package/libodb-pgsql/libodb-pgsql.mk          |  16 +
 package/libodb/Config.in                      |  13 +
 package/libodb/libodb.hash                    |   6 +
 package/libodb/libodb.mk                      |  15 +
 package/odb/0001-no-need-of-tm.h.patch        |  32 ++
 .../odb/0002-Remove-gratuitous-classes.patch  | 444 ++++++++++++++++++
 ...rk-to-make-ODB-compatible-with-GCC-6.patch | 311 ++++++++++++
 ...e-compilable-with-GCC-6-in-C-14-mode.patch |  47 ++
 ...-in-GCC-6-input_location-translation.patch |  33 ++
 .../odb/0006-Adapt-to-changes-in-GCC-8.patch  | 226 +++++++++
 ...itch-to-C-11-get-rid-of-auto_ptr-use.patch | 350 ++++++++++++++
 ...tion-to-be-compatible-with-previous-.patch |  32 ++
 ...espace-aliases-when-parsing-GCC-tree.patch |  29 ++
 .../0010-Add-initial-support-for-GCC-9.patch  | 232 +++++++++
 package/odb/Config.in.host                    |   7 +
 package/odb/odb.hash                          |   6 +
 package/odb/odb.mk                            |  20 +
 package/odb/series                            |  10 +
 support/dependencies/dependencies.sh          |  10 +
 34 files changed, 2010 insertions(+)
 create mode 100644 package/libcutl/libcutl.hash
 create mode 100644 package/libcutl/libcutl.mk
 create mode 100644 package/libodb-boost/Config.in
 create mode 100644 package/libodb-boost/libodb-boost.hash
 create mode 100644 package/libodb-boost/libodb-boost.mk
 create mode 100644 package/libodb-mysql/0001-fix-syntax-issue-while-checking-ldflags.patch
 create mode 100644 package/libodb-mysql/Config.in
 create mode 100644 package/libodb-mysql/libodb-mysql.hash
 create mode 100644 package/libodb-mysql/libodb-mysql.mk
 create mode 100644 package/libodb-pgsql/Config.in
 create mode 100644 package/libodb-pgsql/libodb-pgsql.hash
 create mode 100644 package/libodb-pgsql/libodb-pgsql.mk
 create mode 100644 package/libodb/Config.in
 create mode 100644 package/libodb/libodb.hash
 create mode 100644 package/libodb/libodb.mk
 create mode 100644 package/odb/0001-no-need-of-tm.h.patch
 create mode 100644 package/odb/0002-Remove-gratuitous-classes.patch
 create mode 100644 package/odb/0003-Initial-work-to-make-ODB-compatible-with-GCC-6.patch
 create mode 100644 package/odb/0004-Make-compilable-with-GCC-6-in-C-14-mode.patch
 create mode 100644 package/odb/0005-Fix-bug-in-GCC-6-input_location-translation.patch
 create mode 100644 package/odb/0006-Adapt-to-changes-in-GCC-8.patch
 create mode 100644 package/odb/0007-Switch-to-C-11-get-rid-of-auto_ptr-use.patch
 create mode 100644 package/odb/0008-Fix-GCC-8-adaptation-to-be-compatible-with-previous-.patch
 create mode 100644 package/odb/0009-Handle-namespace-aliases-when-parsing-GCC-tree.patch
 create mode 100644 package/odb/0010-Add-initial-support-for-GCC-9.patch
 create mode 100644 package/odb/Config.in.host
 create mode 100644 package/odb/odb.hash
 create mode 100644 package/odb/odb.mk
 create mode 100644 package/odb/series

--
2.25.0

#1 lore raw

PATCH 1/8 package/libcutl: new package

From: Adam Duskett <[email protected]>

libcutl is distributed in source code and includes the standard autotools build system as well as the VC++ project files. It is a dependency for odb.

Because ODB is a host-only package, and no other package depends on libcutl, this package will also be a host-only package.

---
 DEVELOPERS                   |  1 +
 package/libcutl/libcutl.hash |  6 ++++++
 package/libcutl/libcutl.mk   | 15 +++++++++++++++
 3 files changed, 22 insertions(+)
 create mode 100644 package/libcutl/libcutl.hash
 create mode 100644 package/libcutl/libcutl.mk
DEVELOPERS +1 -0
index dd44331b85..e64b90a1aa 100644
@@ -42,6 +42,7 @@ F:	package/imx-usb-loader/
 F:	package/janus-gateway/
 F:	package/json-for-modern-cpp/
 F:	package/libcpprestsdk/
+F:	package/libcutl/
 F:	package/libressl/
 F:	package/libselinux/
 F:	package/libsemanage/
package/libcutl/libcutl.hash new file +6 -0
new file mode 100644
index 0000000000..1e0baa7f6e
@@ -0,0 +1,6 @@
+# From https://www.codesynthesis.com/download/libcutl/1.10/libcutl-1.10.0.tar.bz2.sha1
+sha1	2885b79529f8caeb13687d722f5c114186f56956	libcutl-1.10.0.tar.bz2
+
+# Locally Computed
+sha256	125163c670e372b47d5626d54379ff8fbaded6ccd5db77ac0bf5912a4017121c	libcutl-1.10.0.tar.bz2
+sha256	c7aa98c5af3b67174f16b12a1fed4332a51cd524b82c69e85baa4c2c412da239	LICENSE
package/libcutl/libcutl.mk new file +15 -0
new file mode 100644
index 0000000000..49c05e6019
@@ -0,0 +1,15 @@
+################################################################################
+#
+# libcutl
+#
+################################################################################
+
+LIBCUTL_VERSION_MAJOR = 1.10
+LIBCUTL_VERSION = $(LIBCUTL_VERSION_MAJOR).0
+LIBCUTL_SOURCE = libcutl-$(LIBCUTL_VERSION).tar.bz2
+LIBCUTL_SITE = https://www.codesynthesis.com/download/libcutl/$(LIBCUTL_VERSION_MAJOR)
+LIBCUTL_INSTALL_STAGING = YES
+LIBCUTL_LICENSE = MIT
+LIBCUTL_LICENSE_FILES = LICENSE
+
+$(eval $(host-autotools-package))
Signature · 1 line
2.25.0
#2 lore raw

PATCH 2/8 support/dependencies: check that host have gcc plugin headers

In reply to Kamel Bouhara

Some packages requires host gcc headers to build gcc plugins. This checks they are indeed installed.

---
 support/dependencies/dependencies.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
support/dependencies/dependencies.sh +10 -0
index 98469bd70c..fcf52818f1 100755
@@ -240,6 +240,16 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
 	fi
 fi
 
+if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
+	if ! echo "#include <gcc-plugin.h>" | g++ -I$(g++ -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then
+		echo
+		echo "Your Buildroot configuration needs a compiler capable of building gcc plugins."
+		echo "If you're running a Debian/Ubuntu distribution, install gcc-X-plugin-dev package."
+		echo "For other distributions, refer to their documentation."
+		exit 1 ;
+	fi
+fi
+
 # Check that the Perl installation is complete enough for Buildroot.
 required_perl_modules="Data::Dumper" # Needed to build host-autoconf
 required_perl_modules="$required_perl_modules ExtUtils::MakeMaker" # Used by host-libxml-parser-perl
Signature · 1 line
2.25.0
#3 lore raw

PATCH 2/8 support/dependencies: check that host have gcc plugin headers

Quoted 4 lines · On Tue, 19 May 2020 09:28:44 +0200 Kamel Bouhara <[email protected]>…

Some packages requires host gcc headers to build gcc plugins. This checks they are indeed installed.

This should have been squashed with PATCH 3/8.

support/dependencies/dependencies.sh if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then · line 244

Quoted 10 lines
support/dependencies/dependencies.sh +2 -0
index 98469bd70c..fcf52818f1 100755
@@ -240,6 +240,16 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
 	fi
 fi
 
+if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
+	if ! echo "#include <gcc-plugin.h>" | g++ -I$(g++ -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then

use $HOSTCXX_NOCCACHE instead of g++.

No need to send a new iteration just for that, it can be fixed when applying.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 2/8 support/dependencies: check that host have gcc plugin headers

Quoted 10 lines · Thomas Petazzoni
Quoted 4 lines · On Tue, 19 May 2020 09:28:44 +0200 Kamel Bouhara <[email protected]>…

Some packages requires host gcc headers to build gcc plugins. This checks they are indeed installed.

This should have been squashed with PATCH 3/8.

My bad I did not understood that.

Quoted 8 lines
Quoted 8 lines
support/dependencies/dependencies.sh +0 -0
index 98469bd70c..fcf52818f1 100755
@@ -240,6 +240,16 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
 	fi
 fi
 
Quoted 8 lines

support/dependencies/dependencies.sh if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then · line 244

Quoted 2 lines
support/dependencies/dependencies.sh +2 -0
+if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
+	if ! echo "#include <gcc-plugin.h>" | g++ -I$(g++ -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then

use $HOSTCXX_NOCCACHE instead of g++.

No need to send a new iteration just for that, it can be fixed when applying.

OK, thanks.

Kamel

Quoted 11 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

#5 lore raw

PATCH 3/8 Config.in: add BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT

In reply to Kamel Bouhara

In preparation to the addition of new dependencies in the odb package, add the BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT symbol.

---
 Config.in | 5 +++++
 1 file changed, 5 insertions(+)
Config.in +5 -0
index 48fd36ff98..e056498bd5 100644
@@ -80,6 +80,11 @@ config BR2_HOSTARCH_NEEDS_IA32_COMPILER
 config BR2_NEEDS_HOST_UTF8_LOCALE
 	bool
 
+# Hidden boolean selected by packages that need the host for building
+# gcc plugins
+config BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT
+	bool
+
 source "arch/Config.in"
 
 menu "Build options"
Signature · 1 line
2.25.0
#6 lore raw

PATCH 4/8 package/odb: new package

In reply to Kamel Bouhara

From: Adam Duskett <[email protected]>

ODB is an open-source, cross-platform, and cross-database object-relational
mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL and without manually writing any mapping code.

ODB supports MySQL, SQLite, PostgreSQL, Oracle, and Microsoft SQL Server relational databases as well as C++98/03 and C++11 language standards. It also comes with optional profiles for Boost and Qt which allow you to seamlessly use value types, containers, and smart pointers from these libraries in your persistent C++ classes.

This package is used for auto-generating ODB specific header files into useable code that can be linked against a seperate libodb and a specific libodb database library. As such, it is only needed as a host program and is not user selectable.

[Kamel: Fix incorrect odb license]
---
 DEVELOPERS                                    |   1 +
 package/Config.in.host                        |   1 +
 package/odb/0001-no-need-of-tm.h.patch        |  32 ++
 .../odb/0002-Remove-gratuitous-classes.patch  | 444 ++++++++++++++++++
 ...rk-to-make-ODB-compatible-with-GCC-6.patch | 311 ++++++++++++
 ...e-compilable-with-GCC-6-in-C-14-mode.patch |  47 ++
 ...-in-GCC-6-input_location-translation.patch |  33 ++
 .../odb/0006-Adapt-to-changes-in-GCC-8.patch  | 226 +++++++++
 ...itch-to-C-11-get-rid-of-auto_ptr-use.patch | 350 ++++++++++++++
 ...tion-to-be-compatible-with-previous-.patch |  32 ++
 ...espace-aliases-when-parsing-GCC-tree.patch |  29 ++
 .../0010-Add-initial-support-for-GCC-9.patch  | 232 +++++++++
 package/odb/Config.in.host                    |   7 +
 package/odb/odb.hash                          |   6 +
 package/odb/odb.mk                            |  20 +
 package/odb/series                            |  10 +
 16 files changed, 1781 insertions(+)
 create mode 100644 package/odb/0001-no-need-of-tm.h.patch
 create mode 100644 package/odb/0002-Remove-gratuitous-classes.patch
 create mode 100644 package/odb/0003-Initial-work-to-make-ODB-compatible-with-GCC-6.patch
 create mode 100644 package/odb/0004-Make-compilable-with-GCC-6-in-C-14-mode.patch
 create mode 100644 package/odb/0005-Fix-bug-in-GCC-6-input_location-translation.patch
 create mode 100644 package/odb/0006-Adapt-to-changes-in-GCC-8.patch
 create mode 100644 package/odb/0007-Switch-to-C-11-get-rid-of-auto_ptr-use.patch
 create mode 100644 package/odb/0008-Fix-GCC-8-adaptation-to-be-compatible-with-previous-.patch
 create mode 100644 package/odb/0009-Handle-namespace-aliases-when-parsing-GCC-tree.patch
 create mode 100644 package/odb/0010-Add-initial-support-for-GCC-9.patch
 create mode 100644 package/odb/Config.in.host
 create mode 100644 package/odb/odb.hash
 create mode 100644 package/odb/odb.mk
 create mode 100644 package/odb/series
DEVELOPERS +1 -0
index e64b90a1aa..66ce95b4e1 100644
@@ -50,6 +50,7 @@ F:	package/libsepol/
 F:	package/libwebsockets/
 F:	package/mender-grubenv/
 F:	package/nginx-naxsi/
+F:	package/odb/
 F:	package/openjdk/
 F:	package/openjdk-bin/
 F:	package/php/
package/Config.in.host +1 -0
index dfea478868..7dc1e46e97 100644
@@ -81,5 +81,6 @@ menu "Host utilities"
 	source "package/xorriso/Config.in.host"
 	source "package/zip/Config.in.host"
 	source "package/zstd/Config.in.host"
+	source "package/odb/Config.in.host"
 
 endmenu
package/odb/0001-no-need-of-tm.h.patch new file +32 -0
new file mode 100644
index 0000000000..9f4b7ad498
@@ -0,0 +1,32 @@
+From bb4eda4847752b04369afc88fdbb8b43a458be3c Mon Sep 17 00:00:00 2001
+From: Kamel Bouhara <[email protected]>
+Date: Thu, 14 May 2020 17:31:27 +0200
+Subject: [PATCH 01/10] no need of tm.h
+
+<tm.h> include in gcc.hxx appears to be no longer necessary.
+On MIPS this file pulls in enum processor which conflicts with our class
+processor.
+
+From debsources: https://sources.debian.org/patches/odb/2.4.0-12/no_need_of_tm.h.patch/
+
+Signed-off-by: Kamel Bouhara <[email protected]>
+---
+ odb/gcc.hxx | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/odb/gcc.hxx b/odb/gcc.hxx
+index 504b59b..c953047 100644
+--- a/odb/gcc.hxx
++++ b/odb/gcc.hxx
+@@ -46,8 +46,6 @@ extern "C"
+ #include <tree.h>
+ #include <real.h>
+ 
+-#include <tm.h>
+-
+ #include <cpplib.h>
+ #include <cp/cp-tree.h>
+ 
+-- 
+2.25.0
+
package/odb/0002-Remove-gratuitous-classes.patch new file +444 -0

444 lines not on this page · raw message

package/odb/0003-Initial-work-to-make-ODB-compatible-with-GCC-6.patch new file +311 -0

311 lines not on this page · raw message

package/odb/0004-Make-compilable-with-GCC-6-in-C-14-mode.patch new file +47 -0

47 lines not on this page · raw message

package/odb/0005-Fix-bug-in-GCC-6-input_location-translation.patch new file +33 -0
new file mode 100644
index 0000000000..fdf4e3ccae
@@ -0,0 +1,33 @@
+From 029687831099bf1dcc944517f9e48af1db5b0361 Mon Sep 17 00:00:00 2001
+From: Boris Kolpackov <[email protected]>
+Date: Fri, 23 Dec 2016 10:18:01 +0200
+Subject: [PATCH 05/10] Fix bug in GCC 6 input_location translation
+
+Signed-off-by: Kamel Bouhara <[email protected]>
+---
+ odb/cxx-lexer.cxx | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx
+index 64df296..ae045d9 100644
+--- a/odb/cxx-lexer.cxx
++++ b/odb/cxx-lexer.cxx
+@@ -106,7 +106,15 @@ next (string& token, tree* node)
+ location_t cxx_pragma_lexer::
+ location () const
+ {
++  // Starting from GCC 6 the input location seem to require the same
++  // translation as what we do in real_source_location().
++  //
++#if BUILDING_GCC_MAJOR >= 6
++  return linemap_resolve_location (
++    line_table, input_location, LRK_MACRO_EXPANSION_POINT, 0);
++#else
+   return input_location;
++#endif
+ }
+ 
+ string cxx_pragma_lexer::
+-- 
+2.25.0
+
package/odb/0006-Adapt-to-changes-in-GCC-8.patch new file +226 -0

226 lines not on this page · raw message

package/odb/0007-Switch-to-C-11-get-rid-of-auto_ptr-use.patch new file +350 -0

350 lines not on this page · raw message

package/odb/0008-Fix-GCC-8-adaptation-to-be-compatible-with-previous-.patch new file +32 -0
new file mode 100644
index 0000000000..b3ac9a8d29
@@ -0,0 +1,32 @@
+From 8cc165a2f7f945db36a18e462138553a000292cd Mon Sep 17 00:00:00 2001
+From: Boris Kolpackov <[email protected]>
+Date: Tue, 7 Nov 2017 16:57:35 +0200
+Subject: [PATCH 08/10] Fix GCC 8 adaptation to be compatible with previous
+ versions
+
+Signed-off-by: Kamel Bouhara <[email protected]>
+---
+ odb/validator.cxx | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/odb/validator.cxx b/odb/validator.cxx
+index 196386c..f0edaaf 100644
+--- a/odb/validator.cxx
++++ b/odb/validator.cxx
+@@ -1231,7 +1231,13 @@ namespace
+             compiler, get_identifier ("has_lt_operator"), false, false);
+ 
+           if (has_lt_operator_ != error_mark_node)
++          {
++#if BUILDING_GCC_MAJOR >= 8
+             has_lt_operator_ = OVL_FIRST (has_lt_operator_);
++#else
++            has_lt_operator_ = OVL_CURRENT (has_lt_operator_);
++#endif
++          }
+           else
+           {
+             os << unit.file () << ": error: unable to resolve has_lt_operator "
+-- 
+2.25.0
+
package/odb/0009-Handle-namespace-aliases-when-parsing-GCC-tree.patch new file +29 -0
new file mode 100644
index 0000000000..a9bdc89564
@@ -0,0 +1,29 @@
+From 2d37e44753c1e67de4658b6fdf95760432c74ead Mon Sep 17 00:00:00 2001
+From: Boris Kolpackov <[email protected]>
+Date: Fri, 5 Oct 2018 07:20:18 +0200
+Subject: [PATCH 09/10] Handle namespace aliases when parsing GCC tree
+
+Signed-off-by: Kamel Bouhara <[email protected]>
+---
+ odb/parser.cxx | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/odb/parser.cxx b/odb/parser.cxx
+index 30e45af..03bcb01 100644
+--- a/odb/parser.cxx
++++ b/odb/parser.cxx
+@@ -906,6 +906,11 @@ collect (tree ns)
+       continue;
+ #endif
+ 
++    // Ignore namespace aliases.
++    //
++    if (DECL_NAMESPACE_ALIAS (decl))
++      continue;
++
+     if (!DECL_IS_BUILTIN (decl) || DECL_NAMESPACE_STD_P (decl))
+     {
+       if (trace)
+-- 
+2.25.0
+
package/odb/0010-Add-initial-support-for-GCC-9.patch new file +232 -0

232 lines not on this page · raw message

package/odb/Config.in.host new file +7 -0
new file mode 100644
index 0000000000..e45677095c
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_ODB
+	bool "host-odb"
+	select BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT
+	help
+	  This is a compiler that takes a specially crafted c++ header
+	  file and auto-generates a schema that works with libodb and
+	  the subsequent libodb-database library.
package/odb/odb.hash new file +6 -0
new file mode 100644
index 0000000000..773a9c829b
@@ -0,0 +1,6 @@
+# From https://www.codesynthesis.com/products/odb/download.xhtml
+sha1	810fc02e591429ed19f5a2699d144fb611fb121b	odb-2.4.0.tar.bz2
+
+# Locally computed
+sha256	6785154fa98ea3977c8c2ab38cec16c4aa78c2c2039e80cd2908347b1c1d4198	odb-2.4.0.tar.bz2
+sha256	7983b82cb1f1686ac2b55420ded9c0f348f93dd17bf3e048ae3b25c1da51b80e	LICENSE
package/odb/odb.mk new file +20 -0
new file mode 100644
index 0000000000..11086471e6
@@ -0,0 +1,20 @@
+################################################################################
+#
+# odb
+#
+################################################################################
+
+ODB_VERSION_MAJOR = 2.4
+ODB_VERSION = $(ODB_VERSION_MAJOR).0
+ODB_SOURCE = odb-$(ODB_VERSION).tar.bz2
+ODB_SITE = https://www.codesynthesis.com/download/odb/$(ODB_VERSION_MAJOR)
+ODB_LICENSE = GPL-3.0
+ODB_LICENSE_FILES = LICENSE
+HOST_ODB_DEPENDENCIES = host-libcutl
+
+# Prevent odb from trying to install the gcc plugin into the hosts
+# gcc plugin directory. Instead, this will install the gcc plugin
+# into host/libexec/odb
+HOST_ODB_CONF_OPTS = --with-gcc-plugin-dir=no
+
+$(eval $(host-autotools-package))
package/odb/series new file +10 -0
new file mode 100644
index 0000000000..d41253abf9
@@ -0,0 +1,10 @@
+0001-no-need-of-tm.h.patch
+0002-Remove-gratuitous-classes.patch
+0003-Initial-work-to-make-ODB-compatible-with-GCC-6.patch
+0004-Make-compilable-with-GCC-6-in-C-14-mode.patch
+0005-Fix-bug-in-GCC-6-input_location-translation.patch
+0006-Adapt-to-changes-in-GCC-8.patch
+0007-Switch-to-C-11-get-rid-of-auto_ptr-use.patch
+0008-Fix-GCC-8-adaptation-to-be-compatible-with-previous-.patch
+0009-Handle-namespace-aliases-when-parsing-GCC-tree.patch
+0010-Add-initial-support-for-GCC-9.patch
Signature · 1 line
2.25.0
#7 lore raw

PATCH 5/8 package/libodb: new package

In reply to Kamel Bouhara

From: Adam Duskett <[email protected]>

This package contains the common ODB runtime library. Every application that includes code generated by the ODB compiler will need to link to this library.

[Kamel:
- Fix incorrect license
- Remove false dependency on host-odb]

---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/libodb/Config.in   | 13 +++++++++++++
 package/libodb/libodb.hash |  6 ++++++
 package/libodb/libodb.mk   | 15 +++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 package/libodb/Config.in
 create mode 100644 package/libodb/libodb.hash
 create mode 100644 package/libodb/libodb.mk
DEVELOPERS +1 -0
index 66ce95b4e1..4c7c157e07 100644
@@ -43,6 +43,7 @@ F:	package/janus-gateway/
 F:	package/json-for-modern-cpp/
 F:	package/libcpprestsdk/
 F:	package/libcutl/
+F:	package/libodb/
 F:	package/libressl/
 F:	package/libselinux/
 F:	package/libsemanage/
package/Config.in +1 -0
index edf7687ab7..3891b36282 100644
@@ -1804,6 +1804,7 @@ menu "Other"
 	source "package/libloki/Config.in"
 	source "package/libnpth/Config.in"
 	source "package/libnspr/Config.in"
+	source "package/libodb/Config.in"
 	source "package/libpfm4/Config.in"
 	source "package/libplatform/Config.in"
 	source "package/libplist/Config.in"
package/libodb/Config.in new file +13 -0
new file mode 100644
index 0000000000..8312f47353
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LIBODB
+	bool "libodb"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  This package contains the common ODB runtime library. Every
+	  application that includes code generated by the ODB compiler
+	  will need to link to this library.
+
+	  https://www.codesynthesis.com/products/odb/
+
+comment "libodb needs a toolchain w/ C++, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/libodb/libodb.hash new file +6 -0
new file mode 100644
index 0000000000..cea5b9eda2
@@ -0,0 +1,6 @@
+# From https://www.codesynthesis.com/projects/libcutl/
+sha1	42bd2a8023e338e004711e755eb30bd122b844a6	libodb-2.4.0.tar.bz2
+
+# Locally Computed
+sha256	66a1bb4e8bb6ef60cc79334f8028c4d4de98d87f2ff6f8123b4cfb7751ce0007	libodb-2.4.0.tar.bz2
+sha256	841105a470fc283851c63941510ffd403c726d1910b688f7df95914ab8b1b5a3	LICENSE
package/libodb/libodb.mk new file +15 -0
new file mode 100644
index 0000000000..f36d8957c0
@@ -0,0 +1,15 @@
+################################################################################
+#
+# libodb
+#
+################################################################################
+
+LIBODB_VERSION_MAJOR = 2.4
+LIBODB_VERSION = $(LIBODB_VERSION_MAJOR).0
+LIBODB_SOURCE = libodb-$(LIBODB_VERSION).tar.bz2
+LIBODB_SITE = https://www.codesynthesis.com/download/odb/$(LIBODB_VERSION_MAJOR)
+LIBODB_INSTALL_STAGING = YES
+LIBODB_LICENSE = GPL-2.0
+LIBODB_LICENSE_FILES = LICENSE
+
+$(eval $(autotools-package))
Signature · 1 line
2.25.0
#8 lore raw

PATCH 6/8 package/libodb-pgsql: new package

In reply to Kamel Bouhara

From: Adam Duskett <[email protected]>

This package contains the PostgreSQL ODB runtime library. Every application that includes code generated for the PostgreSQL database will need to link to this library.

[Kamel: Fix incorrect license, Remove false dependency on host-odb]
---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/libodb-pgsql/Config.in         | 16 ++++++++++++++++
 package/libodb-pgsql/libodb-pgsql.hash |  6 ++++++
 package/libodb-pgsql/libodb-pgsql.mk   | 16 ++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/libodb-pgsql/Config.in
 create mode 100644 package/libodb-pgsql/libodb-pgsql.hash
 create mode 100644 package/libodb-pgsql/libodb-pgsql.mk
DEVELOPERS +1 -0
index 4c7c157e07..abdee8541a 100644
@@ -44,6 +44,7 @@ F:	package/json-for-modern-cpp/
 F:	package/libcpprestsdk/
 F:	package/libcutl/
 F:	package/libodb/
+F:	package/libodb-pgsql/
 F:	package/libressl/
 F:	package/libselinux/
 F:	package/libsemanage/
package/Config.in +1 -0
index 3891b36282..59e714fb6a 100644
@@ -1319,6 +1319,7 @@ menu "Database"
 	source "package/hiredis/Config.in"
 	source "package/kompexsqlite/Config.in"
 	source "package/leveldb/Config.in"
+	source "package/libodb-pgsql/Config.in"
 	source "package/libgit2/Config.in"
 	source "package/libpqxx/Config.in"
 	source "package/mongodb/Config.in"
package/libodb-pgsql/Config.in new file +16 -0
new file mode 100644
index 0000000000..e23946bc44
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_LIBODB_PGSQL
+	bool "libodb-pgsql"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_POSTGRESQL
+	select BR2_PACKAGE_LIBODB
+	help
+	  This package contains the PostgreSQL ODB runtime library.
+	  Every application that includes code generated for the
+	  PostgreSQL database will need to link to this library.
+
+	  https://www.codesynthesis.com/products/odb/
+
+comment "libodb-pgsql needs a toolchain w/ C++, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+        depends on BR2_PACKAGE_POSTGRESQL
package/libodb-pgsql/libodb-pgsql.hash new file +6 -0
new file mode 100644
index 0000000000..5799f09236
@@ -0,0 +1,6 @@
+# From https://www.codesynthesis.com/download/odb/2.4/libodb-pgsql-2.4.0.tar.bz2.sha1
+sha1	4628d5e296da01dbaf8658fd402b4f709f30ea2d	libodb-pgsql-2.4.0.tar.bz2
+
+# Locally Computed
+sha256	778a4d38bd1161e1f0b368815514c3335da20c7584e3d07613526dcce53523bc	libodb-pgsql-2.4.0.tar.bz2
+sha256	841105a470fc283851c63941510ffd403c726d1910b688f7df95914ab8b1b5a3	LICENSE
package/libodb-pgsql/libodb-pgsql.mk new file +16 -0
new file mode 100644
index 0000000000..038f7878c0
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libodb-pgsql
+#
+################################################################################
+
+LIBODB_PGSQL_VERSION_MAJOR = 2.4
+LIBODB_PGSQL_VERSION = $(LIBODB_PGSQL_VERSION_MAJOR).0
+LIBODB_PGSQL_SOURCE = libodb-pgsql-$(LIBODB_PGSQL_VERSION).tar.bz2
+LIBODB_PGSQL_SITE = https://www.codesynthesis.com/download/odb/$(LIBODB_PGSQL_VERSION_MAJOR)
+LIBODB_PGSQL_LICENSE = GPL-2.0
+LIBODB_PGSQL_LICENSE_FILES = LICENSE
+LIBODB_PGSQL_INSTALL_STAGING = YES
+LIBODB_PGSQL_DEPENDENCIES = postgresql libodb
+
+$(eval $(autotools-package))
Signature · 1 line
2.25.0
#9 lore raw

PATCH 7/8 package/libodb-mysql: new package

In reply to Kamel Bouhara

This package contains the MySQL ODB runtime library. Every application that includes code generated for the MySQL database will need to link to this library.

---
 DEVELOPERS                                    |  3 ++
 package/Config.in                             |  1 +
 ...-syntax-issue-while-checking-ldflags.patch | 35 +++++++++++++++++++
 package/libodb-mysql/Config.in                | 16 +++++++++
 package/libodb-mysql/libodb-mysql.hash        |  4 +++
 package/libodb-mysql/libodb-mysql.mk          | 16 +++++++++
 6 files changed, 75 insertions(+)
 create mode 100644 package/libodb-mysql/0001-fix-syntax-issue-while-checking-ldflags.patch
 create mode 100644 package/libodb-mysql/Config.in
 create mode 100644 package/libodb-mysql/libodb-mysql.hash
 create mode 100644 package/libodb-mysql/libodb-mysql.mk
DEVELOPERS +3 -0
index abdee8541a..73a3a44ef8 100644
@@ -1409,6 +1409,9 @@ F:	package/easy-rsa/
 N:	Justin Maggard <[email protected]>
 F:	package/dtach/
 
+N:	Kamel Bouhara <[email protected]>
+F:	package/libodb-mysql/
+
 N:	Karoly Kasza <[email protected]>
 F:	package/irqbalance/
 F:	package/openvmtools/
package/Config.in +1 -0
index 59e714fb6a..651241dc0c 100644
@@ -1319,6 +1319,7 @@ menu "Database"
 	source "package/hiredis/Config.in"
 	source "package/kompexsqlite/Config.in"
 	source "package/leveldb/Config.in"
+	source "package/libodb-mysql/Config.in"
 	source "package/libodb-pgsql/Config.in"
 	source "package/libgit2/Config.in"
 	source "package/libpqxx/Config.in"
package/libodb-mysql/0001-fix-syntax-issue-while-checking-ldflags.patch new file +35 -0
new file mode 100644
index 0000000000..9d2013e3a0
@@ -0,0 +1,35 @@
+From 3af12d8d0f749751e487955c24260049e7a8eec6 Mon Sep 17 00:00:00 2001
+From: Kamel Bouhara <[email protected]>
+Date: Wed, 13 May 2020 16:58:22 +0200
+Subject: [PATCH] fix syntax issue while checking ldflags
+
+Signed-off-by: Kamel Bouhara <[email protected]>
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index def5883..2d783f6 100755
+--- a/configure
++++ b/configure
+@@ -17574,7 +17574,7 @@ libmysqlclient_paths="none /usr/lib/mysql /usr/lib64/mysql"
+ 
+ for path in $libmysqlclient_paths; do
+ 
+-if test x"path" != xnone; then
++if test x"$path" != xnone; then
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS -L$path"
+ fi
+@@ -17753,7 +17753,7 @@ if test x"$libmysqlclient_found" = xyes; then
+   break;
+ fi
+ 
+-if test x"path" != xnone; then
++if test x"$path" != xnone; then
+   LDFLAGS="$save_LDFLAGS"
+ fi
+ 
+-- 
+2.25.0
+
package/libodb-mysql/Config.in new file +16 -0
new file mode 100644
index 0000000000..55a32ce6d4
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_LIBODB_MYSQL
+	bool "libodb-mysql"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_MYSQL
+	select BR2_PACKAGE_LIBODB
+	help
+	  This package contains the MySQL ODB runtime library. Every application
+	  that includes code generated for the MySQL database will need to link
+	  to this library.
+
+	  https://www.codesynthesis.com/products/odb/
+
+comment "libodb-mysql needs a toolchain w/ C++, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+        depends on BR2_PACKAGE_MYSQL
package/libodb-mysql/libodb-mysql.hash new file +4 -0
new file mode 100644
index 0000000000..1c35041af8
@@ -0,0 +1,4 @@
+sha1	2021a67577354f1d6bed50c0b257c1920760eda7	libodb-mysql-2.4.0.tar.bz2
+
+sha256	ce2fcdb6ab4a02fc0aff263a891c56949fa41b89e65d7a40d8b656d3ebf0d9bc	libodb-mysql-2.4.0.tar.bz2
+sha256	841105a470fc283851c63941510ffd403c726d1910b688f7df95914ab8b1b5a3	LICENSE
package/libodb-mysql/libodb-mysql.mk new file +16 -0
new file mode 100644
index 0000000000..97cbcddf93
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libodb-mysql
+#
+################################################################################
+
+LIBODB_MYSQL_VERSION_MAJOR = 2.4
+LIBODB_MYSQL_VERSION = $(LIBODB_MYSQL_VERSION_MAJOR).0
+LIBODB_MYSQL_SOURCE = libodb-mysql-$(LIBODB_MYSQL_VERSION).tar.bz2
+LIBODB_MYSQL_SITE = https://www.codesynthesis.com/download/odb/$(LIBODB_MYSQL_VERSION_MAJOR)
+LIBODB_MYSQL_INSTALL_STAGING = YES
+LIBODB_MYSQL_LICENSE = GPL-2.0
+LIBODB_MYSQL_LICENSE_FILES = LICENSE
+LIBODB_MYSQL_DEPENDENCIES = libodb mysql
+
+$(eval $(autotools-package))
Signature · 1 line
2.25.0
#10 lore raw

PATCH 8/8 package/libodb-boost: new package

In reply to Kamel Bouhara

This package contains the Boost ODB profile library. The Boost profile provides support for persisting Boost smart pointers, containers, and value types with the ODB system.

---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/libodb-boost/Config.in         | 16 ++++++++++++++++
 package/libodb-boost/libodb-boost.hash |  7 +++++++
 package/libodb-boost/libodb-boost.mk   | 16 ++++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/libodb-boost/Config.in
 create mode 100644 package/libodb-boost/libodb-boost.hash
 create mode 100644 package/libodb-boost/libodb-boost.mk
DEVELOPERS +1 -0
index 73a3a44ef8..a967870018 100644
@@ -1411,6 +1411,7 @@ F:	package/dtach/
 
 N:	Kamel Bouhara <[email protected]>
 F:	package/libodb-mysql/
+F:	package/libodb-boost/
 
 N:	Karoly Kasza <[email protected]>
 F:	package/irqbalance/
package/Config.in +1 -0
index 651241dc0c..d668e1d3e3 100644
@@ -1807,6 +1807,7 @@ menu "Other"
 	source "package/libnpth/Config.in"
 	source "package/libnspr/Config.in"
 	source "package/libodb/Config.in"
+	source "package/libodb-boost/Config.in"
 	source "package/libpfm4/Config.in"
 	source "package/libplatform/Config.in"
 	source "package/libplist/Config.in"
package/libodb-boost/Config.in new file +16 -0
new file mode 100644
index 0000000000..afa9a9b2a4
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_LIBODB_BOOST
+	bool "libodb-boost"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_LIBODB
+	help
+	  This package contains the common ODB runtime library. Every
+	  application that includes code generated by the ODB compiler
+	  will need to link to this library.
+
+	  https://www.codesynthesis.com/products/odb/
+
+comment "libodb-boost needs a toolchain w/ C++, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+        depends on BR2_PACKAGE_BOOST
package/libodb-boost/libodb-boost.hash new file +7 -0
new file mode 100644
index 0000000000..03b6edacae
@@ -0,0 +1,7 @@
+# From https://www.codesynthesis.com/projects/libcutl/
+sha1	f813702b2856732e199ae34e3393b8cecff878ef	libodb-boost-2.4.0.tar.bz2
+
+
+# Locally Computed
+sha256  b41bd4aaa3f3c9563cfa41bae19bda1bbcc3652e4430b4ebb1819eef2ffcadf4	libodb-boost-2.4.0.tar.bz2
+sha256	841105a470fc283851c63941510ffd403c726d1910b688f7df95914ab8b1b5a3	LICENSE
package/libodb-boost/libodb-boost.mk new file +16 -0
new file mode 100644
index 0000000000..679c9d7a38
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libodb-boost
+#
+################################################################################
+
+LIBODB_BOOST_VERSION_MAJOR = 2.4
+LIBODB_BOOST_VERSION = $(LIBODB_BOOST_VERSION_MAJOR).0
+LIBODB_BOOST_SOURCE = libodb-boost-$(LIBODB_BOOST_VERSION).tar.bz2
+LIBODB_BOOST_SITE = https://www.codesynthesis.com/download/odb/$(LIBODB_BOOST_VERSION_MAJOR)
+LIBODB_BOOST_INSTALL_STAGING = YES
+LIBODB_BOOST_LICENSE = GPL-2.0
+LIBODB_BOOST_LICENSE_FILES = LICENSE
+LIBODB_BOOST_DEPENDENCIES = boost libodb
+
+$(eval $(autotools-package))
Signature · 1 line
2.25.0