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

Diff of /eclass/mysql.eclass

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

Revision 1.43 Revision 1.50
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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.eclass,v 1.43 2006/10/23 12:26:45 vivo Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.50 2006/12/16 12:34:29 chtekk Exp $
4 4
5# Author: Francesco Riosa <vivo@gentoo.org> 5# Author: Francesco Riosa <vivo@gentoo.org>
6# Maintainer: Luca Longinotti <chtekk@gentoo.org> 6# Maintainer: Luca Longinotti <chtekk@gentoo.org>
7 7
8# Both MYSQL_VERSION_ID and MYSQL_PATCHSET_REV must be set in the ebuild too 8# Both MYSQL_VERSION_ID and MYSQL_PATCHSET_REV must be set in the ebuild too
33 >=sys-apps/sed-4 33 >=sys-apps/sed-4
34 >=sys-apps/texinfo-4.7-r1 34 >=sys-apps/texinfo-4.7-r1
35 >=sys-libs/readline-4.1 35 >=sys-libs/readline-4.1
36 >=sys-libs/zlib-1.2.3" 36 >=sys-libs/zlib-1.2.3"
37 37
38# LEAVE THE SURROUNDING SPACES THERE
39MYSQL_MUTUALLY_EXCLUSIVE=" !dev-db/mysql !dev-db/mysql-community "
40DEPEND="${DEPEND} ${MYSQL_MUTUALLY_EXCLUSIVE/ !${CATEGORY}\/${PN} /}"
41
38mysql_version_is_at_least "5.01.00.00" \ 42mysql_version_is_at_least "5.01.00.00" \
39|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )" 43|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )"
40 44
41RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" 45RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )"
42 46
43# dev-perl/DBD-mysql is needed by some scripts installed by MySQL 47# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
44PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" 48PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
45 49
46# Shorten the path because the socket path length must be shorter than 107 chars 50# Shorten the path because the socket path length must be shorter than 107 chars
47# and we will run a mysql server during test phase 51# and we will run a mysql server during test phase
48S="${WORKDIR}/${PN/_alpha/-bk-}" # BitKeeper ebuilds 52S="${WORKDIR}/mysql" # BitKeeper ebuilds
49 53
50# Define $MY_FIXED_PV for MySQL patchsets 54# Define $MY_FIXED_PV for MySQL patchsets
51MY_FIXED_PV="${PV/_alpha/}" 55MY_FIXED_PV="${PV/_alpha/}"
52#MY_FIXED_PV="${MY_FIXED_PV/_beta/}" 56#MY_FIXED_PV="${MY_FIXED_PV/_beta/}"
53#MY_FIXED_PV="${MY_FIXED_PV/_rc/}" 57#MY_FIXED_PV="${MY_FIXED_PV/_rc/}"
54 58
55MY_P="${P/_/-}" 59MY_P="${P/_/-}"
56MY_P="${MY_P/-alpha/-bk-}" # BitKeeper ebuilds 60MY_P="${MY_P/-alpha/-bk-}" # BitKeeper ebuilds
61MY_P="${MY_P/-community/}"
57 62
58# Define correct SRC_URIs 63# Define correct SRC_URIs
59SRC_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/${MY_P}${MYSQL_RERELEASE}.tar.gz" 64SRC_URI="${BASE_URI}/${MY_P}${MYSQL_RERELEASE}.tar.gz"
60if [[ -n "${MYSQL_PATCHSET_REV}" ]] ; then 65if [[ -n "${MYSQL_PATCHSET_REV}" ]] ; then
61 MYSQL_PATCHSET_FILENAME="${PN}-patchset-${MY_FIXED_PV}-r${MYSQL_PATCHSET_REV}.tar.bz2" 66 MYSQL_PATCHSET_FILENAME="${PN}-patchset-${MY_FIXED_PV}-r${MYSQL_PATCHSET_REV}.tar.bz2"
62 # We add the Gentoo mirror here, as we only use primaryuri for the MySQL tarball 67 # We add the Gentoo mirror here, as we only use primaryuri for the MySQL tarball
63 SRC_URI="${SRC_URI} http://gentoo.longitekk.com/${MYSQL_PATCHSET_FILENAME}" 68 SRC_URI="${SRC_URI} http://g3nt8.org/patches/${MYSQL_PATCHSET_FILENAME}"
64fi 69fi
65 70
66DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." 71DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
67HOMEPAGE="http://www.mysql.com/" 72HOMEPAGE="http://www.mysql.com/"
68SLOT="0" 73SLOT="0"
150 export MY_INCLUDEDIR 155 export MY_INCLUDEDIR
151 export DATADIR 156 export DATADIR
152} 157}
153 158
154configure_minimal() { 159configure_minimal() {
155 # These are things we exclude from a minimal build, please 160 # These are things we exclude from a minimal build, please
156 # note that the server actually does get built and installed, 161 # note that the server actually does get built and installed,
157 # but we then delete it before packaging. 162 # but we then delete it before packaging.
158 local minimal_exclude_list="server embedded-server extra-tools innodb bench berkeley-db row-based-replication" 163 local minimal_exclude_list="server embedded-server extra-tools innodb bench berkeley-db row-based-replication"
159 164
160 for i in ${minimal_exclude_list} ; do 165 for i in ${minimal_exclude_list} ; do
161 myconf="${myconf} --without-${i}" 166 myconf="${myconf} --without-${i}"
162 done 167 done
163 myconf="${myconf} --with-extra-charsets=none" 168 myconf="${myconf} --with-extra-charsets=none"
169 myconf="${myconf} --enable-local-infile"
170
171 if useq "static" ; then
172 myconf="${myconf} --with-client-ldflags=-all-static"
173 myconf="${myconf} --disable-shared"
174 else
175 myconf="${myconf} --enable-shared --enable-static"
176 fi
177
178 if mysql_version_is_at_least "4.01.00.00" && ! useq "latin1" ; then
179 myconf="${myconf} --with-charset=utf8"
180 myconf="${myconf} --with-collation=utf8_general_ci"
181 else
182 myconf="${myconf} --with-charset=latin1"
183 myconf="${myconf} --with-collation=latin1_swedish_ci"
184 fi
164} 185}
165 186
166configure_common() { 187configure_common() {
167 myconf="${myconf} $(use_with big-tables)" 188 myconf="${myconf} $(use_with big-tables)"
168 myconf="${myconf} --enable-local-infile" 189 myconf="${myconf} --enable-local-infile"
439 filter-flags "-O" "-O[01]" 460 filter-flags "-O" "-O[01]"
440 461
441 # glib-2.3.2_pre fix, bug #16496 462 # glib-2.3.2_pre fix, bug #16496
442 append-flags "-DHAVE_ERRNO_AS_DEFINE=1" 463 append-flags "-DHAVE_ERRNO_AS_DEFINE=1"
443 464
444 append-flags "-fno-exceptions -fno-strict-aliasing" 465 CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-strict-aliasing"
445 CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti" 466 CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti"
446 mysql_version_is_at_least "5.00.00.00" \ 467 mysql_version_is_at_least "5.00.00.00" \
447 && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" 468 && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
448 export CXXFLAGS 469 export CXXFLAGS
449 470
606 # Make sure the vars are correctly initialized 627 # Make sure the vars are correctly initialized
607 mysql_init_vars 628 mysql_init_vars
608 629
609 [[ -z "${DATADIR}" ]] && die "Sorry, unable to find DATADIR" 630 [[ -z "${DATADIR}" ]] && die "Sorry, unable to find DATADIR"
610 631
611 if built_with_use dev-db/mysql minimal ; then 632 if built_with_use ${CATEGORY}/${PN} minimal ; then
612 die "Minimal builds do NOT include the MySQL server" 633 die "Minimal builds do NOT include the MySQL server"
613 fi 634 fi
614 635
615 local pwd1="a" 636 local pwd1="a"
616 local pwd2="b" 637 local pwd2="b"
711 wait %1 732 wait %1
712 einfo "Done" 733 einfo "Done"
713} 734}
714 735
715mysql_pkg_postrm() { 736mysql_pkg_postrm() {
716 mysql_lib_symlinks 737 : #mysql_lib_symlinks
717} 738}

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.50

  ViewVC Help
Powered by ViewVC 1.1.20