summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSeppo Jaakola <seppo.jaakola@codership.com>2013-07-13 13:30:03 +0300
committerSeppo Jaakola <seppo.jaakola@codership.com>2013-07-13 13:30:03 +0300
commitdb0cfba638383569b1e30765e2d36e0707bfb930 (patch)
treed56bf3ec5c5804b2bd15a5eceddb14b5520b3d2e /cmake
parent0a9216835f406947fb4d492616da4cda75e5e113 (diff)
parenta057b504904c3e6ab1e3006c081b4fb23faaf1d4 (diff)
downloadmariadb-git-db0cfba638383569b1e30765e2d36e0707bfb930.tar.gz
Merged with lp:maria revision #3766
Diffstat (limited to 'cmake')
-rw-r--r--cmake/configure.pl2
-rw-r--r--cmake/cpack_rpm.cmake30
-rw-r--r--cmake/create_initial_db.cmake.in2
-rw-r--r--cmake/make_dist.cmake.in2
-rw-r--r--cmake/mysql_version.cmake2
-rw-r--r--cmake/os/FreeBSD.cmake6
-rw-r--r--cmake/os/Linux.cmake6
-rw-r--r--cmake/package_name.cmake2
-rw-r--r--cmake/plugin.cmake2
-rw-r--r--cmake/readline.cmake2
-rw-r--r--cmake/ssl.cmake2
-rw-r--r--cmake/zlib.cmake8
12 files changed, 38 insertions, 28 deletions
diff --git a/cmake/configure.pl b/cmake/configure.pl
index d39071b13bb..9f46a5668c9 100644
--- a/cmake/configure.pl
+++ b/cmake/configure.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake
index e7da4e984e0..5da00f9cecc 100644
--- a/cmake/cpack_rpm.cmake
+++ b/cmake/cpack_rpm.cmake
@@ -93,7 +93,7 @@ SET(CPACK_RPM_devel_USER_FILELIST ${ignored})
SET(CPACK_RPM_test_USER_FILELIST ${ignored})
SET(CPACK_RPM_client_PACKAGE_OBSOLETES "mysql-client MySQL-client MySQL-OurDelta-client")
-SET(CPACK_RPM_client_PACKAGE_PROVIDES "MariaDB-client MySQL-client mysql-client")
+SET(CPACK_RPM_client_PACKAGE_PROVIDES "MySQL-client mysql-client")
# this is a workaround for CPackRPM.cmake (as of 2.8.8) bug.
# If a package group does not specify OBSOLETES/REQUIRES the values of the
@@ -102,22 +102,40 @@ SET(CPACK_RPM_common_PACKAGE_OBSOLETES "MySQL-common")
SET(CPACK_RPM_common_PACKAGE_PROVIDES "MariaDB-common")
SET(CPACK_RPM_devel_PACKAGE_OBSOLETES "mysql-devel MySQL-devel MySQL-OurDelta-devel")
-SET(CPACK_RPM_devel_PACKAGE_PROVIDES "MariaDB-devel MySQL-devel mysql-devel")
+SET(CPACK_RPM_devel_PACKAGE_PROVIDES "MySQL-devel mysql-devel")
-SET(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB mysql mysql-server MySQL-server MySQL-OurDelta-server")
-SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MariaDB-server MySQL-server config(MariaDB-server) msqlormysql mysql mysql(x86-32) mysql(x86-64) mysql-server")
+SET(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB MySQL mysql-server MySQL-server MySQL-OurDelta-server")
+SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MySQL MySQL-server msqlormysql mysql-server")
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)
SET(CPACK_RPM_shared_PACKAGE_OBSOLETES "mysql-shared MySQL-shared-standard MySQL-shared-pro MySQL-shared-pro-cert MySQL-shared-pro-gpl MySQL-shared-pro-gpl-cert MySQL-shared MySQL-OurDelta-shared mysql-libs")
-SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MariaDB-shared MySQL-shared mysql-shared libmysqlclient.so.18 libmysqlclient.so.18(libmysqlclient_16) libmysqlclient.so.18(libmysqlclient_18) libmysqlclient_r.so.18 libmysqlclient_r.so.18(libmysqlclient_18) mysql-libs")
+SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MySQL-shared mysql-shared")
+
SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
SET(CPACK_RPM_test_PACKAGE_OBSOLETES "mysql-test MySQL-test MySQL-OurDelta-test")
-SET(CPACK_RPM_test_PACKAGE_PROVIDES "MariaDB-test MySQL-test mysql-test")
+SET(CPACK_RPM_test_PACKAGE_PROVIDES "MySQL-test mysql-test")
+
+# Argh! Different distributions call packages differently, to be a drop-in replacement
+# we have to fake distribution-speficic dependencies
+MACRO(ALTERNATIVE_NAME real alt)
+ SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES")
+ SET(${p} "${${p}} ${alt} ${alt}(x86-32) ${alt}(x86-64) config(${alt})")
+ENDMACRO(ALTERNATIVE_NAME)
+
+IF(RPM MATCHES "(rhel|centos)5")
+ ALTERNATIVE_NAME("shared" "mysql")
+ELSEIF(RPM MATCHES "(rhel|centos)6")
+ ALTERNATIVE_NAME("client" "mysql")
+ ALTERNATIVE_NAME("shared" "mysql-libs")
+ELSEIF(RPM MATCHES "fedora")
+ ALTERNATIVE_NAME("client" "mysql")
+ ALTERNATIVE_NAME("shared" "mysql-libs")
+ENDIF()
# workaround for lots of perl dependencies added by rpmbuild
SET(CPACK_RPM_test_PACKAGE_PROVIDES "${CPACK_RPM_test_PACKAGE_PROVIDES} perl(lib::mtr_gcov.pl) perl(lib::mtr_gprof.pl) perl(lib::mtr_io.pl) perl(lib::mtr_misc.pl) perl(lib::mtr_process.pl) perl(lib::v1/mtr_cases.pl) perl(lib::v1/mtr_gcov.pl) perl(lib::v1/mtr_gprof.pl) perl(lib::v1/mtr_im.pl) perl(lib::v1/mtr_io.pl) perl(lib::v1/mtr_match.pl) perl(lib::v1/mtr_misc.pl) perl(lib::v1/mtr_process.pl) perl(lib::v1/mtr_report.pl) perl(lib::v1/mtr_stress.pl) perl(lib::v1/mtr_timer.pl) perl(lib::v1/mtr_unique.pl) perl(mtr_cases) perl(mtr_io.pl) perl(mtr_match) perl(mtr_misc.pl) perl(mtr_report) perl(mtr_results) perl(mtr_unique)")
diff --git a/cmake/create_initial_db.cmake.in b/cmake/create_initial_db.cmake.in
index f330c13b09d..c77e28d882c 100644
--- a/cmake/create_initial_db.cmake.in
+++ b/cmake/create_initial_db.cmake.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/cmake/make_dist.cmake.in b/cmake/make_dist.cmake.in
index 1b347e41836..ada27c36926 100644
--- a/cmake/make_dist.cmake.in
+++ b/cmake/make_dist.cmake.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
index 9dd2dfed1e6..2abff3dc63d 100644
--- a/cmake/mysql_version.cmake
+++ b/cmake/mysql_version.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/cmake/os/FreeBSD.cmake b/cmake/os/FreeBSD.cmake
index 27afe679f25..3a5a29f6de6 100644
--- a/cmake/os/FreeBSD.cmake
+++ b/cmake/os/FreeBSD.cmake
@@ -32,9 +32,3 @@ IF(EXECINFO)
SET(LIBEXECINFO ${EXECINFO})
ENDIF()
-# Use atomic builtins
-IF(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=i686")
-ENDIF()
diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake
index 108e06cf7b0..36d7ade66a7 100644
--- a/cmake/os/Linux.cmake
+++ b/cmake/os/Linux.cmake
@@ -47,9 +47,3 @@ IF(HAVE_DECL_SHM_HUGETLB)
SET(HAVE_LARGE_PAGE_OPTION 1)
ENDIF()
-IF(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR MATCHES "86")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=i686")
-ENDIF()
-
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
index df6822493cb..b4125e873d6 100644
--- a/cmake/package_name.cmake
+++ b/cmake/package_name.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index f016d8eab4f..2f1ebc8f428 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/cmake/readline.cmake b/cmake/readline.cmake
index 285b436921e..c99557683a6 100644
--- a/cmake/readline.cmake
+++ b/cmake/readline.cmake
@@ -115,7 +115,7 @@ ENDMACRO()
MACRO (MYSQL_USE_BUNDLED_READLINE)
SET(USE_NEW_READLINE_INTERFACE 1)
- SET(HAVE_HIST_ENTRY)
+ SET(HAVE_HIST_ENTRY 0 CACHE INTERNAL "" FORCE)
SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils)
SET(READLINE_LIBRARY readline)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline)
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index cabff530b47..ca950229129 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
index a3960c2a9da..d2e78dd7049 100644
--- a/cmake/zlib.cmake
+++ b/cmake/zlib.cmake
@@ -56,12 +56,16 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
INCLUDE(CheckFunctionExists)
SET(CMAKE_REQUIRED_LIBRARIES z)
CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32)
+ CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND)
+ CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND)
SET(CMAKE_REQUIRED_LIBRARIES)
- IF(HAVE_CRC32)
- SET(WITH_ZLIB "system" CACHE STRING "Which zlib to use (possible values are 'bundled' or 'system')")
+ IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
+ SET(WITH_ZLIB "system" CACHE STRING
+ "Which zlib to use (possible values are 'bundled' or 'system')")
SET(ZLIB_SOURCES "")
ELSE()
SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
+ MESSAGE(STATUS "system zlib found but not usable")
ENDIF()
ENDIF()
IF(NOT ZLIB_FOUND)