pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases Import mariadb-connector-c-3.0.3 as database...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/29c4c9e1d5f2
branches:  trunk
changeset: 378653:29c4c9e1d5f2
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Fri Apr 13 08:04:14 2018 +0000

description:
Import mariadb-connector-c-3.0.3 as databases/mariadb-connector-c.

This is LGPL MariaDB client library that can be used to connect to MySQL
or MariaDB.

diffstat:

 databases/Makefile                                                   |    3 +-
 databases/mariadb-connector-c/DESCR                                  |    2 +
 databases/mariadb-connector-c/Makefile                               |   24 ++
 databases/mariadb-connector-c/PLIST                                  |   24 ++
 databases/mariadb-connector-c/buildlink3.mk                          |   25 ++
 databases/mariadb-connector-c/distinfo                               |   10 +
 databases/mariadb-connector-c/options.mk                             |   23 ++
 databases/mariadb-connector-c/patches/patch-CMakeLists.txt           |   41 ++++
 databases/mariadb-connector-c/patches/patch-cmake_CheckTypes.cmake   |   14 +
 databases/mariadb-connector-c/patches/patch-cmake_plugins.cmake      |   15 +
 databases/mariadb-connector-c/patches/patch-libmariadb_ma__context.c |  102 ++++++++++
 11 files changed, 282 insertions(+), 1 deletions(-)

diffs (truncated from 337 to 300 lines):

diff -r 451a9590949b -r 29c4c9e1d5f2 databases/Makefile
--- a/databases/Makefile        Fri Apr 13 07:58:59 2018 +0000
+++ b/databases/Makefile        Fri Apr 13 08:04:14 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.558 2018/03/21 10:00:38 taca Exp $
+# $NetBSD: Makefile,v 1.559 2018/04/13 08:04:14 fhajny Exp $
 
 COMMENT=       Databases
 
@@ -87,6 +87,7 @@
 SUBDIR+=       lua-sqlite3
 SUBDIR+=       lua-tokyocabinet
 SUBDIR+=       luma
