| 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.32 2006/05/31 20:45:49 chtekk Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.33 2006/08/31 21:37:03 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 |
| … | |
… | |
| 49 | MY_FIXED_PV="${PV/_alpha/}" |
49 | MY_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 | |
| 53 | # Define correct SRC_URIs |
53 | # Define correct SRC_URIs |
| 54 | SRC_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/${P/_/-}.tar.gz" |
54 | SRC_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/${P/_/-}${MYSQL_RERELEASE}.tar.gz" |
| 55 | if [[ -n "${MYSQL_PATCHSET_REV}" ]] ; then |
55 | if [[ -n "${MYSQL_PATCHSET_REV}" ]] ; then |
| 56 | MYSQL_PATCHSET_FILENAME="${PN}-patchset-${MY_FIXED_PV}-r${MYSQL_PATCHSET_REV}.tar.bz2" |
56 | 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 |
57 | # We add the Gentoo mirror here, as we only use primaryuri for the MySQL tarball |
| 58 | SRC_URI="${SRC_URI} mirror://gentoo/${MYSQL_PATCHSET_FILENAME} http://gentoo.longitekk.com/${MYSQL_PATCHSET_FILENAME}" |
58 | SRC_URI="${SRC_URI} mirror://gentoo/${MYSQL_PATCHSET_FILENAME} http://gentoo.longitekk.com/${MYSQL_PATCHSET_FILENAME}" |
| 59 | fi |
59 | fi |
| … | |
… | |
| 169 | # Initialize the proper variables first |
169 | # Initialize the proper variables first |
| 170 | mysql_init_vars |
170 | mysql_init_vars |
| 171 | |
171 | |
| 172 | unpack ${A} |
172 | unpack ${A} |
| 173 | |
173 | |
| 174 | mv -f "${WORKDIR}/${P/_/-}" "${S}" |
174 | mv -f "${WORKDIR}/${P/_/-}${MYSQL_RERELEASE}" "${S}" |
| 175 | cd "${S}" |
175 | cd "${S}" |
| 176 | |
176 | |
| 177 | # Apply the patches for this MySQL version |
177 | # Apply the patches for this MySQL version |
| 178 | if [[ -d "${WORKDIR}/${MY_FIXED_PV}" ]] ; then |
178 | if [[ -d "${WORKDIR}/${MY_FIXED_PV}" ]] ; then |
| 179 | EPATCH_SOURCE="${WORKDIR}/${MY_FIXED_PV}" EPATCH_SUFFIX="patch" epatch |
179 | EPATCH_SOURCE="${WORKDIR}/${MY_FIXED_PV}" EPATCH_SUFFIX="patch" epatch |