Date: Sat, 22 Dec 2018 17:16:57 +0000 (UTC) From: Mahdi Mokhtari <mmokhi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r488110 - head/databases/mysql57-client/files Message-ID: <201812221716.wBMHGvBx071045@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmokhi Date: Sat Dec 22 17:16:56 2018 New Revision: 488110 URL: https://svnweb.freebsd.org/changeset/ports/488110 Log: 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 Modified: head/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake Modified: head/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake ============================================================================== --- head/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake Sat Dec 22 17:12:10 2018 (r488109) +++ head/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake Sat Dec 22 17:16:56 2018 (r488110) @@ -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) ++
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812221716.wBMHGvBx071045>