/[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.11
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.11 2011/12/27 07:37:20 robbat2 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"
223 225
224[[ ${PN} == "mariadb" ]] \ 226[[ ${PN} == "mariadb" ]] \
225&& mysql_version_is_at_least "5.2.5" \ 227&& mysql_version_is_at_least "5.2.5" \
226&& IUSE="${IUSE} sphinx" 228&& IUSE="${IUSE} sphinx"
227 229
230mysql_version_is_at_least "5.5.7" \
231&& IUSE="${IUSE} systemtap"
232
228 233
229# 234#
230# DEPENDENCIES: 235# DEPENDENCIES:
231# 236#
232 237
233# Be warned, *DEPEND are version-dependant 238# Be warned, *DEPEND are version-dependant
234# These are used for both runtime and compiletime 239# These are used for both runtime and compiletime
235DEPEND=" 240DEPEND="
236 ssl? ( >=dev-libs/openssl-0.9.6d ) 241 ssl? ( >=dev-libs/openssl-0.9.6d )
237 userland_GNU? ( sys-process/procps ) 242 kernel_linux? ( sys-process/procps )
238 >=sys-apps/sed-4 243 >=sys-apps/sed-4
239 >=sys-apps/texinfo-4.7-r1 244 >=sys-apps/texinfo-4.7-r1
240 >=sys-libs/readline-4.1 245 >=sys-libs/readline-4.1
241 >=sys-libs/zlib-1.2.3 246 >=sys-libs/zlib-1.2.3
242" 247"
248for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do 253for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do
249 [[ ${i} == ${PN} ]] || 254 [[ ${i} == ${PN} ]] ||
250 DEPEND="${DEPEND} !dev-db/${i}" 255 DEPEND="${DEPEND} !dev-db/${i}"
251done 256done
252 257
258# prefix: first need to implement something for #196294
253RDEPEND="${DEPEND} 259RDEPEND="${DEPEND}
254 !minimal? ( dev-db/mysql-init-scripts ) 260 !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) )
255 selinux? ( sec-policy/selinux-mysql ) 261 selinux? ( sec-policy/selinux-mysql )
256" 262"
257 263
258DEPEND="${DEPEND} 264DEPEND="${DEPEND}
259 virtual/yacc 265 virtual/yacc
273&& DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )" 279&& DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )"
274 280
275[[ "${PN}" == "mariadb" ]] \ 281[[ "${PN}" == "mariadb" ]] \
276&& mysql_version_is_at_least "5.2.5" \ 282&& mysql_version_is_at_least "5.2.5" \
277&& DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )" 283&& DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )"
284
285mysql_version_is_at_least "5.5.7" \
286&& DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3 )"
278 287
279# dev-perl/DBD-mysql is needed by some scripts installed by MySQL 288# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
280PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" 289PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
281 290
282# For other stuff to bring us in 291# For other stuff to bring us in
635 && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ 644 && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
636 || touch "${TMPDIR}/fill_help_tables.sql" 645 || touch "${TMPDIR}/fill_help_tables.sql"
637 help_tables="${TMPDIR}/fill_help_tables.sql" 646 help_tables="${TMPDIR}/fill_help_tables.sql"
638 647
639 pushd "${TMPDIR}" &>/dev/null 648 pushd "${TMPDIR}" &>/dev/null
640 "${ROOT}/usr/bin/mysql_install_db" >"${TMPDIR}"/mysql_install_db.log 2>&1 649 "${ROOT}/usr/bin/mysql_install_db" --basedir=/usr >"${TMPDIR}"/mysql_install_db.log 2>&1
641 if [ $? -ne 0 ]; then 650 if [ $? -ne 0 ]; then
642 grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 651 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" 652 die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
644 fi 653 fi
645 popd &>/dev/null 654 popd &>/dev/null

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

  ViewVC Help
Powered by ViewVC 1.1.20