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

Contents of /eclass/mysql-cmake.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.25 - (hide annotations) (download)
Wed Oct 8 17:25:46 2014 UTC (4 years, 2 months ago) by grknight
Branch: MAIN
Changes since 1.24: +5 -3 lines
Sync eclasses from mysql overlay

1 hasufell 1.18 # Copyright 1999-2014 Gentoo Foundation
2 robbat2 1.1 # Distributed under the terms of the GNU General Public License v2
3 grknight 1.25 # $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.24 2014/07/31 22:26:07 grknight Exp $
4 robbat2 1.1
5     # @ECLASS: mysql-cmake.eclass
6     # @MAINTAINER:
7     # Maintainers:
8     # - MySQL Team <mysql-bugs@gentoo.org>
9     # - Robin H. Johnson <robbat2@gentoo.org>
10     # - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
11 grknight 1.20 # - Brian Evans <grknight@gentoo.org>
12 robbat2 1.1 # @BLURB: This eclass provides the support for cmake based mysql releases
13     # @DESCRIPTION:
14     # The mysql-cmake.eclass provides the support to build the mysql
15     # ebuilds using the cmake build system. This eclass provides
16 jmbsvicetto 1.19 # the src_prepare, src_configure, src_compile, and src_install
17     # phase hooks.
18 robbat2 1.1
19 jmbsvicetto 1.19 inherit cmake-utils flag-o-matic multilib prefix eutils
20 robbat2 1.1
21     #
22     # HELPER FUNCTIONS:
23     #
24    
25     # @FUNCTION: mysql_cmake_disable_test
26     # @DESCRIPTION:
27     # Helper function to disable specific tests.
28     mysql-cmake_disable_test() {
29    
30 robbat2 1.10 local rawtestname testname testsuite reason mysql_disabled_file mysql_disabled_dir
31 robbat2 1.1 rawtestname="${1}" ; shift
32     reason="${@}"
33     ewarn "test '${rawtestname}' disabled: '${reason}'"
34    
35     testsuite="${rawtestname/.*}"
36     testname="${rawtestname/*.}"
37 robbat2 1.10 for mysql_disabled_file in \
38 jmbsvicetto 1.19 ${S}/mysql-test/disabled.def \
39 robbat2 1.10 ${S}/mysql-test/t/disabled.def ; do
40 jmbsvicetto 1.16 [[ -f ${mysql_disabled_file} ]] && break
41 robbat2 1.10 done
42     #mysql_disabled_file="${S}/mysql-test/t/disabled.def"
43 robbat2 1.1 #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}"
44 robbat2 1.10 echo ${testname} : ${reason} >> "${mysql_disabled_file}"
45 robbat2 1.1
46 jmbsvicetto 1.16 if [[ ( -n ${testsuite} ) && ( ${testsuite} != "main" ) ]]; then
47 robbat2 1.10 for mysql_disabled_file in \
48 jmbsvicetto 1.19 ${S}/mysql-test/suite/${testsuite}/disabled.def \
49     ${S}/mysql-test/suite/${testsuite}/t/disabled.def \
50 robbat2 1.1 FAILED ; do
51 jmbsvicetto 1.16 [[ -f ${mysql_disabled_file} ]] && break
52 robbat2 1.1 done
53 jmbsvicetto 1.16 if [[ ${mysql_disabled_file} != "FAILED" ]]; then
54 robbat2 1.10 echo "${testname} : ${reason}" >> "${mysql_disabled_file}"
55 robbat2 1.1 else
56 robbat2 1.10 for mysql_disabled_dir in \
57     ${S}/mysql-test/suite/${testsuite} \
58 jmbsvicetto 1.19 ${S}/mysql-test/suite/${testsuite}/t \
59 robbat2 1.10 FAILED ; do
60 jmbsvicetto 1.16 [[ -d ${mysql_disabled_dir} ]] && break
61 robbat2 1.10 done
62 jmbsvicetto 1.16 if [[ ${mysql_disabled_dir} != "FAILED" ]]; then
63 robbat2 1.10 echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def"
64     else
65     ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
66     fi
67 robbat2 1.1 fi
68     fi
69     }
70    
71 jmbsvicetto 1.19 # @FUNCTION: mysql-cmake_use_plugin
72     # @DESCRIPTION:
73     # Helper function to enable/disable plugins by use flags
74     # cmake-utils_use_with is not enough as some references check WITH_ (0|1)
75     # and some check WITHOUT_. Also, this can easily extend to non-storage plugins.
76     mysql-cmake_use_plugin() {
77     [[ -z $2 ]] && die "mysql-cmake_use_plugin <USE flag> <flag name>"
78     if use_if_iuse $1 ; then
79 robbat2 1.23 echo "-DWITH_$2=1 -DPLUGIN_$2=YES"
80 jmbsvicetto 1.19 else
81 robbat2 1.23 echo "-DWITHOUT_$2=1 -DWITH_$2=0 -DPLUGIN_$2=NO"
82 jmbsvicetto 1.19 fi
83     }
84    
85 robbat2 1.1 # @FUNCTION: configure_cmake_locale
86     # @DESCRIPTION:
87     # Helper function to configure locale cmake options
88     configure_cmake_locale() {
89    
90 jmbsvicetto 1.16 if ! use minimal && [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
91 robbat2 1.1 ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
92     ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
93     ewarn "You MUST file bugs without these variables set."
94    
95     mycmakeargs+=(
96     -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
97     -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
98     )
99    
100     elif ! use latin1 ; then
101     mycmakeargs+=(
102     -DDEFAULT_CHARSET=utf8
103     -DDEFAULT_COLLATION=utf8_general_ci
104     )
105     else
106     mycmakeargs+=(
107     -DDEFAULT_CHARSET=latin1
108     -DDEFAULT_COLLATION=latin1_swedish_ci
109     )
110     fi
111     }
112    
113     # @FUNCTION: configure_cmake_minimal
114     # @DESCRIPTION:
115     # Helper function to configure minimal build
116     configure_cmake_minimal() {
117    
118     mycmakeargs+=(
119     -DWITHOUT_SERVER=1
120     -DWITHOUT_EMBEDDED_SERVER=1
121     -DEXTRA_CHARSETS=none
122     -DINSTALL_SQLBENCHDIR=
123     -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1
124     -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1
125     -DWITHOUT_CSV_STORAGE_ENGINE=1
126     -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
127     -DWITHOUT_HEAP_STORAGE_ENGINE=1
128     -DWITHOUT_INNOBASE_STORAGE_ENGINE=1
129     -DWITHOUT_MYISAMMRG_STORAGE_ENGINE=1
130     -DWITHOUT_MYISAM_STORAGE_ENGINE=1
131     -DWITHOUT_PARTITION_STORAGE_ENGINE=1
132 robbat2 1.23 -DPLUGIN_ARCHIVE=NO
133     -DPLUGIN_BLACKHOLE=NO
134     -DPLUGIN_CSV=NO
135     -DPLUGIN_FEDERATED=NO
136     -DPLUGIN_HEAP=NO
137     -DPLUGIN_INNOBASE=NO
138     -DPLUGIN_MYISAMMRG=NO
139     -DPLUGIN_MYISAM=NO
140     -DPLUGIN_PARTITION=NO
141 robbat2 1.1 )
142     }
143    
144     # @FUNCTION: configure_cmake_standard
145     # @DESCRIPTION:
146     # Helper function to configure standard build
147     configure_cmake_standard() {
148    
149     mycmakeargs+=(
150     -DEXTRA_CHARSETS=all
151     -DMYSQL_USER=mysql
152 jmbsvicetto 1.5 -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock
153 robbat2 1.3 $(cmake-utils_use_disable !static SHARED)
154 robbat2 1.1 $(cmake-utils_use_with debug)
155     $(cmake-utils_use_with embedded EMBEDDED_SERVER)
156     $(cmake-utils_use_with profiling)
157 robbat2 1.4 $(cmake-utils_use_enable systemtap DTRACE)
158 robbat2 1.1 )
159    
160 jmbsvicetto 1.19 if use static; then
161     mycmakeargs+=( -DWITH_PIC=1 )
162 robbat2 1.1 fi
163    
164 jmbsvicetto 1.19 if use jemalloc; then
165     mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
166 robbat2 1.10 fi
167    
168 jmbsvicetto 1.19 if use tcmalloc; then
169     mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
170 robbat2 1.10 fi
171    
172 robbat2 1.1 # Storage engines
173     mycmakeargs+=(
174     -DWITH_ARCHIVE_STORAGE_ENGINE=1
175     -DWITH_BLACKHOLE_STORAGE_ENGINE=1
176     -DWITH_CSV_STORAGE_ENGINE=1
177     -DWITH_HEAP_STORAGE_ENGINE=1
178     -DWITH_INNOBASE_STORAGE_ENGINE=1
179     -DWITH_MYISAMMRG_STORAGE_ENGINE=1
180     -DWITH_MYISAM_STORAGE_ENGINE=1
181     -DWITH_PARTITION_STORAGE_ENGINE=1
182     $(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE)
183     )
184 robbat2 1.10
185 jmbsvicetto 1.19 if in_iuse pbxt ; then
186 robbat2 1.10 mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) )
187     fi
188    
189 jmbsvicetto 1.19 if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then
190 robbat2 1.10 mycmakeargs+=(
191 jmbsvicetto 1.19 $(mysql-cmake_use_plugin oqgraph OQGRAPH)
192     $(mysql-cmake_use_plugin sphinx SPHINX)
193     $(mysql-cmake_use_plugin extraengine FEDERATEDX)
194     $(mysql-cmake_use_plugin tokudb TOKUDB)
195     $(mysql-cmake_use_plugin pam AUTH_PAM)
196 robbat2 1.10 )
197 robbat2 1.14
198 jmbsvicetto 1.19 if mysql_version_is_at_least 10.0.5 ; then
199     # CassandraSE needs Apache Thrift which is not in portage
200     mycmakeargs+=(
201     -DWITHOUT_CASSANDRA=1 -DWITH_CASSANDRA=0
202 robbat2 1.23 -DPLUGIN_CASSANDRA=NO
203 jmbsvicetto 1.19 $(mysql-cmake_use_plugin extraengine SEQUENCE)
204     $(mysql-cmake_use_plugin extraengine SPIDER)
205     $(mysql-cmake_use_plugin extraengine CONNECT)
206     -DCONNECT_WITH_MYSQL=1
207 robbat2 1.23 -DPLUGIN_CONNECT_WITH_MYSQL=YES
208 jmbsvicetto 1.19 $(cmake-utils_use xml CONNECT_WITH_LIBXML2)
209     $(cmake-utils_use odbc CONNECT_WITH_ODBC)
210     )
211 robbat2 1.14 fi
212 jmbsvicetto 1.16 fi
213    
214     if [[ ${PN} == "percona-server" ]]; then
215     mycmakeargs+=(
216     $(cmake-utils_use_with pam)
217     )
218 robbat2 1.10 fi
219 jmbsvicetto 1.19
220     if [[ ${PN} == "mysql-cluster" ]]; then
221     # TODO: This really should include the following options,
222     # but the memcached package doesn't install the files it seeks.
223     # -DWITH_BUNDLED_MEMCACHED=OFF
224     # -DMEMCACHED_HOME=${EPREFIX}/usr
225     mycmakeargs+=(
226     -DWITH_BUNDLED_LIBEVENT=OFF
227     $(cmake-utils_use_with java NDB_JAVA)
228     )
229     fi
230 robbat2 1.1 }
231    
232     #
233     # EBUILD FUNCTIONS
234     #
235    
236     # @FUNCTION: mysql-cmake_src_prepare
237     # @DESCRIPTION:
238     # Apply patches to the source code and remove unneeded bundled libs.
239     mysql-cmake_src_prepare() {
240    
241     debug-print-function ${FUNCNAME} "$@"
242    
243     cd "${S}"
244    
245 jmbsvicetto 1.19 if [[ ${MY_EXTRAS_VER} != none ]]; then
246    
247     # Apply the patches for this MySQL version
248     EPATCH_SUFFIX="patch"
249     mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory"
250     # Clean out old items
251     rm -f "${EPATCH_SOURCE}"/*
252     # Now link in right patches
253     mysql_mv_patches
254     # And apply
255     epatch
256     fi
257 robbat2 1.1
258     # last -fPIC fixup, per bug #305873
259     i="${S}"/storage/innodb_plugin/plug.in
260 jmbsvicetto 1.16 [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
261 robbat2 1.1
262     rm -f "scripts/mysqlbug"
263 jmbsvicetto 1.19 if use jemalloc && ! ( [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "5.5.33" ); then
264 grknight 1.21 echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
265 jmbsvicetto 1.19 fi
266    
267     if use tcmalloc; then
268     echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
269     fi
270    
271     if in_iuse tokudb ; then
272     # Don't build bundled xz-utils
273     rm -f "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake"
274     touch "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake"
275 grknight 1.25 sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
276 jmbsvicetto 1.19 fi
277    
278 robbat2 1.15 epatch_user
279 robbat2 1.1 }
280    
281     # @FUNCTION: mysql-cmake_src_configure
282     # @DESCRIPTION:
283     # Configure mysql to build the code for Gentoo respecting the use flags.
284     mysql-cmake_src_configure() {
285    
286     debug-print-function ${FUNCNAME} "$@"
287    
288 jmbsvicetto 1.2 CMAKE_BUILD_TYPE="RelWithDebInfo"
289    
290 hasufell 1.18 # debug hack wrt #497532
291 robbat2 1.1 mycmakeargs=(
292 hasufell 1.18 -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug "" "-DNDEBUG")"
293     -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug "" "-DNDEBUG")"
294 jmbsvicetto 1.5 -DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr
295     -DMYSQL_DATADIR=${EPREFIX}/var/lib/mysql
296     -DSYSCONFDIR=${EPREFIX}/etc/mysql
297 robbat2 1.1 -DINSTALL_BINDIR=bin
298     -DINSTALL_DOCDIR=share/doc/${P}
299     -DINSTALL_DOCREADMEDIR=share/doc/${P}
300     -DINSTALL_INCLUDEDIR=include/mysql
301     -DINSTALL_INFODIR=share/info
302 jmbsvicetto 1.19 -DINSTALL_LIBDIR=$(get_libdir)
303     -DINSTALL_ELIBDIR=$(get_libdir)/mysql
304 robbat2 1.1 -DINSTALL_MANDIR=share/man
305 jmbsvicetto 1.5 -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql
306 robbat2 1.1 -DINSTALL_MYSQLSHAREDIR=share/mysql
307     -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test
308     -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
309     -DINSTALL_SBINDIR=sbin
310     -DINSTALL_SCRIPTDIR=share/mysql/scripts
311     -DINSTALL_SQLBENCHDIR=share/mysql
312 jmbsvicetto 1.5 -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql
313 robbat2 1.1 -DWITH_COMMENT="Gentoo Linux ${PF}"
314 jmbsvicetto 1.16 $(cmake-utils_use_with test UNIT_TESTS)
315 jmbsvicetto 1.19 -DWITH_LIBEDIT=0
316     -DWITH_ZLIB=system
317     -DWITHOUT_LIBWRAP=1
318     -DENABLED_LOCAL_INFILE=1
319 grknight 1.20 $(cmake-utils_use_enable static-libs STATIC_LIBS)
320     -DWITH_SSL=$(usex ssl system bundled)
321 grknight 1.24 -DWITH_DEFAULT_COMPILER_OPTIONS=0
322     -DWITH_DEFAULT_FEATURE_SET=0
323 robbat2 1.1 )
324    
325 robbat2 1.23 if in_iuse bindist ; then
326 grknight 1.21 mycmakeargs+=(
327     -DWITH_READLINE=$(usex bindist 1 0)
328     -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
329     $(usex bindist -DHAVE_BFD_H=0 '')
330     )
331 jmbsvicetto 1.19 fi
332    
333 robbat2 1.23 mycmakeargs+=( -DWITH_EDITLINE=system )
334    
335 jmbsvicetto 1.19 if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
336 grknight 1.20 mycmakeargs+=(
337     -DWITH_JEMALLOC=$(usex jemalloc system)
338     )
339 jmbsvicetto 1.19 mysql_version_is_at_least "10.0.9" && mycmakeargs+=( -DWITH_PCRE=system )
340     fi
341    
342 robbat2 1.1 configure_cmake_locale
343    
344     if use minimal ; then
345     configure_cmake_minimal
346     else
347     configure_cmake_standard
348     fi
349    
350     # Bug #114895, bug #110149
351     filter-flags "-O" "-O[01]"
352    
353 jmbsvicetto 1.16 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
354 jmbsvicetto 1.19 CXXFLAGS="${CXXFLAGS} -felide-constructors"
355     # Causes linkage failures. Upstream bug #59607 removes it
356 robbat2 1.15 if ! mysql_version_is_at_least "5.6" ; then
357     CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
358     fi
359 jmbsvicetto 1.19 # As of 5.7, exceptions and rtti are used!
360 jmbsvicetto 1.16 if ! mysql_version_is_at_least "5.7" ; then
361 jmbsvicetto 1.19 CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti"
362 jmbsvicetto 1.16 fi
363 robbat2 1.1 export CXXFLAGS
364    
365     # bug #283926, with GCC4.4, this is required to get correct behavior.
366     append-flags -fno-strict-aliasing
367    
368     cmake-utils_src_configure
369     }
370    
371     # @FUNCTION: mysql-cmake_src_compile
372     # @DESCRIPTION:
373     # Compile the mysql code.
374     mysql-cmake_src_compile() {
375    
376     debug-print-function ${FUNCNAME} "$@"
377    
378     cmake-utils_src_compile
379     }
380    
381     # @FUNCTION: mysql-cmake_src_install
382     # @DESCRIPTION:
383     # Install mysql.
384     mysql-cmake_src_install() {
385    
386     debug-print-function ${FUNCNAME} "$@"
387    
388     # Make sure the vars are correctly initialized
389     mysql_init_vars
390    
391     cmake-utils_src_install
392    
393     # Convenience links
394     einfo "Making Convenience links for mysqlcheck multi-call binary"
395     dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze"
396     dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
397     dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
398    
399 jmbsvicetto 1.16 # Create a mariadb_config symlink
400 jmbsvicetto 1.19 [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && dosym "/usr/bin/mysql_config" "/usr/bin/mariadb_config"
401 jmbsvicetto 1.16
402 robbat2 1.1 # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
403 jmbsvicetto 1.5 rm -Rf "${ED}/usr/data"
404 robbat2 1.1
405     # Various junk (my-*.cnf moved elsewhere)
406     einfo "Removing duplicate /usr/share/mysql files"
407    
408     # Unless they explicitly specific USE=test, then do not install the
409     # testsuite. It DOES have a use to be installed, esp. when you want to do a
410     # validation of your database configuration after tuning it.
411     if ! use test ; then
412     rm -rf "${D}"/${MY_SHAREDSTATEDIR}/mysql-test
413     fi
414    
415     # Configuration stuff
416     case ${MYSQL_PV_MAJOR} in
417 robbat2 1.11 5.[1-4]*) mysql_mycnf_version="5.1" ;;
418 grknight 1.25 5.5) mysql_mycnf_version="5.5" ;;
419     5.[6-9]|6*|7*|8*|9*|10*) mysql_mycnf_version="5.6" ;;
420 robbat2 1.1 esac
421     einfo "Building default my.cnf (${mysql_mycnf_version})"
422 robbat2 1.12 insinto "${MY_SYSCONFDIR#${EPREFIX}}"
423 grknight 1.25 [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
424 robbat2 1.1 mycnf_src="my.cnf-${mysql_mycnf_version}"
425     sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
426     "${FILESDIR}/${mycnf_src}" \
427 grknight 1.21 > "${TMPDIR}/my.cnf.ok" || die
428 robbat2 1.23 use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
429 robbat2 1.1 if use latin1 ; then
430     sed -i \
431     -e "/character-set/s|utf8|latin1|g" \
432 grknight 1.21 "${TMPDIR}/my.cnf.ok" || die
433 robbat2 1.1 fi
434 robbat2 1.13 eprefixify "${TMPDIR}/my.cnf.ok"
435 robbat2 1.1 newins "${TMPDIR}/my.cnf.ok" my.cnf
436    
437     # Minimal builds don't have the MySQL server
438     if ! use minimal ; then
439     einfo "Creating initial directories"
440     # Empty directories ...
441     diropts "-m0750"
442 jmbsvicetto 1.16 if [[ ${PREVIOUS_DATADIR} != "yes" ]] ; then
443 jmbsvicetto 1.5 dodir "${MY_DATADIR#${EPREFIX}}"
444     keepdir "${MY_DATADIR#${EPREFIX}}"
445 robbat2 1.1 chown -R mysql:mysql "${D}/${MY_DATADIR}"
446     fi
447    
448     diropts "-m0755"
449 jmbsvicetto 1.19 for folder in "${MY_LOGDIR#${EPREFIX}}" ; do
450 robbat2 1.1 dodir "${folder}"
451     keepdir "${folder}"
452 jmbsvicetto 1.5 chown -R mysql:mysql "${ED}/${folder}"
453 robbat2 1.1 done
454     fi
455    
456     # Minimal builds don't have the MySQL server
457     if ! use minimal ; then
458     einfo "Including support files and sample configurations"
459     docinto "support-files"
460     for script in \
461     "${S}"/support-files/my-*.cnf.sh \
462     "${S}"/support-files/magic \
463     "${S}"/support-files/ndb-config-2-node.ini.sh
464     do
465 jmbsvicetto 1.16 [[ -f $script ]] && dodoc "${script}"
466 robbat2 1.1 done
467    
468     docinto "scripts"
469     for script in "${S}"/scripts/mysql* ; do
470 jmbsvicetto 1.16 [[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}"
471 robbat2 1.1 done
472     fi
473    
474 robbat2 1.14 #Remove mytop if perl is not selected
475 jmbsvicetto 1.19 [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && ! use perl \
476 robbat2 1.14 && rm -f "${ED}/usr/bin/mytop"
477 grknight 1.21
478     # Percona has decided to rename libmysqlclient to libperconaserverclient
479     # Use a symlink to preserve linkages for those who don't use mysql_config
480     if [[ ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.5.36" ; then
481     dosym libperconaserverclient.so /usr/$(get_libdir)/libmysqlclient.so
482     dosym libperconaserverclient.so /usr/$(get_libdir)/libmysqlclient_r.so
483     if use static-libs ; then
484     dosym libperconaserverclient.a /usr/$(get_libdir)/libmysqlclient.a
485     dosym libperconaserverclient.a /usr/$(get_libdir)/libmysqlclient_r.a
486     fi
487     fi
488 robbat2 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20