Skip to contentSkip to conversation

package/radlib: new package

PATCH Superseded ray.kinsella at intel.com 4 participants 9 messages Apr 13, 2016 – Jun 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 package/radlib: new package

From: Ray Kinsella <[email protected]>

Changes v4 -> v5:
* reorganize autotools changes into 3 seperate patches
* adding pkg-config support for sqlite and postgresql
* adding mysql-config support for mysql
* removing ugly CROSS_COMPILE and paths relative to $(prefix)
* number of small tidy ups for package/radlib

Ray Kinsella (1):
package/radlib: new package

 package/Config.in                                  |   1 +
 ...oduce-pkg-config-for-sqlite-and-postgresq.patch | 102 +++++++++++++++++++++
 .../0002-radlib-introduce-mysql-config.patch       |  78 ++++++++++++++++
 ...adlib-fix-the-paths-in-the-subdir-objects.patch |  93 +++++++++++++++++++
 package/radlib/Config.in                           |  38 ++++++++
 package/radlib/radlib.hash                         |   2 +
 package/radlib/radlib.mk                           |  28 ++++++
 7 files changed, 342 insertions(+)
 create mode 100644 package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch
 create mode 100644 package/radlib/0002-radlib-introduce-mysql-config.patch
 create mode 100644 package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch
 create mode 100644 package/radlib/Config.in
 create mode 100644 package/radlib/radlib.hash
 create mode 100644 package/radlib/radlib.mk
Signature · 1 line
2.4.11
#1 lore raw

PATCH v5 1/1 package/radlib: new package

From: Ray Kinsella <[email protected]>

radlib is a rapid application development library for unix multi-process applications. It uses SYS V IPC facilities and FIFOs to provide an RTOS-like, event-driven, distributed framework. Processes may be run as daemons or have a controlling terminal.

---
 package/Config.in                                  |   1 +
 ...oduce-pkg-config-for-sqlite-and-postgresq.patch | 102 +++++++++++++++++++++
 .../0002-radlib-introduce-mysql-config.patch       |  78 ++++++++++++++++
 ...adlib-fix-the-paths-in-the-subdir-objects.patch |  93 +++++++++++++++++++
 package/radlib/Config.in                           |  38 ++++++++
 package/radlib/radlib.hash                         |   2 +
 package/radlib/radlib.mk                           |  28 ++++++
 7 files changed, 342 insertions(+)
 create mode 100644 package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch
 create mode 100644 package/radlib/0002-radlib-introduce-mysql-config.patch
 create mode 100644 package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch
 create mode 100644 package/radlib/Config.in
 create mode 100644 package/radlib/radlib.hash
 create mode 100644 package/radlib/radlib.mk
package/Config.in +1 -0
index 64822bf..6c59556 100644
@@ -1262,6 +1262,7 @@ endif
 	source "package/protobuf-c/Config.in"
 	source "package/qhull/Config.in"
 	source "package/qlibc/Config.in"
+	source "package/radlib/Config.in"
 	source "package/startup-notification/Config.in"
 	source "package/tz/Config.in"
 	source "package/tzdata/Config.in"
package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch new file +102 -0

102 lines not on this page · raw message

package/radlib/0002-radlib-introduce-mysql-config.patch new file +78 -0

78 lines not on this page · raw message

package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch new file +93 -0

93 lines not on this page · raw message

