Skip to content
Permalink
Browse files

mysql8: disable CMake Xcode check and use the compiler-blacklist port…

…group
  • Loading branch information...
herbygillot authored and cjones051073 committed Jun 10, 2019
1 parent 39e260d commit 935f00861840bdd40a58d81785a2cc0be61c262d
Showing with 49 additions and 3 deletions.
  1. +7 −3 databases/mysql8/Portfile
  2. +42 −0 databases/mysql8/files/patch-disable-xcode-check.diff
@@ -12,8 +12,8 @@ maintainers {gmail.com:herby.gillot @herbygillot} openmaintainer
homepage https://www.mysql.com/

# Set revision_client and revision_server to 0 on version bump.
set revision_client 2
set revision_server 3
set revision_client 3
set revision_server 4

set name_mysql ${name}
set version_branch [join [lrange [split ${version} .] 0 1] .]
@@ -25,6 +25,7 @@ if {$subport eq $name} {
PortGroup muniversal 1.0
PortGroup cmake 1.1
PortGroup select 1.0
PortGroup compiler_blacklist_versions 1.0

description Multithreaded SQL database server
long_description MySQL is an open-source, multi-threaded SQL database.
@@ -61,6 +62,8 @@ if {$subport eq $name} {

use_parallel_build yes

compiler.blacklist-append {clang < 800}

# Use default CMake build_types
if {[variant_isset debug]} {
cmake.build_type Debug
@@ -118,7 +121,8 @@ if {$subport eq $name} {
patch.pre_args -p1
patchfiles patch-cmake-install_layout.cmake.diff \
patch-router-cmake-set_rpath.diff \
patch-sql-local-boost.diff
patch-sql-local-boost.diff \
patch-disable-xcode-check.diff

post-extract {
file mkdir ${cmake.build_dir}/macports
@@ -0,0 +1,42 @@
--- ./cmake/os/Darwin.cmake.orig 2019-06-10 02:21:49.000000000 -0400
+++ ./cmake/os/Darwin.cmake 2019-06-10 02:46:18.000000000 -0400
@@ -24,21 +24,24 @@

INCLUDE(CheckCSourceRuns)

-# We require at least XCode 9.0
-IF(NOT FORCE_UNSUPPORTED_COMPILER)
- IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
- CHECK_C_SOURCE_RUNS("
- int main()
- {
- return (__clang_major__ < 9);
- }" HAVE_SUPPORTED_CLANG_VERSION)
- IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
- MESSAGE(FATAL_ERROR "XCode 9.0 or newer is required!")
- ENDIF()
- ELSE()
- MESSAGE(FATAL_ERROR "Unsupported compiler!")
- ENDIF()
-ENDIF()
+# MACPORTS: XCode version check disabled to rely instead on compiler
+# blacklisting in the ports build process.
+#
+# # We require at least XCode 9.0
+# IF(NOT FORCE_UNSUPPORTED_COMPILER)
+# IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
+# CHECK_C_SOURCE_RUNS("
+# int main()
+# {
+# return (__clang_major__ <= 9);
+# }" HAVE_SUPPORTED_CLANG_VERSION)
+# IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
+# MESSAGE(FATAL_ERROR "XCode 9.0 or newer is required!")
+# ENDIF()
+# ELSE()
+# MESSAGE(FATAL_ERROR "Unsupported compiler!")
+# ENDIF()
+# ENDIF()

# This is used for the version_compile_machine variable.
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)

0 comments on commit 935f008

Please sign in to comment.
You can’t perform that action at this time.