Lines 81-86
Link Here
|
81 |
# AND in the re-merged mysql-5.0.82 and newer |
81 |
# AND in the re-merged mysql-5.0.82 and newer |
82 |
if [ "${PN}" == "mysql-community" ]; then |
82 |
if [ "${PN}" == "mysql-community" ]; then |
83 |
MYSQL_COMMUNITY_FEATURES=1 |
83 |
MYSQL_COMMUNITY_FEATURES=1 |
|
|
84 |
elif [ "${PN}" == "mariadb" ]; then |
85 |
MYSQL_COMMUNITY_FEATURES=1 |
86 |
SERVER_URI="http://launchpad.net/maria/$(get_version_component_range 1-2 ${PV})/ongoing/+download/mariadb-$(replace_version_separator 3 '-').tar.gz" |
84 |
elif [ "${PV#5.0}" != "${PV}" ] && mysql_version_is_at_least "5.0.82"; then |
87 |
elif [ "${PV#5.0}" != "${PV}" ] && mysql_version_is_at_least "5.0.82"; then |
85 |
MYSQL_COMMUNITY_FEATURES=1 |
88 |
MYSQL_COMMUNITY_FEATURES=1 |
86 |
elif [ "${PV#5.1}" != "${PV}" ] && mysql_version_is_at_least "5.1.28"; then |
89 |
elif [ "${PV#5.1}" != "${PV}" ] && mysql_version_is_at_least "5.1.28"; then |
Lines 111-119
Link Here
|
111 |
>=sys-libs/zlib-1.2.3" |
114 |
>=sys-libs/zlib-1.2.3" |
112 |
|
115 |
|
113 |
# Having different flavours at the same time is not a good idea |
116 |
# Having different flavours at the same time is not a good idea |
114 |
for i in "" "-community" ; do |
117 |
for i in "mysql" "mysql-community" "mariadb" ; do |
115 |
[[ "${i}" == ${PN#mysql} ]] || |
118 |
[[ "${i}" == ${PN} ]] || |
116 |
DEPEND="${DEPEND} !dev-db/mysql${i}" |
119 |
DEPEND="${DEPEND} !dev-db/${i}" |
117 |
done |
120 |
done |
118 |
|
121 |
|
119 |
RDEPEND="${DEPEND} |
122 |
RDEPEND="${DEPEND} |
Lines 128-133
Link Here
|
128 |
mysql_version_is_at_least "5.1.12" \ |
131 |
mysql_version_is_at_least "5.1.12" \ |
129 |
&& DEPEND="${DEPEND} >=dev-util/cmake-2.4.3" |
132 |
&& DEPEND="${DEPEND} >=dev-util/cmake-2.4.3" |
130 |
|
133 |
|
|
|
134 |
[ "${PN}" == "mariadb" ] \ |
135 |
&& DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )" |
136 |
|
131 |
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL |
137 |
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL |
132 |
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" |
138 |
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" |
133 |
|
139 |
|
Lines 156-169
Link Here
|
156 |
http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" |
162 |
http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" |
157 |
|
163 |
|
158 |
# PBXT engine |
164 |
# PBXT engine |
159 |
mysql_version_is_at_least "5.1.12" \ |
165 |
mysql_version_is_at_least "5.1.12" && [ "${PN}" != "mariadb" ] \ |
160 |
&& [[ -n "${PBXT_VERSION}" ]] \ |
166 |
&& [[ -n "${PBXT_VERSION}" ]] \ |
161 |
&& PBXT_P="pbxt-${PBXT_VERSION}" \ |
167 |
&& PBXT_P="pbxt-${PBXT_VERSION}" \ |
162 |
&& PBXT_SRC_URI="mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \ |
168 |
&& PBXT_SRC_URI="mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \ |
163 |
&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" |
169 |
&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" |
164 |
|
170 |
|
165 |
# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set |
171 |
# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set |
166 |
mysql_version_is_at_least "5.1.26" \ |
172 |
mysql_version_is_at_least "5.1.26" && [ "${PN}" != "mariadb" ] \ |
167 |
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \ |
173 |
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \ |
168 |
&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \ |
174 |
&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \ |
169 |
&& XTRADB_SRC_URI="http://www.percona.com/${PN}/xtradb/${PERCONA_VER}/source/${XTRADB_P}.tar.gz" \ |
175 |
&& XTRADB_SRC_URI="http://www.percona.com/${PN}/xtradb/${PERCONA_VER}/source/${XTRADB_P}.tar.gz" \ |
Lines 190-206
Link Here
|
190 |
mysql_version_is_at_least "5.1" \ |
196 |
mysql_version_is_at_least "5.1" \ |
191 |
|| IUSE="${IUSE} berkdb" |
197 |
|| IUSE="${IUSE} berkdb" |
192 |
|
198 |
|
193 |
mysql_version_is_at_least "5.1.12" \ |
199 |
mysql_version_is_at_least "5.1.12" && [ "${PN}" != "mariadb" ] \ |
194 |
&& [[ -n "${PBXT_VERSION}" ]] \ |
200 |
&& [[ -n "${PBXT_VERSION}" ]] \ |
195 |
&& IUSE="${IUSE} pbxt" |
201 |
&& IUSE="${IUSE} pbxt" |
196 |
|
202 |
|
197 |
mysql_version_is_at_least "5.1.26" \ |
203 |
#MariaDB includes XtraDB by default and cannot be disabled |
|
|
204 |
mysql_version_is_at_least "5.1.26" && [ "${PN}" != "mariadb" ] \ |
198 |
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \ |
205 |
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \ |
199 |
&& IUSE="${IUSE} xtradb" |
206 |
&& IUSE="${IUSE} xtradb" |
200 |
|
207 |
|
201 |
[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \ |
208 |
[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \ |
202 |
&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling" |
209 |
&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling" |
203 |
|
210 |
|
|
|
211 |
[ "${PN}" == "mariadb" ] \ |
212 |
&& IUSE="${IUSE} maria-tmp-tables pbxt libevent" |
213 |
|
204 |
# |
214 |
# |
205 |
# HELPER FUNCTIONS: |
215 |
# HELPER FUNCTIONS: |
206 |
# |
216 |
# |
Lines 490-498
Link Here
|
490 |
if use extraengine ; then |
500 |
if use extraengine ; then |
491 |
# like configuration=max-no-ndb, archive and example removed in 5.1.11 |
501 |
# like configuration=max-no-ndb, archive and example removed in 5.1.11 |
492 |
plugins="${plugins},archive,blackhole,example,federated,partition" |
502 |
plugins="${plugins},archive,blackhole,example,federated,partition" |
493 |
|
503 |
if [ "${PN}" != "mariadb" ] ; then |
494 |
elog "Before using the Federated storage engine, please be sure to read" |
504 |
elog "Before using the Federated storage engine, please be sure to read" |
495 |
elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" |
505 |
elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" |
|
|
506 |
else |
507 |
elog "MariaDB includes the FederatedX engine. Be sure to read" |
508 |
elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine" |
509 |
fi |
496 |
fi |
510 |
fi |
497 |
|
511 |
|
498 |
# Upstream specifically requests that InnoDB always be built. |
512 |
# Upstream specifically requests that InnoDB always be built. |
Lines 508-513
Link Here
|
508 |
plugins="${plugins},falcon" |
522 |
plugins="${plugins},falcon" |
509 |
fi |
523 |
fi |
510 |
|
524 |
|
|
|
525 |
if [ "${PN}" == "mariadb" ] ; then |
526 |
plugins="${plugins},maria" |
527 |
if use pbxt ; then |
528 |
plugins="${plugins},pbxt" |
529 |
else |
530 |
myconf="${myconf} --without-plugin-pbxt" |
531 |
fi |
532 |
myconf="${myconf} $(use_with maria-tmp-tables) $(use_with libevent)" |
533 |
fi |
534 |
|
511 |
myconf="${myconf} --with-plugins=${plugins}" |
535 |
myconf="${myconf} --with-plugins=${plugins}" |
512 |
} |
536 |
} |
513 |
|
537 |
|
Lines 659-664
Link Here
|
659 |
|
683 |
|
660 |
local rebuilddirlist d |
684 |
local rebuilddirlist d |
661 |
|
685 |
|
|
|
686 |
if [ "${PN}" != "mariadb" ] ; then |
662 |
if mysql_version_is_at_least "5.1.26" && use xtradb ; then |
687 |
if mysql_version_is_at_least "5.1.26" && use xtradb ; then |
663 |
einfo "Replacing InnoDB with Percona XtraDB" |
688 |
einfo "Replacing InnoDB with Percona XtraDB" |
664 |
pushd "${S}"/storage |
689 |
pushd "${S}"/storage |
Lines 671-676
Link Here
|
671 |
ln -s "${WORKDIR}/${XTRADB_P}" "${i}" |
696 |
ln -s "${WORKDIR}/${XTRADB_P}" "${i}" |
672 |
popd |
697 |
popd |
673 |
fi |
698 |
fi |
|
|
699 |
fi |
674 |
|
700 |
|
675 |
if mysql_version_is_at_least "5.1.12" ; then |
701 |
if mysql_version_is_at_least "5.1.12" ; then |
676 |
einfo "Updating innobase cmake" |
702 |
einfo "Updating innobase cmake" |
Lines 773-779
Link Here
|
773 |
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|' |
799 |
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|' |
774 |
|
800 |
|
775 |
if [[ $EAPI == 2 ]]; then |
801 |
if [[ $EAPI == 2 ]]; then |
776 |
mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_configure |
802 |
mysql_version_is_at_least "5.1.12" && [ "${PN}" != "mariadb" ] && use pbxt && pbxt_src_configure |
777 |
fi |
803 |
fi |
778 |
} |
804 |
} |
779 |
|
805 |
|
Lines 789-795
Link Here
|
789 |
|
815 |
|
790 |
emake || die "emake failed" |
816 |
emake || die "emake failed" |
791 |
|
817 |
|
792 |
mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_compile |
818 |
mysql_version_is_at_least "5.1.12" && [ "${PN}" != "mariadb" ] && use pbxt && pbxt_src_compile |
793 |
} |
819 |
} |
794 |
|
820 |
|
795 |
# @FUNCTION: mysql_src_install |
821 |
# @FUNCTION: mysql_src_install |
Lines 801-807
Link Here
|
801 |
|
827 |
|
802 |
emake install DESTDIR="${D}" benchdir_root="${MY_SHAREDSTATEDIR}" || die "emake install failed" |
828 |
emake install DESTDIR="${D}" benchdir_root="${MY_SHAREDSTATEDIR}" || die "emake install failed" |
803 |
|
829 |
|
804 |
mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_install |
830 |
mysql_version_is_at_least "5.1.12" && [ "${PN}" != "mariadb" ] && use pbxt && pbxt_src_install |
805 |
|
831 |
|
806 |
# Convenience links |
832 |
# Convenience links |
807 |
einfo "Making Convenience links for mysqlcheck multi-call binary" |
833 |
einfo "Making Convenience links for mysqlcheck multi-call binary" |
Lines 941-947
Link Here
|
941 |
einfo |
967 |
einfo |
942 |
fi |
968 |
fi |
943 |
|
969 |
|
944 |
if mysql_version_is_at_least "5.1.12" && use pbxt ; then |
970 |
if mysql_version_is_at_least "5.1.12" && [ "${PN}" != "mariadb" ] && use pbxt ; then |
945 |
# TODO: explain it better |
971 |
# TODO: explain it better |
946 |
elog " mysql> INSTALL PLUGIN pbxt SONAME 'libpbxt.so';" |
972 |
elog " mysql> INSTALL PLUGIN pbxt SONAME 'libpbxt.so';" |
947 |
elog " mysql> CREATE TABLE t1 (c1 int, c2 text) ENGINE=pbxt;" |
973 |
elog " mysql> CREATE TABLE t1 (c1 int, c2 text) ENGINE=pbxt;" |