package/radlib/Config.in new file +38 -0
new file mode 100644
index 0000000..a4a89c9
@@ -0,0 +1,38 @@
+config BR2_PACKAGE_RADLIB
+	bool "radlib"
+	help
+	  radlib is a rapid application development library for unix
+	  multi-process applications. It uses SYS V IPC facilities and
+	  FIFOs to provide an RTOS-like, event-driven, distributed framework.
+	  Processes may be run as daemons or have a controlling terminal.
+	  
+	  http://sourceforge.net/projects/radlib/
+
+choice
+	prompt "radlib database backend"
+	depends on BR2_PACKAGE_RADLIB
+	depends on BR2_PACKAGE_SQLITE \
+		|| BR2_PACKAGE_MYSQL \
+		|| BR2_PACKAGE_POSTGRESQL
+	help
+	  Selects the backend database: sqlite, mysql or postgresql
+
+config BR2_PACKAGE_RADLIB_SQLITE
+	bool "sqlite"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  Configure radlib to use a sqlite database backend
+
+config BR2_PACKAGE_RADLIB_MYSQL
+	bool "mysql"
+	depends on BR2_PACKAGE_MYSQL
+	help
+	  Configure radlib to use a mysql database backend
+
+config BR2_PACKAGE_RADLIB_POSTGRESQL
+	bool "postgresql"
+	depends on BR2_PACKAGE_POSTGRESQL
+	help
+	  Configure radlib to use a postgresql database backend
+
+endchoice
package/radlib/radlib.hash new file +2 -0
new file mode 100644
index 0000000..2fbfbba
@@ -0,0 +1,2 @@
+# From http://sourceforge.net/projects/radlib/files/
+sha256  82b98bb5e08a500dea1e4252843b9c772fa1fb67ac8ab89ed64abdd5e22eca66  radlib-2.12.0.tar.gz
package/radlib/radlib.mk new file +28 -0
new file mode 100644
index 0000000..8b8d61e
@@ -0,0 +1,28 @@
+################################################################################
+#
+# radlib
+#
+################################################################################
+
+RADLIB_VERSION = 2.12.0
+RADLIB_SITE = http://downloads.sourceforge.net/radlib
+RADLIB_INSTALL_STAGING = YES
+RADLIB_LICENSE = BSD-2c
+RADLIB_LICENSE_FILES = COPYING
+RADLIB_AUTORECONF = YES
+RADLIB_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_RADLIB_SQLITE),y)
+RADLIB_CONF_OPTS += --enable-sqlite
+endif
+
+ifeq ($(BR2_PACKAGE_RADLIB_MYSQL),y)
+RADLIB_CONF_ENV=ac_cv_path_MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config"
+RADLIB_CONF_OPTS += --enable-mysql
+endif
+
+ifeq ($(BR2_PACKAGE_RADLIB_POSTGRESQL),y)
+RADLIB_CONF_OPTS += --enable-pgresql
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
2.4.11
#2 lore raw

PATCH v5 1/1 package/radlib: new package

Quoted 10 lines · ray.kinsella at intel.com

From: Ray Kinsella <[email protected]>

radlib is a rapid application development library for unix multi-process applications. It uses SYS V IPC facilities and FIFOs to provide an RTOS-like, event-driven, distributed framework. Processes may be run as daemons or have a controlling terminal.

---

[snip]

package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch line 4

Quoted 10 lines
package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch new file +4 -0
new file mode 100644
index 0000000..63a4315
@@ -0,0 +1,102 @@
+From 3c7aad41e2c32b63267fa8cd6bf3fbb9ea0aaae3 Mon Sep 17 00:00:00 2001
+From: Ray Kinsella <[email protected]>
+Date: Wed, 13 Apr 2016 16:21:02 +0100
+Subject: [PATCH 1/3] radlib: introduce pkg-config for sqlite and postgresql

Please generate patches with the -N option; the 1/3 becomes invalid when a 4th
patch is added, or when some of the patches are accepted upstream. Given upstream's lack of updates the latter isn't very likely :-) Did you try to submit the patches upstream?

Quoted 10 lines
package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch new file +10 -0
+
+Retrieve cflags and linker options for sqlite and postgresql using pkg-config.
+
+Signed-off-by: Ray Kinsella <[email protected]>
+---
+ configure.in          | 6 ++++++
+ debug/Makefile.am     | 4 ++--
+ msgRouter/Makefile.am | 4 ++--
+ src/Makefile.am       | 6 ++----
+ 4 files changed, 12 insertions(+), 8 deletions(-)

package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch line 24

