All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Herve Codina <herve.codina@bootlin.com>, buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH 2/3] package/libdbi-drivers: new package
Date: Wed, 13 Oct 2021 20:11:12 +0200	[thread overview]
Message-ID: <471e1df6-225d-04b3-49e1-b68edac32fa6@mind.be> (raw)
In-Reply-To: <20211004124316.355770-3-herve.codina@bootlin.com>



On 04/10/2021 14:43, Herve Codina wrote:
> The libdbi-drivers project provides the database-specific drivers
> for the libdbi framework
> 
> http://libdbi-drivers.sourceforge.net/
> 
> Based on initial work from Nicolas Carrier <nicolas.carrier@orolia.com>
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> ---
>   DEVELOPERS                                    |  2 +
>   package/Config.in                             |  1 +
>   ...CONFIG-variable-instead-of-mysql_con.patch | 47 ++++++++++++++++++
>   package/libdbi-drivers/Config.in              |  8 ++++
>   package/libdbi-drivers/libdbi-drivers.hash    |  3 ++
>   package/libdbi-drivers/libdbi-drivers.mk      | 48 +++++++++++++++++++
>   6 files changed, 109 insertions(+)
>   create mode 100644 package/libdbi-drivers/0001-build-Use-MYSQL_CONFIG-variable-instead-of-mysql_con.patch
>   create mode 100644 package/libdbi-drivers/Config.in
>   create mode 100644 package/libdbi-drivers/libdbi-drivers.hash
>   create mode 100644 package/libdbi-drivers/libdbi-drivers.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 30bf29ffd6..b954c58953 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1150,6 +1150,7 @@ F:	package/json-glib/
>   
>   N:	Hervé Codina <herve.codina@bootlin.com>
>   F:	package/libdbi/
> +F:	package/libdbi-drivers/
>   
>   N:	Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
>   F:	package/gauche/
> @@ -1984,6 +1985,7 @@ F:	configs/galileo_defconfig
>   N:	Nicolas Carrier <nicolas.carrier@orolia.com>
>   F:	package/bmap-tools/
>   F:	package/libdbi/
> +F:	package/libdbi-drivers/
>   F:	package/php-xdebug/
>   F:	package/python-augeas/
>   F:	package/python-flask-expects-json/
> diff --git a/package/Config.in b/package/Config.in
> index 1b07eed5e0..a6572feb3b 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1415,6 +1415,7 @@ menu "Database"
>   	source "package/kompexsqlite/Config.in"
>   	source "package/leveldb/Config.in"
>   	source "package/libdbi/Config.in"
> +	source "package/libdbi-drivers/Config.in"
>   	source "package/libgit2/Config.in"
>   	source "package/libmdbx/Config.in"
>   	source "package/libodb/Config.in"
> diff --git a/package/libdbi-drivers/0001-build-Use-MYSQL_CONFIG-variable-instead-of-mysql_con.patch b/package/libdbi-drivers/0001-build-Use-MYSQL_CONFIG-variable-instead-of-mysql_con.patch
> new file mode 100644
> index 0000000000..66e99c430f
> --- /dev/null
> +++ b/package/libdbi-drivers/0001-build-Use-MYSQL_CONFIG-variable-instead-of-mysql_con.patch
> @@ -0,0 +1,47 @@
> +From bc966656d8598a6d87c901a67ecdb91c436f4939 Mon Sep 17 00:00:00 2001
> +From: Herve Codina <herve.codina@bootlin.com>
> +Date: Wed, 29 Sep 2021 15:08:33 +0200
> +Subject: [PATCH] build: Use MYSQL_CONFIG variable instead of
> + 'mysql_config'
> +
> +The MYSQL_CONFIG variable is used to check 'mysql_config' prog.
> +This variable can be override by the user but was not used for
> +retrieving MYSQL_INCLUDE, MYSQL_LIBS, ...
> +
> +This commit replaces the hardcoded usage of 'mysql_config' by
> +the use of MYSQL_CONFIG variable.
> +
> +This lead to 'MYSQL_CONFIG=/some/where/mysql_config ./configure'
> +command to work properly.
> +
> +Signed-off-by: Herve Codina <herve.codina@bootlin.com>

  Please send the patch upstream to the mailing list [1]. Normally, I'd also 
want an upstream link here, but I've already applied.


  Regards,
  Arnout

[1] https://sourceforge.net/projects/libdbi-drivers/lists/libdbi-drivers-devel

