new package: libmariadbcpp (#8374)
This commit is contained in:
parent
59d87b266b
commit
7d537368bf
22
packages/libmariadbcpp/build.sh
Normal file
22
packages/libmariadbcpp/build.sh
Normal file
@ -0,0 +1,22 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://mariadb.com/docs/clients/mariadb-connectors/connector-cpp/
|
||||
TERMUX_PKG_DESCRIPTION="Enables C++ applications to establish client connections to MariaDB Enterprise over TLS"
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.1.0
|
||||
TERMUX_PKG_SRCURL=https://github.com/mariadb-corporation/mariadb-connector-cpp.git
|
||||
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_DEPENDS="libc++, openssl, zlib"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DINSTALL_LIB_SUFFIX=lib
|
||||
-DINSTALL_LIBDIR=lib/mariadbcpp
|
||||
-DINSTALL_PLUGINDIR=lib/mariadbcpp/plugin
|
||||
-DWITH_EXTERNAL_ZLIB=ON
|
||||
"
|
||||
|
||||
termux_step_post_get_source() {
|
||||
git submodule update --init --recursive
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
LDFLAGS="-Wl,-rpath=$TERMUX_PREFIX/lib/mariadbcpp $LDFLAGS"
|
||||
}
|
13
packages/libmariadbcpp/libmariadb-include-ma_global.h.patch
Normal file
13
packages/libmariadbcpp/libmariadb-include-ma_global.h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/libmariadb/include/ma_global.h
|
||||
+++ b/libmariadb/include/ma_global.h
|
||||
@@ -21,6 +21,10 @@
|
||||
#ifndef _global_h
|
||||
#define _global_h
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+typedef unsigned short ushort;
|
||||
+#endif
|
||||
+
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
@ -0,0 +1,31 @@
|
||||
From ed2a7d72cfdbd57b2d07912f17aebd04df5f7d13 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Fellenz <mattf53190@gmail.com>
|
||||
Date: Mon, 16 Aug 2021 08:48:17 -0700
|
||||
Subject: [PATCH] Fix improper string + int concatenation
|
||||
|
||||
When using the `+` operator on a string literal (which is natively a `char*`) and an integer, you are actually adding to the pointer value rather than concatenating to the string. Instead, by first explicitly constructing an `std::string` from the string literal, and second using `std::to_string` on the integer, the string will be properly concatenated.
|
||||
---
|
||||
src/CallableParameterMetaData.cpp | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/CallableParameterMetaData.cpp b/src/CallableParameterMetaData.cpp
|
||||
index d90626c..7f7d392 100644
|
||||
--- a/src/CallableParameterMetaData.cpp
|
||||
+++ b/src/CallableParameterMetaData.cpp
|
||||
@@ -17,7 +17,6 @@
|
||||
51 Franklin St., Fifth Floor, Boston, MA 02110, USA
|
||||
*************************************************************************************/
|
||||
|
||||
-
|
||||
#include "CallableParameterMetaData.h"
|
||||
|
||||
#include "ColumnType.h"
|
||||
@@ -59,7 +58,7 @@ namespace mariadb
|
||||
void CallableParameterMetaData::setIndex(uint32_t index)
|
||||
{
|
||||
if (index < 1 || index > parameterCount) {
|
||||
- throw SQLException("invalid parameter index " + index);
|
||||
+ throw SQLException(std::string("invalid parameter index ") + std::to_string(index));
|
||||
}
|
||||
rs->absolute(index);
|
||||
}
|
Loading…
Reference in New Issue
Block a user