libraries/mysql-connector-c++: Updated for version 1.1.6.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2015-04-26 17:50:39 +07:00
parent bcbebf33ab
commit fd1448408d
4 changed files with 37 additions and 9 deletions

View file

@ -0,0 +1,13 @@
diff --git a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp
index 703c0f3..1569e55 100644
--- a/driver/nativeapi/libmysql_static_proxy.cpp
+++ b/driver/nativeapi/libmysql_static_proxy.cpp
@@ -319,7 +319,7 @@ LibmysqlStaticProxy::options(MYSQL * mysql, enum mysql_option option, const void
int
LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg)
{
-#if MYSQL_VERSION_ID >= 50703
+#if not defined MARIADB_BASE_VERSION && MYSQL_VERSION_ID >= 50703
if (::mysql_get_option(mysql, option, arg)) {
throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()");
} else {

View file

@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=mysql-connector-c++
VERSION=${VERSION:-1.1.3}
BUILD=${BUILD:-3}
VERSION=${VERSION:-1.1.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -69,12 +69,18 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Compatibility patch for MariaDB
patch -Np1 < $CWD/mysql_cxx_linkage.patch
patch -Np1 < $CWD/mariadb_api.patch
mkdir -p build
cd build
cmake \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF \
-DMYSQL_LIB=/usr/lib${LIBDIRSUFFIX}/libmysqlclient.so \
-DCMAKE_BUILD_TYPE=Release ..
make mysqlcppconn
cp $TMP/$PRGNAM-$VERSION/build/cppconn/config.h $TMP/$PRGNAM-$VERSION/cppconn/config.h
@ -82,10 +88,6 @@ cd build
make install DESTDIR=$PKG
cd ..
if [ "$ARCH" = "x86_64" ]; then
mv $PKG/usr/lib/ $PKG/usr/lib${LIBDIRSUFFIX}/
fi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

View file

@ -1,8 +1,8 @@
PRGNAM="mysql-connector-c++"
VERSION="1.1.3"
VERSION="1.1.6"
HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
DOWNLOAD="https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.3.tar.gz"
MD5SUM="65828789b8d92e6118e7f24568f34a07"
DOWNLOAD="https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.6.tar.gz"
MD5SUM="9e49dcfc1408b18b3d3ca02781ff7efb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View file

@ -0,0 +1,13 @@
diff --git a/FindMySQL.cmake b/FindMySQL.cmake
index c73337a..d76fdbd 100644
--- a/FindMySQL.cmake
+++ b/FindMySQL.cmake
@@ -462,7 +462,7 @@ if(NOT WIN32)
endif()
if(NOT MYSQL_CXXFLAGS)
- if(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603)
+ if(MYSQL_CXX_LINKAGE)
_mysql_conf(MYSQL_CXXFLAGS "--cxxflags")
set(MYSQL_CXX_LINKAGE 1)
else()