2016-05-31 09:52:04 +02:00
|
|
|
# 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.
|
|
|
|
|
2016-09-19 22:18:45 +02:00
|
|
|
# All patches are managed at https://github.com/Martchus/mariadb-connector-c
|
|
|
|
|
2016-05-31 09:52:04 +02:00
|
|
|
pkgname=mingw-w64-mariadb-connector-c
|
2022-04-02 20:59:38 +02:00
|
|
|
pkgver=3.2.6
|
2016-09-17 16:33:47 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases (mingw-w64)'
|
2016-05-31 09:52:04 +02:00
|
|
|
arch=('any')
|
2016-09-17 16:33:47 +02:00
|
|
|
url='https://mariadb.com/kb/en/mariadb/about-mariadb-connector-c'
|
2016-05-31 09:52:04 +02:00
|
|
|
license=('LGPL')
|
|
|
|
replaces=('mingw-w64-libmariadbclient')
|
|
|
|
conflicts=('mingw-w64-libmariadbclient')
|
|
|
|
provides=("mingw-w64-libmariadbclient=$pkgver")
|
2020-04-17 02:56:27 +02:00
|
|
|
depends=('mingw-w64-crt' 'mingw-w64-openssl' 'mingw-w64-zlib' 'mingw-w64-curl')
|
2016-05-31 09:52:04 +02:00
|
|
|
makedepends=('mingw-w64-cmake')
|
|
|
|
options=('!strip' '!buildflags' 'staticlibs')
|
2020-04-17 02:56:27 +02:00
|
|
|
source=(
|
2021-12-01 13:27:27 +01:00
|
|
|
"https://github.com/mariadb-corporation/mariadb-connector-c/archive/refs/tags/v$pkgver.tar.gz"
|
2020-04-17 02:56:27 +02:00
|
|
|
'0001-Fix-mingw-w64-build.patch'
|
2021-11-02 02:05:16 +01:00
|
|
|
'0002-Enable-pkg-config-for-mingw-w64-build.patch'
|
2020-04-17 02:56:27 +02:00
|
|
|
)
|
2022-04-02 20:59:38 +02:00
|
|
|
sha256sums=('d9aee070e1d954074a70eff1cfd2d6c6bc5d190dc00075975a55d4f3e1ac20c5'
|
|
|
|
'88912c97b33ab86835f10f37ce7a67e11d489dedfd65d0696aba85680d0d3805'
|
|
|
|
'c405499b0812a2792a2c6a419b2061c8e280bda74049dba9a018576ed1a332e6')
|
2016-05-31 09:52:04 +02:00
|
|
|
|
2016-09-17 16:33:47 +02:00
|
|
|
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
|
2016-05-31 09:52:04 +02:00
|
|
|
|
|
|
|
prepare() {
|
2021-12-01 13:27:27 +01:00
|
|
|
cd "$srcdir/mariadb-connector-c-${pkgver}"
|
2016-09-17 16:33:47 +02:00
|
|
|
for patch in "$srcdir/"*.patch; do
|
|
|
|
patch -p1 -i "$patch"
|
|
|
|
done
|
2016-05-31 09:52:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
2021-12-01 13:27:27 +01:00
|
|
|
cd "$srcdir/mariadb-connector-c-${pkgver}"
|
2016-05-31 09:52:04 +02:00
|
|
|
for _arch in ${_architectures}; do
|
|
|
|
mkdir -p build-${_arch} && pushd build-${_arch}
|
|
|
|
${_arch}-cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=RELEASE \
|
|
|
|
-DWITH_EXTERNAL_ZLIB=ON \
|
2020-04-17 02:56:27 +02:00
|
|
|
-DWITH_SSL=OPENSSL \
|
2016-05-31 09:52:04 +02:00
|
|
|
-DWITH_MYSQLCOMPAT=ON \
|
2020-04-17 02:56:27 +02:00
|
|
|
-DWITH_UNIT_TESTS=OFF \
|
2016-05-31 09:52:04 +02:00
|
|
|
..
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
for _arch in ${_architectures}; do
|
2021-12-01 13:27:27 +01:00
|
|
|
cd "$srcdir/mariadb-connector-c-${pkgver}/build-${_arch}"
|
2016-05-31 09:52:04 +02:00
|
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
ln -s mariadb "$pkgdir"/usr/${_arch}/include/mysql
|
|
|
|
${_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
|
|
|
|
done
|
|
|
|
}
|