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

Diff of /eclass/mysql-v2.eclass

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

Revision 1.6 Revision 1.9
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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-v2.eclass,v 1.6 2011/08/21 16:14:56 jmbsvicetto Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.9 2011/10/07 04:30:18 jmbsvicetto Exp $
4 4
5# @ECLASS: mysql-v2.eclass 5# @ECLASS: mysql-v2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maintainers: 7# Maintainers:
8# - MySQL Team <mysql-bugs@gentoo.org> 8# - MySQL Team <mysql-bugs@gentoo.org>
17# It provides the src_unpack, src_prepare, src_configure, src_compile, 17# It provides the src_unpack, src_prepare, src_configure, src_compile,
18# scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm 18# scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm
19# phase hooks. 19# phase hooks.
20 20
21# @ECLASS-VARIABLE: BUILD 21# @ECLASS-VARIABLE: BUILD
22# @DESCRIPTION:
22# @DESCRIPTION: Build type of the mysql version 23# Build type of the mysql version
23# The default value is autotools
24: ${BUILD:=autotools} 24: ${BUILD:=autotools}
25 25
26case ${BUILD} in 26case ${BUILD} in
27 "cmake") 27 "cmake")
28 BUILD_INHERIT="mysql-cmake" 28 BUILD_INHERIT="mysql-cmake"
39esac 39esac
40 40
41MYSQL_EXTRAS="" 41MYSQL_EXTRAS=""
42 42
43# @ECLASS-VARIABLE: MYSQL_EXTRAS_VER 43# @ECLASS-VARIABLE: MYSQL_EXTRAS_VER
44# @DESCRIPTION:
44# @DESCRIPTION: The version of the MYSQL_EXTRAS repo to use to build mysql 45# The version of the MYSQL_EXTRAS repo to use to build mysql
46# Use "none" to disable it's use
45[[ "${MY_EXTRAS_VER}" == "live" ]] && MYSQL_EXTRAS="git-2" 47[[ "${MY_EXTRAS_VER}" == "live" ]] && MYSQL_EXTRAS="git-2"
46 48
47inherit eutils flag-o-matic gnuconfig ${MYSQL_EXTRAS} ${BUILD_INHERIT} mysql_fx versionator toolchain-funcs 49inherit eutils flag-o-matic gnuconfig ${MYSQL_EXTRAS} ${BUILD_INHERIT} mysql_fx versionator toolchain-funcs
48 50
49# 51#
171 173
172# Define correct SRC_URIs 174# Define correct SRC_URIs
173SRC_URI="${SERVER_URI}" 175SRC_URI="${SERVER_URI}"
174 176
175# Gentoo patches to MySQL 177# Gentoo patches to MySQL
176[[ ${MY_EXTRAS_VER} != live ]] \ 178[[ ${MY_EXTRAS_VER} != live ]] && [[ ${MY_EXTRAS_VER} != none ]] \
177&& SRC_URI="${SRC_URI} 179&& SRC_URI="${SRC_URI}
178 mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 180 mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
179 http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 181 http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
180 http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 182 http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
181 http://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" 183 http://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
232 234
233# Be warned, *DEPEND are version-dependant 235# Be warned, *DEPEND are version-dependant
234# These are used for both runtime and compiletime 236# These are used for both runtime and compiletime
235DEPEND=" 237DEPEND="
236 ssl? ( >=dev-libs/openssl-0.9.6d ) 238 ssl? ( >=dev-libs/openssl-0.9.6d )
237 userland_GNU? ( sys-process/procps ) 239 kernel_linux? ( sys-process/procps )
238 >=sys-apps/sed-4 240 >=sys-apps/sed-4
239 >=sys-apps/texinfo-4.7-r1 241 >=sys-apps/texinfo-4.7-r1
240 >=sys-libs/readline-4.1 242 >=sys-libs/readline-4.1
241 >=sys-libs/zlib-1.2.3 243 >=sys-libs/zlib-1.2.3
242" 244"
248for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do 250for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do
249 [[ ${i} == ${PN} ]] || 251 [[ ${i} == ${PN} ]] ||
250 DEPEND="${DEPEND} !dev-db/${i}" 252 DEPEND="${DEPEND} !dev-db/${i}"
251done 253done
252 254
255# prefix: first need to implement something for #196294
253RDEPEND="${DEPEND} 256RDEPEND="${DEPEND}
254 !minimal? ( dev-db/mysql-init-scripts ) 257 !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) )
255 selinux? ( sec-policy/selinux-mysql ) 258 selinux? ( sec-policy/selinux-mysql )
256" 259"
257 260
258DEPEND="${DEPEND} 261DEPEND="${DEPEND}
259 virtual/yacc 262 virtual/yacc
635 && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ 638 && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
636 || touch "${TMPDIR}/fill_help_tables.sql" 639 || touch "${TMPDIR}/fill_help_tables.sql"
637 help_tables="${TMPDIR}/fill_help_tables.sql" 640 help_tables="${TMPDIR}/fill_help_tables.sql"
638 641
639 pushd "${TMPDIR}" &>/dev/null 642 pushd "${TMPDIR}" &>/dev/null
640 "${ROOT}/usr/bin/mysql_install_db" >"${TMPDIR}"/mysql_install_db.log 2>&1 643 "${ROOT}/usr/bin/mysql_install_db --basedir=/usr" >"${TMPDIR}"/mysql_install_db.log 2>&1
641 if [ $? -ne 0 ]; then 644 if [ $? -ne 0 ]; then
642 grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 645 grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
643 die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" 646 die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
644 fi 647 fi
645 popd &>/dev/null 648 popd &>/dev/null

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

  ViewVC Help
Powered by ViewVC 1.1.20