diff options
author | John Marino <marino@FreeBSD.org> | 2015-12-17 12:08:06 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2015-12-17 12:08:06 +0000 |
commit | 929e5dccb6e08e3f5a38cf6fa0009d996d6ef3d4 (patch) | |
tree | 654fd5e566c815748b90097985f159e1da2e730b /databases | |
parent | 8ff2ca145769b2b34ef947274d675494bdabd457 (diff) | |
download | freebsd-ports-929e5dccb6e08e3f5a38cf6fa0009d996d6ef3d4.zip |
databases/mysql57-*: Support DragonFly
PR: 204607
Diffstat (limited to 'databases')
9 files changed, 128 insertions, 6 deletions
diff --git a/databases/mysql57-client/files/patch-cmake_os_DragonFly.cmake b/databases/mysql57-client/files/patch-cmake_os_DragonFly.cmake new file mode 100644 index 000000000000..7e94978023f1 --- /dev/null +++ b/databases/mysql57-client/files/patch-cmake_os_DragonFly.cmake @@ -0,0 +1,27 @@ +--- cmake/os/DragonFly.cmake.orig 2015-12-17 10:53:10 UTC ++++ cmake/os/DragonFly.cmake +@@ -0,0 +1,24 @@ ++INCLUDE(CheckCSourceRuns) ++ ++# We require at least GCC 4.4 or Clang 3.3. ++IF(NOT FORCE_UNSUPPORTED_COMPILER) ++ IF(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() ++ ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang") ++ CHECK_C_SOURCE_RUNS(" ++ int main() ++ { ++ return (__clang_major__ < 3) || ++ (__clang_major__ == 3 && __clang_minor__ < 3); ++ }" HAVE_SUPPORTED_CLANG_VERSION) ++ IF(NOT HAVE_SUPPORTED_CLANG_VERSION) ++ MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!") ++ ENDIF() ++ ELSE() ++ MESSAGE(FATAL_ERROR "Unsupported compiler!") ++ ENDIF() ++ENDIF() diff --git a/databases/mysql57-client/files/patch-cmd-line-utils_libedit_chartype.h b/databases/mysql57-client/files/patch-cmd-line-utils_libedit_chartype.h new file mode 100644 index 000000000000..6aaba5c733f7 --- /dev/null +++ b/databases/mysql57-client/files/patch-cmd-line-utils_libedit_chartype.h @@ -0,0 +1,11 @@ +--- cmd-line-utils/libedit/chartype.h.orig 2015-11-29 19:16:24 UTC ++++ cmd-line-utils/libedit/chartype.h +@@ -49,7 +49,7 @@ + TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */ + #if !defined(__NetBSD__) && !defined(__sun) \ + && !(defined(__APPLE__) && defined(__MACH__)) \ +- && !defined(__FreeBSD__) && !defined(_AIX) ++ && !defined(__FreeBSD__) && !defined(_AIX) && !defined(__DragonFly__) + #ifndef __STDC_ISO_10646__ + /* In many places it is assumed that the first 127 code points are ASCII + * compatible, so ensure wchar_t indeed does ISO 10646 and not some other diff --git a/databases/mysql57-client/files/patch-cmd-line-utils_libedit_vi.c b/databases/mysql57-client/files/patch-cmd-line-utils_libedit_vi.c new file mode 100644 index 000000000000..0847a07c84d4 --- /dev/null +++ b/databases/mysql57-client/files/patch-cmd-line-utils_libedit_vi.c @@ -0,0 +1,20 @@ +--- cmd-line-utils/libedit/vi.c.orig 2015-11-29 19:16:24 UTC ++++ cmd-line-utils/libedit/vi.c +@@ -919,7 +919,7 @@ vi_comment_out(EditLine *el, Int c __att + * NB: posix implies that we should enter insert mode, however + * this is against historical precedent... + */ +-#if defined(__weak_reference) && !defined(__FreeBSD__) ++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__) + __weakref_visible char *my_get_alias_text(const char *) + __weak_reference(get_alias_text); + #endif +@@ -928,7 +928,7 @@ protected el_action_t + vi_alias(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) + { +-#if defined(__weak_reference) && !defined(__FreeBSD__) ++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__) + char alias_name[3]; + char *alias_text; + diff --git a/databases/mysql57-client/files/patch-libmysql_CMakeLists.txt b/databases/mysql57-client/files/patch-libmysql_CMakeLists.txt new file mode 100644 index 000000000000..d4a6ee54a7e6 --- /dev/null +++ b/databases/mysql57-client/files/patch-libmysql_CMakeLists.txt @@ -0,0 +1,11 @@ +--- libmysql/CMakeLists.txt.orig 2015-11-29 19:16:24 UTC ++++ libmysql/CMakeLists.txt +@@ -260,7 +260,7 @@ IF(NOT DISABLE_SHARED) + COMPONENT SharedLibraries) + IF(UNIX) + # libtool compatability +- IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) ++ IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly" OR APPLE) + SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}") + ELSE() + SET(OS_SHARED_LIB_VERSION diff --git a/databases/mysql57-server/Makefile b/databases/mysql57-server/Makefile index 4ac02156faa4..6def0b349f09 100644 --- a/databases/mysql57-server/Makefile +++ b/databases/mysql57-server/Makefile @@ -123,10 +123,4 @@ post-extract: post-patch: @${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt -.if ${OPSYS} == DragonFly - ${CP} ${WRKSRC}/cmake/os/FreeBSD.cmake \ - ${WRKSRC}/cmake/os/DragonFly.cmake - ${MV} ${WRKSRC}/storage/tokudb ${WRKSRC}/skip-tokudb -.endif - .include <bsd.port.post.mk> diff --git a/databases/mysql57-server/files/patch-cmd-line-utils_libedit_chartype.h b/databases/mysql57-server/files/patch-cmd-line-utils_libedit_chartype.h new file mode 100644 index 000000000000..6aaba5c733f7 --- /dev/null +++ b/databases/mysql57-server/files/patch-cmd-line-utils_libedit_chartype.h @@ -0,0 +1,11 @@ +--- cmd-line-utils/libedit/chartype.h.orig 2015-11-29 19:16:24 UTC ++++ cmd-line-utils/libedit/chartype.h +@@ -49,7 +49,7 @@ + TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */ + #if !defined(__NetBSD__) && !defined(__sun) \ + && !(defined(__APPLE__) && defined(__MACH__)) \ +- && !defined(__FreeBSD__) && !defined(_AIX) ++ && !defined(__FreeBSD__) && !defined(_AIX) && !defined(__DragonFly__) + #ifndef __STDC_ISO_10646__ + /* In many places it is assumed that the first 127 code points are ASCII + * compatible, so ensure wchar_t indeed does ISO 10646 and not some other diff --git a/databases/mysql57-server/files/patch-cmd-line-utils_libedit_vi.c b/databases/mysql57-server/files/patch-cmd-line-utils_libedit_vi.c new file mode 100644 index 000000000000..0847a07c84d4 --- /dev/null +++ b/databases/mysql57-server/files/patch-cmd-line-utils_libedit_vi.c @@ -0,0 +1,20 @@ +--- cmd-line-utils/libedit/vi.c.orig 2015-11-29 19:16:24 UTC ++++ cmd-line-utils/libedit/vi.c +@@ -919,7 +919,7 @@ vi_comment_out(EditLine *el, Int c __att + * NB: posix implies that we should enter insert mode, however + * this is against historical precedent... + */ +-#if defined(__weak_reference) && !defined(__FreeBSD__) ++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__) + __weakref_visible char *my_get_alias_text(const char *) + __weak_reference(get_alias_text); + #endif +@@ -928,7 +928,7 @@ protected el_action_t + vi_alias(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) + { +-#if defined(__weak_reference) && !defined(__FreeBSD__) ++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__) + char alias_name[3]; + char *alias_text; + diff --git a/databases/mysql57-server/files/patch-include_my__thread__os__id.h b/databases/mysql57-server/files/patch-include_my__thread__os__id.h new file mode 100644 index 000000000000..382c3ee920f5 --- /dev/null +++ b/databases/mysql57-server/files/patch-include_my__thread__os__id.h @@ -0,0 +1,15 @@ +--- include/my_thread_os_id.h.orig 2015-11-29 19:16:24 UTC ++++ include/my_thread_os_id.h +@@ -75,8 +75,12 @@ static inline my_thread_os_id_t my_threa + return pthread_getthreadid_np(); + #else + #ifdef HAVE_INTEGER_PTHREAD_SELF ++# ifdef __DragonFly__ ++ return syscall(SYS_lwp_gettid); ++# else + /* Unknown platform, fallback. */ + return pthread_self(); ++# endif + #else + /* Feature not available. */ + return 0; diff --git a/databases/mysql57-server/files/patch-storage_innobase_include_srv0mon.h b/databases/mysql57-server/files/patch-storage_innobase_include_srv0mon.h new file mode 100644 index 000000000000..598981a5e0ab --- /dev/null +++ b/databases/mysql57-server/files/patch-storage_innobase_include_srv0mon.h @@ -0,0 +1,13 @@ +--- storage/innobase/include/srv0mon.h.orig 2015-11-29 19:16:24 UTC ++++ storage/innobase/include/srv0mon.h +@@ -34,6 +34,10 @@ Created 12/15/2009 Jimmy Yang + /* Required for FreeBSD so that INT64_MAX is defined. */ + #define __STDC_LIMIT_MACROS + #endif /* __STDC_LIMIT_MACROS */ ++#ifdef __DragonFly__ ++/* The hack above doen't work for dragonfly, stdint.h already imported */ ++#include <machine/int_limits.h> ++#endif + + #include <stdint.h> + |