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
|
# Work out the default SERVER_URI correctly
|
||||||
if [ -z "${SERVER_URI}" ]; then
|
if [ -z "${SERVER_URI}" ]; then
|
||||||
# The community build is on the mirrors
|
# 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"
|
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
|
# The maria source is on launchpad
|
||||||
elif [ "${PN}" == "mysql-mariadb" ]; then
|
elif [ "${PN}" == "mysql-mariadb" ]; then
|
||||||
SERVER_URI="http://launchpad.net/maria/${PV%.*}/ongoing/+download/mysql-${PV//_/-maria-}.tar.gz"
|
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
|
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||||
http://g3nt8.org/patches/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"
|
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" \
|
for str in ${MYSQL_STORAGE} ; do
|
||||||
&& [[ -n "${SOLIDDB_VERSION}" ]] \
|
STORAGE_USE="${str/-*/}"
|
||||||
&& SRC_URI="${SRC_URI} mirror://sourceforge/soliddb/solidmysql-${SOLIDDB_VERSION}.tar.gz"
|
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."
|
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
|
||||||
HOMEPAGE="http://www.mysql.com/"
|
HOMEPAGE="http://www.mysql.com/"
|
||||||
@ -125,21 +123,13 @@ mysql_version_is_at_least "5.0.18" \
|
|||||||
mysql_version_is_at_least "5.1" \
|
mysql_version_is_at_least "5.1" \
|
||||||
|| IUSE="${IUSE} berkdb"
|
|| 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" \
|
mysql_version_is_at_least "5.1.30" \
|
||||||
&& IUSE="${IUSE} -static_mysqld -fast-mutexes"
|
&& IUSE="${IUSE} -static_mysqld -fast-mutexes"
|
||||||
|
|
||||||
mysql_version_is_at_least "5.2" \
|
mysql_version_is_at_least "5.2" \
|
||||||
&& IUSE="${IUSE} falcon"
|
&& IUSE="${IUSE} falcon"
|
||||||
|
|
||||||
[[ ${PN} = mysql-mariadb ]] \
|
IUSE="${IUSE} ${STORAGE_IUSE}"
|
||||||
&& IUSE="${IUSE} mariadb"
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \
|
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \
|
||||||
pkg_postinst pkg_config pkg_postrm
|
pkg_postinst pkg_config pkg_postrm
|
||||||
|
|
||||||
@ -398,7 +388,12 @@ configure_51() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Upstream specifically requests that InnoDB always be built.
|
# Upstream specifically requests that InnoDB always be built.
|
||||||
plugins="${plugins},innobase"
|
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
|
# like configuration=max-no-ndb
|
||||||
if use cluster ; then
|
if use cluster ; then
|
||||||
@ -411,20 +406,13 @@ configure_51() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use pbxt ; then
|
for str in ${STORAGE_IUSE} ; do
|
||||||
[[ -d storage/pbxt ]] && plugins="${plugins},pbxt"
|
#[[ ${str} = "xtradb" ]] && str="innobase"
|
||||||
[[ ! -d storage/pbxt ]] && eerror "use pbxt but no Primebase plugin"
|
if use ${str} ; then
|
||||||
fi
|
[[ -d storage/${str} ]] && plugins="${plugins},${str}"
|
||||||
|
[[ ! -d storage/${str} ]] && eerror "use ${str} but no ${str} plugin"
|
||||||
if use soliddb ; then
|
fi
|
||||||
[[ -d storage/soliddb ]] && plugins="${plugins},soliddb"
|
done
|
||||||
[[ ! -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"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use falcon ; then
|
if use falcon ; then
|
||||||
[[ -d storage/falcon ]] && plugins="${plugins},falcon"
|
[[ -d storage/falcon ]] && plugins="${plugins},falcon"
|
||||||
@ -480,25 +468,14 @@ mysql_src_unpack() {
|
|||||||
# Initialize the proper variables first
|
# Initialize the proper variables first
|
||||||
mysql_init_vars
|
mysql_init_vars
|
||||||
|
|
||||||
|
ln -sf "${MY_SOURCEDIR}" "${WORKDIR}/mysql-storage"
|
||||||
unpack ${A}
|
unpack ${A}
|
||||||
|
rm -f "${WORKDIR}/mysql-storage"
|
||||||
# Grab the patches
|
# Grab the patches
|
||||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git_src_unpack
|
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git_src_unpack
|
||||||
|
|
||||||
mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}"
|
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}"
|
cd "${S}"
|
||||||
|
|
||||||
# Apply the patches for this MySQL version
|
# 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"
|
sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in"
|
||||||
rm -f "scripts/mysqlbug"
|
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
|
# Make charsets install in the right place
|
||||||
find . -name 'Makefile.am' \
|
find . -name 'Makefile.am' \
|
||||||
-exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
|
-exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
|
||||||
@ -567,7 +550,6 @@ mysql_src_unpack() {
|
|||||||
|| die "Failed bdb reconfigure"
|
|| die "Failed bdb reconfigure"
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_src_compile() {
|
mysql_src_compile() {
|
||||||
|
Loading…
Reference in New Issue
Block a user