Skip to contentSkip to conversation

package/unixodbc: drop non upstreamable patch

PATCH New Fabrice Fontaine 2 participants 3 messages Oct 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/unixodbc: drop non upstreamable patch

Drop patch that is not upstreamable and replace it by using --{dis,en}able-threads option

---
 package/unixodbc/0001-fix-nopthread.patch | 39 -----------------------
 package/unixodbc/unixodbc.mk              |  6 ++++
 2 files changed, 6 insertions(+), 39 deletions(-)
 delete mode 100644 package/unixodbc/0001-fix-nopthread.patch
package/unixodbc/0001-fix-nopthread.patch deleted +0 -39
deleted file mode 100644
index 45933e54d6..0000000000
@@ -1,39 +0,0 @@
-Fix pthread detection
-
-configure.in always calls AC_CHECK_COMP_OPT(pthread) which succeeds with the
-toolchain used although it does not contain thread support:
-
-checking for mutex_lock in -lthread ... no
-checking for pthread_mutex_lock in -lpthread... no
-checking for pthread_mutex_lock in -lc... no
-checking if compiler accepts -pthread... yes
-checking for pthread_mutex_lock in -lc... no
-checking for pthread_mutex_lock in -lpthread... no
-
-This positive configure check leads to
-
-    CFLAGS="$CFLAGS -pthread"
-
-in ./configure, line 15757 which causes a compilation bug
-/home/br/br4/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.8.3/../../../../arm-buildroot-linux-uclibcgnueab
-
-using this defconfig
-http://autobuild.buildroot.net/results/e86/e86e97ff7887f1bdc6bf913498392ff50f56ea88/defconfig
-
-This patch disables the freebsd-only code path. Patching configure directly
-prevents the need for autoreconf.
-
-Signed-off-by: Bernd Kuhls <[email protected]>
-
-diff -uNr unixODBC-2.3.2.org/configure unixODBC-2.3.2/configure
---- unixODBC-2.3.2.org/configure	2013-10-08 10:56:03.000000000 +0200
-+++ unixODBC-2.3.2/configure	2015-03-13 21:19:59.210429211 +0100
-@@ -15746,7 +15746,7 @@
- 
-     fi
- 
--    if test "x$gotthread" = "xno"; then
-+    if test "x$gotthread" = "xnot_needed_for_buildroot"; then
-       if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
-                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -pthread" >&5
- $as_echo_n "checking if compiler accepts -pthread... " >&6; }
package/unixodbc/unixodbc.mk +6 -0
index 2c936fe9d5..efcd5e3d4e 100644
@@ -34,4 +34,10 @@ else
 UNIXODBC_CONF_OPTS += --disable-readline
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+UNIXODBC_CONF_OPTS += --enable-threads
+else
+UNIXODBC_CONF_OPTS += --disable-threads
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.28.0
#1 lore raw

PATCH 2/2 package/unixodbc: bump to version 2.3.9

- libedit is an optional dependency since version 2.3.9 and
https://github.com/lurcher/unixODBC/commit/6ebf06767e398dc0b7d4aa090e20f7814c2ae383
- Update indentation in hash file (two spaces)

---
 package/unixodbc/unixodbc.hash | 10 +++++-----
 package/unixodbc/unixodbc.mk   |  9 ++++++++-
 2 files changed, 13 insertions(+), 6 deletions(-)
package/unixodbc/unixodbc.hash +5 -5
index 4d0ad191d1..ba094f7627 100644
@@ -1,6 +1,6 @@
-# From ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz.md5
-md5 274a711b0c77394e052db6493840c6f9  unixODBC-2.3.7.tar.gz
+# From ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.9.tar.gz.md5
+md5  06f76e034bb41df5233554abe961a16f  unixODBC-2.3.9.tar.gz
 # Locally computed