Quoted 10 lines
package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch new file +10 -0
+
+diff --git a/configure.in b/configure.in
+index 47e507e..83f572c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -23,6 +23,9 @@ AC_ARG_ENABLE(pgresql,
+   *) pgresql=false ;;
+ esac],[pgresql=false])
+ AM_CONDITIONAL(PGRESQL, test x$pgresql = xtrue)
++if test x$pgresql = xtrue; then

Since the AM_CONDITIONAL is defined just above, it's better to use AM_COND_IF:

AM_COND_IF([PGRESQL],
PKG_CHECK_MODULES([POSTGRESQL], [libpq])
)

(untested, of course).

package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch line 34

Quoted 10 lines
package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch new file +10 -0
++  PKG_CHECK_MODULES([POSTGRESQL], [libpq])
++fi
+
+ AC_ARG_ENABLE(sqlite,
+ [  --enable-sqlite                include radlib sqlite database support],
+@@ -32,6 +35,9 @@ AC_ARG_ENABLE(sqlite,
+   *) sqlite=false ;;
+ esac],[sqlite=false])
+ AM_CONDITIONAL(SQLITE, test x$sqlite = xtrue)
++if test x$sqlite = xtrue; then

Same here.

Quoted 5 lines
package/radlib/0001-radlib-introduce-pkg-config-for-sqlite-and-postgresq.patch new file +5 -0
++  PKG_CHECK_MODULES([SQLITE3], [sqlite3])
++fi
+
+ # Check for big endian host:
+ AC_C_BIGENDIAN()

[snip]

Quoted 20 lines
package/radlib/0002-radlib-introduce-mysql-config.patch new file +14 -0
new file mode 100644
index 0000000..d778d42
@@ -0,0 +1,78 @@
+From c70ccfd485b87f9ffe065b82588aa158743620a0 Mon Sep 17 00:00:00 2001
+From: Ray Kinsella <[email protected]>
+Date: Wed, 13 Apr 2016 16:23:11 +0100
+Subject: [PATCH 2/3] radlib: introduce mysql-config
+
+Retrieve cflags and linker options for mysql using mysql-config.$
+
+Signed-off-by: Ray Kinsella <[email protected]>
+---
+ configure.in          | 9 +++++++++
+ debug/Makefile.am     | 2 +-
+ msgRouter/Makefile.am | 2 +-
+ src/Makefile.am       | 3 +--
+ 4 files changed, 12 insertions(+), 4 deletions(-)

package/radlib/0002-radlib-introduce-mysql-config.patch line 24

Quoted 10 lines
package/radlib/0002-radlib-introduce-mysql-config.patch new file +10 -0
+
+diff --git a/configure.in b/configure.in
+index 83f572c..3fb8f49 100644
+--- a/configure.in
++++ b/configure.in
+@@ -14,6 +14,15 @@ AC_ARG_ENABLE(mysql,
+   *) mysql=false ;;
+ esac],[mysql=false])
+ AM_CONDITIONAL(MYSQL, test x$mysql = xtrue)
++if test x$mysql = xtrue; then

Same, use AM_COND_IF

package/radlib/0002-radlib-introduce-mysql-config.patch line 30

Quoted 6 lines
package/radlib/0002-radlib-introduce-mysql-config.patch new file +6 -0
++  AC_PATH_PROG([MYSQL_CONFIG], [mysql_config])
++  if test "x$MYSQL_CONFIG" != "x";then
++    MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
++    MYSQL_LIBS=`$MYSQL_CONFIG --libs`
++    AC_SUBST([MYSQL_CFLAGS])
++    AC_SUBST([MYSQL_LIBS])

I guess there should be an error in the else branch?

