From owner-svn-ports-all@freebsd.org Sat Dec 22 17:16:58 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CACCB1358F62; Sat, 22 Dec 2018 17:16:57 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 664BB8FDAC; Sat, 22 Dec 2018 17:16:57 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D5B1E5; Sat, 22 Dec 2018 17:16:57 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBMHGvcC071046; Sat, 22 Dec 2018 17:16:57 GMT (envelope-from mmokhi@FreeBSD.org) Received: (from mmokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBMHGvBx071045; Sat, 22 Dec 2018 17:16:57 GMT (envelope-from mmokhi@FreeBSD.org) Message-Id: <201812221716.wBMHGvBx071045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmokhi set sender to mmokhi@FreeBSD.org using -f From: Mahdi Mokhtari Date: Sat, 22 Dec 2018 17:16:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r488110 - head/databases/mysql57-client/files X-SVN-Group: ports-head X-SVN-Commit-Author: mmokhi X-SVN-Commit-Paths: head/databases/mysql57-client/files X-SVN-Commit-Revision: 488110 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 664BB8FDAC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2018 17:16:58 -0000 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 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) ++