mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 10:14:09 +00:00
mariadb: fix darwin build
This commit is contained in:
parent
cb506e6e2e
commit
106d87b6c6
17
pkgs/servers/sql/mariadb/clang-isfinite.patch
Normal file
17
pkgs/servers/sql/mariadb/clang-isfinite.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/include/my_global.h b/include/my_global.h
|
||||
index cb31ae2..2866f87 100644
|
||||
--- a/include/my_global.h
|
||||
+++ b/include/my_global.h
|
||||
@@ -803,12 +803,6 @@ inline unsigned long long my_double2ulonglong(double d)
|
||||
#endif
|
||||
|
||||
#ifndef isfinite
|
||||
-#ifdef HAVE_FINITE
|
||||
-#define isfinite(x) finite(x)
|
||||
-#else
|
||||
-#define finite(x) (1.0 / fabs(x) > 0.0)
|
||||
-#endif /* HAVE_FINITE */
|
||||
-#elif (__cplusplus >= 201103L)
|
||||
#include <cmath>
|
||||
static inline bool isfinite(double x) { return std::isfinite(x); }
|
||||
#endif /* isfinite */
|
@ -34,7 +34,8 @@ common = rec { # attributes common to both builds
|
||||
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
|
||||
'';
|
||||
|
||||
patches = [ ./cmake-includedir.patch ];
|
||||
patches = [ ./cmake-includedir.patch ]
|
||||
++ stdenv.lib.optional stdenv.cc.isClang ./clang-isfinite.patch;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_CONFIG=mysql_release"
|
||||
@ -121,7 +122,8 @@ everything = stdenv.mkDerivation (common // {
|
||||
buildInputs = common.buildInputs ++ [
|
||||
xz lzo lz4 bzip2 snappy
|
||||
libxml2 boost judy libevent cracklib
|
||||
] ++ optionals (stdenv.isLinux && !stdenv.isArm) [ numactl ];
|
||||
] ++ optional (stdenv.isLinux && !stdenv.isArm) numactl
|
||||
++ optional stdenv.isDarwin libiconv;
|
||||
|
||||
cmakeFlags = common.cmakeFlags ++ [
|
||||
"-DMYSQL_DATADIR=/var/lib/mysql"
|
||||
@ -159,7 +161,8 @@ everything = stdenv.mkDerivation (common // {
|
||||
rm "$out"/bin/rcmysql
|
||||
'';
|
||||
|
||||
CXXFLAGS = optionalString stdenv.isi686 "-fpermissive";
|
||||
CXXFLAGS = optionalString stdenv.isi686 "-fpermissive"
|
||||
+ optionalString stdenv.isDarwin " -std=c++11";
|
||||
});
|
||||
|
||||
connector-c = stdenv.mkDerivation rec {
|
||||
|
Loading…
Reference in New Issue
Block a user