/[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.18 Revision 1.19
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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.18 2014/03/19 00:55:48 hasufell Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.19 2014/04/22 02:00:28 jmbsvicetto 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>
10# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> 10# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
11# @BLURB: This eclass provides the support for cmake based mysql releases 11# @BLURB: This eclass provides the support for cmake based mysql releases
12# @DESCRIPTION: 12# @DESCRIPTION:
13# The mysql-cmake.eclass provides the support to build the mysql 13# The mysql-cmake.eclass provides the support to build the mysql
14# ebuilds using the cmake build system. This eclass provides 14# ebuilds using the cmake build system. This eclass provides
15# the src_unpack, src_prepare, src_configure, src_compile, scr_install, 15# the src_prepare, src_configure, src_compile, and src_install
16# pkg_preinst, pkg_postinst, pkg_config and pkg_postrm phase hooks. 16# phase hooks.
17 17
18inherit cmake-utils flag-o-matic multilib prefix 18inherit cmake-utils flag-o-matic multilib prefix eutils
19 19
20# 20#
21# HELPER FUNCTIONS: 21# HELPER FUNCTIONS:
22# 22#
23 23
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 \ 36 for mysql_disabled_file in \
37 ${S}/mysql-test/disabled.def \ 37 ${S}/mysql-test/disabled.def \
38 ${S}/mysql-test/t/disabled.def ; do 38 ${S}/mysql-test/t/disabled.def ; do
39 [[ -f ${mysql_disabled_file} ]] && break 39 [[ -f ${mysql_disabled_file} ]] && break
40 done 40 done
41 #mysql_disabled_file="${S}/mysql-test/t/disabled.def" 41 #mysql_disabled_file="${S}/mysql-test/t/disabled.def"
42 #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}" 42 #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}"
43 echo ${testname} : ${reason} >> "${mysql_disabled_file}" 43 echo ${testname} : ${reason} >> "${mysql_disabled_file}"
44 44
45 if [[ ( -n ${testsuite} ) && ( ${testsuite} != "main" ) ]]; then 45 if [[ ( -n ${testsuite} ) && ( ${testsuite} != "main" ) ]]; then
46 for mysql_disabled_file in \ 46 for mysql_disabled_file in \
47 ${S}/mysql-test/suite/${testsuite}/disabled.def \ 47 ${S}/mysql-test/suite/${testsuite}/disabled.def \
48 ${S}/mysql-test/suite/${testsuite}/t/disabled.def \ 48 ${S}/mysql-test/suite/${testsuite}/t/disabled.def \
49 FAILED ; do 49 FAILED ; do
50 [[ -f ${mysql_disabled_file} ]] && break 50 [[ -f ${mysql_disabled_file} ]] && break
51 done 51 done
52 if [[ ${mysql_disabled_file} != "FAILED" ]]; then 52 if [[ ${mysql_disabled_file} != "FAILED" ]]; then
53 echo "${testname} : ${reason}" >> "${mysql_disabled_file}" 53 echo "${testname} : ${reason}" >> "${mysql_disabled_file}"
54 else 54 else
55 for mysql_disabled_dir in \ 55 for mysql_disabled_dir in \
56 ${S}/mysql-test/suite/${testsuite} \ 56 ${S}/mysql-test/suite/${testsuite} \
57 ${S}/mysql-test/suite/${testsuite}/t \ 57 ${S}/mysql-test/suite/${testsuite}/t \
58 FAILED ; do 58 FAILED ; do
59 [[ -d ${mysql_disabled_dir} ]] && break 59 [[ -d ${mysql_disabled_dir} ]] && break
60 done 60 done
61 if [[ ${mysql_disabled_dir} != "FAILED" ]]; then 61 if [[ ${mysql_disabled_dir} != "FAILED" ]]; then
62 echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def" 62 echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def"
65 fi 65 fi
66 fi 66 fi
67 fi 67 fi
68} 68}
69 69
70# @FUNCTION: mysql-cmake_use_plugin
71# @DESCRIPTION:
72# Helper function to enable/disable plugins by use flags
73# cmake-utils_use_with is not enough as some references check WITH_ (0|1)
74# and some check WITHOUT_. Also, this can easily extend to non-storage plugins.
75mysql-cmake_use_plugin() {
76 [[ -z $2 ]] && die "mysql-cmake_use_plugin <USE flag> <flag name>"
77 if use_if_iuse $1 ; then
78 echo "-DWITH_$2=1"
79 else
80 echo "-DWITHOUT_$2=1 -DWITH_$2=0"
81 fi
82}
83
70# @FUNCTION: configure_cmake_locale 84# @FUNCTION: configure_cmake_locale
71# @DESCRIPTION: 85# @DESCRIPTION:
72# Helper function to configure locale cmake options 86# Helper function to configure locale cmake options
73configure_cmake_locale() { 87configure_cmake_locale() {
74 88
101configure_cmake_minimal() { 115configure_cmake_minimal() {
102 116
103 mycmakeargs+=( 117 mycmakeargs+=(
104 -DWITHOUT_SERVER=1 118 -DWITHOUT_SERVER=1
105 -DWITHOUT_EMBEDDED_SERVER=1 119 -DWITHOUT_EMBEDDED_SERVER=1
106 -DENABLED_LOCAL_INFILE=1
107 -DEXTRA_CHARSETS=none 120 -DEXTRA_CHARSETS=none
108 -DINSTALL_SQLBENCHDIR= 121 -DINSTALL_SQLBENCHDIR=
109 -DWITH_SSL=system
110 -DWITH_ZLIB=system
111 -DWITHOUT_LIBWRAP=1
112 -DWITH_READLINE=0
113 -DWITH_LIBEDIT=0
114 -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 122 -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1
115 -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 123 -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1
116 -DWITHOUT_CSV_STORAGE_ENGINE=1 124 -DWITHOUT_CSV_STORAGE_ENGINE=1
117 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 125 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
118 -DWITHOUT_HEAP_STORAGE_ENGINE=1 126 -DWITHOUT_HEAP_STORAGE_ENGINE=1
128# @DESCRIPTION: 136# @DESCRIPTION:
129# Helper function to configure standard build 137# Helper function to configure standard build
130configure_cmake_standard() { 138configure_cmake_standard() {
131 139
132 mycmakeargs+=( 140 mycmakeargs+=(
133 -DENABLED_LOCAL_INFILE=1
134 -DEXTRA_CHARSETS=all 141 -DEXTRA_CHARSETS=all
135 -DMYSQL_USER=mysql 142 -DMYSQL_USER=mysql
136 -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock 143 -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock
137 -DWITH_READLINE=0
138 -DWITH_LIBEDIT=0
139 -DWITH_ZLIB=system
140 -DWITHOUT_LIBWRAP=1
141 )
142
143 mycmakeargs+=(
144 $(cmake-utils_use_disable !static SHARED) 144 $(cmake-utils_use_disable !static SHARED)
145 $(cmake-utils_use_with debug) 145 $(cmake-utils_use_with debug)
146 $(cmake-utils_use_with embedded EMBEDDED_SERVER) 146 $(cmake-utils_use_with embedded EMBEDDED_SERVER)
147 $(cmake-utils_use_with profiling) 147 $(cmake-utils_use_with profiling)
148 $(cmake-utils_use_enable systemtap DTRACE) 148 $(cmake-utils_use_enable systemtap DTRACE)
149 $(cmake-utils_use_enable static-libs STATIC_LIBS)
149 ) 150 )
150 151
151 if use ssl; then 152 if use static; then
152 mycmakeargs+=( -DWITH_SSL=system ) 153 mycmakeargs+=( -DWITH_PIC=1 )
153 else 154 fi
155
156 if use jemalloc; then
154 mycmakeargs+=( -DWITH_SSL=bundled ) 157 mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
155 fi 158 fi
156 159
157 if mysql_version_is_at_least "5.5" && use jemalloc; then 160 if use tcmalloc; then
158 mycmakeargs+=( -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' -DWITH_SAFEMALLOC=OFF ) 161 mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
159 fi
160
161 if mysql_version_is_at_least "5.5" && use tcmalloc; then
162 mycmakeargs+=( -DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc' -DWITH_SAFEMALLOC=OFF )
163 fi 162 fi
164 163
165 # Storage engines 164 # Storage engines
166 mycmakeargs+=( 165 mycmakeargs+=(
167 -DWITH_ARCHIVE_STORAGE_ENGINE=1 166 -DWITH_ARCHIVE_STORAGE_ENGINE=1
173 -DWITH_MYISAM_STORAGE_ENGINE=1 172 -DWITH_MYISAM_STORAGE_ENGINE=1
174 -DWITH_PARTITION_STORAGE_ENGINE=1 173 -DWITH_PARTITION_STORAGE_ENGINE=1
175 $(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE) 174 $(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE)
176 ) 175 )
177 176
178 if pbxt_available ; then 177 if in_iuse pbxt ; then
179 mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) ) 178 mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) )
180 fi 179 fi
181 180
182 if [[ ${PN} == "mariadb" ]]; then 181 if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then
182 mycmakeargs+=(
183 $(mysql-cmake_use_plugin oqgraph OQGRAPH)
184 $(mysql-cmake_use_plugin sphinx SPHINX)
185 $(mysql-cmake_use_plugin extraengine FEDERATEDX)
186 $(mysql-cmake_use_plugin tokudb TOKUDB)
187 $(mysql-cmake_use_plugin pam AUTH_PAM)
188 )
189
190 if mysql_version_is_at_least 10.0.5 ; then
191 # CassandraSE needs Apache Thrift which is not in portage
192 # TODO: Add use and deps for Connect SE external deps
183 mycmakeargs+=( 193 mycmakeargs+=(
184 $(cmake-utils_use_with oqgraph OQGRAPH_STORAGE_ENGINE) 194 -DWITHOUT_CASSANDRA=1 -DWITH_CASSANDRA=0
185 $(cmake-utils_use_with sphinx SPHINX_STORAGE_ENGINE) 195 $(mysql-cmake_use_plugin extraengine SEQUENCE)
186 $(cmake-utils_use_with extraengine FEDERATEDX_STORAGE_ENGINE) 196 $(mysql-cmake_use_plugin extraengine SPIDER)
197 $(mysql-cmake_use_plugin extraengine CONNECT)
198 -DCONNECT_WITH_MYSQL=1
199 $(cmake-utils_use xml CONNECT_WITH_LIBXML2)
200 $(cmake-utils_use odbc CONNECT_WITH_ODBC)
187 ) 201 )
188
189 if ! use pam ; then
190 mycmakeargs+=( -DAUTH_PAM_DISABLED=1 )
191 fi 202 fi
192 fi 203 fi
193 204
194 if [[ ${PN} == "percona-server" ]]; then 205 if [[ ${PN} == "percona-server" ]]; then
195 mycmakeargs+=( 206 mycmakeargs+=(
196 $(cmake-utils_use_with pam) 207 $(cmake-utils_use_with pam)
208 )
209 fi
210
211 if [[ ${PN} == "mysql-cluster" ]]; then
212 # TODO: This really should include the following options,
213 # but the memcached package doesn't install the files it seeks.
214 # -DWITH_BUNDLED_MEMCACHED=OFF
215 # -DMEMCACHED_HOME=${EPREFIX}/usr
216 mycmakeargs+=(
217 -DWITH_BUNDLED_LIBEVENT=OFF
218 $(cmake-utils_use_with java NDB_JAVA)
197 ) 219 )
198 fi 220 fi
199} 221}
200 222
201# 223#
209 231
210 debug-print-function ${FUNCNAME} "$@" 232 debug-print-function ${FUNCNAME} "$@"
211 233
212 cd "${S}" 234 cd "${S}"
213 235
236 if [[ ${MY_EXTRAS_VER} != none ]]; then
237
214 # Apply the patches for this MySQL version 238 # Apply the patches for this MySQL version
215 EPATCH_SUFFIX="patch" 239 EPATCH_SUFFIX="patch"
216 mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory" 240 mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory"
217 # Clean out old items 241 # Clean out old items
218 rm -f "${EPATCH_SOURCE}"/* 242 rm -f "${EPATCH_SOURCE}"/*
219 # Now link in right patches 243 # Now link in right patches
220 mysql_mv_patches 244 mysql_mv_patches
221 # And apply 245 # And apply
222 epatch 246 epatch
247 fi
223 248
224 # last -fPIC fixup, per bug #305873 249 # last -fPIC fixup, per bug #305873
225 i="${S}"/storage/innodb_plugin/plug.in 250 i="${S}"/storage/innodb_plugin/plug.in
226 [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" 251 [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
227 252
228 rm -f "scripts/mysqlbug" 253 rm -f "scripts/mysqlbug"
254 if use jemalloc && ! ( [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "5.5.33" ); then
255 echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt"
256 fi
257
258 if use tcmalloc; then
259 echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
260 fi
261
262 if in_iuse tokudb ; then
263 # Don't build bundled xz-utils
264 rm -f "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake"
265 touch "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake"
266 fi
267
229 epatch_user 268 epatch_user
230} 269}
231 270
232# @FUNCTION: mysql-cmake_src_configure 271# @FUNCTION: mysql-cmake_src_configure
233# @DESCRIPTION: 272# @DESCRIPTION:
248 -DINSTALL_BINDIR=bin 287 -DINSTALL_BINDIR=bin
249 -DINSTALL_DOCDIR=share/doc/${P} 288 -DINSTALL_DOCDIR=share/doc/${P}
250 -DINSTALL_DOCREADMEDIR=share/doc/${P} 289 -DINSTALL_DOCREADMEDIR=share/doc/${P}
251 -DINSTALL_INCLUDEDIR=include/mysql 290 -DINSTALL_INCLUDEDIR=include/mysql
252 -DINSTALL_INFODIR=share/info 291 -DINSTALL_INFODIR=share/info
292 -DINSTALL_LIBDIR=$(get_libdir)
253 -DINSTALL_LIBDIR=$(get_libdir)/mysql 293 -DINSTALL_ELIBDIR=$(get_libdir)/mysql
254 -DINSTALL_MANDIR=share/man 294 -DINSTALL_MANDIR=share/man
255 -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql 295 -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql
256 -DINSTALL_MYSQLSHAREDIR=share/mysql 296 -DINSTALL_MYSQLSHAREDIR=share/mysql
257 -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test 297 -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test
258 -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin 298 -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
260 -DINSTALL_SCRIPTDIR=share/mysql/scripts 300 -DINSTALL_SCRIPTDIR=share/mysql/scripts
261 -DINSTALL_SQLBENCHDIR=share/mysql 301 -DINSTALL_SQLBENCHDIR=share/mysql
262 -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql 302 -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql
263 -DWITH_COMMENT="Gentoo Linux ${PF}" 303 -DWITH_COMMENT="Gentoo Linux ${PF}"
264 $(cmake-utils_use_with test UNIT_TESTS) 304 $(cmake-utils_use_with test UNIT_TESTS)
305 -DWITH_READLINE=0
306 -DWITH_LIBEDIT=0
307 -DWITH_ZLIB=system
308 -DWITHOUT_LIBWRAP=1
309 -DENABLED_LOCAL_INFILE=1
265 ) 310 )
311
312 if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.6.12" ; then
313 mycmakeargs+=( -DWITH_EDITLINE=system )
314 fi
315
316 if use ssl; then
317 mycmakeargs+=( -DWITH_SSL=system )
318 else
319 mycmakeargs+=( -DWITH_SSL=bundled )
320 fi
266 321
267 # Bug 412851 322 # Bug 412851
268 # MariaDB requires this flag to compile with GPLv3 readline linked 323 # MariaDB requires this flag to compile with GPLv3 readline linked
269 # Adds a warning about redistribution to configure 324 # Adds a warning about redistribution to configure
270 if [[ ${PN} == "mariadb" ]] ; then 325 if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
271 mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 ) 326 mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 )
327 fi
328
329 if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then
330 if use jemalloc ; then
331 mycmakeargs+=( -DWITH_JEMALLOC="system" )
332 else
333 mycmakeargs+=( -DWITH_JEMALLOC=no )
334 fi
335 mysql_version_is_at_least "10.0.9" && mycmakeargs+=( -DWITH_PCRE=system )
272 fi 336 fi
273 337
274 configure_cmake_locale 338 configure_cmake_locale
275 339
276 if use minimal ; then 340 if use minimal ; then
281 345
282 # Bug #114895, bug #110149 346 # Bug #114895, bug #110149
283 filter-flags "-O" "-O[01]" 347 filter-flags "-O" "-O[01]"
284 348
285 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" 349 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
286 CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti" 350 CXXFLAGS="${CXXFLAGS} -felide-constructors"
287 # Causes linkage failures. Upstream bug #59607 removes it 351 # Causes linkage failures. Upstream bug #59607 removes it
288 if ! mysql_version_is_at_least "5.6" ; then 352 if ! mysql_version_is_at_least "5.6" ; then
289 CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" 353 CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
290 fi 354 fi
291 # As of 5.7, exceptions are used! 355 # As of 5.7, exceptions and rtti are used!
292 if ! mysql_version_is_at_least "5.7" ; then 356 if ! mysql_version_is_at_least "5.7" ; then
293 CXXFLAGS="${CXXFLAGS} -fno-exceptions" 357 CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti"
294 fi 358 fi
295 export CXXFLAGS 359 export CXXFLAGS
296 360
297 # bug #283926, with GCC4.4, this is required to get correct behavior. 361 # bug #283926, with GCC4.4, this is required to get correct behavior.
298 append-flags -fno-strict-aliasing 362 append-flags -fno-strict-aliasing
327 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze" 391 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze"
328 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair" 392 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
329 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" 393 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
330 394
331 # Create a mariadb_config symlink 395 # Create a mariadb_config symlink
332 [[ ${PN} == "mariadb" ]] && dosym "/usr/bin/mysql_config" "/usr/bin/mariadb_config" 396 [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && dosym "/usr/bin/mysql_config" "/usr/bin/mariadb_config"
333 397
334 # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir 398 # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
335 rm -Rf "${ED}/usr/data" 399 rm -Rf "${ED}/usr/data"
336 400
337 # Various junk (my-*.cnf moved elsewhere) 401 # Various junk (my-*.cnf moved elsewhere)
338 einfo "Removing duplicate /usr/share/mysql files" 402 einfo "Removing duplicate /usr/share/mysql files"
339
340 # Clean up stuff for a minimal build
341# if use minimal ; then
342# einfo "Remove all extra content for minimal build"
343# rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench}
344# rm -f "${ED}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam}
345# rm -f "${ED}/usr/sbin/mysqld"
346# rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a
347# fi
348 403
349 # Unless they explicitly specific USE=test, then do not install the 404 # Unless they explicitly specific USE=test, then do not install the
350 # testsuite. It DOES have a use to be installed, esp. when you want to do a 405 # testsuite. It DOES have a use to be installed, esp. when you want to do a
351 # validation of your database configuration after tuning it. 406 # validation of your database configuration after tuning it.
352 if ! use test ; then 407 if ! use test ; then
383 keepdir "${MY_DATADIR#${EPREFIX}}" 438 keepdir "${MY_DATADIR#${EPREFIX}}"
384 chown -R mysql:mysql "${D}/${MY_DATADIR}" 439 chown -R mysql:mysql "${D}/${MY_DATADIR}"
385 fi 440 fi
386 441
387 diropts "-m0755" 442 diropts "-m0755"
388 for folder in "${MY_LOGDIR#${EPREFIX}}" "/var/run/mysqld" ; do 443 for folder in "${MY_LOGDIR#${EPREFIX}}" ; do
389 dodir "${folder}" 444 dodir "${folder}"
390 keepdir "${folder}" 445 keepdir "${folder}"
391 chown -R mysql:mysql "${ED}/${folder}" 446 chown -R mysql:mysql "${ED}/${folder}"
392 done 447 done
393 fi 448 fi
408 for script in "${S}"/scripts/mysql* ; do 463 for script in "${S}"/scripts/mysql* ; do
409 [[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}" 464 [[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}"
410 done 465 done
411 fi 466 fi
412 467
413 cat <<-EOF > "${T}"/80mysql-libdir
414 LDPATH="${EPREFIX}/usr/$(get_libdir)/mysql"
415 EOF
416 doenvd "${T}"/80mysql-libdir
417
418 #Remove mytop if perl is not selected 468 #Remove mytop if perl is not selected
419 [[ ${PN} == "mariadb" ]] && ! use perl \ 469 [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && ! use perl \
420 && rm -f "${ED}/usr/bin/mytop" 470 && rm -f "${ED}/usr/bin/mytop"
421} 471}

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20