aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmokhi <mmokhi@FreeBSD.org>2018-12-26 20:01:58 +0800
committermmokhi <mmokhi@FreeBSD.org>2018-12-26 20:01:58 +0800
commit60c4e81245a6e88adbee9e158f35770cf8481b16 (patch)
treeb7b82042198bba1c814919a18bcd8d245f54ed27
parentc4cb740e632a6aad97f1a7d2338dbc6db43f846c (diff)
downloadfreebsd-ports-gnome-60c4e81245a6e88adbee9e158f35770cf8481b16.tar.gz
freebsd-ports-gnome-60c4e81245a6e88adbee9e158f35770cf8481b16.tar.zst
freebsd-ports-gnome-60c4e81245a6e88adbee9e158f35770cf8481b16.zip
databases/mysql57-client: Fix build for i386
Make MySQL build-script assume that FreeBSD's Clang (on i386) doesn't have "atomic_*" functions builtin implemented. This is added to cmake/os/FreeBSD.cmake to make the merge for upstream easier. This fixes the build of mysql57-client on the i386 again. PR: 229605 Submitted by: PitDron <pitdron@gmail.com> Reported by: gbromov@gmail.com Sponsored by: The FreeBSD Foundation
-rw-r--r--databases/mysql57-client/Makefile2
-rw-r--r--databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake14
2 files changed, 12 insertions, 4 deletions
diff --git a/databases/mysql57-client/Makefile b/databases/mysql57-client/Makefile
index 9efc8da80d88..03134a97e5c7 100644
--- a/databases/mysql57-client/Makefile
+++ b/databases/mysql57-client/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= mysql
-PORTREVISION= 1
+PORTREVISION= 2
PKGNAMESUFFIX= 57-client
COMMENT= Multithreaded SQL database (client)
diff --git a/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake b/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake
index 966daa63733d..64b809e3bd45 100644
--- a/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake
+++ b/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake
@@ -1,9 +1,17 @@
---- cmake/os/FreeBSD.cmake.orig 2018-12-19 17:43:09 UTC
+--- cmake/os/FreeBSD.cmake.orig 2018-10-04 05:48:22 UTC
+++ cmake/os/FreeBSD.cmake
-@@ -30,6 +30,12 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
+@@ -30,6 +30,20 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
ENDIF()
++ CHECK_C_SOURCE_RUNS("
++ int main()
++ {
++ return (__clang_major__ >= 4);
++ }" I386_ATOMIC_BUILTINS)
++ IF((CMAKE_SYSTEM_PROCESSOR MATCHES "i386") AND (NOT I386_ATOMIC_BUILTINS))
++ SET(HAVE_GCC_ATOMIC_BUILTINS CACHE INTERNAL "")
++ ENDIF()
+ ELSEIF(CMAKE_COMPILER_IS_GNUCC)
+ EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GCC_VERSION)
@@ -13,7 +21,7 @@
ELSE()
MESSAGE(FATAL_ERROR "Unsupported compiler!")
ENDIF()
-@@ -38,4 +44,6 @@ ENDIF()
+@@ -38,4 +52,6 @@ ENDIF()
# Should not be needed any more, but kept for easy resurrection if needed
# #Legacy option, maybe not needed anymore , taken as is from autotools build
# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)