update eclass to the new package based externel storage engine system
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mysql@1573 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
parent
f52fc1b455
commit
89aa027b20
@ -77,11 +77,10 @@ PDEPEND="${PDEPEND} =virtual/mysql-$(get_version_component_range 1-2 ${PV})"
|
||||
# Work out the default SERVER_URI correctly
|
||||
if [ -z "${SERVER_URI}" ]; then
|
||||
# The community build is on the mirrors
|
||||
if [ "${PN}" == "mysql-community" ]; then
|
||||
if [ "${PN}" == "mysql" ]; then
|
||||
SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz"
|
||||
elif [ "${PN}" == "mysql-community" ]; then
|
||||
SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz"
|
||||
# The enterprise source is on the primary site only
|
||||
elif [ "${PN}" == "mysql" ]; then
|
||||
SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${PV//_/-}.tar.gz"
|
||||
# The maria source is on launchpad
|
||||
elif [ "${PN}" == "mysql-mariadb" ]; then
|
||||
SERVER_URI="http://launchpad.net/maria/${PV%.*}/ongoing/+download/mysql-${PV//_/-maria-}.tar.gz"
|
||||
@ -95,14 +94,13 @@ SRC_URI="${SERVER_URI}"
|
||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
http://ftp.mars.arge.at/mysql/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||
mysql_version_is_at_least "5.1.12" \
|
||||
&& [[ -n "${PBXT_VERSION}" ]] \
|
||||
&& SRC_URI="${SRC_URI} http://www.primebase.org/download/pbxt-${PBXT_VERSION}.tar.gz
|
||||
mirror://sourceforge/pbxt/pbxt-${PBXT_VERSION}.tar.gz"
|
||||
|
||||
mysql_version_is_at_least "5.1.22" \
|
||||
&& [[ -n "${SOLIDDB_VERSION}" ]] \
|
||||
&& SRC_URI="${SRC_URI} mirror://sourceforge/soliddb/solidmysql-${SOLIDDB_VERSION}.tar.gz"
|
||||
for str in ${MYSQL_STORAGE} ; do
|
||||
STORAGE_USE="${str/-*/}"
|
||||
SRC_URI="${SRC_URI} ${STORAGE_USE}? ( http://ftp.mars.arge.at/mysql/mysql-storage-${str}-gentoo.tar.gz )"
|
||||
STORAGE_IUSE="${STORAGE_IUSE} ${STORAGE_USE}"
|
||||
done
|
||||
|
||||
|
||||
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
|
||||
HOMEPAGE="http://www.mysql.com/"
|
||||
@ -125,21 +123,13 @@ mysql_version_is_at_least "5.0.18" \
|
||||
mysql_version_is_at_least "5.1" \
|
||||
|| IUSE="${IUSE} berkdb"
|
||||
|
||||
mysql_version_is_at_least "5.1.12" \
|
||||
&& IUSE="${IUSE} pbxt"
|
||||
|
||||
mysql_version_is_at_least "5.1.22" \
|
||||
&& IUSE="${IUSE} soliddb"
|
||||
|
||||
mysql_version_is_at_least "5.1.30" \
|
||||
&& IUSE="${IUSE} -static_mysqld -fast-mutexes"
|
||||
|
||||
mysql_version_is_at_least "5.2" \
|
||||
&& IUSE="${IUSE} falcon"
|
||||
|
||||
[[ ${PN} = mysql-mariadb ]] \
|
||||
&& IUSE="${IUSE} mariadb"
|
||||
|
||||
IUSE="${IUSE} ${STORAGE_IUSE}"
|
||||
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \
|
||||
pkg_postinst pkg_config pkg_postrm
|
||||
|
||||
@ -398,7 +388,12 @@ configure_51() {
|
||||
fi
|
||||
|
||||
# Upstream specifically requests that InnoDB always be built.
|
||||
if use xtradb ; then
|
||||
[[ -d storage/xtradb ]] && plugins="${plugins},innobase"
|
||||
[[ ! -d storage/xtradb ]] && eerror "use xtradb but no Percona xtradb plugin"
|
||||
else
|
||||
plugins="${plugins},innobase"
|
||||
fi
|
||||
|
||||
# like configuration=max-no-ndb
|
||||
if use cluster ; then
|
||||
@ -411,20 +406,13 @@ configure_51() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if use pbxt ; then
|
||||
[[ -d storage/pbxt ]] && plugins="${plugins},pbxt"
|
||||
[[ ! -d storage/pbxt ]] && eerror "use pbxt but no Primebase plugin"
|
||||
fi
|
||||
|
||||
if use soliddb ; then
|
||||
[[ -d storage/soliddb ]] && plugins="${plugins},soliddb"
|
||||
[[ ! -d storage/soliddb ]] && eerror "use soliddb but no Solid DB plugin"
|
||||
fi
|
||||
|
||||
if use mariadb ; then
|
||||
[[ -d storage/maria ]] && plugins="${plugins},maria"
|
||||
[[ ! -d storage/maria ]] && eerror "use mariadb but no Maria DB plugin"
|
||||
for str in ${STORAGE_IUSE} ; do
|
||||
#[[ ${str} = "xtradb" ]] && str="innobase"
|
||||
if use ${str} ; then
|
||||
[[ -d storage/${str} ]] && plugins="${plugins},${str}"
|
||||
[[ ! -d storage/${str} ]] && eerror "use ${str} but no ${str} plugin"
|
||||
fi
|
||||
done
|
||||
|
||||
if use falcon ; then
|
||||
[[ -d storage/falcon ]] && plugins="${plugins},falcon"
|
||||
@ -480,25 +468,14 @@ mysql_src_unpack() {
|
||||
# Initialize the proper variables first
|
||||
mysql_init_vars
|
||||
|
||||
ln -sf "${MY_SOURCEDIR}" "${WORKDIR}/mysql-storage"
|
||||
unpack ${A}
|
||||
rm -f "${WORKDIR}/mysql-storage"
|
||||
# Grab the patches
|
||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git_src_unpack
|
||||
|
||||
mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}"
|
||||
|
||||
if mysql_version_is_at_least "5.1.12" ; then
|
||||
if [ -n "${PBXT_VERSION}" ]; then
|
||||
mv -f "${WORKDIR}/pbxt-${PBXT_VERSION}" "${S}/storage/pbxt"
|
||||
fi
|
||||
fi
|
||||
|
||||
if mysql_version_is_at_least "5.1.22" ; then
|
||||
if [ -n "${SOLIDDB_VERSION}" ]; then
|
||||
mv -f "${WORKDIR}/solidmysql-${SOLIDDB_VERSION}/soliddb" "${S}/storage/soliddb"
|
||||
mv -f "${WORKDIR}/solidmysql-${SOLIDDB_VERSION}/docs" "${S}/storage/soliddb/docs"
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
|
||||
# Apply the patches for this MySQL version
|
||||
@ -516,6 +493,12 @@ mysql_src_unpack() {
|
||||
sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in"
|
||||
rm -f "scripts/mysqlbug"
|
||||
|
||||
if use xtradb ; then
|
||||
# xtradb and innobase can't exist at buildtime side by side
|
||||
rm -rf "${S}/storage/innobase"
|
||||
mv -f "${S}/storage/xtradb" "${S}/storage/innobase"
|
||||
fi
|
||||
|
||||
# Make charsets install in the right place
|
||||
find . -name 'Makefile.am' \
|
||||
-exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
|
||||
@ -567,7 +550,6 @@ mysql_src_unpack() {
|
||||
|| die "Failed bdb reconfigure"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
mysql_src_compile() {
|
||||
|
Loading…
Reference in New Issue
Block a user