/[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.4 Revision 1.5
1# Copyright 1999-2011 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.4 2011/12/27 07:37:20 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.5 2012/01/06 21:32:48 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>
115 115
116 mycmakeargs+=( 116 mycmakeargs+=(
117 -DENABLED_LOCAL_INFILE=1 117 -DENABLED_LOCAL_INFILE=1
118 -DEXTRA_CHARSETS=all 118 -DEXTRA_CHARSETS=all
119 -DMYSQL_USER=mysql 119 -DMYSQL_USER=mysql
120 -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock 120 -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock
121 -DWITHOUT_READLINE=1 121 -DWITHOUT_READLINE=1
122 -DWITH_ZLIB=system 122 -DWITH_ZLIB=system
123 -DWITHOUT_LIBWRAP=1 123 -DWITHOUT_LIBWRAP=1
124 ) 124 )
125 125
189 debug-print-function ${FUNCNAME} "$@" 189 debug-print-function ${FUNCNAME} "$@"
190 190
191 CMAKE_BUILD_TYPE="RelWithDebInfo" 191 CMAKE_BUILD_TYPE="RelWithDebInfo"
192 192
193 mycmakeargs=( 193 mycmakeargs=(
194 -DCMAKE_INSTALL_PREFIX=/usr 194 -DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr
195 -DMYSQL_DATADIR=/var/lib/mysql 195 -DMYSQL_DATADIR=${EPREFIX}/var/lib/mysql
196 -DSYSCONFDIR=/etc/mysql 196 -DSYSCONFDIR=${EPREFIX}/etc/mysql
197 -DINSTALL_BINDIR=bin 197 -DINSTALL_BINDIR=bin
198 -DINSTALL_DOCDIR=share/doc/${P} 198 -DINSTALL_DOCDIR=share/doc/${P}
199 -DINSTALL_DOCREADMEDIR=share/doc/${P} 199 -DINSTALL_DOCREADMEDIR=share/doc/${P}
200 -DINSTALL_INCLUDEDIR=include/mysql 200 -DINSTALL_INCLUDEDIR=include/mysql
201 -DINSTALL_INFODIR=share/info 201 -DINSTALL_INFODIR=share/info
202 -DINSTALL_LIBDIR=$(get_libdir)/mysql 202 -DINSTALL_LIBDIR=$(get_libdir)/mysql
203 -DINSTALL_MANDIR=share/man 203 -DINSTALL_MANDIR=share/man
204 -DINSTALL_MYSQLDATADIR=/var/lib/mysql 204 -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql
205 -DINSTALL_MYSQLSHAREDIR=share/mysql 205 -DINSTALL_MYSQLSHAREDIR=share/mysql
206 -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test 206 -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test
207 -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin 207 -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
208 -DINSTALL_SBINDIR=sbin 208 -DINSTALL_SBINDIR=sbin
209 -DINSTALL_SCRIPTDIR=share/mysql/scripts 209 -DINSTALL_SCRIPTDIR=share/mysql/scripts
210 -DINSTALL_SQLBENCHDIR=share/mysql 210 -DINSTALL_SQLBENCHDIR=share/mysql
211 -DINSTALL_SUPPORTFILESDIR=/usr/share/mysql 211 -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql
212 -DWITH_COMMENT="Gentoo Linux ${PF}" 212 -DWITH_COMMENT="Gentoo Linux ${PF}"
213 -DWITHOUT_UNIT_TESTS=1 213 -DWITHOUT_UNIT_TESTS=1
214 ) 214 )
215 215
216 configure_cmake_locale 216 configure_cmake_locale
262 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze" 262 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze"
263 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair" 263 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
264 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" 264 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
265 265
266 # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir 266 # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
267 rm -Rf "${D}/usr/data" 267 rm -Rf "${ED}/usr/data"
268 268
269 # Various junk (my-*.cnf moved elsewhere) 269 # Various junk (my-*.cnf moved elsewhere)
270 einfo "Removing duplicate /usr/share/mysql files" 270 einfo "Removing duplicate /usr/share/mysql files"
271 271
272 # Clean up stuff for a minimal build 272 # Clean up stuff for a minimal build
273# if use minimal ; then 273# if use minimal ; then
274# einfo "Remove all extra content for minimal build" 274# einfo "Remove all extra content for minimal build"
275# rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} 275# rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench}
276# rm -f "${D}"/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} 276# 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}
277# rm -f "${D}/usr/sbin/mysqld" 277# rm -f "${ED}/usr/sbin/mysqld"
278# rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a 278# rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a
279# fi 279# fi
280 280
281 # Unless they explicitly specific USE=test, then do not install the 281 # Unless they explicitly specific USE=test, then do not install the
282 # testsuite. It DOES have a use to be installed, esp. when you want to do a 282 # testsuite. It DOES have a use to be installed, esp. when you want to do a
307 if ! use minimal ; then 307 if ! use minimal ; then
308 einfo "Creating initial directories" 308 einfo "Creating initial directories"
309 # Empty directories ... 309 # Empty directories ...
310 diropts "-m0750" 310 diropts "-m0750"
311 if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then 311 if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then
312 dodir "${MY_DATADIR}" 312 dodir "${MY_DATADIR#${EPREFIX}}"
313 keepdir "${MY_DATADIR}" 313 keepdir "${MY_DATADIR#${EPREFIX}}"
314 chown -R mysql:mysql "${D}/${MY_DATADIR}" 314 chown -R mysql:mysql "${D}/${MY_DATADIR}"
315 fi 315 fi
316 316
317 diropts "-m0755" 317 diropts "-m0755"
318 for folder in "${MY_LOGDIR}" "/var/run/mysqld" ; do 318 for folder in "${MY_LOGDIR#${EPREFIX}}" "/var/run/mysqld" ; do
319 dodir "${folder}" 319 dodir "${folder}"
320 keepdir "${folder}" 320 keepdir "${folder}"
321 chown -R mysql:mysql "${D}/${folder}" 321 chown -R mysql:mysql "${ED}/${folder}"
322 done 322 done
323 fi 323 fi
324 324
325 # Minimal builds don't have the MySQL server 325 # Minimal builds don't have the MySQL server
326 if ! use minimal ; then 326 if ! use minimal ; then
339 [[ -f "$script" ]] && [[ "${script%.sh}" == "${script}" ]] && dodoc "${script}" 339 [[ -f "$script" ]] && [[ "${script%.sh}" == "${script}" ]] && dodoc "${script}"
340 done 340 done
341 341
342 fi 342 fi
343 343
344 mysql_lib_symlinks "${D}" 344 mysql_lib_symlinks "${ED}"
345} 345}

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20