pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/mysql80-client mysql80: Fix build on NetBSD 9.x



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3efc5866a024
branches:  trunk
changeset: 454830:3efc5866a024
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Jun 22 10:12:36 2021 +0000

description:
mysql80: Fix build on NetBSD 9.x

- Disable kqueue when EVFILT_USER is detected as missing by CMake.
- Use Linux procfs when F_GETPATH is missing.
- Define ppoll to pollts.

diffstat:

 databases/mysql80-client/distinfo                                                    |   9 +-
 databases/mysql80-client/patches/patch-configure.cmake                               |  28 ++++++++-
 databases/mysql80-client/patches/patch-router_src_harness_src_stdx_io_file_handle.cc |  25 ++++++++-
 databases/mysql80-client/patches/patch-vio_viosocket.cc                              |  15 ++--
 4 files changed, 60 insertions(+), 17 deletions(-)

diffs (142 lines):

diff -r 6ae286665c87 -r 3efc5866a024 databases/mysql80-client/distinfo
--- a/databases/mysql80-client/distinfo Tue Jun 22 09:36:41 2021 +0000
+++ b/databases/mysql80-client/distinfo Tue Jun 22 10:12:36 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
+$NetBSD: distinfo,v 1.2 2021/06/22 10:12:36 nia Exp $
 
 SHA1 (mysql-boost-8.0.24.tar.gz) = e640d9851c1721a0550bdca38f03cb8681d61862
 RMD160 (mysql-boost-8.0.24.tar.gz) = 2577eb94d5b8651f3520706be9c40c3e924980d4
@@ -11,7 +11,7 @@
 SHA1 (patch-cmake_os_SunOS.cmake) = 15cf67c136c2b6e608d9379290d235d71d6b769e
 SHA1 (patch-cmake_readline.cmake) = fb79ed969240ae2984098f72c2d3fb501154902c
 SHA1 (patch-config.h.cmake) = e6debea316c5bb8338afb693d704007d45b3941f
-SHA1 (patch-configure.cmake) = 659b93e5a1eeaf32a2937b8201050d34e83f6b5d
+SHA1 (patch-configure.cmake) = b03de49ecb8d6ce58ef24f5dcd8f0a8c95eab592
 SHA1 (patch-include_CMakeLists.txt) = 289c1454d1b7e7fe8566187b3cefc722260993b6
 SHA1 (patch-include_my__compare.h) = e6b3146252d1ebf2e2423ed3682621aa68cce6bd
 SHA1 (patch-include_my__thread.h) = 176134a238c5c2f983aadb6d1cd620165f4057bb
@@ -25,12 +25,11 @@
 SHA1 (patch-router_src_harness_include_mysql_harness_net_ts_internet.h) = 29e019236423aaa77b71b273d009404e4fbafe73
 SHA1 (patch-router_src_harness_include_mysql_harness_net_ts_local.h) = d2149f9840dc8b65a4d9d8332bcd5088b4f9b919
 SHA1 (patch-router_src_harness_include_mysql_harness_tty.h) = ca883b2ed83b623922b58cf96f896de9847d37cb
-SHA1 (patch-router_src_harness_src_stdx_io_file_handle.cc) = 0004dfb6a65b8774096ad58825ab5fa04858e6bf
+SHA1 (patch-router_src_harness_src_stdx_io_file_handle.cc) = 5349b05663179e4ef049cfb1532514e48a3885c9
 SHA1 (patch-scripts_CMakeLists.txt) = 15be14619275f0dc39c216901b2cabc6ee517300
 SHA1 (patch-scripts_mysqld_safe.sh) = 0784314227657aa0bc3f4a0b4e21c173a86fa94b
 SHA1 (patch-sql_CMakeLists.txt) = 84af2f2e58a17bde292a665a726489b8f56f4132
 SHA1 (patch-sql_conn__handler_socket__connection.cc) = b414e0d499f51750e1aa6e9dd7b4e7006456a079
 SHA1 (patch-sql_item_geofunc_relchecks_bgwrap.h) = d20896bfe2391d30aa9e95834c77e7de03377d76
 SHA1 (patch-sql_resourcegroups_platform_thread__attrs__api__apple.cc) = e08ed53790ac8b03b38d566fee3a2688ca6065b3
-SHA1 (patch-storage_ndb_include_ndb__global.h) = 03adf28cbd965869a0e8ea312ae719d7772e63da
-SHA1 (patch-vio_viosocket.cc) = 76dfaf9c8feb39fc3043cfd83d51a47aa8a8352d
+SHA1 (patch-vio_viosocket.cc) = 15dcc0dee88e736a844aacc02e9dbc6beeb915e4
diff -r 6ae286665c87 -r 3efc5866a024 databases/mysql80-client/patches/patch-configure.cmake
--- a/databases/mysql80-client/patches/patch-configure.cmake    Tue Jun 22 09:36:41 2021 +0000
+++ b/databases/mysql80-client/patches/patch-configure.cmake    Tue Jun 22 10:12:36 2021 +0000
@@ -1,8 +1,7 @@
-$NetBSD: patch-configure.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
+$NetBSD: patch-configure.cmake,v 1.2 2021/06/22 10:12:37 nia Exp $
 
 * check for ffsll and provide a portable version if not found
-
-$NetBSD: patch-configure.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
+* check for EVFILT_USER, if missing disable kqueue (necessary on NetBSD 9.x)
 
 --- configure.cmake.orig       2021-03-22 08:44:50.000000000 +0000
 +++ configure.cmake
