summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartchus2016-09-18 19:05:49 +0200
committerMartchus2016-09-18 19:05:49 +0200
commit44308252921201534e38681853200c85c22e5545 (patch)
treefdfa9c1d8d49e2e29e8aace6147ab6aaea35f601
parent484abde34ba10fd68dee4b155ddb9400a98ac40b (diff)
downloadaur-44308252921201534e38681853200c85c22e5545.tar.gz
Update to 2.3.1
-rw-r--r--.SRCINFO20
-rw-r--r--0001-Fix-libnames-for-mingw-w64.patch89
-rw-r--r--0002-Fix-_SIZE_T_DEFINED-under-mingw-w64.patch25
-rw-r--r--0003-Use-fopen-rather-than-fopen_s-for-XP-compatibility.patch45
-rw-r--r--PKGBUILD27
-rw-r--r--PKGBUILD.bak74
6 files changed, 256 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d7df7a97603e..0e6b325c9be9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Tue May 31 21:04:55 UTC 2016
+# Sun Sep 18 17:05:38 UTC 2016
pkgbase = mingw-w64-mariadb-connector-c
pkgdesc = MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases (mingw-w64)
- pkgver = 2.2.3
- pkgrel = 2
+ pkgver = 2.3.1
+ pkgrel = 1
url = https://mariadb.com/kb/en/mariadb/about-mariadb-connector-c
arch = any
license = LGPL
@@ -11,18 +11,18 @@ pkgbase = mingw-w64-mariadb-connector-c
depends = mingw-w64-crt
depends = mingw-w64-openssl
depends = mingw-w64-zlib
- provides = mingw-w64-libmariadbclient=2.2.3
+ provides = mingw-w64-libmariadbclient=2.3.1
conflicts = mingw-w64-libmariadbclient
replaces = mingw-w64-libmariadbclient
options = !strip
options = !buildflags
options = staticlibs
- source = https://downloads.mariadb.org/interstitial/connector-c-2.2.3/mariadb-connector-c-2.2.3-src.tar.gz
- source = fix-libnames-mingw.patch
- source = use_fopen_for_xp_compatibility.patch
- source = fix-size-t-defined.patch
- sha1sums = 89031eeb4cf56affea30a3d66ff2c6c29462da3d
- sha1sums = d80d94dfe46bf02cb3934ff493070f7b8cb455d9
+ source = https://downloads.mariadb.org/interstitial/connector-c-2.3.1/mariadb-connector-c-2.3.1-src.tar.gz
+ source = 0001-Fix-libnames-for-mingw-w64.patch
+ source = 0002-Fix-_SIZE_T_DEFINED-under-mingw-w64.patch
+ source = 0003-Use-fopen-rather-than-fopen_s-for-XP-compatibility.patch
+ sha1sums = 7c12d46799e270a14ea414ea23a79aff48bf24e6
+ sha1sums = 164de4f08355fbc40bfb22164ec0486ec8002ab2
sha1sums = dcf3d766ae6faf99aa93d1444e3b200c4f80c4f1
sha1sums = 4d1b01a0f800b15ad6e44e387f2f8d8c147cdea3
diff --git a/0001-Fix-libnames-for-mingw-w64.patch b/0001-Fix-libnames-for-mingw-w64.patch
new file mode 100644
index 000000000000..3c85c643b7b0
--- /dev/null
+++ b/0001-Fix-libnames-for-mingw-w64.patch
@@ -0,0 +1,89 @@
+From 9af2954796a6f705b0a4f5ce415ce7bdfa3ab5ce Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sat, 17 Sep 2016 16:41:12 +0200
+Subject: [PATCH 1/3] Fix libnames for mingw-w64
+
+---
+ libmariadb/CMakeLists.txt | 39 ++++++++++++++++++++-------------------
+ 1 file changed, 20 insertions(+), 19 deletions(-)
+
+diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
+index f07dc02..ea58fd4 100644
+--- a/libmariadb/CMakeLists.txt
++++ b/libmariadb/CMakeLists.txt
+@@ -362,7 +362,7 @@ SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} ${ZLIB_SOURCES})
+ ENDIF()
+
+ IF(WIN32)
+- SET_VERSION_INFO("TARGET:libmariadb"
++ SET_VERSION_INFO("TARGET:mariadb"
+ "FILE_TYPE:VFT_DLL"
+ "SOURCE_FILE:libmariadb/libmariadb.c"
+ "ORIGINAL_FILE_NAME:libmariadb.dll"
+@@ -390,23 +390,24 @@ ENDIF()
+ ADD_LIBRARY(mariadbclient STATIC ${mariadbclient_RC} $<TARGET_OBJECTS:mariadb_obj> ${EMPTY_FILE} ${EXPORT_LINK})
+ TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS})
+
+-ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} $<TARGET_OBJECTS:mariadb_obj> ${EMPTY_FILE} ${EXPORT_LINK})
+-TARGET_LINK_LIBRARIES(libmariadb ${SYSTEM_LIBS})
++ADD_LIBRARY(mariadb SHARED ${libmariadb_RC} ${LIBMARIADB_SOURCES} ${EMPTY_FILE})
++TARGET_LINK_LIBRARIES(mariadb ${SYSTEM_LIBS})
+ IF(UNIX)
+- SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
++ SET_TARGET_PROPERTIES(mariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
+ ENDIF()
+-SIGN_TARGET(libmariadb)
++SIGN_TARGET(mariadb)
+
+ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+- TARGET_LINK_LIBRARIES (libmariadb "-Wl,--no-undefined")
+- TARGET_LINK_LIBRARIES (libmariadb "-Wl,--version-script=${EXPORT_FILE}")
++ TARGET_LINK_LIBRARIES (mariadb "-Wl,--no-undefined")
++ TARGET_LINK_LIBRARIES (mariadb "-Wl,--version-script=${EXPORT_FILE}")
+ TARGET_LINK_LIBRARIES (mariadbclient "-Wl,--no-undefined")
+ TARGET_LINK_LIBRARIES (mariadbclient "-Wl,--version-script=${EXPORT_FILE}")
+ ENDIF()
+
+-SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "")
++# for consistency with previous version
++#SET_TARGET_PROPERTIES(mariadb PROPERTIES PREFIX "")
+
+-SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION
++SET_TARGET_PROPERTIES(mariadb PROPERTIES VERSION
+ ${CPACK_PACKAGE_VERSION_MAJOR}
+ SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR})
+
+@@ -419,20 +420,20 @@ INCLUDE(${CMAKE_SOURCE_DIR}/cmake/symlink.cmake)
+ # There are still several projects which don't make use
+ # of the config program. To make sure these programs can
+ # use mariadb client library we provide libmysql symlinks
+-IF(NOT WIN32 AND WITH_MYSQLCOMPAT)
+- SET(INSTALL_PATH ${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR})
+- create_symlink(libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX} libmariadb ${INSTALL_PATH})
+- create_symlink(libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX} libmariadb ${INSTALL_PATH})
+- create_symlink(libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_PATH})
+- create_symlink(libmysqlclient_r${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_PATH})
++IF(WITH_MYSQLCOMPAT)
++ SET(INSTALL_PATH ${LIB_INSTALL_DIR})
++ create_symlink(libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX} mariadb ${BIN_INSTALL_DIR})
++ create_symlink(libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX} mariadb ${BIN_INSTALL_DIR})
++ create_symlink(libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${LIB_INSTALL_DIR})
++ create_symlink(libmysqlclient_r${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${LIB_INSTALL_DIR})
+ ENDIF()
+
+
+ INSTALL(TARGETS
+- libmariadb mariadbclient
+- RUNTIME DESTINATION "${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}"
+- LIBRARY DESTINATION "${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}"
+- ARCHIVE DESTINATION "${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}")
++ mariadb mariadbclient
++ RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
++ LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
++ ARCHIVE DESTINATION "${LIB_INSTALL_DIR}")
+
+ INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/
+ DESTINATION ${INCLUDE_INSTALL_DIR}/${SUFFIX_INSTALL_DIR})
+--
+2.9.3
+
diff --git a/0002-Fix-_SIZE_T_DEFINED-under-mingw-w64.patch b/0002-Fix-_SIZE_T_DEFINED-under-mingw-w64.patch
new file mode 100644
index 000000000000..aa9bffea5ec6
--- /dev/null
+++ b/0002-Fix-_SIZE_T_DEFINED-under-mingw-w64.patch
@@ -0,0 +1,25 @@
+From 7cfcfdc3b258bbbe67e29997899c80c2c7bfe2bc Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sat, 17 Sep 2016 16:44:14 +0200
+Subject: [PATCH 2/3] Fix _SIZE_T_DEFINED under mingw-w64
+
+---
+ include/my_global.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/my_global.h b/include/my_global.h
+index 176404c..1905544 100644
+--- a/include/my_global.h
++++ b/include/my_global.h
+@@ -450,7 +450,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
+ #define NO_PISAM /* Not needed anymore */
+ #define NO_MISAM /* Not needed anymore */
+ #define NO_HASH /* Not needed anymore */
+-#ifdef _WIN32
++#if defined(_WIN32) && !defined(__MINGW32__)
+ #define NO_DIR_LIBRARY /* Not standar dir-library */
+ #define USE_MY_STAT_STRUCT /* For my_lib */
+ #ifdef _MSC_VER
+--
+2.9.3
+
diff --git a/0003-Use-fopen-rather-than-fopen_s-for-XP-compatibility.patch b/0003-Use-fopen-rather-than-fopen_s-for-XP-compatibility.patch
new file mode 100644
index 000000000000..a07985b84c97
--- /dev/null
+++ b/0003-Use-fopen-rather-than-fopen_s-for-XP-compatibility.patch
@@ -0,0 +1,45 @@
+From cc7d7a770c85fc208d4d727a3d9efafd8316db70 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sat, 17 Sep 2016 16:51:15 +0200
+Subject: [PATCH 3/3] Use fopen rather than fopen_s for XP compatibility
+
+---
+ libmariadb/dbug.c | 4 ----
+ libmariadb/my_fopen.c | 4 ----
+ 2 files changed, 8 deletions(-)
+
+diff --git a/libmariadb/dbug.c b/libmariadb/dbug.c
+index cd4a0f1..abca4ae 100644
+--- a/libmariadb/dbug.c
++++ b/libmariadb/dbug.c
+@@ -2051,11 +2051,7 @@ static void DBUGOpenFile(CODE_STATE *cs,
+ }
+ else
+ {
+-#ifdef _WIN32
+- if (fopen_s(&fp, name, append ? "a+" : "w"))
+-#else
+ if (!(fp= fopen(name, append ? "a+" : "w")))
+-#endif
+ {
+ (void) fprintf(stderr, ERR_OPEN, cs->process, name);
+ perror("");
+diff --git a/libmariadb/my_fopen.c b/libmariadb/my_fopen.c
+index 5c0fb40..ad2deb9 100644
+--- a/libmariadb/my_fopen.c
++++ b/libmariadb/my_fopen.c
+@@ -36,11 +36,7 @@ FILE *my_fopen(const char *FileName, int Flags, myf MyFlags)
+ FileName, Flags, MyFlags));
+
+ make_ftype(type,Flags);
+-#ifdef _WIN32
+- if (fopen_s(&fd, FileName, type) == 0)
+-#else
+ if ((fd = fopen(FileName, type)) != 0)
+-#endif
+ {
+ /*
+ The test works if MY_NFILE < 128. The problem is that fileno() is char
+--
+2.9.3
+
diff --git a/PKGBUILD b/PKGBUILD
index 0ef349011dea..a0595f64defd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,11 +5,11 @@
# you also find the URL of a binary repository.
pkgname=mingw-w64-mariadb-connector-c
-pkgver=2.2.3
-pkgrel=2
-pkgdesc="MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases (mingw-w64)"
+pkgver=2.3.1
+pkgrel=1
+pkgdesc='MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases (mingw-w64)'
arch=('any')
-url="https://mariadb.com/kb/en/mariadb/about-mariadb-connector-c"
+url='https://mariadb.com/kb/en/mariadb/about-mariadb-connector-c'
license=('LGPL')
replaces=('mingw-w64-libmariadbclient')
conflicts=('mingw-w64-libmariadbclient')
@@ -18,26 +18,25 @@ depends=('mingw-w64-crt' 'mingw-w64-openssl' 'mingw-w64-zlib')
makedepends=('mingw-w64-cmake')
options=('!strip' '!buildflags' 'staticlibs')
source=("https://downloads.mariadb.org/interstitial/connector-c-${pkgver}/mariadb-connector-c-${pkgver}-src.tar.gz"
- 'fix-libnames-mingw.patch'
- 'use_fopen_for_xp_compatibility.patch'
- 'fix-size-t-defined.patch')
-sha1sums=('89031eeb4cf56affea30a3d66ff2c6c29462da3d'
- 'd80d94dfe46bf02cb3934ff493070f7b8cb455d9'
+ '0001-Fix-libnames-for-mingw-w64.patch'
+ '0002-Fix-_SIZE_T_DEFINED-under-mingw-w64.patch'
+ '0003-Use-fopen-rather-than-fopen_s-for-XP-compatibility.patch')
+sha1sums=('7c12d46799e270a14ea414ea23a79aff48bf24e6'
+ '164de4f08355fbc40bfb22164ec0486ec8002ab2'
'dcf3d766ae6faf99aa93d1444e3b200c4f80c4f1'
'4d1b01a0f800b15ad6e44e387f2f8d8c147cdea3')
-_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
prepare() {
cd "$srcdir/mariadb-connector-c-$pkgver-src/"
- patch -p0 -i "$srcdir/fix-libnames-mingw.patch"
- patch -p0 -i "$srcdir/use_fopen_for_xp_compatibility.patch"
- patch -p0 -i "$srcdir/fix-size-t-defined.patch"
+ for patch in "$srcdir/"*.patch; do
+ patch -p1 -i "$patch"
+ done
}
build() {
unset LDFLAGS
-
cd "$srcdir/mariadb-connector-c-$pkgver-src/"
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
diff --git a/PKGBUILD.bak b/PKGBUILD.bak
new file mode 100644
index 000000000000..306d560a2ce7
--- /dev/null
+++ b/PKGBUILD.bak
@@ -0,0 +1,74 @@
+# Maintainer: Martchus <martchus@gmx.net>
+# Contributor: ant32 <antreimer@gmail.com>
+
+# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
+# you also find the URL of a binary repository.
+
+pkgname=mingw-w64-mariadb-connector-c
+pkgver=2.2.3
+pkgrel=2
+pkgdesc="MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases (mingw-w64)"
+arch=('any')
+url="https://mariadb.com/kb/en/mariadb/about-mariadb-connector-c"
+license=('LGPL')
+replaces=('mingw-w64-libmariadbclient')
+conflicts=('mingw-w64-libmariadbclient')
+provides=("mingw-w64-libmariadbclient=$pkgver")
+depends=('mingw-w64-crt' 'mingw-w64-openssl' 'mingw-w64-zlib')
+makedepends=('mingw-w64-cmake')
+options=('!strip' '!buildflags' 'staticlibs')
+source=("https://downloads.mariadb.org/interstitial/connector-c-${pkgver}/mariadb-connector-c-${pkgver}-src.tar.gz"
+ 'fix-libnames-mingw.patch'
+ 'use_fopen_for_xp_compatibility.patch'
+ 'fix-size-t-defined.patch')
+sha1sums=('89031eeb4cf56affea30a3d66ff2c6c29462da3d'
+ 'c8eed89cb0175f8b18a3df5f1ef343858d26d3f5'
+ 'dcf3d766ae6faf99aa93d1444e3b200c4f80c4f1'
+ '4d1b01a0f800b15ad6e44e387f2f8d8c147cdea3')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "$srcdir/mariadb-connector-c-$pkgver-src/"
+ patch -p0 -i "$srcdir/fix-libnames-mingw.patch"
+ patch -p0 -i "$srcdir/use_fopen_for_xp_compatibility.patch"
+ patch -p0 -i "$srcdir/fix-size-t-defined.patch"
+ #patch -p0 -i "$srcdir/fix-qt5-uint-error.patch"
+}
+
+build() {
+ unset LDFLAGS
+
+ cd "$srcdir/mariadb-connector-c-$pkgver-src/"
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-cmake \
+ -DCMAKE_BUILD_TYPE=RELEASE \
+ -DWITH_EXTERNAL_ZLIB=ON \
+ -DWITH_SQLITE=OFF \
+ -DWITH_OPENSSL=ON \
+ -DWITH_MYSQLCOMPAT=ON \
+ ..
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/mariadb-connector-c-$pkgver-src/build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ ln -s mariadb "$pkgdir"/usr/${_arch}/include/mysql
+ # Creation of symlinks in CMake project file doesn't work for some reason.
+ # Probably a couple more symlinks that should be created.
+ ln -s libmariadb.dll.a "$pkgdir"/usr/${_arch}/lib/libmysql.dll.a
+ ln -s libmariadbclient.a "$pkgdir"/usr/${_arch}/lib/libmysqlclient.a
+ ln -s libmariadb.dll "$pkgdir"/usr/${_arch}/bin/libmysql.dll
+ ln -s libmariadb.dll "$pkgdir"/usr/${_arch}/bin/libmysqlclient.dll
+ ln -s libmariadb.dll "$pkgdir"/usr/${_arch}/bin/libmysqlclient_r.dll
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/lib/plugin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/plugin/*.a
+ done
+}