+SUBDIR+=       mariadb-connector-c
 SUBDIR+=       mariadb55-client
 SUBDIR+=       mariadb55-server
 SUBDIR+=       metakit-lib
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/DESCR       Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,2 @@
+This is LGPL MariaDB client library that can be used to connect to MySQL
+or MariaDB.
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/Makefile    Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+DISTNAME=      mariadb-connector-c-3.0.3
+CATEGORIES=    databases
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=MariaDB/}
+
+MAINTAINER=    filip%joyent.com@localhost
+HOMEPAGE=      https://github.com/MariaDB/mariadb-connector-c/
+COMMENT=       MariaDB Connector/C library
+LICENSE=       gnu-lgpl-v2.1
+
+GITHUB_PROJECT=        mariadb-connector-c
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+USE_CMAKE=     yes
+USE_TOOLS+=    pkg-config
+
+.include "options.mk"
+
+CMAKE_ARGS+=   -DWITH_EXTERNAL_ZLIB=ON
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/PLIST       Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,24 @@
+@comment $NetBSD: PLIST,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+bin/mariadb_config
+include/mariadb/errmsg.h
+include/mariadb/ma_list.h
+include/mariadb/ma_pvio.h
+include/mariadb/ma_tls.h
+include/mariadb/mariadb/ma_io.h
+include/mariadb/mariadb_com.h
+include/mariadb/mariadb_ctype.h
+include/mariadb/mariadb_dyncol.h
+include/mariadb/mariadb_stmt.h
+include/mariadb/mariadb_version.h
+include/mariadb/mysql.h
+include/mariadb/mysql/client_plugin.h
+include/mariadb/mysql/plugin_auth.h
+include/mariadb/mysql/plugin_auth_common.h
+include/mariadb/mysqld_error.h
+lib/mariadb/libmariadb.so
+lib/mariadb/libmariadb.so.3
+lib/mariadb/libmariadbclient.a
+${PLIST.gss}lib/mariadb/plugin/auth_gssapi_client.so
+lib/mariadb/plugin/dialog.so
+lib/mariadb/plugin/mysql_clear_password.so
+${PLIST.curl}lib/mariadb/plugin/remote_io.so
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/buildlink3.mk       Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: buildlink3.mk,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+BUILDLINK_TREE+=       mariadb-connector-c
+
+.if !defined(MARIADB_CONNECTOR_C_BUILDLINK3_MK)
+MARIADB_CONNECTOR_C_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.mariadb-connector-c+=    mariadb-connector-c>=3.0.0
+BUILDLINK_PKGSRCDIR.mariadb-connector-c?=      ../../databases/mariadb-connector-c
+
+pkgbase := mariadb-connector-c
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.mariadb-connector-c:Mcurl)
+.  include "../../www/curl/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.mariadb-connector-c:Mkerberos)
+.  include "../../mk/krb5.buildlink3.mk"
+.endif
+
+.include "../../security/openssl/buildlink3.mk"
+.endif # MARIADB_CONNECTOR_C_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -mariadb-connector-c
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/distinfo    Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+SHA1 (mariadb-connector-c-3.0.3.tar.gz) = 73250ec95d493d84eff63e66bcfc3d9d9c39d3ea
+RMD160 (mariadb-connector-c-3.0.3.tar.gz) = 574a38b779b70a3782cd7a2abe5e178506ce96eb
+SHA512 (mariadb-connector-c-3.0.3.tar.gz) = 46845358a45c4fa1310d1e0126d2328e323457b162aba629fe569bf26a91b1cc5bdbb9c2d123d1b180a1362852e72774c5375c62d94c59117346776fbdbdd19d
+Size (mariadb-connector-c-3.0.3.tar.gz) = 672982 bytes
+SHA1 (patch-CMakeLists.txt) = ca3b3ada833da74f1708b293994bd96f9fb1ca92
+SHA1 (patch-cmake_CheckTypes.cmake) = 7b8184efcaee685d4b3db39441ed50ca08a8df6f
+SHA1 (patch-cmake_plugins.cmake) = 27b3bfa8fb8436b8fee5ca37439f3d413e0e90b4
+SHA1 (patch-libmariadb_ma__context.c) = 56ec0f9f4ab75826b87b0074523c235907e0507f
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/options.mk  Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,23 @@
+# $NetBSD: options.mk,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.mariadb-connector-c
+PKG_SUPPORTED_OPTIONS= curl kerberos
+PKG_SUGGESTED_OPTIONS= # empty
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=           curl gss
+
+.if !empty(PKG_OPTIONS:Mcurl)
+PLIST.curl=            yes
+.  include "../../www/curl/buildlink3.mk"
+.else
+CMAKE_ARGS+=           -DWITH_CURL=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mkerberos)
+PLIST.gss=             yes
+.  include "../../mk/krb5.buildlink3.mk"
+.else
+CMAKE_ARGS+=           -DWITH_GSS=OFF
+.endif
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/patches/patch-CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/patches/patch-CMakeLists.txt        Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+Make sure Kerberos/GSS support can be turned off.
+
+--- CMakeLists.txt.orig        2018-01-17 11:43:58.000000000 +0000
++++ CMakeLists.txt
+@@ -25,7 +25,7 @@ get_directory_property(IS_SUBPROJECT PAR
+ # do not inherit include directories from the parent project
+ SET_PROPERTY(DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
+ FOREACH(V WITH_MYSQLCOMPAT WITH_MSI WITH_SIGNCODE WITH_RTC WITH_UNITTEST
+-    WITH_DYNCOL WITH_EXTERNAL_ZLIB WITH_CURL WITH_SQLITE WITH_SSL
++    WITH_DYNCOL WITH_EXTERNAL_ZLIB WITH_CURL WITH_GSS WITH_SQLITE WITH_SSL
+     INSTALL_LAYOUT WITH_TEST_SRCPKG)
+   SET(${V} ${${OPT}${V}})
+ ENDFOREACH()
+@@ -63,6 +63,7 @@ ADD_OPTION(WITH_UNITTEST "build test sui
+ ADD_OPTION(WITH_DYNCOL "Enables support of dynamic coluumns" ON)
+ ADD_OPTION(WITH_EXTERNAL_ZLIB "Enables use of external zlib" OFF)
+ ADD_OPTION(WITH_CURL "Enables use of curl" ON)
++ADD_OPTION(WITH_GSS "Enables use of Kerberos auth" ON)
+ ADD_OPTION(WITH_SSL "Enables use of TLS/SSL library" ON)
+ ###############
+ 
+@@ -88,7 +89,7 @@ IF(WITH_RTC)
+   SET(RTC_OPTIONS "/RTC1 /RTCc")
+ ENDIF()
+ 
+-IF(NOT WIN32)
++IF(WITH_GSS)
+   INCLUDE(${CC_SOURCE_DIR}/cmake/FindGSSAPI.cmake)
+   IF(GSSAPI_FOUND)
+     INCLUDE_DIRECTORIES(${GSSAPI_INCS})
+@@ -374,7 +375,7 @@ IF(NOT REMOTEIO_PLUGIN_TYPE MATCHES "OFF
+     ADD_DEFINITIONS("-DHAVE_REMOTEIO=1")
+   ENDIF()
+ ENDIF()
+-IF(NOT WIN32)
++IF(WITH_GSS)
+   IF(NOT AUTH_GSSAPI_PLUGIN_TYPE MATCHES "OFF")
+     INCLUDE(${CC_SOURCE_DIR}/cmake/FindGSSAPI.cmake)
+     IF(GSSAPI_FOUND)
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/patches/patch-cmake_CheckTypes.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/patches/patch-cmake_CheckTypes.cmake        Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-cmake_CheckTypes.cmake,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+Using socket types needs libsocket on at least SunOS.
+
+--- cmake/CheckTypes.cmake.orig        2017-01-17 09:53:54.000000000 +0000
++++ cmake/CheckTypes.cmake
+@@ -98,6 +98,7 @@ IF(WIN32)
+ ELSE(WIN32)
+   FOREACH(CHECK_TYPE "socklen_t" "size_t" "int")
+     IF (NOT SOCKET_SIZE_TYPE)
++      SET(CMAKE_REQUIRED_LIBRARIES "${LIBSOCKET}")
+       CHECK_C_SOURCE_COMPILES("
+         #include <sys/socket.h>
+         int main(int argc, char **argv)
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/patches/patch-cmake_plugins.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/patches/patch-cmake_plugins.cmake   Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-cmake_plugins.cmake,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+Make sure curl support can be turned off.
+
+--- cmake/plugins.cmake.orig   2018-01-17 11:43:58.000000000 +0000
++++ cmake/plugins.cmake
+@@ -96,7 +96,7 @@ ENDFOREACH()
+ MESSAGE1(plugin_config "Plugin configuration:${plugin_config}")
+ MESSAGE1(LIBMARIADB_SOURCES "STATIC PLUGIN SOURCES: ${LIBMARIADB_SOURCES}")
+ 
+-IF(NOT REMOTEIO_PLUGIN_TYPE MATCHES "NO")
++IF(WITH_CURL AND NOT REMOTEIO_PLUGIN_TYPE MATCHES "NO")
+   FIND_PACKAGE(CURL)
+ ENDIF()
+ 
diff -r 451a9590949b -r 29c4c9e1d5f2 databases/mariadb-connector-c/patches/patch-libmariadb_ma__context.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb-connector-c/patches/patch-libmariadb_ma__context.c      Fri Apr 13 08:04:14 2018 +0000
@@ -0,0 +1,102 @@
+$NetBSD: patch-libmariadb_ma__context.c,v 1.1 2018/04/13 08:04:14 fhajny Exp $
+
+Fix incorrect assembler syntax.
+
+--- libmariadb/ma_context.c.orig       2018-01-17 11:43:58.000000000 +0000
++++ libmariadb/ma_context.c
+@@ -200,6 +200,7 @@ my_context_spawn(struct my_context *c, v
+   */
+   __asm__ __volatile__
+     (
++     ".cfi_startproc\n\t"
+      "movq %%rsp, (%[save])\n\t"
+      "movq %[stack], %%rsp\n\t"
+ #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 && !defined(__INTEL_COMPILER)
+@@ -240,6 +241,7 @@ my_context_spawn(struct my_context *c, v
+      "2:\n\t"
+      "movl $1, %[ret]\n"
+      "3:\n"
++     ".cfi_endproc\n"
+      : [ret] "=a" (ret),
+        [f] "+S" (f),
+        /* Need this in %rdi to follow calling convention. */
+@@ -260,6 +262,7 @@ my_context_continue(struct my_context *c
+ 
+   __asm__ __volatile__
+     (
++     ".cfi_startproc\n\t"
+      "movq (%[save]), %%rax\n\t"
+      "movq %%rsp, (%[save])\n\t"
+      "movq %%rax, %%rsp\n\t"
+@@ -309,6 +312,7 @@ my_context_continue(struct my_context *c
+      "2:\n\t"
+      "movl $1, %[ret]\n"
+      "3:\n"
++     ".cfi_endproc\n"
+      : [ret] "=a" (ret)
+      : /* Need this in callee-save register to preserve in function call. */
+        [save] "b" (&c->save[0])
+@@ -324,6 +328,7 @@ my_context_yield(struct my_context *c)
+   uint64_t *save= &c->save[0];
+   __asm__ __volatile__
+     (
++     ".cfi_startproc\n\t"
+      "movq (%[save]), %%rax\n\t"
+      "movq %%rsp, (%[save])\n\t"
+      "movq %%rax, %%rsp\n\t"
+@@ -352,6 +357,7 @@ my_context_yield(struct my_context *c)
+      "jmpq *%%rax\n"
+ 
+      "1:\n"
++     ".cfi_endproc\n"
+      : [save] "+D" (save)
+      :
+      : "rax", "rcx", "rdx", "rsi", "r8", "r9", "r10", "r11", "memory", "cc"
+@@ -439,6 +445,7 @@ my_context_spawn(struct my_context *c, v
+   */
+   __asm__ __volatile__
+     (
++     ".cfi_startproc\n\t"
+      "movl %%esp, (%[save])\n\t"
+      "movl %[stack], %%esp\n\t"
+ #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 && !defined(__INTEL_COMPILER)
+@@ -479,6 +486,7 @@ my_context_spawn(struct my_context *c, v
+      "3:\n\t"
+      "movl $1, %[ret]\n"



Home | Main Index | Thread Index | Old Index