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

Diff of /eclass/mysql-autotools.eclass

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

Revision 1.19 Revision 1.20
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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-autotools.eclass,v 1.19 2014/07/19 10:18:41 grobian Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.20 2014/07/29 17:59:21 robbat2 Exp $
4 4
5# @ECLASS: mysql-autotools.eclass 5# @ECLASS: mysql-autotools.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# MySQL Team <mysql-bugs@gentoo.org> 7# MySQL Team <mysql-bugs@gentoo.org>
8# Robin H. Johnson <robbat2@gentoo.org> 8# Robin H. Johnson <robbat2@gentoo.org>
375# Apply patches to the source code and remove unneeded bundled libs. 375# Apply patches to the source code and remove unneeded bundled libs.
376mysql-autotools_src_prepare() { 376mysql-autotools_src_prepare() {
377 377
378 cd "${S}" 378 cd "${S}"
379 379
380 if [[ ${MY_EXTRAS_VER} != none ]]; then
381
380 # Apply the patches for this MySQL version 382 # Apply the patches for this MySQL version
381 EPATCH_SUFFIX="patch" 383 EPATCH_SUFFIX="patch"
382 mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory" 384 mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory"
383 # Clean out old items 385 # Clean out old items
384 rm -f "${EPATCH_SOURCE}"/* 386 rm -f "${EPATCH_SOURCE}"/*
385 # Now link in right patches 387 # Now link in right patches
386 mysql_mv_patches 388 mysql_mv_patches
387 # And apply 389 # And apply
388 epatch 390 epatch
391 fi
389 392
390 # last -fPIC fixup, per bug #305873 393 # last -fPIC fixup, per bug #305873
391 i="${S}"/storage/innodb_plugin/plug.in 394 i="${S}"/storage/innodb_plugin/plug.in
392 [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" 395 [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
393 396
394 # Additional checks, remove bundled zlib 397 # Additional checks, remove bundled zlib (Cluster needs this, for static
398 # memory management in zlib, leave available for Cluster)
399 if [[ "${PN}" != "mysql-cluster" ]] ; then
395 rm -f "${S}/zlib/"*.[ch] 400 rm -f "${S}/zlib/"*.[ch]
396 sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" 401 sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in"
402 fi
397 rm -f "scripts/mysqlbug" 403 rm -f "scripts/mysqlbug"
398 404
399 # Make charsets install in the right place 405 # Make charsets install in the right place
400 find . -name 'Makefile.am' \ 406 find . -name 'Makefile.am' \
401 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; 407 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
604 -e "s!/tmp!${EPREFIX}/tmp!" \ 610 -e "s!/tmp!${EPREFIX}/tmp!" \
605 -e "s!/usr!${EPREFIX}/usr!" \ 611 -e "s!/usr!${EPREFIX}/usr!" \
606 -e "s!= /var!= ${EPREFIX}/var!" \ 612 -e "s!= /var!= ${EPREFIX}/var!" \
607 "${FILESDIR}/${mycnf_src}" \ 613 "${FILESDIR}/${mycnf_src}" \
608 > "${TMPDIR}/my.cnf.ok" 614 > "${TMPDIR}/my.cnf.ok"
609 use prefix && sed -i -e '/^user[ ]*= mysql$/d' "${TMPDIR}/my.cnf.ok" 615 use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
610 if use latin1 ; then 616 if use latin1 ; then
611 sed -i \ 617 sed -i \
612 -e "/character-set/s|utf8|latin1|g" \ 618 -e "/character-set/s|utf8|latin1|g" \
613 "${TMPDIR}/my.cnf.ok" 619 "${TMPDIR}/my.cnf.ok"
614 fi 620 fi

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.20