package/radlib: new package
v4 cover 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.
--------------------------------------------------------------------------------
Ray Kinsella (3):
package/radlib: kconfig and makefile package/radlib: Renamed configure.in to configure.ac package/radlib: reworked autotools with pkg-config
package/Config.in | 1 + ...dlib-renamed-configure.in-to-configure.ac.patch | 213 +++++++++++++++++ ...radlib-reworked-autotools-with-pkg-config.patch | 252 +++++++++++++++++++++ package/radlib/Config.in | 37 +++ package/radlib/radlib.hash | 2 + package/radlib/radlib.mk | 28 +++ 6 files changed, 533 insertions(+) create mode 100644 package/radlib/0001-radlib-renamed-configure.in-to-configure.ac.patch create mode 100644 package/radlib/0002-radlib-reworked-autotools-with-pkg-config.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
PATCH v4 1/3 package/radlib: kconfig and makefile
From: Ray Kinsella <[email protected]>
Add new package for radlib including kconfig and makefile. The makefile includes a choice depending on which database backends are enabled.
--- package/Config.in | 1 + package/radlib/Config.in | 37 +++++++++++++++++++++++++++++++++++++ package/radlib/radlib.hash | 2 ++ package/radlib/radlib.mk | 28 ++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+) 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
@@ -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/Config.in new file +37 -0
@@ -0,0 +1,37 @@ +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
@@ -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
@@ -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 += --with-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 += --with-mysql +endif + +ifeq ($(BR2_PACKAGE_RADLIB_POSTGRESQL),y) + RADLIB_CONF_OPTS += --with-postgresql +endif + +$(eval $(autotools-package))
Signature · 1 line
2.4.11
PATCH v4 1/3 package/radlib: kconfig and makefile
Very quick feedback, not a detailed review.
First of all, the three patches should be squashed into one, because all three
are needed to have a functional package. Otherwise, the build would be broken between the patches.
Quoted 37 lines · ray.kinsella at intel.com
From: Ray Kinsella <[email protected]>
Add new package for radlib including kconfig and makefile. The makefile includes a choice depending on which database backends are enabled.
Signed-off-by Ray Kinsella <[email protected]>--- package/Config.in | 1 + package/radlib/Config.in | 37 +++++++++++++++++++++++++++++++++++++ package/radlib/radlib.hash | 2 ++ package/radlib/radlib.mk | 28 ++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+)create mode 100644 package/radlib/Config.in
create mode 100644 package/radlib/radlib.hash
create mode 100644package/radlib/radlib.mkpackage/Config.in +1
-0@@ -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/Config.in new file +3
-0@@ -0,0 +1,37 @@ +config BR2_PACKAGE_RADLIB + bool "radlib" + help
package/radlib/Config.in line 13
Quoted 10 lines
package/radlib/Config.in new file +10
-0+ 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
We generally prefer to have a big if...endif construct, because that is easier
to extend with additional options.
However, do we really need this choice? Isn't it possible to build radlib with
support for multiple databases?
package/radlib/Config.in line 17
Quoted 4 lines
package/radlib/Config.in new file +4
-0+ depends on BR2_PACKAGE_SQLITE \ + || BR2_PACKAGE_MYSQL \ + || BR2_PACKAGE_POSTGRESQL + help$
Stray $
package/radlib/Config.in line 18
Quoted 1 line
package/radlib/Config.in new file +1
-0+ Selects the backend database: sqlite, mysql or postgresql
Indentation should be one tab + 2 spaces; same below.
Quoted 8 lines
package/radlib/Config.in new file +8
-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
package/radlib/Config.in line 36
Quoted 10 lines
package/radlib/Config.in new file +10
-0+ 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
Add an empty line here.
Quoted 21 lines
package/radlib/Config.in new file +1
-0+endchoicepackage/radlib/radlib.hash new file +2
-0@@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/radlib/files/ +sha256 82b98bb5e08a500dea1e4252843b9c772fa1fb67ac8ab89ed64abdd5e22eca66 radlib-2.12.0.tar.gzpackage/radlib/radlib.mk new file +6
-0@@ -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 += --with-sqlite
Don't indent.
Shouldn't there also be a RADLIB_DEPENDENCIES += sqlite ?
Also add
elseRADLIB_CONF_OPTS += --without-sqlite
(unless if that doesn't work of course; it if doesn't, mention it in the commit message).
Regards,
Arnout
Quoted 13 lines
package/radlib/radlib.mk new file +12
-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 += --with-mysql +endif + +ifeq ($(BR2_PACKAGE_RADLIB_POSTGRESQL),y) + RADLIB_CONF_OPTS += --with-postgresql +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
Kinsella
PATCH v4 1/3 package/radlib: kconfig and makefile
Hi Arnout,
Quoted 8 lines · Arnout Vandecappelle
Very quick feedback, not a detailed review.
First of all, the three patches should be squashed into one,
because all three
are needed to have a functional package. Otherwise, the build would be broken
between the patches.
Confused, just doing what I was asked in the previous review. Can you offer a little more guidance on how I should structure.
Agree that you need all the pieces for a functional package.
Quoted 8 lines · Thomas Petazzoni
Hello,
So you're doing three different things. Which calls for three different
patches.I'll do a full review once you send it with git send-email, because the
line wrapping makes it really hard to follow.
PATCH v4 1/3 package/radlib: kconfig and makefile
Quoted 12 lines · Ray
Hi Arnout,
Quoted 8 lines · Arnout Vandecappelle
Very quick feedback, not a detailed review.
First of all, the three patches should be squashed into one,
because all three
are needed to have a functional package. Otherwise, the build would be broken
between the patches.
Quoted 2 lines
Confused, just doing what I was asked in the previous review. Can you offer a little more guidance on how I should structure.
You misunderstood the patches that Thomas was refering to. There should be a
single PATCH v5 that you send to the buildroot mailing list, which contains Config.in, radlib.mk, radlib.hash, and at least 3 ....patch files.
Regards,
Arnout
Quoted 14 lines
Agree that you need all the pieces for a functional package.
Quoted 8 lines · Thomas Petazzoni
Hello,
So you're doing three different things. Which calls for three different
patches.I'll do a full review once you send it with git send-email, because the
line wrapping makes it really hard to follow.
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
Kinsella
PATCH v4 1/3 package/radlib: kconfig and makefile
Quoted 8 lines · Arnout Vandecappelle
Quoted 2 lines
Confused, just doing what I was asked in the previous review. Can you offer a little more guidance on how I should structure.
You misunderstood the patches that Thomas was refering to. There
should be a
single PATCH v5 that you send to the buildroot mailing list, which contains
Config.in, radlib.mk, radlib.hash, and at least 3 ....patch files.
ok I get it ... your point about the build being broken between patches makes perfect sense.
So a single email PATCH v3 patching radlib.mk, Config.in, radlib.hash and three patches. On the 3 patches, can we define what these look like...
1. Patch to introduce pkg-config for sqlite and postgresql.
2. Patch to introduce mysql-config.
3. Patch to fix the paths in the subdir-objects.
Accurate, make sense?
Ray k
PATCH v4 1/3 package/radlib: kconfig and makefile
Quoted 17 lines · Ray
Quoted 8 lines · Arnout Vandecappelle
Quoted 2 lines
Confused, just doing what I was asked in the previous review. Can you offer a little more guidance on how I should structure.
You misunderstood the patches that Thomas was refering to. There
should be a
single PATCH v5 that you send to the buildroot mailing list, which contains
Config.in, radlib.mk, radlib.hash, and at least 3 ....patch files.ok I get it ... your point about the build being broken between patches makes perfect sense.
So a single email PATCH v3 patching radlib.mk, Config.in, radlib.hash and three patches. On the 3 patches, can we define what these look like...
Quoted 5 lines
1. Patch to introduce pkg-config for sqlite and postgresql.
2. Patch to introduce mysql-config.
3. Patch to fix the paths in the subdir-objects.Accurate, make sense?
Yes, makes sense.
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
Kinsella
PATCH v4 1/3 package/radlib: kconfig and makefile
Thanks Arnout.
Ray K
Quoted 35 lines · Arnout Vandecappelle
Quoted 22 lines · Ray
Quoted 11 lines · Arnout Vandecappelle
Quoted 2 lines
Confused, just doing what I was asked in the previous review. Can you offer a little more guidance on how I should structure.
You misunderstood the patches that Thomas was refering to.
There
should be a
single PATCH v5 that you send to the buildroot mailing list, which
contains
Config.in, radlib.mk, radlib.hash, and at least 3 ....patch files.ok I get it ... your point about the build being broken between patches
makes perfect sense.So a single email PATCH v3 patching radlib.mk, Config.in, radlib.hash
and three patches. On the 3 patches, can we define what these look like...Quoted 5 lines
1. Patch to introduce pkg-config for sqlite and postgresql.
2. Patch to introduce mysql-config.
3. Patch to fix the paths in the subdir-objects.Accurate, make sense?
Yes, makes sense.
Regards,
Arnout
PATCH v4 2/3 package/radlib: Renamed configure.in to configure.ac
In reply to ray.kinsella at intel.comFrom: Ray Kinsella <[email protected]>
configure.ac is now standard for autotools, this supresses a warning on autoreconf.
--- ...dlib-renamed-configure.in-to-configure.ac.patch | 213 +++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 package/radlib/0001-radlib-renamed-configure.in-to-configure.ac.patch
package/radlib/0001-radlib-renamed-configure.in-to-configure.ac.patch new file +213 -0
@@ -0,0 +1,213 @@ +From d3a51cf6492e062383dd49ee604aa1f77cdd47b0 Mon Sep 17 00:00:00 2001 +From: Ray Kinsella <[email protected]> +Date: Wed, 6 Apr 2016 11:23:45 +0100 +Subject: [PATCH 1/2] radlib: renamed configure.in to configure.ac + +configure.ac is now standard for autotools, this supresses a warning on +autoreconf + +Signed-off-by: Ray Kinsella <[email protected]> +--- + configure.ac | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + configure.in | 91 ------------------------------------------------------------ + 2 files changed, 91 insertions(+), 91 deletions(-) + create mode 100644 configure.ac + delete mode 100644 configure.in + +diff --git a/configure.ac b/configure.ac +new file mode 100644 +index 0000000..47e507e +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,91 @@ ++# Process this file with autoconf to produce a configure script. ++ ++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]) ++AM_CONFIG_HEADER([config.h]) ++ ++AC_ARG_ENABLE(mysql, ++[ --enable-mysql include radlib MySQL database support], ++[case "${enableval}" in ++ yes) mysql=true ;; ++ no) mysql=false ;; ++ *) mysql=false ;; ++esac],[mysql=false]) ++AM_CONDITIONAL(MYSQL, test x$mysql = xtrue) ++ ++AC_ARG_ENABLE(pgresql, ++[ --enable-pgresql include radlib postgreSQL database support], ++[case "${enableval}" in ++ yes) pgresql=true ;; ++ no) pgresql=false ;; ++ *) pgresql=false ;; ++esac],[pgresql=false]) ++AM_CONDITIONAL(PGRESQL, test x$pgresql = xtrue) ++ ++AC_ARG_ENABLE(sqlite, ++[ --enable-sqlite include radlib sqlite database support], ++[case "${enableval}" in ++ yes) sqlite=true ;; ++ no) sqlite=false ;; ++ *) sqlite=false ;; ++esac],[sqlite=false]) ++AM_CONDITIONAL(SQLITE, test x$sqlite = xtrue) ++ ++# Check for big endian host: ++AC_C_BIGENDIAN() ++ ++# Checks for programs. ++AC_PROG_CC ++AC_PROG_INSTALL ++AC_PROG_LIBTOOL ++ ++# Set a flag here if we are cross compiling (must be after AC_PROG_CC) ++AM_CONDITIONAL(CROSSCOMPILE, test x$cross_compiling = xyes) ++ ++# Checks for libraries. ++AC_CHECK_LIB([c], [strncpy]) ++AC_CHECK_LIB([m], [exp]) ++ ++# Checks for header files. ++AC_HEADER_STDC ++AC_HEADER_SYS_WAIT ++AC_CHECK_HEADERS([fcntl.h \ ++ stdlib.h \ ++ string.h \ ++ sys/time.h \ ++ syslog.h \ ++ termios.h \ ++ unistd.h]) ++ ++# Checks for typedefs, structures, and compiler characteristics. ++AC_C_CONST ++AC_TYPE_PID_T ++AC_HEADER_TIME ++AC_STRUCT_TM ++ ++# Checks for library functions. ++AC_FUNC_FORK ++AC_FUNC_MALLOC ++AC_FUNC_SELECT_ARGTYPES ++AC_TYPE_SIGNAL ++AC_FUNC_STAT ++AC_FUNC_VPRINTF ++AC_CHECK_FUNCS([getcwd \ ++ gethostname \ ++ gettimeofday \ ++ memset \ ++ mkdir \ ++ mkfifo \ ++ select \ ++ strchr \ ++ strerror \ ++ strrchr]) ++ ++AC_CONFIG_FILES([Makefile \ ++ src/Makefile \ ++ msgRouter/Makefile \ ++ debug/Makefile]) ++AC_OUTPUT ++ +diff --git a/configure.in b/configure.in +deleted file mode 100644 +index 47e507e..0000000 +--- a/configure.in ++++ /dev/null +@@ -1,91 +0,0 @@ +-# Process this file with autoconf to produce a configure script. +- +-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]) +-AM_CONFIG_HEADER([config.h]) +- +-AC_ARG_ENABLE(mysql, +-[ --enable-mysql include radlib MySQL database support], +-[case "${enableval}" in +- yes) mysql=true ;; +- no) mysql=false ;; +- *) mysql=false ;; +-esac],[mysql=false]) +-AM_CONDITIONAL(MYSQL, test x$mysql = xtrue) +- +-AC_ARG_ENABLE(pgresql, +-[ --enable-pgresql include radlib postgreSQL database support], +-[case "${enableval}" in +- yes) pgresql=true ;; +- no) pgresql=false ;; +- *) pgresql=false ;; +-esac],[pgresql=false]) +-AM_CONDITIONAL(PGRESQL, test x$pgresql = xtrue) +- +-AC_ARG_ENABLE(sqlite, +-[ --enable-sqlite include radlib sqlite database support], +-[case "${enableval}" in +- yes) sqlite=true ;; +- no) sqlite=false ;; +- *) sqlite=false ;; +-esac],[sqlite=false]) +-AM_CONDITIONAL(SQLITE, test x$sqlite = xtrue) +- +-# Check for big endian host: +-AC_C_BIGENDIAN() +- +-# Checks for programs. +-AC_PROG_CC +-AC_PROG_INSTALL +-AC_PROG_LIBTOOL +- +-# Set a flag here if we are cross compiling (must be after AC_PROG_CC) +-AM_CONDITIONAL(CROSSCOMPILE, test x$cross_compiling = xyes) +- +-# Checks for libraries. +-AC_CHECK_LIB([c], [strncpy]) +-AC_CHECK_LIB([m], [exp]) +- +-# Checks for header files. +-AC_HEADER_STDC +-AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS([fcntl.h \ +- stdlib.h \ +- string.h \ +- sys/time.h \ +- syslog.h \ +- termios.h \ +- unistd.h]) +- +-# Checks for typedefs, structures, and compiler characteristics. +-AC_C_CONST +-AC_TYPE_PID_T +-AC_HEADER_TIME +-AC_STRUCT_TM +- +-# Checks for library functions. +-AC_FUNC_FORK +-AC_FUNC_MALLOC +-AC_FUNC_SELECT_ARGTYPES +-AC_TYPE_SIGNAL +-AC_FUNC_STAT +-AC_FUNC_VPRINTF +-AC_CHECK_FUNCS([getcwd \ +- gethostname \ +- gettimeofday \ +- memset \ +- mkdir \ +- mkfifo \ +- select \ +- strchr \ +- strerror \ +- strrchr]) +- +-AC_CONFIG_FILES([Makefile \ +- src/Makefile \ +- msgRouter/Makefile \ +- debug/Makefile]) +-AC_OUTPUT +- +-- +2.4.3 +
Signature · 1 line
2.4.11
PATCH v4 2/3 package/radlib: Renamed configure.in to configure.ac
Quoted 4 lines · ray.kinsella at intel.com
From: Ray Kinsella <[email protected]>
configure.ac is now standard for autotools, this supresses a warning on autoreconf.
If it is just a warning, then this patch isn't needed.
If it really is needed, it's better to do it as a hook:
define RADLIB_RENAME_CONFIGURE_IN
mv $(@D)/configure.in $(@D)/configure.ac
endef
RADLIB_POST_PATCH_HOOKS += RADLIB_RENAME_CONFIGURE_IN
That said, it's still a good idea to upstream this patch.
Regards,
Arnout
Quoted 28 lines
Signed-off-by Ray Kinsella <[email protected]>--- ...dlib-renamed-configure.in-to-configure.ac.patch | 213 +++++++++++++++++++++ 1 file changed, 213 insertions(+)create mode 100644
package/radlib/0001-radlib-renamed-configure.in-to-configure.ac.patchpackage/radlib/0001-radlib-renamed-configure.in-to-configure.ac.patch new file +15
-0@@ -0,0 +1,213 @@ +From d3a51cf6492e062383dd49ee604aa1f77cdd47b0 Mon Sep 17 00:00:00 2001 +From: Ray Kinsella <[email protected]> +Date: Wed, 6 Apr 2016 11:23:45 +0100 +Subject: [PATCH 1/2] radlib: renamed configure.in to configure.ac + +configure.ac is now standard for autotools, this supresses a warning on +autoreconf + +Signed-off-by: Ray Kinsella <[email protected]> +--- + configure.ac | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + configure.in | 91 ------------------------------------------------------------ + 2 files changed, 91 insertions(+), 91 deletions(-) + create mode 100644 configure.ac + delete mode 100644 configure.in
[snip]
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
Kinsella
PATCH v4 2/3 package/radlib: Renamed configure.in to configure.ac
ok, I will check.
Quoted 61 lines · Arnout Vandecappelle
Quoted 4 lines · ray.kinsella at intel.com
From: Ray Kinsella <[email protected]>
configure.ac is now standard for autotools, this supresses a warning on autoreconf.
If it is just a warning, then this patch isn't needed.
If it really is needed, it's better to do it as a hook:
define
RADLIB_RENAME_CONFIGURE_INmv $(@D)/configure.in $(@D)/configure.acendef
RADLIB_POST_PATCH_HOOKS+=RADLIB_RENAME_CONFIGURE_INThat said, it's still a good idea to upstream this patch.
Regards,
ArnoutQuoted 37 lines
Signed-off-by Ray Kinsella <[email protected]>--- ...dlib-renamed-configure.in-to-configure.ac.patch | 213 +++++++++++++++++++++ 1 file changed, 213 insertions(+)create mode 100644 package/radlib/0001-radlib-renamed
(quoted diff) +0
-1-configure.in-to-configure.ac.patch(quoted diff) +0
-2-configure.ac.patch b/package/radlib/0001-radlib-renamed -configure.in-to-configure.ac.patchnew file mode 100644
index 0000000..c808ba7package/radlib/0001-radlib-renamed-configure.in-to new file +1
-1-configure.ac.patch@@ -0,0 +1,213 @@ +From d3a51cf6492e062383dd49ee604aa1f77cdd47b0 Mon Sep 17 00:00:002001
package/radlib/0001-radlib-renamed-configure.in-to new file +5
-0+From: Ray Kinsella <[email protected]> +Date: Wed, 6 Apr 2016 11:23:45 +0100 +Subject: [PATCH 1/2] radlib: renamed configure.in to configure.ac + +configure.ac is now standard for autotools, this supresses awarning on
package/radlib/0001-radlib-renamed-configure.in-to new file +10
-1+autoreconf + +Signed-off-by: Ray Kinsella <[email protected]> +--- + configure.ac | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + configure.in | 91 ----------------------------------------------- ------------- + 2 files changed, 91 insertions(+), 91 deletions(-) + create mode 100644 configure.ac + delete mode 100644 configure.in[snip]
PATCH v4 3/3 package/radlib: reworked autotools with pkg-config
In reply to ray.kinsella at intel.comFrom: Ray Kinsella <[email protected]>
Reworked the autools implementation to use pkg-config and mysql-config.
--- ...radlib-reworked-autotools-with-pkg-config.patch | 252 +++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +252 -0
@@ -0,0 +1,252 @@ +From 832855f6942fea66a39c738865484e57a8f97169 Mon Sep 17 00:00:00 2001 +From: Ray Kinsella <[email protected]> +Date: Wed, 6 Apr 2016 11:25:40 +0100 +Subject: [PATCH 2/2] radlib: reworked autotools with pkg-config + +Reworked the autools implementation to use pkg-config and mysql-config. + +Signed-off-by: Ray Kinsella <[email protected]> +--- + configure.ac | 47 ++++++++++++++++++++++------------------------- + debug/Makefile.am | 32 +++++--------------------------- + msgRouter/Makefile.am | 34 ++++++---------------------------- + src/Makefile.am | 36 +++++++++++++----------------------- + 4 files changed, 46 insertions(+), 103 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 47e507e..ba493f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3,35 +3,32 @@ + 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]) ++AM_INIT_AUTOMAKE([subdir-objects]) + AM_CONFIG_HEADER([config.h]) + +-AC_ARG_ENABLE(mysql, +-[ --enable-mysql include radlib MySQL database support], +-[case "${enableval}" in +- yes) mysql=true ;; +- no) mysql=false ;; +- *) mysql=false ;; +-esac],[mysql=false]) +-AM_CONDITIONAL(MYSQL, test x$mysql = xtrue) ++AC_ARG_WITH([postgresql], AS_HELP_STRING([--with-postgresql], [Build with postgresql])) ++if test "x$with_postgresql" = "xyes"; then ++ PKG_CHECK_MODULES([POSTGRESQL], [libpq], [have_libpq=yes], [have_libpq=no]) ++fi ++AM_CONDITIONAL([HAVE_POSTGRESQL], [test "$have_libpq" = "yes"]) + +-AC_ARG_ENABLE(pgresql, +-[ --enable-pgresql include radlib postgreSQL database support], +-[case "${enableval}" in +- yes) pgresql=true ;; +- no) pgresql=false ;; +- *) pgresql=false ;; +-esac],[pgresql=false]) +-AM_CONDITIONAL(PGRESQL, test x$pgresql = xtrue) ++AC_ARG_WITH([mysql], AS_HELP_STRING([--with-mysql], [Build with mysql])) ++if test "x$with_mysql" = "xyes"; then ++ 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]) ++ fi ++fi ++AM_CONDITIONAL([HAVE_MYSQL], [test "x$MYSQL_CONFIG" != "x"]) + +-AC_ARG_ENABLE(sqlite, +-[ --enable-sqlite include radlib sqlite database support], +-[case "${enableval}" in +- yes) sqlite=true ;; +- no) sqlite=false ;; +- *) sqlite=false ;; +-esac],[sqlite=false]) +-AM_CONDITIONAL(SQLITE, test x$sqlite = xtrue) ++AC_ARG_WITH([sqlite], AS_HELP_STRING([--with-sqlite], [Build with sqlite])) ++if test "x$with_sqlite" = "xyes"; then ++ PKG_CHECK_MODULES([SQLITE3], [sqlite3], [have_libsqlite3=yes], [have_libsqlite3=no]) ++fi ++AM_CONDITIONAL([HAVE_SQLITE3], [test "$have_libsqlite3" = "yes"]) + + # Check for big endian host: + AC_C_BIGENDIAN() +diff --git a/debug/Makefile.am b/debug/Makefile.am +index 00f3b13..fde57d5 100644 +--- a/debug/Makefile.am ++++ b/debug/Makefile.am +@@ -4,7 +4,7 @@ + bin_PROGRAMS = raddebug + + # define include directories +-INCLUDES = \ ++AM_CFLAGS = \ + -I$(top_srcdir)/h \ + -D_GNU_SOURCE + +@@ -15,30 +15,8 @@ raddebug_SOURCES = \ + # define libraries + raddebug_LDADD = -lrad -lpthread + +-if MYSQL +-raddebug_LDADD += -lmysqlclient +-else +-if PGRESQL +-raddebug_LDADD += -lpq +-endif +-endif +-if SQLITE +-raddebug_LDADD += -lsqlite3 +-endif +- + # define library directories +-raddebug_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib +-INCLUDES += -I$(prefix)/include -I/usr/include +- +-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 ++raddebug_LDFLAGS = -L../src/.libs \ ++ $(SQLITE3_LIBS) \ ++ $(MYSQL_LIBS) \ ++ $(POSTGRESQL_LIBS) +diff --git a/msgRouter/Makefile.am b/msgRouter/Makefile.am +index 5a20421..6f13a4e 100644 +--- a/msgRouter/Makefile.am ++++ b/msgRouter/Makefile.am +@@ -4,7 +4,7 @@ + bin_PROGRAMS = radmrouted + + # define include directories +-INCLUDES = \ ++AM_CFLAGS = \ + -I$(top_srcdir)/h \ + -D_GNU_SOURCE + +@@ -13,32 +13,10 @@ radmrouted_SOURCES = \ + $(top_srcdir)/msgRouter/msgRouter.c + + # define libraries +-radmrouted_LDADD = -lrad -lpthread +- +-if MYSQL +-radmrouted_LDADD += -lmysqlclient +-else +-if PGRESQL +-radmrouted_LDADD += -lpq +-endif +-endif +-if SQLITE +-radmrouted_LDADD += -lsqlite3 +-endif ++radmrouted_LDADD = -lrad -lpthread + + # define library directories +-radmrouted_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib +-INCLUDES += -I$(prefix)/include -I/usr/include +- +-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 ++radmrouted_LDFLAGS = -L../src/.libs \ ++ $(SQLITE3_LIBS) \ ++ $(MYSQL_LIBS) \ ++ $(POSTGRESQL_LIBS) +diff --git a/src/Makefile.am b/src/Makefile.am +index 38b2ac8..25d16cf 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -12,45 +12,35 @@ SUBDIRS = + #define the library to be built + lib_LTLIBRARIES = librad.la + +-if MYSQL +-MY_INCLUDES = \ +- -I$(prefix)/include/mysql \ +- -I/usr/include/mysql +-MY_SOURCES = \ ++if HAVE_MYSQL ++MYSQL_SOURCES = \ + $(top_srcdir)/database/mysql/my_database.c \ + $(top_srcdir)/src/raddatabase.c + MYSQL_HDRS = \ + $(top_srcdir)/h/raddatabase.h + endif +-if PGRESQL +-PG_INCLUDES = \ +- -I$(prefix)/include \ +- -I/usr/include +-PG_SOURCES = \ ++if HAVE_POSTGRESQL ++PGSQL_SOURCES = \ + $(top_srcdir)/database/postgresql/pg_database.c \ + $(top_srcdir)/src/raddatabase.c + PGSQL_HDRS = \ + $(top_srcdir)/h/raddatabase.h \ + $(top_srcdir)/database/postgresql/_pg-types.h + endif +-if SQLITE +-SQ_INCLUDES = \ +- -I$(prefix)/include \ +- -I/usr/include +-SQ_SOURCES = \ ++if HAVE_SQLITE3 ++SQLITE_SOURCES = \ + $(top_srcdir)/src/radsqlite.c + SQLITE_HDRS = \ + $(top_srcdir)/h/radsqlite.h + endif + + # define include directories +-INCLUDES = \ ++AM_CFLAGS = \ + -I$(top_srcdir)/h \ +- -I$(prefix)/include \ + -D_GNU_SOURCE \ +- $(MY_INCLUDES) \ +- $(PG_INCLUDES) \ +- $(SQ_INCLUDES) ++ $(MYSQL_CFLAGS) \ ++ $(SQLITE3_CFLAGS) \ ++ $(POSTGRESQL_CFLAGS) + + + +@@ -86,9 +76,9 @@ librad_la_SOURCES = \ + $(top_srcdir)/src/radtimers.c \ + $(top_srcdir)/src/radtimeUtils.c \ + $(top_srcdir)/src/radUDPsocket.c \ +- $(MY_SOURCES) \ +- $(PG_SOURCES) \ +- $(SQ_SOURCES) ++ $(MYSQL_SOURCES) \ ++ $(PGSQL_SOURCES) \ ++ $(SQLITE_SOURCES) + + + # define the header files we install for the library +-- +2.4.3 +
Signature · 1 line
2.4.11
PATCH v4 3/3 package/radlib: reworked autotools with pkg-config
Quoted 16 lines · ray.kinsella at intel.com
From: Ray Kinsella <[email protected]>
Reworked the autools implementation to use pkg-config and mysql-config.
Signed-off-by Ray Kinsella <[email protected]>--- ...radlib-reworked-autotools-with-pkg-config.patch | 252 +++++++++++++++++++++ 1 file changed, 252 insertions(+)create mode 100644
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patchpackage/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +0
-0
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 6
Quoted 6 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +6
-0@@ -0,0 +1,252 @@ +From 832855f6942fea66a39c738865484e57a8f97169 Mon Sep 17 00:00:00 2001 +From: Ray Kinsella <[email protected]> +Date: Wed, 6 Apr 2016 11:25:40 +0100 +Subject: [PATCH 2/2] radlib: reworked autotools with pkg-config + +Reworked the autools implementation to use pkg-config and mysql-config.
Do this in three separate patches: one that sets subdir-objects, one that adds
pkg-config, and one that adds mysql-config.
Quoted 13 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +13
-0+ +Signed-off-by: Ray Kinsella <[email protected]> +--- + configure.ac | 47 ++++++++++++++++++++++------------------------- + debug/Makefile.am | 32 +++++--------------------------- + msgRouter/Makefile.am | 34 ++++++---------------------------- + src/Makefile.am | 36 +++++++++++++----------------------- + 4 files changed, 46 insertions(+), 103 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 47e507e..ba493f5 100644 +--- a/configure.ac ++++ b/configure.ac
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 29
Quoted 10 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +10
-0+@@ -3,35 +3,32 @@ + 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]) ++AM_INIT_AUTOMAKE([subdir-objects]) + AM_CONFIG_HEADER([config.h]) + +-AC_ARG_ENABLE(mysql, +-[ --enable-mysql include radlib MySQL database support],
Why would you remove this? An enable option is as good as a with option.
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 34
Quoted 5 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +5
-0+-[case "${enableval}" in +- yes) mysql=true ;; +- no) mysql=false ;; +- *) mysql=false ;; +-esac],[mysql=false])
So you keep the above, and here just add
if test x"$mysql" = xtrue; then
AC_PATH_PROG(...)
if test "x$MYSQL_CONFIG" != "x"; then
...
else
mysql=false
fi
fi
(indentation in this file seems to be with two spaces instead of tabs).
And of course the same story for pg.
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 35
Quoted 1 line
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +1
-0+-AM_CONDITIONAL(MYSQL, test x$mysql = xtrue)
Keep this, there is no reason to replace it by HAVE_MYSQL.
Quoted 42 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +42
-0++AC_ARG_WITH([postgresql], AS_HELP_STRING([--with-postgresql], [Build with postgresql])) ++if test "x$with_postgresql" = "xyes"; then ++ PKG_CHECK_MODULES([POSTGRESQL], [libpq], [have_libpq=yes], [have_libpq=no]) ++fi ++AM_CONDITIONAL([HAVE_POSTGRESQL], [test "$have_libpq" = "yes"]) + +-AC_ARG_ENABLE(pgresql, +-[ --enable-pgresql include radlib postgreSQL database support], +-[case "${enableval}" in +- yes) pgresql=true ;; +- no) pgresql=false ;; +- *) pgresql=false ;; +-esac],[pgresql=false]) +-AM_CONDITIONAL(PGRESQL, test x$pgresql = xtrue) ++AC_ARG_WITH([mysql], AS_HELP_STRING([--with-mysql], [Build with mysql])) ++if test "x$with_mysql" = "xyes"; then ++ 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]) ++ fi ++fi ++AM_CONDITIONAL([HAVE_MYSQL], [test "x$MYSQL_CONFIG" != "x"]) + +-AC_ARG_ENABLE(sqlite, +-[ --enable-sqlite include radlib sqlite database support], +-[case "${enableval}" in +- yes) sqlite=true ;; +- no) sqlite=false ;; +- *) sqlite=false ;; +-esac],[sqlite=false]) +-AM_CONDITIONAL(SQLITE, test x$sqlite = xtrue) ++AC_ARG_WITH([sqlite], AS_HELP_STRING([--with-sqlite], [Build with sqlite])) ++if test "x$with_sqlite" = "xyes"; then ++ PKG_CHECK_MODULES([SQLITE3], [sqlite3], [have_libsqlite3=yes], [have_libsqlite3=no]) ++fi ++AM_CONDITIONAL([HAVE_SQLITE3], [test "$have_libsqlite3" = "yes"]) + + # Check for big endian host: + AC_C_BIGENDIAN()
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 87
Quoted 10 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +10
-0+diff --git a/debug/Makefile.am b/debug/Makefile.am +index 00f3b13..fde57d5 100644 +--- a/debug/Makefile.am ++++ b/debug/Makefile.am +@@ -4,7 +4,7 @@ + bin_PROGRAMS = raddebug + + # define include directories +-INCLUDES = \ ++AM_CFLAGS = \
Why does this need to be changed?
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 90
Quoted 3 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +3
-0+ -I$(top_srcdir)/h \ + -D_GNU_SOURCE +
Did you forget to add $(SQLITE3_CFLAGS) etc?
Quoted 21 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +21
-0+@@ -15,30 +15,8 @@ raddebug_SOURCES = \ + # define libraries + raddebug_LDADD = -lrad -lpthread + +-if MYSQL +-raddebug_LDADD += -lmysqlclient +-else +-if PGRESQL +-raddebug_LDADD += -lpq +-endif +-endif +-if SQLITE +-raddebug_LDADD += -lsqlite3 +-endif +- + # define library directories +-raddebug_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib +-INCLUDES += -I$(prefix)/include -I/usr/include +- +-if MYSQL +-raddebug_LDFLAGS += -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 121
Quoted 10 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +10
-0+-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
Removing the CROSSCOMPILE part should be a separate patch.
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 126
Quoted 5 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +5
-0++raddebug_LDFLAGS = -L../src/.libs \ ++ $(SQLITE3_LIBS) \ ++ $(MYSQL_LIBS) \ ++ $(POSTGRESQL_LIBS) +diff --git a/msgRouter/Makefile.am b/msgRouter/Makefile.am
[snip]
Same here.
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 177
Quoted 1 line
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +1
-0+diff --git a/src/Makefile.am b/src/Makefile.am
[snip]
Same here.
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
Kinsella
PATCH v4 3/3 package/radlib: reworked autotools with pkg-config
Quoted 3 lines · Arnout Vandecappelle
Do this in three separate patches: one that sets subdir-objects, one that adds
pkg-config, and one that adds mysql-config.
Ok then, use a hook for the rename.
Might make more sense to do one patch for pkg-config with subdir -objects, because these are linked - which subdir objects you get depends on pkg-config?
And then another patch for mysql-config. So two patches?
Quoted 7 lines
Quoted 4 lines
+-AC_ARG_ENABLE(mysql, +-[ --enable-mysql include radlib MySQL databasesupport],
Why would you remove this? An enable option is as good as a with
option.
The original feedback I got was that the autotools implementation for radlib was hopelessly screwed up. I was trying to strike a balance between limiting changes but improving the overall flows.
I used with 'with' instead of 'enable' because of the semantics ...
If a package _must_ be available on the platform for it available to choose then 'with' makes more sense than 'enable'. Radlib supports more than one back end so selecting a backend by indicating 'with' made more sense to me. 'enable' is typically for features whereas 'with', is typically used to indicate building 'with' a given package.
That said I am agnoistic, I am happy to revert to AC_ARG_ENABLE to reduce the patch.
Quoted 12 lines
Quoted 6 lines
+-[case "${enableval}" in +- yes) mysql=true ;; +- no) mysql=false ;; +- *) mysql=false ;; +-esac],[mysql=false])So you keep the above, and here just add
if test x"$mysql" = xtrue; then
AC_PATH_PROG(...)
if test "x$MYSQL_CONFIG" != "x"; then
Quoted 8 lines
...else
mysql=false
fi
fi(indentation in this file seems to be with two spaces instead of tabs).
np, will fix.
Quoted 2 lines
And of course the same story for pg.
ok.
Quoted 3 lines
Quoted 1 line
+-AM_CONDITIONAL(MYSQL, test x$mysql = xtrue)
Keep this, there is no reason to replace it by
HAVE_MYSQL.
Ok - I am pretty sure I got feedback to change these conditionals to HAVE_, but no problem I can fix.
Quoted 5 lines
Quoted 3 lines
+ # define include directories
+-INCLUDES = \
++AM_CFLAGS = \Why does this need to be changed?
I will investigate ...
The original INCLUDES was pulling in host directories. Not sure why the switch to AM_CFLAGS
Quoted 6 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 90
Quoted 4 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +3
-0+ -I$(top_srcdir)/h \ + -D_GNU_SOURCE +Did you forget to add $(SQLITE3_CFLAGS) etc?
nope, no special include is needed for SQLITE.
Quoted 1 line
Removing the CROSSCOMPILE part should be a separate patch.
ok
Quoted 20 lines
Quoted 6 lines
++raddebug_LDFLAGS = -L../src/.libs \
++ $(SQLITE3_LIBS) \
++ $(MYSQL_LIBS) \
++ $(POSTGRESQL_LIBS)
+diff --git a/msgRouter/Makefile.am b/msgRouter/Makefile.am[snip]
Same here.
Quoted 1 line
+diff --git a/src/Makefile.am b/src/Makefile.am
[snip]
Same here.
Regards,
Arnout
PATCH v4 3/3 package/radlib: reworked autotools with pkg-config
Quoted 10 lines · Ray
Quoted 3 lines · Arnout Vandecappelle
Do this in three separate patches: one that sets subdir-objects, one that adds
pkg-config, and one that adds mysql-config.Ok then, use a hook for the rename.
Might make more sense to do one patch for pkg-config with subdir -objects, because these are linked - which subdir objects you get depends on pkg-config?
Er, subdir-objects is just an option that is needed for recent autoconf when
you have directories without Makefile.am. Doesn't have anything to do with pkg-config AFAIK.
Quoted 8 lines
And then another patch for mysql-config. So two patches?
Quoted 5 lines
Quoted 4 lines
+-AC_ARG_ENABLE(mysql, +-[ --enable-mysql include radlib MySQL databasesupport],
Quoted 6 lines
Quoted 2 lines
Why would you remove this? An enable option is as good as a with
option.The original feedback I got was that the autotools implementation for radlib was hopelessly screwed up. I was trying to strike a balance between limiting changes but improving the overall flows.
From who did you get that feedback? Thomas wrote that the Makefile.am
contained some weird stuff, but that's a bit separate.
Quoted 8 lines
I used with 'with' instead of 'enable' because of the semantics ...
If a package _must_ be available on the platform for it available to choose then 'with' makes more sense than 'enable'. Radlib supports more than one back end so selecting a backend by indicating 'with' made more sense to me. 'enable' is typically for features whereas 'with', is typically used to indicate building 'with' a given package.
Well, your Config.in didn't express that at least one database must be
selected, and also your original replies to Thomas didn't say that, so I assumed that the databases were indeed optional. But even if they are not optional, I wouldn't bother changing the enable in a with.
Quoted 4 lines
That said I am agnoistic, I am happy to revert to
AC_ARG_ENABLEto reduce the patch.
[snip]
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
+-AM_CONDITIONAL(MYSQL, test x$mysql = xtrue)
Keep this, there is no reason to replace it by
HAVE_MYSQL.Ok - I am pretty sure I got feedback to change these conditionals to
HAVE_, but no problem I can fix.
I looked back at Thomas's original comments and couldn't find anything
suggesting that.
Quoted 13 lines
Quoted 7 lines
Quoted 5 lines
+ # define include directories
+-INCLUDES = \
++AM_CFLAGS = \Why does this need to be changed?
I will investigate ...
The original INCLUDES was pulling in host directories. Not sure why the switch toAM_CFLAGSQuoted 1 line
Quoted 7 lines
Quoted 5 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch line 90
Quoted 3 lines
package/radlib/0002-radlib-reworked-autotools-with-pkg-config.patch new file +3
-0+ -I$(top_srcdir)/h \ + -D_GNU_SOURCE +Did you forget to add $(SQLITE3_CFLAGS) etc?nope, no special include is needed for SQLITE.
Well, that's because in buildroot we install everything in /usr/include, so no
-I option is needed. But you can't assume that in general, so you will need SQLITE3_CFLAGS for upstream.
Quoted 5 lines
Quoted 3 lines
Removing the CROSSCOMPILE part should be a separate patch.
ok
Just to be clear: I mean a separate .patch file, not a separate commit in
buildroot.git.
Regards,
Arnout
[snip]
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