Quoted 5 lines
package/radlib/0002-radlib-introduce-mysql-config.patch new file +5 -0
++  fi
++fi
+
+ AC_ARG_ENABLE(pgresql,
+ [  --enable-pgresql               include radlib postgreSQL database support],

[snip]

package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch line 7

Quoted 13 lines
package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch new file +7 -0
new file mode 100644
index 0000000..b375eaf
@@ -0,0 +1,93 @@
+From ddcebb69533c795c1c0371eeefe856924e11ff23 Mon Sep 17 00:00:00 2001
+From: Ray Kinsella <[email protected]>
+Date: Wed, 13 Apr 2016 16:24:34 +0100
+Subject: [PATCH 3/3] radlib: fix the paths in the subdir-objects
+
+Remove paths relative to $(prefix) and CROSS_COMPILE options from
+subdir-objects.

I think this should be the first patch; our autoreconf will not be happy
without subdir-objects.

Quoted 7 lines
package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch new file +7 -0
+
+Signed-off-by: Ray Kinsella <[email protected]>
+---
+ configure.in          |  1 +
+ debug/Makefile.am     | 16 ++--------------
+ msgRouter/Makefile.am | 16 ++--------------
+ src/Makefile.am       |  1 -

package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch line 24

Quoted 10 lines
package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch new file +10 -0
+ 4 files changed, 5 insertions(+), 29 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 3fb8f49..ffc0204 100644
+--- a/configure.in
++++ b/configure.in
+@@ -4,6 +4,7 @@ AC_PREREQ(2.5)
+ AC_INIT([radlib],[2.12.0],[mteel2005 at gmail.com])
+ AC_CONFIG_SRCDIR([h/radmsgLog.h])
+ AM_INIT_AUTOMAKE([radlib],[2.12.0])

Shouldn't this one be removed?

Quoted 75 lines
package/radlib/0003-radlib-fix-the-paths-in-the-subdir-objects.patch new file +69 -0
++AM_INIT_AUTOMAKE([subdir-objects])
+ AM_CONFIG_HEADER([config.h])
+
+ AC_ARG_ENABLE(mysql,
+diff --git a/debug/Makefile.am b/debug/Makefile.am
+index 7c558ed..e732a06 100644
+--- a/debug/Makefile.am
++++ b/debug/Makefile.am
+@@ -27,18 +27,6 @@ raddebug_LDADD   += $(SQLITE3_LIBS)
+ endif
+
+ # define library directories
+-raddebug_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib
+-INCLUDES         += -I$(prefix)/include -I/usr/include
++raddebug_LDADD += -L../src/.libs
+
+-if MYSQL
+-raddebug_LDFLAGS += -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql
+-else
+-if PGRESQL
+-raddebug_LDFLAGS += -L$(prefix)/pgsql/lib
+-INCLUDES         += -I$(prefix)/pgsql/include
+-endif
+-endif
+-
+-if CROSSCOMPILE
+-raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
+-endif
++# removed paths relative to $(prefix)
+diff --git a/msgRouter/Makefile.am b/msgRouter/Makefile.am
+index 14733b7..2cf9d17 100644
+--- a/msgRouter/Makefile.am
++++ b/msgRouter/Makefile.am
+@@ -27,18 +27,6 @@ radmrouted_LDADD   += $(SQLITE3_LIBS)
+ endif
+
+ # define library directories
+-radmrouted_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib
+-INCLUDES           += -I$(prefix)/include -I/usr/include
++radmrouted_LDADD += -L../src/.libs
+
+-if MYSQL
+-radmrouted_LDFLAGS += -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql
+-else
+-if PGRESQL
+-radmrouted_LDFLAGS += -L$(prefix)/lib -L$(prefix)/pgsql/lib
+-INCLUDES           += -I$(prefix)/pgsql/include
+-endif
+-endif
+-
+-if CROSSCOMPILE
+-radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
+-endif
++# removed paths relative to $(prefix)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ea1b73d..f08976b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -43,7 +43,6 @@ endif
+ # define include directories
+ INCLUDES = \
+ 		-I$(top_srcdir)/h \
+-		-I$(prefix)/include \
+ 		-D_GNU_SOURCE \
+ 		$(MY_INCLUDES) \
+ 		$(PG_INCLUDES) \
+--
+2.4.11
+
package/radlib/Config.in new file +0 -0
new file mode 100644
index 0000000..a4a89c9

package/radlib/Config.in line 7

Quoted 7 lines
package/radlib/Config.in new file +7 -0
@@ -0,0 +1,38 @@
+config BR2_PACKAGE_RADLIB
+	bool "radlib"
+	help
+	  radlib is a rapid application development library for unix
+	  multi-process applications. It uses SYS V IPC facilities and
+	  FIFOs to provide an RTOS-like, event-driven, distributed framework.
+	  Processes may be run as daemons or have a controlling terminal.

Lines in help text should be wrapped at 72 columns, where tab counts for 8.

package/radlib/Config.in line 18

Quoted 11 lines
package/radlib/Config.in new file +11 -0
+	
+	  http://sourceforge.net/projects/radlib/
+
+choice
+	prompt "radlib database backend"
+	depends on BR2_PACKAGE_RADLIB
+	depends on BR2_PACKAGE_SQLITE \
+		|| BR2_PACKAGE_MYSQL \
+		|| BR2_PACKAGE_POSTGRESQL
+	help
+	  Selects the backend database: sqlite, mysql or postgresql

I'm not really happy with this choice, I'd prefer an automatic selection. But
it's true, if both mysql and postgresql are selected it's hard to decide which one should be used...

Quoted 26 lines
package/radlib/Config.in new file +20 -0
+
+config BR2_PACKAGE_RADLIB_SQLITE
+	bool "sqlite"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  Configure radlib to use a sqlite database backend
+
+config BR2_PACKAGE_RADLIB_MYSQL
+	bool "mysql"
+	depends on BR2_PACKAGE_MYSQL
+	help
+	  Configure radlib to use a mysql database backend
+
+config BR2_PACKAGE_RADLIB_POSTGRESQL
+	bool "postgresql"
+	depends on BR2_PACKAGE_POSTGRESQL
+	help
+	  Configure radlib to use a postgresql database backend
+
+endchoice
package/radlib/radlib.hash new file +0 -0
new file mode 100644
index 0000000..2fbfbba

package/radlib/radlib.hash line 1

Quoted 1 line
package/radlib/radlib.hash new file +1 -0
@@ -0,0 +1,2 @@
+# From http://sourceforge.net/projects/radlib/files/

Err, I see sha1 and md5 there, but not sha256. So you should take the md5 and
sha1 from sourceforge and add the locally-calculated sha256.

Quoted 13 lines
package/radlib/radlib.hash new file +1 -0
+sha256  82b98bb5e08a500dea1e4252843b9c772fa1fb67ac8ab89ed64abdd5e22eca66  radlib-2.12.0.tar.gz
package/radlib/radlib.mk new file +6 -0
new file mode 100644
index 0000000..8b8d61e
@@ -0,0 +1,28 @@
+################################################################################
+#
+# radlib
+#
+################################################################################
+

package/radlib/radlib.mk line 16

Quoted 10 lines
package/radlib/radlib.mk new file +10 -0
+RADLIB_VERSION = 2.12.0
+RADLIB_SITE = http://downloads.sourceforge.net/radlib
+RADLIB_INSTALL_STAGING = YES
+RADLIB_LICENSE = BSD-2c
+RADLIB_LICENSE_FILES = COPYING
+RADLIB_AUTORECONF = YES
+RADLIB_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_RADLIB_SQLITE),y)
+RADLIB_CONF_OPTS += --enable-sqlite

