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

Diff of /eclass/mysql.eclass

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

Revision 1.38 Revision 1.40
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.38 2006/10/20 13:14:21 chtekk Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.40 2006/10/20 15:22:24 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
48# Define $MY_FIXED_PV for MySQL patchsets 48# Define $MY_FIXED_PV for MySQL patchsets
49MY_FIXED_PV="${PV/_alpha/}" 49MY_FIXED_PV="${PV/_alpha/}"
50#MY_FIXED_PV="${MY_FIXED_PV/_beta/}" 50#MY_FIXED_PV="${MY_FIXED_PV/_beta/}"
51#MY_FIXED_PV="${MY_FIXED_PV/_rc/}" 51#MY_FIXED_PV="${MY_FIXED_PV/_rc/}"
52 52
53MY_P="${P/_/-}"
54
53# Define correct SRC_URIs 55# Define correct SRC_URIs
54SRC_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/${P/_/-}${MYSQL_RERELEASE}.tar.gz" 56SRC_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/${MY_P}${MYSQL_RERELEASE}.tar.gz"
55if [[ -n "${MYSQL_PATCHSET_REV}" ]] ; then 57if [[ -n "${MYSQL_PATCHSET_REV}" ]] ; then
56 MYSQL_PATCHSET_FILENAME="${PN}-patchset-${MY_FIXED_PV}-r${MYSQL_PATCHSET_REV}.tar.bz2" 58 MYSQL_PATCHSET_FILENAME="${PN}-patchset-${MY_FIXED_PV}-r${MYSQL_PATCHSET_REV}.tar.bz2"
57 # We add the Gentoo mirror here, as we only use primaryuri for the MySQL tarball 59 # We add the Gentoo mirror here, as we only use primaryuri for the MySQL tarball
58 SRC_URI="${SRC_URI} http://gentoo.longitekk.com/${MYSQL_PATCHSET_FILENAME}" 60 SRC_URI="${SRC_URI} http://gentoo.longitekk.com/${MYSQL_PATCHSET_FILENAME}"
59fi 61fi
60 62
61DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." 63DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
62HOMEPAGE="http://www.mysql.com/" 64HOMEPAGE="http://www.mysql.com/"
63SLOT="0" 65SLOT="0"
64LICENSE="GPL-2" 66LICENSE="GPL-2"
65IUSE="big-tables berkdb debug embedded minimal perl selinux srvdir ssl static" 67IUSE="big-tables debug embedded minimal perl selinux srvdir ssl static"
66RESTRICT="confcache" 68RESTRICT="confcache"
67 69
68mysql_version_is_at_least "4.01.00.00" \ 70mysql_version_is_at_least "4.01.00.00" \
69&& IUSE="${IUSE} latin1" 71&& IUSE="${IUSE} latin1"
70 72
77mysql_version_is_at_least "5.00.18.00" \ 79mysql_version_is_at_least "5.00.18.00" \
78&& IUSE="${IUSE} max-idx-128" 80&& IUSE="${IUSE} max-idx-128"
79 81
80mysql_version_is_at_least "5.01.00.00" \ 82mysql_version_is_at_least "5.01.00.00" \
81&& IUSE="${IUSE} innodb" 83&& IUSE="${IUSE} innodb"
84
85mysql_version_is_at_least "5.01.00.00" \
86|| IUSE="${IUSE} berkdb"
82 87
83EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \ 88EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \
84 pkg_postinst pkg_config pkg_postrm 89 pkg_postinst pkg_config pkg_postrm
85 90
86# 91#
121 else 126 else
122 DATADIR="${MY_LOCALSTATEDIR}" 127 DATADIR="${MY_LOCALSTATEDIR}"
123 fi 128 fi
124 einfo "Using default DATADIR" 129 einfo "Using default DATADIR"
125 fi 130 fi
126 einfo "MySQL DATADIR is ${DATADIR}" 131 elog "MySQL DATADIR is ${DATADIR}"
127 132
128 if [[ -z "${PREVIOUS_DATADIR}" ]] ; then 133 if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
129 if [[ -e "${DATADIR}" ]] ; then 134 if [[ -e "${DATADIR}" ]] ; then
130 ewarn "Previous datadir found, it's YOUR job to change" 135 elog "Previous datadir found, it's YOUR job to change"
131 ewarn "ownership and take care of it" 136 elog "ownership and take care of it"
132 PREVIOUS_DATADIR="yes" 137 PREVIOUS_DATADIR="yes"
133 else 138 else
134 PREVIOUS_DATADIR="no" 139 PREVIOUS_DATADIR="no"
135 fi 140 fi
136 export PREVIOUS_DATADIR 141 export PREVIOUS_DATADIR
142 export MY_INCLUDEDIR 147 export MY_INCLUDEDIR
143 export DATADIR 148 export DATADIR
144} 149}
145 150
146configure_minimal() { 151configure_minimal() {
147 # these are things we exclude from a minimal build 152 # These are things we exclude from a minimal build, please
148 # note that the server actually does get built and installed 153 # note that the server actually does get built and installed,
149 # but we then delete it before packaging. 154 # but we then delete it before packaging.
150 local minimal_exclude_list="server embedded-server extra-tools innodb bench berkeley-db row-based-replication" 155 local minimal_exclude_list="server embedded-server extra-tools innodb bench berkeley-db row-based-replication"
151 156
152 for i in ${minimal_exclude_list}; do 157 for i in ${minimal_exclude_list} ; do
153 myconf="${myconf} --without-${i}" 158 myconf="${myconf} --without-${i}"
154 done 159 done
155 myconf="${myconf} --with-extra-charsets=none" 160 myconf="${myconf} --with-extra-charsets=none"
156} 161}
157 162
158configure_common() { 163configure_common() {
164 myconf="${myconf} $(use_with big-tables)"
159 myconf="${myconf} --enable-local-infile" 165 myconf="${myconf} --enable-local-infile"
160 myconf="${myconf} --with-extra-charsets=all" 166 myconf="${myconf} --with-extra-charsets=all"
161 myconf="${myconf} --with-mysqld-user=mysql" 167 myconf="${myconf} --with-mysqld-user=mysql"
168 myconf="${myconf} --with-server"
162 myconf="${myconf} --with-unix-socket-path='/var/run/mysqld/mysqld.sock'" 169 myconf="${myconf} --with-unix-socket-path='/var/run/mysqld/mysqld.sock'"
163 myconf="${myconf} --without-libwrap" 170 myconf="${myconf} --without-libwrap"
164 171
165 if useq "static" ; then 172 if useq "static" ; then
166 myconf="${myconf} --with-mysqld-ldflags=-all-static" 173 myconf="${myconf} --with-mysqld-ldflags=-all-static"
167 myconf="${myconf} --with-client-ldflags=-all-static" 174 myconf="${myconf} --with-client-ldflags=-all-static"
168 myconf="${myconf} --disable-shared" 175 myconf="${myconf} --disable-shared"
169 else 176 else
176 myconf="${myconf} --without-debug" 183 myconf="${myconf} --without-debug"
177 mysql_version_is_at_least "4.01.03.00" \ 184 mysql_version_is_at_least "4.01.03.00" \
178 && useq "cluster" \ 185 && useq "cluster" \
179 && myconf="${myconf} --without-ndb-debug" 186 && myconf="${myconf} --without-ndb-debug"
180 fi 187 fi
181 188
182 if mysql_version_is_at_least "4.01.00.00" && ! useq "latin1" ; then 189 if mysql_version_is_at_least "4.01.00.00" && ! useq "latin1" ; then
183 myconf="${myconf} --with-charset=utf8" 190 myconf="${myconf} --with-charset=utf8"
184 myconf="${myconf} --with-collation=utf8_general_ci" 191 myconf="${myconf} --with-collation=utf8_general_ci"
185 else 192 else
186 myconf="${myconf} --with-charset=latin1" 193 myconf="${myconf} --with-charset=latin1"
187 myconf="${myconf} --with-collation=latin1_swedish_ci" 194 myconf="${myconf} --with-collation=latin1_swedish_ci"
188 fi 195 fi
189 196
190 if useq "embedded" ; then 197 if useq "embedded" ; then
191 myconf="${myconf} --with-embedded-privilege-control" 198 myconf="${myconf} --with-embedded-privilege-control"
192 myconf="${myconf} --with-embedded-server" 199 myconf="${myconf} --with-embedded-server"
193 else 200 else
194 myconf="${myconf} --without-embedded-privilege-control" 201 myconf="${myconf} --without-embedded-privilege-control"
221 228
222 # The following fix is due to a bug with bdb on SPARC's. See: 229 # The following fix is due to a bug with bdb on SPARC's. See:
223 # http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8 230 # http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8
224 # It comes down to non-64-bit safety problems. 231 # It comes down to non-64-bit safety problems.
225 if useq "sparc" || useq "alpha" || useq "hppa" || useq "mips" || useq "amd64" ; then 232 if useq "sparc" || useq "alpha" || useq "hppa" || useq "mips" || useq "amd64" ; then
226 ewarn "bdb berkeley-db disabled due to incompatible arch" 233 elog "Berkeley DB support was disabled due to incompatible arch"
227 myconf="${myconf} --without-berkeley-db" 234 myconf="${myconf} --without-berkeley-db"
228 else 235 else
236 if useq "berkdb" ; then
229 useq "berkdb" && myconf="${myconf} --with-berkeley-db=./bdb" 237 myconf="${myconf} --with-berkeley-db=./bdb"
238 else
239 myconf="${myconf} --without-berkeley-db"
240 fi
230 fi 241 fi
231 242
232 if mysql_version_is_at_least "4.01.03.00" ; then 243 if mysql_version_is_at_least "4.01.03.00" ; then
233 myconf="${myconf} --with-geometry" 244 myconf="${myconf} --with-geometry"
234 myconf="${myconf} $(use_with cluster ndbcluster)" 245 myconf="${myconf} $(use_with cluster ndbcluster)"
235 fi 246 fi
236
237 mysql_version_is_at_least "4.01.11.00" \
238 && myconf="${myconf} $(use_with big-tables)"
239 247
240 if mysql_version_is_at_least "4.01.03.00" && useq "extraengine" ; then 248 if mysql_version_is_at_least "4.01.03.00" && useq "extraengine" ; then
241 # http://dev.mysql.com/doc/mysql/en/archive-storage-engine.html 249 # http://dev.mysql.com/doc/mysql/en/archive-storage-engine.html
242 myconf="${myconf} --with-archive-storage-engine" 250 myconf="${myconf} --with-archive-storage-engine"
243 251
249 257
250 # http://dev.mysql.com/doc/mysql/en/federated-storage-engine.html 258 # http://dev.mysql.com/doc/mysql/en/federated-storage-engine.html
251 # http://dev.mysql.com/doc/mysql/en/federated-description.html 259 # http://dev.mysql.com/doc/mysql/en/federated-description.html
252 # http://dev.mysql.com/doc/mysql/en/federated-limitations.html 260 # http://dev.mysql.com/doc/mysql/en/federated-limitations.html
253 if mysql_version_is_at_least "5.00.03.00" ; then 261 if mysql_version_is_at_least "5.00.03.00" ; then
254 einfo "Before using the Federated storage engine, please be sure to read" 262 elog "Before using the Federated storage engine, please be sure to read"
255 einfo "http://dev.mysql.com/doc/mysql/en/federated-limitations.html" 263 elog "http://dev.mysql.com/doc/mysql/en/federated-limitations.html"
256 myconf="${myconf} --with-federated-storage-engine" 264 myconf="${myconf} --with-federated-storage-engine"
257 fi 265 fi
258 fi 266 fi
259 267
260 mysql_version_is_at_least "5.00.18.00" \ 268 mysql_version_is_at_least "5.00.18.00" \
261 && useq "max-idx-128" \ 269 && useq "max-idx-128" \
262 && myconf="${myconf} --with-max-indexes=128" 270 && myconf="${myconf} --with-max-indexes=128"
263} 271}
264 272
265configure_51() { 273configure_51() {
266 # TODO : !!!!! readd --withouth-readline 274 # TODO: !!!! readd --without-readline
267 # the failure depend upon config/ac-macros/readline.m4 checking into 275 # the failure depend upon config/ac-macros/readline.m4 checking into
268 # readline.h instead of history.h 276 # readline.h instead of history.h
269 myconf="${myconf} $(use_with big-tables)"
270 myconf="${myconf} $(use_with ssl)" 277 myconf="${myconf} $(use_with ssl)"
271 myconf="${myconf} --enable-assembler" 278 myconf="${myconf} --enable-assembler"
272 myconf="${myconf} --with-geometry" 279 myconf="${myconf} --with-geometry"
273 myconf="${myconf} --with-readline" 280 myconf="${myconf} --with-readline"
274 myconf="${myconf} --with-row-based-replication" 281 myconf="${myconf} --with-row-based-replication"
275 myconf="${myconf} --with-zlib=/usr/$(get_libdir)" 282 myconf="${myconf} --with-zlib=/usr/$(get_libdir)"
276 myconf="${myconf} --without-pstack" 283 myconf="${myconf} --without-pstack"
277 useq "max-idx-128" && myconf="${myconf} --with-max-indexes=128" 284 useq "max-idx-128" && myconf="${myconf} --with-max-indexes=128"
278 285
279 # 5.1 introduces a new way to manage storage engines (plugins) 286 # 5.1 introduces a new way to manage storage engines (plugins)
280 # like configuration=none 287 # like configuration=none
281 local plugins="csv,myisam,myisammrg,heap" 288 local plugins="csv,myisam,myisammrg,heap"
282 if useq "extraengine" ; then 289 if useq "extraengine" ; then
283 # like configuration=max-no-ndb, archive and example removed in 5.1.11 290 # like configuration=max-no-ndb, archive and example removed in 5.1.11
284 plugins="${plugins},blackhole,federated,ftexample,partition" 291 plugins="${plugins},blackhole,federated,ftexample,partition"
285 292
286 einfo "before to use federated engine be sure to read" 293 elog "Before using the Federated storage engine, please be sure to read"
287 einfo "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" 294 elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
288 fi 295 fi
289 296
290 if useq "innodb" ; then 297 if useq "innodb" ; then
291 plugins="${plugins},innobase" 298 plugins="${plugins},innobase"
292 fi 299 fi
305# 312#
306 313
307mysql_pkg_setup() { 314mysql_pkg_setup() {
308 enewgroup mysql 60 || die "problem adding 'mysql' group" 315 enewgroup mysql 60 || die "problem adding 'mysql' group"
309 enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" 316 enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
310 317
311 if mysql_version_is_at_least "5.01.12.00" && useq "innodb" ; then 318 if mysql_version_is_at_least "5.01.12.00" && useq "innodb" ; then
319 eerror "InnoDB now uses cmake to build, this is a TODO item, will be fixed shortly!"
312 die "innodb now use cmake to build this is a TODO item" 320 die "InnoDB now uses cmake to build, this is a TODO item, will be fixed shortly!"
313 fi 321 fi
314 322
315 # Check for USE flag problems in pkg_setup 323 # Check for USE flag problems in pkg_setup
316 if useq "static" && useq "ssl" ; then 324 if useq "static" && useq "ssl" ; then
317 eerror "MySQL does not support being built statically with SSL support enabled!" 325 eerror "MySQL does not support being built statically with SSL support enabled!"
330 && ( useq "cluster" || useq "extraengine" ) \ 338 && ( useq "cluster" || useq "extraengine" ) \
331 && useq "minimal" ; then 339 && useq "minimal" ; then
332 eerror "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" 340 eerror "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!"
333 die "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" 341 die "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!"
334 fi 342 fi
335 343
336 useq "berkdb" && ewarn "Berkley DB support is deprecated and will be removed in future versions" 344 useq "berkdb" && elog "Berkeley DB support is deprecated and will be removed in future versions!"
337} 345}
338 346
339mysql_src_unpack() { 347mysql_src_unpack() {
340 # Initialize the proper variables first 348 # Initialize the proper variables first
341 mysql_init_vars 349 mysql_init_vars
342 350
343 unpack ${A} 351 unpack ${A}
344 352
345 mv -f "${WORKDIR}/${P/_/-}${MYSQL_RERELEASE}" "${S}" 353 mv -f "${WORKDIR}/${MY_P}${MYSQL_RERELEASE}" "${S}"
346 cd "${S}" 354 cd "${S}"
347 355
348 # Apply the patches for this MySQL version 356 # Apply the patches for this MySQL version
349 if [[ -d "${WORKDIR}/${MY_FIXED_PV}" ]] ; then 357 if [[ -d "${WORKDIR}/${MY_FIXED_PV}" ]] ; then
350 EPATCH_SOURCE="${WORKDIR}/${MY_FIXED_PV}" EPATCH_SUFFIX="patch" epatch 358 EPATCH_SOURCE="${WORKDIR}/${MY_FIXED_PV}" EPATCH_SUFFIX="patch" epatch
359 find . -name 'Makefile.am' \ 367 find . -name 'Makefile.am' \
360 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; 368 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
361 369
362 # Manage mysqlmanager 370 # Manage mysqlmanager
363 mysql_version_is_at_least "5.00.15.00" \ 371 mysql_version_is_at_least "5.00.15.00" \
364 && sed -i -e "s!@GENTOO_EXT@!${MY_SUFFIX}!g" \ 372 && sed -i -e "s!@GENTOO_EXT@!!g" \
365 -e "s!@GENTOO_SOCK_PATH@!var/run/mysqld!g" \ 373 -e "s!@GENTOO_SOCK_PATH@!var/run/mysqld!g" \
366 "${S}/server-tools/instance-manager/Makefile.am" 374 "${S}/server-tools/instance-manager/Makefile.am"
367 375
368 if mysql_version_is_at_least "4.01.00.00" ; then 376 if mysql_version_is_at_least "4.01.00.00" ; then
369 # Remove what needs to be recreated, so we're sure it's actually done 377 # Remove what needs to be recreated, so we're sure it's actually done
390 pushd "${d}" &>/dev/null 398 pushd "${d}" &>/dev/null
391 AT_GNUCONF_UPDATE="yes" eautoreconf 399 AT_GNUCONF_UPDATE="yes" eautoreconf
392 popd &>/dev/null 400 popd &>/dev/null
393 done 401 done
394 402
395 # TODO: berkdb in MySQL 5.1 needs to be worked on 403 # Berkeley DB has been removed in MySQL 5.1
396 if useq "berkdb" \ 404 if useq "berkdb" \
397 && ! mysql_check_version_range "4.00.00.00 to 4.00.99.99" \
398 && ! mysql_check_version_range "5.01.00.00 to 5.01.08.99" ; then 405 && mysql_check_version_range "4.01.00.00 to 5.00.99.99" ; then
399 [[ -w "${bdbdir}/ltmain.sh" ]] && cp -f "ltmain.sh" "${bdbdir}/ltmain.sh" 406 [[ -w "${bdbdir}/ltmain.sh" ]] && cp -f "ltmain.sh" "${bdbdir}/ltmain.sh"
400 pushd "${bdbdir}" \ 407 pushd "${bdbdir}" \
401 && sh s_all \ 408 && sh s_all \
402 || die "Failed bdb reconfigure" \ 409 || die "Failed bdb reconfigure" \
403 &>/dev/null 410 &>/dev/null
484 491
485 # The following fix is due to a bug with bdb on SPARC's. See: 492 # The following fix is due to a bug with bdb on SPARC's. See:
486 # http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8 493 # http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8
487 # It comes down to non-64-bit safety problems. 494 # It comes down to non-64-bit safety problems.
488 if useq "sparc" || useq "alpha" || useq "hppa" || useq "mips" || useq "amd64" ; then 495 if useq "sparc" || useq "alpha" || useq "hppa" || useq "mips" || useq "amd64" ; then
489 ewarn "bdb berkeley-db disabled due to incompatible arch" 496 elog "Berkeley DB support was disabled due to incompatible arch"
490 myconf="${myconf} --without-berkeley-db" 497 myconf="${myconf} --without-berkeley-db"
491 else 498 else
492 # TODO: berkdb in MySQL 5.1 needs to be worked on 499 # TODO: berkdb in MySQL 5.1 needs to be worked on
493 if useq "berkdb" && ! mysql_check_version_range "5.01.00.00 to 5.01.08.99" ; then 500 if useq "berkdb" && ! mysql_check_version_range "5.01.00.00 to 5.01.08.99" ; then
494 myconf="${myconf} --with-berkeley-db=./bdb" 501 myconf="${myconf} --with-berkeley-db=./bdb"
550 557
551 # http://dev.mysql.com/doc/mysql/en/federated-storage-engine.html 558 # http://dev.mysql.com/doc/mysql/en/federated-storage-engine.html
552 # http://dev.mysql.com/doc/mysql/en/federated-description.html 559 # http://dev.mysql.com/doc/mysql/en/federated-description.html
553 # http://dev.mysql.com/doc/mysql/en/federated-limitations.html 560 # http://dev.mysql.com/doc/mysql/en/federated-limitations.html
554 if mysql_version_is_at_least "5.00.03.00" ; then 561 if mysql_version_is_at_least "5.00.03.00" ; then
555 einfo "Before using the Federated storage engine, please be sure to read" 562 elog "Before using the Federated storage engine, please be sure to read"
556 einfo "http://dev.mysql.com/doc/mysql/en/federated-limitations.html" 563 elog "http://dev.mysql.com/doc/mysql/en/federated-limitations.html"
557 myconf="${myconf} --with-federated-storage-engine" 564 myconf="${myconf} --with-federated-storage-engine"
558 fi 565 fi
559 566
560 # http://dev.mysql.com/doc/refman/5.1/en/partitioning-overview.html 567 # http://dev.mysql.com/doc/refman/5.1/en/partitioning-overview.html
561 if mysql_version_is_at_least "5.01.00.00" ; then 568 if mysql_version_is_at_least "5.01.00.00" ; then
568 && myconf="${myconf} --with-max-indexes=128" 575 && myconf="${myconf} --with-max-indexes=128"
569 576
570 mysql_version_is_at_least "5.01.05.00" \ 577 mysql_version_is_at_least "5.01.05.00" \
571 && myconf="${myconf} --with-row-based-replication" 578 && myconf="${myconf} --with-row-based-replication"
572 579
573 # TODO: Rechek again later, there were problems with assembler enabled 580 # TODO: Recheck again later, there were problems with assembler enabled
574 # and some combination of USE flags with MySQL 5.1 581 # and some combinations of USE flags with MySQL 5.1
575 if mysql_check_version_range "5.01.00.00 to 5.01.08.99" ; then 582 if mysql_check_version_range "5.01.00.00 to 5.01.08.99" ; then
576 myconf="${myconf} --disable-assembler" 583 myconf="${myconf} --disable-assembler"
577 else 584 else
578 myconf="${myconf} --enable-assembler" 585 myconf="${myconf} --enable-assembler"
579 fi 586 fi
586 593
587 append-flags "-fno-exceptions -fno-strict-aliasing" 594 append-flags "-fno-exceptions -fno-strict-aliasing"
588 CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti" 595 CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti"
589 mysql_version_is_at_least "5.00.00.00" \ 596 mysql_version_is_at_least "5.00.00.00" \
590 && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" 597 && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
591 export CXXFLAGS="${CXXFLAGS}" 598 export CXXFLAGS
592 599
593 econf \ 600 econf \
594 --libexecdir="/usr/sbin" \ 601 --libexecdir="/usr/sbin" \
595 --sysconfdir="${MY_SYSCONFDIR}" \ 602 --sysconfdir="${MY_SYSCONFDIR}" \
596 --localstatedir="${MY_LOCALSTATEDIR}" \ 603 --localstatedir="${MY_LOCALSTATEDIR}" \
604 --enable-thread-safe-client \ 611 --enable-thread-safe-client \
605 --with-comment="Gentoo Linux ${PF}" \ 612 --with-comment="Gentoo Linux ${PF}" \
606 --with-unix-socket-path="/var/run/mysqld/mysqld.sock" \ 613 --with-unix-socket-path="/var/run/mysqld/mysqld.sock" \
607 --without-readline \ 614 --without-readline \
608 --without-docs \ 615 --without-docs \
609 ${myconf} || die "bad ./configure" 616 ${myconf} || die "econf failed"
610 617
611 # TODO: Move this before autoreconf !!! 618 # TODO: Move this before autoreconf !!!
612 find . -type f -name Makefile -print0 \ 619 find . -type f -name Makefile -print0 \
613 | xargs -0 -n100 sed -i \ 620 | xargs -0 -n100 sed -i \
614 -e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|' 621 -e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
615 622
616 emake || die "compile problem" 623 emake || die "emake failed"
617} 624}
618 625
619mysql_src_install() { 626mysql_src_install() {
620 # Make sure the vars are correctly initialized 627 # Make sure the vars are correctly initialized
621 mysql_init_vars 628 mysql_init_vars
622 629
623 make install DESTDIR="${D}" benchdir_root="${MY_SHAREDSTATEDIR}" || die "make install error" 630 emake install DESTDIR="${D}" benchdir_root="${MY_SHAREDSTATEDIR}" || die "emake install failed"
624 631
625 insinto "${MY_INCLUDEDIR}" 632 insinto "${MY_INCLUDEDIR}"
626 doins "${MY_INCLUDEDIR}"/my_{config,dir}.h 633 doins "${MY_INCLUDEDIR}"/my_{config,dir}.h
627 634
628 # Convenience links 635 # Convenience links
735 chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql* 742 chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql*
736 743
737 if ! useq "minimal" ; then 744 if ! useq "minimal" ; then
738 # Your friendly public service announcement ... 745 # Your friendly public service announcement ...
739 einfo 746 einfo
740 einfo "You might want to run:" 747 elog "You might want to run:"
741 einfo "\"emerge --config =${CATEGORY}/${PF}\"" 748 elog "\"emerge --config =${CATEGORY}/${PF}\""
742 einfo "if this is a new install." 749 elog "if this is a new install."
743 einfo 750 einfo
744 mysql_version_is_at_least "5.01.00.00" \ 751 mysql_version_is_at_least "5.01.00.00" \
745 || einfo "InnoDB is *not* optional as of MySQL-4.0.24, at the request of upstream." 752 || elog "InnoDB is *not* optional as of MySQL-4.0.24, at the request of upstream."
746 fi 753 fi
747 useq "berkdb" && ewarn "Berkley DB support is deprecated and will be removed in future versions" 754 useq "berkdb" && elog "Berkeley DB support is deprecated and will be removed in future versions!"
748} 755}
749 756
750mysql_pkg_config() { 757mysql_pkg_config() {
751 # Make sure the vars are correctly initialized 758 # Make sure the vars are correctly initialized
752 mysql_init_vars 759 mysql_init_vars

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20