Skip to content

Commit

Permalink
mysql8: disable CMake Xcode check and use the compiler-blacklist port…
Browse files Browse the repository at this point in the history
…group
  • Loading branch information
herbygillot authored and cjones051073 committed Jun 12, 2019
1 parent 39e260d commit 935f008
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
10 changes: 7 additions & 3 deletions databases/mysql8/Portfile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ maintainers {gmail.com:herby.gillot @herbygillot} openmaintainer
homepage https://www.mysql.com/ homepage https://www.mysql.com/


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


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


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


use_parallel_build yes use_parallel_build yes


compiler.blacklist-append {clang < 800}

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


post-extract { post-extract {
file mkdir ${cmake.build_dir}/macports file mkdir ${cmake.build_dir}/macports
Expand Down
42 changes: 42 additions & 0 deletions databases/mysql8/files/patch-disable-xcode-check.diff
Original file line number Original file line Diff line number Diff line change
@@ -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.