RADLIB_DEPENDENCIES += sqlite
else
RADLIB_CONF_OPTS += --disable-sqlite

package/radlib/radlib.mk line 21

Quoted 5 lines
package/radlib/radlib.mk new file +5 -0
+endif
+
+ifeq ($(BR2_PACKAGE_RADLIB_MYSQL),y)
+RADLIB_CONF_ENV=ac_cv_path_MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config"
+RADLIB_CONF_OPTS += --enable-mysql

Same here

package/radlib/radlib.mk line 25

Quoted 4 lines
package/radlib/radlib.mk new file +4 -0
+endif
+
+ifeq ($(BR2_PACKAGE_RADLIB_POSTGRESQL),y)
+RADLIB_CONF_OPTS += --enable-pgresql

Same here

Regards,
Arnout

Quoted 4 lines
package/radlib/radlib.mk new file +3 -0
+endif
+
+$(eval $(autotools-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH v5 1/1 package/radlib: new package

Thanks Arnout,

See inline.

Quoted 3 lines · Arnout Vandecappelle

Please generate patches with the -N option; the 1/3 becomes invalid
when a 4th
patch is added, or when some of the patches are accepted upstream.

ok then, so it should be a git format-patch -N. I see what you mean, you may want to remove the patches independently as they get upstreamed, so that would muck up the numbering.

Quoted 4 lines

Given
upstream's lack of updates the latter isn't very likely :-) Did you try to
submit the patches upstream?

Haven't submitted them upstream yet, on my to do list.

Quoted 6 lines

Since the AM_CONDITIONAL is defined just above, it's better to use
AM_COND_IF:

AM_COND_IF([PGRESQL],
PKG_CHECK_MODULES([POSTGRESQL], [libpq])
)

ok, thanks for the tip.

Quoted 15 lines

(untested, of course).

Quoted 11 lines

++ PKG_CHECK_MODULES([POSTGRESQL], [libpq])
++fi
+
+ AC_ARG_ENABLE(sqlite,
+ [ --enable-sqlite include radlib sqlite database
support],
+@@ -32,6 +35,9 @@ AC_ARG_ENABLE(sqlite,
+ *) sqlite=false ;;
+ esac],[sqlite=false])
+ AM_CONDITIONAL(SQLITE, test x$sqlite = xtrue)
++if test x$sqlite = xtrue; then

