mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-04 00:56:07 +01:00
libraries/mysql-connector-c++: Updated for version 1.1.6.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
bcbebf33ab
commit
fd1448408d
4 changed files with 37 additions and 9 deletions
13
libraries/mysql-connector-c++/mariadb_api.patch
Normal file
13
libraries/mysql-connector-c++/mariadb_api.patch
Normal 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 {
|
|
@ -23,8 +23,8 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=mysql-connector-c++
|
PRGNAM=mysql-connector-c++
|
||||||
VERSION=${VERSION:-1.1.3}
|
VERSION=${VERSION:-1.1.6}
|
||||||
BUILD=${BUILD:-3}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
if [ -z "$ARCH" ]; then
|
||||||
|
@ -69,12 +69,18 @@ find -L . \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
-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
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
|
||||||
-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF \
|
-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF \
|
||||||
|
-DMYSQL_LIB=/usr/lib${LIBDIRSUFFIX}/libmysqlclient.so \
|
||||||
-DCMAKE_BUILD_TYPE=Release ..
|
-DCMAKE_BUILD_TYPE=Release ..
|
||||||
make mysqlcppconn
|
make mysqlcppconn
|
||||||
cp $TMP/$PRGNAM-$VERSION/build/cppconn/config.h $TMP/$PRGNAM-$VERSION/cppconn/config.h
|
cp $TMP/$PRGNAM-$VERSION/build/cppconn/config.h $TMP/$PRGNAM-$VERSION/cppconn/config.h
|
||||||
|
@ -82,10 +88,6 @@ cd build
|
||||||
make install DESTDIR=$PKG
|
make install DESTDIR=$PKG
|
||||||
cd ..
|
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 \
|
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
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
PRGNAM="mysql-connector-c++"
|
PRGNAM="mysql-connector-c++"
|
||||||
VERSION="1.1.3"
|
VERSION="1.1.6"
|
||||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
|
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"
|
DOWNLOAD="https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.6.tar.gz"
|
||||||
MD5SUM="65828789b8d92e6118e7f24568f34a07"
|
MD5SUM="9e49dcfc1408b18b3d3ca02781ff7efb"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES=""
|
REQUIRES=""
|
||||||
|
|
13
libraries/mysql-connector-c++/mysql_cxx_linkage.patch
Normal file
13
libraries/mysql-connector-c++/mysql_cxx_linkage.patch
Normal 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()
|
Loading…
Reference in a new issue