aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorMahdi Mokhtari <mmokhi@FreeBSD.org>2018-12-23 01:16:56 +0800
committerMahdi Mokhtari <mmokhi@FreeBSD.org>2018-12-23 01:16:56 +0800
commit0e518dc7c3fab9d109c685ee38f991d1a6b68ea8 (patch)
treee9ac0d845b10508009d2695a7b736057d0ba46e4 /databases
parent8ac911291e1ea1073e4512ee5a6e96f49324d85c (diff)
downloadfreebsd-ports-gnome-0e518dc7c3fab9d109c685ee38f991d1a6b68ea8.tar.gz
freebsd-ports-gnome-0e518dc7c3fab9d109c685ee38f991d1a6b68ea8.tar.zst
freebsd-ports-gnome-0e518dc7c3fab9d109c685ee38f991d1a6b68ea8.zip
databases/mysql57-client: Fix the build with GCC-based architectures
This patch adds a condition to FreeBSD part of MySQL CMake-scripts to recognize gcc as well as Clang, while taking care of Unsupported compilers too. This is an enhancement on the initial patch by Piotr Kubaj <pkubaj@anongoth.pl> that committed by linimon on r488087. PR: 234172 Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'databases')
-rw-r--r--databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake22
1 files changed, 17 insertions, 5 deletions
diff --git a/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake b/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake
index 725ccab9ed3a..966daa63733d 100644
--- a/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake
+++ b/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake
@@ -1,11 +1,23 @@
--- cmake/os/FreeBSD.cmake.orig 2018-12-19 17:43:09 UTC
+++ cmake/os/FreeBSD.cmake
-@@ -30,8 +30,6 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
+@@ -30,6 +30,12 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
ENDIF()
-- ELSE()
-- MESSAGE(FATAL_ERROR "Unsupported compiler!")
++ ELSEIF(CMAKE_COMPILER_IS_GNUCC)
++ EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
++ OUTPUT_VARIABLE GCC_VERSION)
++ IF(GCC_VERSION VERSION_LESS 4.4)
++ MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!")
++ ENDIF()
+ ELSE()
+ MESSAGE(FATAL_ERROR "Unsupported compiler!")
ENDIF()
- ENDIF()
-
+@@ -38,4 +44,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)
+-
++# For GCC maybe it's also good idea to use
++# ADD_DEFINITIONS(-D_GNU_SOURCE)
++