Quoted 1 line

Same here.

ok

Quoted 2 lines

Same, use AM_COND_IF

ok

Quoted 1 line

I guess there should be an error in the else branch?

makes sense.

Quoted 3 lines

I think this should be the first patch; our autoreconf will not be
happy
without subdir-objects.

autoreconf does complain without the subdir-objects. The removal of the CROSS_COMPILE in the same patch is important as the linker breaks without it. It won't even get to linking stage if it can't find the various database libraries fixed in the two previous patches.

Suggest a new first patch to fix sudir-objects (patch number 4.), but then leave the other patches as they are. So the flow would be.

1. Fix subdir-objects
2. Fix sqlite + postgresql
3. Fix mysql
4. Fix the linker (CROSS_COMPILE).

What do you think?

+

Quoted 3 lines
Quoted 1 line

+ AM_INIT_AUTOMAKE([radlib],[2.12.0])

Shouldn't this one be removed?

yup

Quoted 2 lines

Lines in help text should be wrapped at 72 columns, where tab
counts for 8.

ok - I will investigate

Quoted 5 lines

I'm not really happy with this choice, I'd prefer an automatic
selection. But
it's true, if both mysql and postgresql are selected it's hard to decide which
one should be used...

sent a seperate email on this.
mysql and postgresql are mutually exclusive. sqlite lite can be safely enabled/disable depending on BR2_PACKAGE_SQLITE.

Quoted 4 lines

Err, I see sha1 and md5 there, but not sha256. So you should take
the md5 and
sha1 from sourceforge and add the locally-calculated sha256.

ok

Quoted 6 lines
Quoted 3 lines

+sha256
82b98bb5e08a500dea1e4252843b9c772fa1fb67ac8ab89ed64abdd5e22eca66 radlib-2.12.0.tar.gz

RADLIB_DEPENDENCIES += sqlite
else
RADLIB_CONF_OPTS += --disable-sqlite

ok

Quoted 8 lines
Quoted 6 lines
package/radlib/radlib.mk new file +4 -0
+endif
+
+ifeq ($(BR2_PACKAGE_RADLIB_MYSQL),y)
+RADLIB_CONF_ENV=ac_cv_path_MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/my

