/[gentoo-x86]/eclass/mysql-cmake.eclass
Gentoo

Diff of /eclass/mysql-cmake.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.9 Revision 1.10
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.9 2012/06/07 22:06:04 zmedico Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.10 2012/11/01 23:57:50 robbat2 Exp $
4 4
5# @ECLASS: mysql-cmake.eclass 5# @ECLASS: mysql-cmake.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maintainers: 7# Maintainers:
8# - MySQL Team <mysql-bugs@gentoo.org> 8# - MySQL Team <mysql-bugs@gentoo.org>
24# @FUNCTION: mysql_cmake_disable_test 24# @FUNCTION: mysql_cmake_disable_test
25# @DESCRIPTION: 25# @DESCRIPTION:
26# Helper function to disable specific tests. 26# Helper function to disable specific tests.
27mysql-cmake_disable_test() { 27mysql-cmake_disable_test() {
28 28
29 local rawtestname testname testsuite reason mysql_disable_file 29 local rawtestname testname testsuite reason mysql_disabled_file mysql_disabled_dir
30 rawtestname="${1}" ; shift 30 rawtestname="${1}" ; shift
31 reason="${@}" 31 reason="${@}"
32 ewarn "test '${rawtestname}' disabled: '${reason}'" 32 ewarn "test '${rawtestname}' disabled: '${reason}'"
33 33
34 testsuite="${rawtestname/.*}" 34 testsuite="${rawtestname/.*}"
35 testname="${rawtestname/*.}" 35 testname="${rawtestname/*.}"
36 for mysql_disabled_file in \
37 ${S}/mysql-test/disabled.def \
38 ${S}/mysql-test/t/disabled.def ; do
39 [ -f "${mysql_disabled_file}" ] && break
40 done
36 mysql_disable_file="${S}/mysql-test/t/disabled.def" 41 #mysql_disabled_file="${S}/mysql-test/t/disabled.def"
37 #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}" 42 #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}"
38 echo ${testname} : ${reason} >> "${mysql_disable_file}" 43 echo ${testname} : ${reason} >> "${mysql_disabled_file}"
39 44
40 if [ -n "${testsuite}" ]; then 45 if [ -n "${testsuite}" ] && [ "${testsuite}" != "main" ]; then
41 for mysql_disable_file in \ 46 for mysql_disabled_file in \
42 ${S}/mysql-test/suite/${testsuite}/disabled.def \ 47 ${S}/mysql-test/suite/${testsuite}/disabled.def \
43 ${S}/mysql-test/suite/${testsuite}/t/disabled.def \ 48 ${S}/mysql-test/suite/${testsuite}/t/disabled.def \
44 FAILED ; do 49 FAILED ; do
45 [ -f "${mysql_disable_file}" ] && break 50 [ -f "${mysql_disabled_file}" ] && break
46 done 51 done
47 if [ "${mysql_disabled_file}" != "FAILED" ]; then 52 if [ "${mysql_disabled_file}" != "FAILED" ]; then
48 echo "${testname} : ${reason}" >> "${mysql_disable_file}" 53 echo "${testname} : ${reason}" >> "${mysql_disabled_file}"
49 else 54 else
55 for mysql_disabled_dir in \
56 ${S}/mysql-test/suite/${testsuite} \
57 ${S}/mysql-test/suite/${testsuite}/t \
58 FAILED ; do
59 [ -d "${mysql_disabled_dir}" ] && break
60 done
61 if [ "${mysql_disabled_dir}" != "FAILED" ]; then
62 echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def"
63 else
50 ewarn "Could not find testsuite disabled.def location for ${rawtestname}" 64 ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
65 fi
51 fi 66 fi
52 fi 67 fi
53} 68}
54 69
55# @FUNCTION: configure_cmake_locale 70# @FUNCTION: configure_cmake_locale
135 mycmakeargs+=( -DWITH_SSL=system ) 150 mycmakeargs+=( -DWITH_SSL=system )
136 else 151 else
137 mycmakeargs+=( -DWITH_SSL=0 ) 152 mycmakeargs+=( -DWITH_SSL=0 )
138 fi 153 fi
139 154
155 if mysql_version_is_at_least "5.5" && use jemalloc; then
156 mycmakeargs+=( -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' -DWITH_SAFEMALLOC=OFF )
157 fi
158
159 if mysql_version_is_at_least "5.5" && use tcmalloc; then
160 mycmakeargs+=( -DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc' -DWITH_SAFEMALLOC=OFF )
161 fi
162
140 # Storage engines 163 # Storage engines
141 mycmakeargs+=( 164 mycmakeargs+=(
142 -DWITH_ARCHIVE_STORAGE_ENGINE=1 165 -DWITH_ARCHIVE_STORAGE_ENGINE=1
143 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 166 -DWITH_BLACKHOLE_STORAGE_ENGINE=1
144 -DWITH_CSV_STORAGE_ENGINE=1 167 -DWITH_CSV_STORAGE_ENGINE=1
147 -DWITH_MYISAMMRG_STORAGE_ENGINE=1 170 -DWITH_MYISAMMRG_STORAGE_ENGINE=1
148 -DWITH_MYISAM_STORAGE_ENGINE=1 171 -DWITH_MYISAM_STORAGE_ENGINE=1
149 -DWITH_PARTITION_STORAGE_ENGINE=1 172 -DWITH_PARTITION_STORAGE_ENGINE=1
150 $(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE) 173 $(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE)
151 ) 174 )
175
176 if pbxt_available ; then
177 mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) )
178 fi
179
180 if [ "${PN}" == "mariadb" ]; then
181 mycmakeargs+=(
182 $(cmake-utils_use_with oqgraph OQGRAPH_STORAGE_ENGINE)
183 $(cmake-utils_use_with sphinx SPHINX_STORAGE_ENGINE)
184 $(cmake-utils_use_with extraengine FEDERATEDX_STORAGE_ENGINE)
185 )
186 fi
152} 187}
153 188
154# 189#
155# EBUILD FUNCTIONS 190# EBUILD FUNCTIONS
156# 191#
211 -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql 246 -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql
212 -DWITH_COMMENT="Gentoo Linux ${PF}" 247 -DWITH_COMMENT="Gentoo Linux ${PF}"
213 -DWITHOUT_UNIT_TESTS=1 248 -DWITHOUT_UNIT_TESTS=1
214 ) 249 )
215 250
251 # Bug 412851
252 # MariaDB requires this flag to compile with GPLv3 readline linked
253 # Adds a warning about redistribution to configure
254 if [[ "${PN}" == "mariadb" ]] ; then
255 mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 )
256 fi
257
216 configure_cmake_locale 258 configure_cmake_locale
217 259
218 if use minimal ; then 260 if use minimal ; then
219 configure_cmake_minimal 261 configure_cmake_minimal
220 else 262 else

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20