-sha256 45f169ba1f454a72b8fcbb82abd832630a3bf93baa84731cf2949f449e1e3e77  unixODBC-2.3.7.tar.gz
-sha256 a6b9aa1e9bfade121164c06fd975e9b913a8e38bf33d25ff967dfa3ed07d12f8  COPYING
-sha256 1e594f4c7fd6d099eca4bd1340b39d871ce0298331d8ebd4b68935548ee45cf4  exe/COPYING
+sha256  52833eac3d681c8b0c9a5a65f2ebd745b3a964f208fc748f977e44015a31b207  unixODBC-2.3.9.tar.gz
+sha256  a6b9aa1e9bfade121164c06fd975e9b913a8e38bf33d25ff967dfa3ed07d12f8  COPYING
+sha256  1e594f4c7fd6d099eca4bd1340b39d871ce0298331d8ebd4b68935548ee45cf4  exe/COPYING
package/unixodbc/unixodbc.mk +8 -1
index efcd5e3d4e..cdc4e69a7e 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-UNIXODBC_VERSION = 2.3.7
+UNIXODBC_VERSION = 2.3.9
 UNIXODBC_SOURCE = unixODBC-$(UNIXODBC_VERSION).tar.gz
 UNIXODBC_SITE = ftp://ftp.unixodbc.org/pub/unixODBC
 UNIXODBC_INSTALL_STAGING = YES
@@ -13,6 +13,13 @@ UNIXODBC_LICENSE_FILES = COPYING exe/COPYING
 
 UNIXODBC_CONF_OPTS = --enable-drivers --enable-driver-conf
 
+ifeq ($(BR2_PACKAGE_LIBEDIT),y)
+UNIXODBC_CONF_OPTS += --enable-editline
+UNIXODBC_DEPENDENCIES += libedit
+else
+UNIXODBC_CONF_OPTS += --disable-editline
+endif
+
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 UNIXODBC_CONF_OPTS += --enable-iconv
 UNIXODBC_DEPENDENCIES += libiconv
Signature · 1 line
2.28.0
#2 lore raw

PATCH 1/2 package/unixodbc: drop non upstreamable patch

In reply to Fabrice Fontaine

Fabrice, All,

On 2020-10-12 21:41 +0200, Fabrice Fontaine spake thusly:

Quoted 4 lines

Drop patch that is not upstreamable and replace it by using --{dis,en}able-threads option

Both applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 73 lines
---
 package/unixodbc/0001-fix-nopthread.patch | 39 -----------------------
 package/unixodbc/unixodbc.mk              |  6 ++++
 2 files changed, 6 insertions(+), 39 deletions(-)
 delete mode 100644 package/unixodbc/0001-fix-nopthread.patch
package/unixodbc/0001-fix-nopthread.patch deleted +0 -39
deleted file mode 100644
index 45933e54d6..0000000000
@@ -1,39 +0,0 @@
-Fix pthread detection
-
-configure.in always calls AC_CHECK_COMP_OPT(pthread) which succeeds with the
-toolchain used although it does not contain thread support:
-
-checking for mutex_lock in -lthread ... no
-checking for pthread_mutex_lock in -lpthread... no
-checking for pthread_mutex_lock in -lc... no
-checking if compiler accepts -pthread... yes
-checking for pthread_mutex_lock in -lc... no
-checking for pthread_mutex_lock in -lpthread... no
-
-This positive configure check leads to
-
-    CFLAGS="$CFLAGS -pthread"
-
-in ./configure, line 15757 which causes a compilation bug
-/home/br/br4/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.8.3/../../../../arm-buildroot-linux-uclibcgnueab
-
-using this defconfig
-http://autobuild.buildroot.net/results/e86/e86e97ff7887f1bdc6bf913498392ff50f56ea88/defconfig
-
-This patch disables the freebsd-only code path. Patching configure directly
-prevents the need for autoreconf.
-
-Signed-off-by: Bernd Kuhls <[email protected]>
-
-diff -uNr unixODBC-2.3.2.org/configure unixODBC-2.3.2/configure
---- unixODBC-2.3.2.org/configure	2013-10-08 10:56:03.000000000 +0200
-+++ unixODBC-2.3.2/configure	2015-03-13 21:19:59.210429211 +0100
-@@ -15746,7 +15746,7 @@
- 
-     fi
- 
--    if test "x$gotthread" = "xno"; then
-+    if test "x$gotthread" = "xnot_needed_for_buildroot"; then
-       if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
-                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -pthread" >&5
- $as_echo_n "checking if compiler accepts -pthread... " >&6; }
package/unixodbc/unixodbc.mk +6 -0
index 2c936fe9d5..efcd5e3d4e 100644
@@ -34,4 +34,10 @@ else
 UNIXODBC_CONF_OPTS += --disable-readline
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+UNIXODBC_CONF_OPTS += --enable-threads
+else
+UNIXODBC_CONF_OPTS += --disable-threads
+endif
+
 $(eval $(autotools-package))
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'