sql_config"
+RADLIB_CONF_OPTS += --enable-mysql

Same here

ok

Quoted 7 lines

package/radlib/radlib.mk line 25

Quoted 5 lines
package/radlib/radlib.mk new file +4 -0
+endif
+
+ifeq ($(BR2_PACKAGE_RADLIB_POSTGRESQL),y)
+RADLIB_CONF_OPTS += --enable-pgresql

Same here

ok

Thanks,

Ray K

#4 lore raw

PATCH v5 1/1 package/radlib: new package

Quoted 5 lines · Ray

Thanks Arnout,

See inline.

On Fri, 2016-04-22 at 01:02 +0200, Arnout Vandecappelle wrote:

[snip]

Quoted 3 lines
Quoted 3 lines

I think this should be the first patch; our autoreconf will not be
happy
without subdir-objects.

Actually, this was a silly argument: our build will only work with all patches
applied, of course.

Quoted 9 lines

autoreconf does complain without the subdir-objects. The removal of the CROSS_COMPILE in the same patch is important as the linker breaks without it. It won't even get to linking stage if it can't find the various database libraries fixed in the two previous patches.

Suggest a new first patch to fix sudir-objects (patch number 4.), but then leave the other patches as they are. So the flow would be.

Quoted 6 lines

1. Fix subdir-objects
2. Fix sqlite + postgresql
3. Fix mysql
4. Fix the linker (CROSS_COMPILE).

What do you think?

That sounds good. Perhaps 2+3 could be combined, it doesn't matter that much.

[snip]

Quoted 10 lines
Quoted 5 lines

I'm not really happy with this choice, I'd prefer an automatic
selection. But
it's true, if both mysql and postgresql are selected it's hard to decide which
one should be used...

sent a seperate email on this.
mysql and postgresql are mutually exclusive. sqlite lite can be safely enabled/disable depending on BR2_PACKAGE_SQLITE.

Still, I'd prefer an automatic selection. E.g. if mysql is selected, build
mysql support, else if pgsql is selected, build pgsql support, else disable both.

[snip]

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH v5 1/1 package/radlib: new package

apologies for the delay in replying.

Quoted 5 lines · Arnout Vandecappelle
Quoted 4 lines · Ray

Thanks Arnout,

See inline.

Quoted 8 lines
Quoted 1 line · Arnout Vandecappelle

[snip]

Quoted 3 lines
Quoted 3 lines

I think this should be the first patch; our autoreconf will not be
happy
without subdir-objects.

Actually, this was a silly argument: our build will only work with all
patches applied, of course.

understood.

Quoted 28 lines
Quoted 10 lines

autoreconf does complain without the subdir-objects. The removal of the CROSS_COMPILE in the same patch is important as the linker breaks without it. It won't even get to linking stage if it can't find the various database libraries fixed in the two previous patches.

Suggest a new first patch to fix sudir-objects (patch number 4.), but then leave the other patches as they are. So the flow would be.

Quoted 6 lines

1. Fix subdir-objects
2. Fix sqlite + postgresql
3. Fix mysql
4. Fix the linker (CROSS_COMPILE).

What do you think?

That sounds good. Perhaps 2+3 could be combined, it doesn't matter that
much.

[snip]

Quoted 6 lines
Quoted 5 lines

I'm not really happy with this choice, I'd prefer an automatic
selection. But
it's true, if both mysql and postgresql are selected it's hard to decide which
one should be used...

Quoted 8 lines
Quoted 4 lines

sent a seperate email on this.
mysql and postgresql are mutually exclusive. sqlite lite can be safely enabled/disable depending on BR2_PACKAGE_SQLITE.

Still, I'd prefer an automatic selection. E.g. if mysql is selected,
build mysql support, else if pgsql is selected, build pgsql support, else disable both.

ok - that will mean there is always an implicit bias for mysql. I am fine with that being the case.

Quoted 8 lines

[snip]

Regards,
Arnout

#6 lore raw