> +---
> + acinclude.m4 | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/acinclude.m4 b/acinclude.m4
> +index e99318f..9dd2b0f 100644
> +--- a/acinclude.m4
> ++++ b/acinclude.m4
> +@@ -116,15 +116,15 @@ if test "$ac_mysql" = "yes"; then
> + 	fi
> +
> + 	if test "$ac_mysql_incdir" = "no"; then
> +-		MYSQL_INCLUDE=`mysql_config --include`
> ++		MYSQL_INCLUDE=`$MYSQL_CONFIG --include`
> + 	else
> + 		MYSQL_INCLUDE=-I$ac_mysql_incdir
> + 	fi
> + 	if test "$ac_mysql_libdir" = "no"; then
> + 	   	if test "$ac_mysql_threadsafe" = "YES"; then
> +-			MYSQL_LIBS=`mysql_config --libs_r`
> ++			MYSQL_LIBS=`$MYSQL_CONFIG --libs_r`
> + 		else
> +-			MYSQL_LIBS=`mysql_config --libs`
> ++			MYSQL_LIBS=`$MYSQL_CONFIG --libs`
> + 		fi
> + 	else
> + 	   	if test "$ac_mysql_threadsafe" = "YES"; then
> +--
> +2.31.1
> +
> diff --git a/package/libdbi-drivers/Config.in b/package/libdbi-drivers/Config.in
> new file mode 100644
> index 0000000000..087e6aaf0e
> --- /dev/null
> +++ b/package/libdbi-drivers/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_LIBDBI_DRIVERS
> +	bool "libdbi-drivers"
> +	select BR2_PACKAGE_LIBDBI
> +	help
> +	  The libdbi-drivers project provides the
> +	  database-specific drivers for the libdbi framework.
> +
> +	  http://libdbi-drivers.sourceforge.net
> diff --git a/package/libdbi-drivers/libdbi-drivers.hash b/package/libdbi-drivers/libdbi-drivers.hash
> new file mode 100644
> index 0000000000..73a8daa54c
> --- /dev/null
> +++ b/package/libdbi-drivers/libdbi-drivers.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256 0237c8006cefd6873f0b43d9676b14d5674270adf5e7501cd0e3423ff5b41549  libdbi-drivers-7a8e24ec1cf763226f4be31ba1018d888d4989f3-br1.tar.gz
> +sha256 5bbcbb737e60fe9deba08ecbd00920cfcc3403ba2e534c64fdeea49d6bb87509  COPYING
> diff --git a/package/libdbi-drivers/libdbi-drivers.mk b/package/libdbi-drivers/libdbi-drivers.mk
> new file mode 100644
> index 0000000000..78d1c61515
> --- /dev/null
> +++ b/package/libdbi-drivers/libdbi-drivers.mk
> @@ -0,0 +1,48 @@
> +################################################################################
> +#
> +# libdbi-drivers
> +#
> +################################################################################
> +
> +LIBDBI_DRIVERS_VERSION = 7a8e24ec1cf763226f4be31ba1018d888d4989f3
> +LIBDBI_DRIVERS_SITE = https://git.code.sf.net/p/libdbi-drivers/libdbi-drivers
> +LIBDBI_DRIVERS_SITE_METHOD = git
> +LIBDBI_DRIVERS_LICENSE = LGPL-2.1+
> +LIBDBI_DRIVERS_LICENSE_FILES = COPYING
> +LIBDBI_DRIVERS_INSTALL_STAGING = YES
> +LIBDBI_DRIVERS_DEPENDENCIES = libdbi host-pkgconf
> +LIBDBI_DRIVERS_AUTORECONF = YES
> +
> +LIBDBI_DRIVERS_CONF_OPTS = --with-dbi-libdir=$(STAGING_DIR)/usr/lib
> +
> +ifeq ($(BR2_PACKAGE_MYSQL),y)
> +LIBDBI_DRIVERS_DEPENDENCIES += mysql
> +LIBDBI_DRIVERS_CONF_OPTS += --with-mysql
> +LIBDBI_DRIVERS_CONF_ENV += MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config"
> +else
> +LIBDBI_DRIVERS_CONF_OPTS += --without-mysql
> +endif
> +
> +ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
> +LIBDBI_DRIVERS_DEPENDENCIES += postgresql
> +LIBDBI_DRIVERS_CONF_OPTS += --with-pgsql
> +else
> +LIBDBI_DRIVERS_CONF_OPTS += --without-pgsql
> +endif
> +
> +LIBDBI_DRIVERS_CONF_OPTS += --without-sqlite
> +ifeq ($(BR2_PACKAGE_SQLITE),y)
> +LIBDBI_DRIVERS_DEPENDENCIES += sqlite
> +LIBDBI_DRIVERS_CONF_OPTS += --with-sqlite3
> +else
> +LIBDBI_DRIVERS_CONF_OPTS += --without-sqlite3
> +endif
> +
> +LIBDBI_DRIVERS_CONF_OPTS += --without-msql 	# MiniSQL
> +LIBDBI_DRIVERS_CONF_OPTS += --without-oracle	# Oracle OCI
> +LIBDBI_DRIVERS_CONF_OPTS += --without-firebird	# Firebird/Interbase
> +LIBDBI_DRIVERS_CONF_OPTS += --without-freetds	# Freetds
> +LIBDBI_DRIVERS_CONF_OPTS += --without-ingres	# Ingres
> +LIBDBI_DRIVERS_CONF_OPTS += --without-db2	# IBM DB2
> +
> +$(eval $(autotools-package))
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-10-13 18:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 12:43 [Buildroot] [PATCH 0/3] new libdbi and libdbi-drivers packages Herve Codina
2021-10-04 12:43 ` [Buildroot] [PATCH 1/3] package/libdbi: new package Herve Codina
2021-10-13 18:09   ` Arnout Vandecappelle
2021-10-04 12:43 ` [Buildroot] [PATCH 2/3] package/libdbi-drivers: " Herve Codina
2021-10-13 18:11   ` Arnout Vandecappelle [this message]
2021-10-14  8:17     ` Herve Codina
2021-10-04 12:43 ` [Buildroot] [PATCH 3/3] package/collectd: add dbi support Herve Codina
2021-10-13 18:12   ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=471e1df6-225d-04b3-49e1-b68edac32fa6@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=herve.codina@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.