Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 2015 12:08:06 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r403905 - in head/databases: mysql57-client/files mysql57-server mysql57-server/files
Message-ID:  <201512171208.tBHC86pk037510@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Thu Dec 17 12:08:06 2015
New Revision: 403905
URL: https://svnweb.freebsd.org/changeset/ports/403905

Log:
  databases/mysql57-*: Support DragonFly
  
  PR:	204607

Added:
  head/databases/mysql57-client/files/patch-cmake_os_DragonFly.cmake   (contents, props changed)
  head/databases/mysql57-client/files/patch-cmd-line-utils_libedit_chartype.h   (contents, props changed)
  head/databases/mysql57-client/files/patch-cmd-line-utils_libedit_vi.c   (contents, props changed)
  head/databases/mysql57-client/files/patch-libmysql_CMakeLists.txt   (contents, props changed)
  head/databases/mysql57-server/files/patch-cmd-line-utils_libedit_chartype.h   (contents, props changed)
  head/databases/mysql57-server/files/patch-cmd-line-utils_libedit_vi.c   (contents, props changed)
  head/databases/mysql57-server/files/patch-include_my__thread__os__id.h   (contents, props changed)
  head/databases/mysql57-server/files/patch-storage_innobase_include_srv0mon.h   (contents, props changed)
Modified:
  head/databases/mysql57-server/Makefile

Added: head/databases/mysql57-client/files/patch-cmake_os_DragonFly.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-cmake_os_DragonFly.cmake	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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()

Added: head/databases/mysql57-client/files/patch-cmd-line-utils_libedit_chartype.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-cmd-line-utils_libedit_chartype.h	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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

Added: head/databases/mysql57-client/files/patch-cmd-line-utils_libedit_vi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-cmd-line-utils_libedit_vi.c	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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;
+ 

Added: head/databases/mysql57-client/files/patch-libmysql_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-libmysql_CMakeLists.txt	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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

Modified: head/databases/mysql57-server/Makefile
==============================================================================
--- head/databases/mysql57-server/Makefile	Thu Dec 17 10:58:13 2015	(r403904)
+++ head/databases/mysql57-server/Makefile	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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>

Added: head/databases/mysql57-server/files/patch-cmd-line-utils_libedit_chartype.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-server/files/patch-cmd-line-utils_libedit_chartype.h	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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

Added: head/databases/mysql57-server/files/patch-cmd-line-utils_libedit_vi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-server/files/patch-cmd-line-utils_libedit_vi.c	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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;
+ 

Added: head/databases/mysql57-server/files/patch-include_my__thread__os__id.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-server/files/patch-include_my__thread__os__id.h	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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;

Added: head/databases/mysql57-server/files/patch-storage_innobase_include_srv0mon.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-server/files/patch-storage_innobase_include_srv0mon.h	Thu Dec 17 12:08:06 2015	(r403905)
@@ -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>
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512171208.tBHC86pk037510>