aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-22 12:42:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-26 08:54:40 +0000
commit75a15096cc405bd8f2b2d4fb7f3d9ae90ecf0bd0 (patch)
tree2a6b0c06d12c65cb67bc0e60a7cfb493b7e3a860 /testing
parent8a968286ba9850a24c8244137f5bdca3f78cd893 (diff)
downloadaports-75a15096cc405bd8f2b2d4fb7f3d9ae90ecf0bd0.tar.bz2
aports-75a15096cc405bd8f2b2d4fb7f3d9ae90ecf0bd0.tar.xz
testing/mariadb-connector-c: new aport
The MariaDB Native Client library (C driver) http://mariadb.org/ This replaces mariadb-client-libs
Diffstat (limited to 'testing')
-rw-r--r--testing/mariadb-connector-c/APKBUILD59
-rw-r--r--testing/mariadb-connector-c/cmake.patch13
2 files changed, 72 insertions, 0 deletions
diff --git a/testing/mariadb-connector-c/APKBUILD b/testing/mariadb-connector-c/APKBUILD
new file mode 100644
index 0000000000..dd71d06458
--- /dev/null
+++ b/testing/mariadb-connector-c/APKBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mariadb-connector-c
+pkgver=3.0.3
+pkgrel=0
+pkgdesc="The MariaDB Native Client library (C driver)"
+url="http://mariadb.org/"
+arch="all"
+license="LGPLv2+"
+makedepends="cmake libressl-dev zlib-dev"
+replaces="mariadb-client-libs"
+subpackages="$pkgname-dev"
+source="https://downloads.mariadb.org/interstitial/connector-c-3.0.3/mariadb-connector-c-$pkgver-src.tar.gz
+ cmake.patch"
+builddir="$srcdir/mariadb-connector-c-$pkgver-src"
+
+build() {
+ cd "$builddir"
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DINSTALL_LIBDIR=lib \
+ -DINSTALL_INCLUDEDIR=include/mysql \
+ \
+ -DMARIADB_PORT=3306 \
+ -DMARIADB_UNIX_ADDR=/var/lib/mysql/mysql.sock \
+ -DWITH_EXTERNAL_ZLIB=YES \
+ -DWITH_MYSQLCOMPAT=ON \
+ -DWITH_SSL=OPENSSL \
+ ${CMAKE_CROSSOPTS}
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+
+ # purge static libs
+ rm "$pkgdir"/usr/lib/*.a
+
+ # compat symlinks
+ ln -s mariadb_config "$pkgdir"/usr/bin/mysql_config
+ ln -s mariadb_version.h "$pkgdir"/usr/include/mysql/mysql_version.h
+}
+
+dev() {
+ default_dev
+ replaces="mariadb-dev"
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+}
+
+sha512sums="6da66a32165cb74b106bf94e13a35d4bb38f05e5d2b3ff3740862dfc0892a7705977c1394b4f84b8e1f1e50a59a3fadbc62e7733b1feb532c6368a9fc262db04 mariadb-connector-c-3.0.3-src.tar.gz
+4fef45afaa2135310654e31df09de6a451014bdd495b9aa08467b666f543a643c1efdbcca4e866120a357e26a228765f511e8420327708775148b120ec9f161c cmake.patch"
diff --git a/testing/mariadb-connector-c/cmake.patch b/testing/mariadb-connector-c/cmake.patch
new file mode 100644
index 0000000000..87eee0e0c0
--- /dev/null
+++ b/testing/mariadb-connector-c/cmake.patch
@@ -0,0 +1,13 @@
+--- mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in 2017-07-19 11:31:02.000000000 +0200
++++ mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in_patched 2017-10-25 12:32:42.075324299 +0200
+@@ -5,8 +5,8 @@
+
+ static char *mariadb_progname;
+
+-#define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
+-#define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb "\
++#define INCLUDE "-I@INSTALL_INCLUDEDIR@ -I@INSTALL_INCLUDEDIR@"
++#define LIBS "-L@INSTALL_LIBDIR@/ -lmariadb "\
+ "@extra_dynamic_LDFLAGS@"
+ #define LIBS_SYS "@extra_dynamic_LDFLAGS@"
+ #define CFLAGS INCLUDE