diff --git a/databases/Makefile b/databases/Makefile index 0176de236c16..332e26d0b316 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -185,6 +185,7 @@ SUBDIR += luasql-postgres SUBDIR += luasql-sqlite3 SUBDIR += mantis + SUBDIR += mariadb-connector-c SUBDIR += mariadb100-client SUBDIR += mariadb100-server SUBDIR += mariadb101-client diff --git a/databases/mariadb-connector-c/Makefile b/databases/mariadb-connector-c/Makefile new file mode 100644 index 000000000000..b40b01c2c43f --- /dev/null +++ b/databases/mariadb-connector-c/Makefile @@ -0,0 +1,41 @@ +# $FreeBSD$ + +PORTNAME= mariadb +PORTVERSION= 2.3.1 +CATEGORIES= databases ipv6 +MASTER_SITES= http://ftp.osuosl.org/pub/${SITESDIR}/ \ + http://mirrors.supportex.net/${SITESDIR}/ \ + http://mirror2.hs-esslingen.de/pub/Mirrors/${SITESDIR}/ \ + http://gd.tuwien.ac.at/db/${SITESDIR}/ \ + http://mirrors.fe.up.pt/pub/${SITESDIR}/ \ + http://mirror.de.gsnw.de:56431/${SITESDIR}/ \ + http://mirror.layerjet.com/${SITESDIR}/ \ + http://mirror.switch.ch/mirror/${SITESDIR}/ +PKGNAMESUFFIX= connector-c +DISTNAME= ${PORTNAME}-${PKGNAMESUFFIX}-${PORTVERSION}-src + +MAINTAINER= brnrd@FreeBSD.org +COMMENT= MariaDB database connector for C + +LICENSE= LGPL21 + +CONFLICTS_INSTALL= mariadb[0-9]*-client-* \ + mariadb102-server-* \ + mysql[0-9]*-client-* \ + percona[0-9]*-client-* + +USES= cmake compiler:c++11-lib ssl +USE_LDCONFIG= ${PREFIX}/lib/mysql +SITESDIR= mariadb/connector-c-${PORTVERSION} +DOCSDIR= ${PREFIX}/share/doc/mysql + +CMAKE_ARGS+= -DCOMPILATION_COMMENT="FreeBSD Ports" \ + -DWITH_EXTERNAL_ZLIB="YES" + +post-install: + ${RM} -r ${STAGEDIR}${PREFIX}/include/mariadb/CMakeFiles +. for f in CMakeLists.txt Makefile Makefile.am cmake_install.cmake + ${RM} ${STAGEDIR}${PREFIX}/include/mariadb/${f} +. endfor + +.include diff --git a/databases/mariadb-connector-c/distinfo b/databases/mariadb-connector-c/distinfo new file mode 100644 index 000000000000..c780224c0a28 --- /dev/null +++ b/databases/mariadb-connector-c/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1484488531 +SHA256 (mariadb-connector-c-2.3.1-src.tar.gz) = 6ab7e1477ae1484939675a3b499f98148980a0bd340d15d22df00a5c6656c633 +SIZE (mariadb-connector-c-2.3.1-src.tar.gz) = 536755 diff --git a/databases/mariadb-connector-c/files/patch-libmariadb_ma__secure.c b/databases/mariadb-connector-c/files/patch-libmariadb_ma__secure.c new file mode 100644 index 000000000000..0eca2f708e8b --- /dev/null +++ b/databases/mariadb-connector-c/files/patch-libmariadb_ma__secure.c @@ -0,0 +1,25 @@ +--- libmariadb/ma_secure.c.orig 2016-08-03 15:39:12 UTC ++++ libmariadb/ma_secure.c +@@ -74,7 +74,7 @@ static void my_SSL_error(MYSQL *mysql) + Crypto call back functions will be + set during ssl_initialization + */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000 ++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) + #if (OPENSSL_VERSION_NUMBER < 0x10000000) + static unsigned long my_cb_threadid(void) + { +@@ -149,11 +149,11 @@ int my_ssl_start(MYSQL *mysql) + pthread_mutex_lock(&LOCK_ssl_config); + if (!my_ssl_initialized) + { +-#if OPENSSL_VERSION_NUMBER < 0x10100000 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + if (ssl_crypto_init()) + goto end; + #endif +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL); + #else + SSL_library_init(); diff --git a/databases/mariadb-connector-c/pkg-descr b/databases/mariadb-connector-c/pkg-descr new file mode 100644 index 000000000000..ab5013067913 --- /dev/null +++ b/databases/mariadb-connector-c/pkg-descr @@ -0,0 +1,8 @@ +The MariaDB Connector/C is used to connect applications developed in C/C++ +to MariaDB and MySQL databases. MySQL Connector/C is LGPL licensed. + +Parts of MariaDB Connector/C are derived from PHP\'s mysqlnd extension and +the original LGPL MySQL client library for MySQL 3.23. The rest of the code +is written by developers at MariaDB Corporation Ab. + +WWW: https://www.mariadb.com/kb/en/mariadb/about-mariadb-connector-c/ diff --git a/databases/mariadb-connector-c/pkg-plist b/databases/mariadb-connector-c/pkg-plist new file mode 100644 index 000000000000..73a58dbd92e8 --- /dev/null +++ b/databases/mariadb-connector-c/pkg-plist @@ -0,0 +1,50 @@ +bin/mariadb_config +include/mariadb/config-win.h +include/mariadb/dbug.h +include/mariadb/errmsg.h +include/mariadb/getopt.h +include/mariadb/hash.h +include/mariadb/m_ctype.h +include/mariadb/m_string.h +include/mariadb/ma_common.h +include/mariadb/ma_dyncol.h +include/mariadb/ma_secure.h +include/mariadb/my_alarm.h +include/mariadb/my_base.h +include/mariadb/my_config.h +include/mariadb/my_config.h.in +include/mariadb/my_context.h +include/mariadb/my_dir.h +include/mariadb/my_global.h +include/mariadb/my_list.h +include/mariadb/my_net.h +include/mariadb/my_no_pthread.h +include/mariadb/my_pthread.h +include/mariadb/my_stmt.h +include/mariadb/my_sys.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/mysql_async.h +include/mariadb/mysql_com.h +include/mariadb/mysql_io.h +include/mariadb/mysql_mm.h +include/mariadb/mysql_priv.h +include/mariadb/mysql_version.h +include/mariadb/mysql_version.h.in +include/mariadb/mysql_wireprotocol.h +include/mariadb/mysqld_error.h +include/mariadb/mysys_err.h +include/mariadb/sha1.h +include/mariadb/thr_alarm.h +include/mariadb/violite.h +lib/mariadb/libmariadb.so +lib/mariadb/libmariadb.so.2 +lib/mariadb/libmariadbclient.a +lib/mariadb/libmysqlclient.a +lib/mariadb/libmysqlclient.so +lib/mariadb/libmysqlclient_r.a +lib/mariadb/libmysqlclient_r.so +lib/plugin/dialog.so +lib/plugin/mysql_clear_password.so