Last active
August 29, 2015 14:09
-
-
Save muflone/c6641fc1acce22583235 to your computer and use it in GitHub Desktop.
Package mysql-connector-c++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Marcel Korpel <marcel[dot]korpel[at]gmail> | |
# Contributor: Muflone http://www.muflone.com/contacts/english/ | |
# Contributor: Ilya Kuznetsov <monochrome.r42@gmail.com> | |
# Contributor: Christian Hesse <mail@eworm.de> | |
pkgname=mysql-connector-c++ | |
pkgver=1.1.4 | |
pkgrel=2 | |
pkgdesc="A MySQL database connector for C++" | |
arch=('i686' 'x86_64') | |
url="http://dev.mysql.com/doc/refman/5.7/en/connector-cpp.html" | |
license=('GPL') | |
depends=('libmysqlclient' 'boost-libs') | |
makedepends=('cmake' 'boost') | |
source=("http://cdn.mysql.com/Downloads/Connector-C++/${pkgname}-${pkgver}.tar.gz"{,.asc} | |
"use-cxx_linkage-option.patch") | |
sha256sums=('a25f14dad39e93a2f9cdf09166ee53981f7212dce829e4208e07a522963a8585' | |
'SKIP' | |
'bdf011618048cb05b85dc6ffd69c91f08da54333f4ec7e40d1a1ea08b992bfcf') | |
prepare() { | |
cd "${srcdir}"/${pkgname}-${pkgver} | |
patch -i "../use-cxx_linkage-option.patch" | |
} | |
build() { | |
cd "${srcdir}"/${pkgname}-${pkgver} | |
cmake . -DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF \ | |
-DMYSQL_LIB=/usr/lib/libmysqlclient.so | |
make | |
} | |
package() { | |
cd "${srcdir}"/${pkgname}-${pkgver} | |
make DESTDIR="${pkgdir}" install | |
rm "${pkgdir}"/usr/{ANNOUNCEMENT,COPYING,README,INSTALL,Licenses_for_Third-Party_Components.txt} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur src/mysql-connector-c++-1.1.4.orig/FindMySQL.cmake src/mysql-connector-c++-1.1.4/FindMySQL.cmake | |
--- src/mysql-connector-c++-1.1.4.orig/FindMySQL.cmake 2014-07-30 13:41:37.000000000 +0200 | |
+++ src/mysql-connector-c++-1.1.4/FindMySQL.cmake 2014-11-13 17:01:55.709232754 +0100 | |
@@ -104,16 +104,15 @@ | |
# Finally remove the dot | |
STRING(REGEX REPLACE "[.]" "" MYSQL_NUM_VERSION "${MYSQL_NUM_VERSION}") | |
- IF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) | |
+ IF(MYSQL_CXX_LINKAGE) | |
EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cxxflags" | |
OUTPUT_VARIABLE _mysql_config_output | |
) | |
- SET(MYSQL_CXX_LINKAGE 1) | |
- ELSE (MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) | |
+ ELSE (MYSQL_CXX_LINKAGE) | |
EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags" | |
OUTPUT_VARIABLE _mysql_config_output | |
) | |
- ENDIF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) | |
+ ENDIF(MYSQL_CXX_LINKAGE) | |
IF (NOT MYSQL_LINK_FLAGS) | |
STRING(REGEX MATCHALL "-m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment