From fd1448408ddf5dce8327b89ad5f897ac7ab1b030 Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Sun, 26 Apr 2015 17:50:39 +0700 Subject: libraries/mysql-connector-c++: Updated for version 1.1.6. Signed-off-by: Willy Sudiarto Raharjo --- libraries/mysql-connector-c++/mariadb_api.patch | 13 +++++++++++++ .../mysql-connector-c++/mysql-connector-c++.SlackBuild | 14 ++++++++------ libraries/mysql-connector-c++/mysql-connector-c++.info | 6 +++--- libraries/mysql-connector-c++/mysql_cxx_linkage.patch | 13 +++++++++++++ 4 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 libraries/mysql-connector-c++/mariadb_api.patch create mode 100644 libraries/mysql-connector-c++/mysql_cxx_linkage.patch (limited to 'libraries/mysql-connector-c++') diff --git a/libraries/mysql-connector-c++/mariadb_api.patch b/libraries/mysql-connector-c++/mariadb_api.patch new file mode 100644 index 0000000000..c7c8a5913e --- /dev/null +++ b/libraries/mysql-connector-c++/mariadb_api.patch @@ -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 { diff --git a/libraries/mysql-connector-c++/mysql-connector-c++.SlackBuild b/libraries/mysql-connector-c++/mysql-connector-c++.SlackBuild index 5e8013d1a3..e635af98c9 100644 --- a/libraries/mysql-connector-c++/mysql-connector-c++.SlackBuild +++ b/libraries/mysql-connector-c++/mysql-connector-c++.SlackBuild @@ -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 diff --git a/libraries/mysql-connector-c++/mysql-connector-c++.info b/libraries/mysql-connector-c++/mysql-connector-c++.info index 3d1802762e..06f56c3dbe 100644 --- a/libraries/mysql-connector-c++/mysql-connector-c++.info +++ b/libraries/mysql-connector-c++/mysql-connector-c++.info @@ -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="" diff --git a/libraries/mysql-connector-c++/mysql_cxx_linkage.patch b/libraries/mysql-connector-c++/mysql_cxx_linkage.patch new file mode 100644 index 0000000000..5f8fab2462 --- /dev/null +++ b/libraries/mysql-connector-c++/mysql_cxx_linkage.patch @@ -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() -- cgit v1.2.3