@@ -29,3 +28,26 @@
  CHECK_FUNCTION_EXISTS (fsync HAVE_FSYNC)
  CHECK_FUNCTION_EXISTS (gethrtime HAVE_GETHRTIME)
  CHECK_FUNCTION_EXISTS (getpass HAVE_GETPASS)
+@@ -300,6 +297,7 @@ CHECK_SYMBOL_EXISTS(TIOCGWINSZ "sys/ioct
+ CHECK_SYMBOL_EXISTS(FIONREAD "sys/ioctl.h" FIONREAD_IN_SYS_IOCTL)
+ CHECK_SYMBOL_EXISTS(FIONREAD "sys/filio.h" FIONREAD_IN_SYS_FILIO)
+ CHECK_SYMBOL_EXISTS(MADV_DONTDUMP "sys/mman.h" HAVE_MADV_DONTDUMP)
++CHECK_SYMBOL_EXISTS(EVFILT_USER "sys/event.h" HAVE_EVFILT_USER)
+ CHECK_CXX_SOURCE_COMPILES(
+ "#include <sys/types.h>
+  #include <sys/stat.h>
+@@ -332,6 +330,14 @@ ELSEIF(HAVE_TIMER_CREATE AND HAVE_TIMER_
+   SET(HAVE_POSIX_TIMERS 1 CACHE INTERNAL "Have POSIX timer-related functions")
+ ENDIF()
+ 
++IF (NOT HAVE_EVFILT_USER)
++  SET(HAVE_KQUEUE 0)
++  SET(HAVE_KQUEUE_TIMERS 0)
++  IF(HAVE_TIMER_CREATE AND HAVE_TIMER_SETTIME)
++    SET(HAVE_POSIX_TIMERS 1 CACHE INTERNAL "Have POSIX timer-related functions")
++  ENDIF()
++ENDIF()
++
+ IF(NOT HAVE_POSIX_TIMERS AND NOT HAVE_KQUEUE_TIMERS AND NOT WIN32)
+   MESSAGE(FATAL_ERROR "No mysys timer support detected!")
+ ENDIF()
diff -r 6ae286665c87 -r 3efc5866a024 databases/mysql80-client/patches/patch-router_src_harness_src_stdx_io_file_handle.cc
--- a/databases/mysql80-client/patches/patch-router_src_harness_src_stdx_io_file_handle.cc      Tue Jun 22 09:36:41 2021 +0000
+++ b/databases/mysql80-client/patches/patch-router_src_harness_src_stdx_io_file_handle.cc      Tue Jun 22 10:12:36 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-router_src_harness_src_stdx_io_file_handle.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
+$NetBSD: patch-router_src_harness_src_stdx_io_file_handle.cc,v 1.2 2021/06/22 10:12:37 nia Exp $
 
 Support for NetBSD - reuses F_GETPATH code originally for macOS. Also
 use correct constant for the fcntl() code - PATH_MAX, not MAXPATHLEN
@@ -14,7 +14,28 @@
  #endif
  
  #include "mysql/harness/stdx/expected.h"
-@@ -233,9 +230,9 @@ file_handle::current_path() const noexce
+@@ -169,14 +167,15 @@ file_handle::current_path() const noexce
+         make_error_code(std::errc::bad_file_descriptor));
+   }
+ 
+-#if defined(__linux__) || defined(__sun)
++#if defined(__linux__) || defined(__sun) || \
++   (defined(__NetBSD__) && !defined(F_GETPATH))
+   const std::string in =
+-#if defined(__linux__)
+-      // /proc/self/fd/<id> is a symlink to the actual file
+-      "/proc/self/fd/"s
+-#else
++#if defined(__sun)
+       // /proc/<pid>/path/<id> is a symlink to the actual file
+       "/proc/"s + std::to_string(getpid()) + "/path/"s
++#else
++      // /proc/self/fd/<id> is a symlink to the actual file
++      "/proc/self/fd/"s
+ #endif
+       + std::to_string(handle_);
+ 
+@@ -233,9 +232,9 @@ file_handle::current_path() const noexce
    }
  
    return {std::string{path.data(), std::next(path.data(), sz)}};
diff -r 6ae286665c87 -r 3efc5866a024 databases/mysql80-client/patches/patch-vio_viosocket.cc
--- a/databases/mysql80-client/patches/patch-vio_viosocket.cc   Tue Jun 22 09:36:41 2021 +0000
+++ b/databases/mysql80-client/patches/patch-vio_viosocket.cc   Tue Jun 22 10:12:36 2021 +0000
@@ -1,17 +1,18 @@
-$NetBSD: patch-vio_viosocket.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
+$NetBSD: patch-vio_viosocket.cc,v 1.2 2021/06/22 10:12:37 nia Exp $
 
-* don't use kqueue on older NetBSD which misses EVFILT_USER
-
-$NetBSD: patch-vio_viosocket.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
+* define ppoll on older NetBSD that only has pollts
 
 --- vio/viosocket.cc.orig      2021-03-22 08:44:50.000000000 +0000
 +++ vio/viosocket.cc
-@@ -70,6 +70,10 @@
+@@ -70,6 +70,13 @@
  
  #include "mysql/psi/mysql_socket.h"
  
-+#if defined(HAVE_QUEUE) && !defined(EVFILT_USER)
-+#undef HAVE_KQUEUE
++#ifdef __NetBSD__
++#include <sys/param.h>
++#if !__NetBSD_Prereq__(9,99,71)
++#define ppoll pollts
++#endif
 +#endif
 +
  int vio_errno(Vio *vio MY_ATTRIBUTE((unused))) {



Home | Main Index | Thread Index | Old Index