databases/mariadb-connector-c: Add new port

- Add port to databases/Makefile
  - Use zlib from base
  - Add port directory incl required files
  - Add patch for LibreSSL
This commit is contained in:
Bernard Spil 2017-01-15 19:03:51 +00:00
parent 90e71b38f9
commit 8fe309d799
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=431597
6 changed files with 128 additions and 0 deletions

View file

@ -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

View file

@ -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 <bsd.port.mk>

View file

@ -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

View file

@ -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();

View file

@ -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/

View file

@ -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