PATCH v5 1/1 package/radlib: new package

In reply to ray.kinsella at intel.com

Hi folks,

Please ignore this patch, as the current radlib build results in an incorrect dynamic link table in librad.

Lines like the following are just broken

raddebug_LDADD += -lmysqlclient
radmrouted_LDADD += -lmysqlclient

or

radmrouted_LDADD += $(MYSQL_LIBS)
raddebug_LDADD += $(MYSQL_LIBS)

The radlib library (librad.so) should link against mysql/sqlite/postgresql. The radlib executables (shown above) should then link again radlib (librad.so).

Thanks,

Ray K

Quoted 33 lines · ray.kinsella at intel.com

From: Ray Kinsella <[email protected]>

Changes v4 -> v5:
* reorganize autotools changes into 3 seperate patches
* adding pkg-config support for sqlite and postgresql
* adding mysql-config support for mysql
* removing ugly CROSS_COMPILE and paths relative to $(prefix)
* number of small tidy ups for package/radlib

Ray Kinsella (1):
package/radlib: new package

 package/Config.in                                  |   1 +
 ...oduce-pkg-config-for-sqlite-and-postgresq.patch | 102
+++++++++++++++++++++
 .../0002-radlib-introduce-mysql-config.patch       |  78
++++++++++++++++
 ...adlib-fix-the-paths-in-the-subdir-objects.patch |  93
+++++++++++++++++++
 package/radlib/Config.in                           |  38 ++++++++
 package/radlib/radlib.hash                         |   2 +
 package/radlib/radlib.mk                           |  28 ++++++
 7 files changed, 342 insertions(+)
 create mode 100644 package/radlib/0001-radlib-introduce-pkg-config
(quoted diff) +0 -3
-for-sqlite-and-postgresq.patch
 create mode 100644 package/radlib/0002-radlib-introduce-mysql
-config.patch
 create mode 100644 package/radlib/0003-radlib-fix-the-paths-in-the
-subdir-objects.patch
 create mode 100644 package/radlib/Config.in
 create mode 100644 package/radlib/radlib.hash
 create mode 100644 package/radlib/radlib.mk
#7 lore raw

PATCH v5 1/1 package/radlib: new package

Hello,

Quoted 8 lines · Ray

Please ignore this patch, as the current radlib build results in an incorrect dynamic link table in librad.

Lines like the following are just broken

raddebug_LDADD += -lmysqlclient
radmrouted_LDADD += -lmysqlclient

Quoted 8 lines

or

radmrouted_LDADD += $(MYSQL_LIBS)
raddebug_LDADD += $(MYSQL_LIBS)

The radlib library (librad.so) should link against mysql/sqlite/postgresql. The radlib executables (shown above) should then link again radlib (librad.so).

There were some other issues in your patch, and I was planning to review it. I'll try to give you some feedback so that you can take it into account for your v6.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH v5 1/1 package/radlib: new package

Thanks Thomas,

The backend 'choice' needs to be reworked to to remove sqllite. mysql or postgresql is used in 'raddatabase', these are mutually exclusive. SQLite ('radsqlite') is used seperately, it can be simply be enabled or disabled depending on whether it is BR2_PACKAGE_SQLITE is enabled.

Thanks,

Ray K

Quoted 29 lines · Thomas Petazzoni

Hello,

Quoted 10 lines · Ray

Please ignore this patch, as the current radlib build results in an incorrect dynamic link table in librad.

Lines like the following are just broken

raddebug_LDADD += -lmysqlclient
radmrouted_LDADD += -lmysqlclient

or

Quoted 7 lines

radmrouted_LDADD += $(MYSQL_LIBS)
raddebug_LDADD += $(MYSQL_LIBS)

The radlib library (librad.so) should link against mysql/sqlite/postgresql. The radlib executables (shown above) should
then link again radlib (librad.so).

There were some other issues in your patch, and I was planning to review it. I'll try to give you some feedback so that you can take it into account for your v6.

Thanks,

Thomas