Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 303130 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/eclass/mysql.eclass (-12 / +35 lines)
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}" == "mysql-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-117 Link Here
111
		>=sys-libs/zlib-1.2.3"
113
		>=sys-libs/zlib-1.2.3"
112
114
113
# Having different flavours at the same time is not a good idea
115
# Having different flavours at the same time is not a good idea
114
for i in "" "-community" ; do
116
for i in "" "-community" "-mariadb"; do
115
	[[ "${i}" == ${PN#mysql} ]] ||
117
	[[ "${i}" == ${PN#mysql} ]] ||
116
	DEPEND="${DEPEND} !dev-db/mysql${i}"
118
	DEPEND="${DEPEND} !dev-db/mysql${i}"
117
done
119
done
Lines 156-169 Link Here
156
		http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
158
		http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
157
159
158
# PBXT engine
160
# PBXT engine
159
mysql_version_is_at_least "5.1.12" \
161
mysql_version_is_at_least "5.1.12" && [ "${PN#mysql-}" != "mariadb" ] \
160
&& [[ -n "${PBXT_VERSION}" ]] \
162
&& [[ -n "${PBXT_VERSION}" ]] \
161
&& PBXT_P="pbxt-${PBXT_VERSION}" \
163
&& PBXT_P="pbxt-${PBXT_VERSION}" \
162
&& PBXT_SRC_URI="mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \
164
&& PBXT_SRC_URI="mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \
163
&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )"
165
&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )"
164
166
165
# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set
167
# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set
166
mysql_version_is_at_least "5.1.26" \
168
mysql_version_is_at_least "5.1.26" && [ "${PN#mysql-}" != "mariadb" ] \
167
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
169
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
168
&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \
170
&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \
169
&& XTRADB_SRC_URI="http://www.percona.com/${PN}/xtradb/${PERCONA_VER}/source/${XTRADB_P}.tar.gz" \
171
&& 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" \
192
mysql_version_is_at_least "5.1" \
191
|| IUSE="${IUSE} berkdb"
193
|| IUSE="${IUSE} berkdb"
192
194
193
mysql_version_is_at_least "5.1.12" \
195
mysql_version_is_at_least "5.1.12" && [ "${PN#mysql-}" != "mariadb" ] \
194
&& [[ -n "${PBXT_VERSION}" ]] \
196
&& [[ -n "${PBXT_VERSION}" ]] \
195
&& IUSE="${IUSE} pbxt"
197
&& IUSE="${IUSE} pbxt"
196
198
197
mysql_version_is_at_least "5.1.26" \
199
#MariaDB includes XtraDB by default and cannot be disabled
200
mysql_version_is_at_least "5.1.26" && [ "${PN#mysql-}" != "mariadb" ] \
198
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
201
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
199
&& IUSE="${IUSE} xtradb"
202
&& IUSE="${IUSE} xtradb"
200
203
201
[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \
204
[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \
202
&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling"
205
&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling"
203
206
207
[ "${PN#mysql-}" == "mariadb" ] \
208
&& IUSE="${IUSE} maria-tmp-tables pbxt libevent"
209
204
#
210
#
205
# HELPER FUNCTIONS:
211
# HELPER FUNCTIONS:
206
#
212
#
Lines 490-498 Link Here
490
	if use extraengine ; then
496
	if use extraengine ; then
491
		# like configuration=max-no-ndb, archive and example removed in 5.1.11
497
		# like configuration=max-no-ndb, archive and example removed in 5.1.11
492
		plugins="${plugins},archive,blackhole,example,federated,partition"
498
		plugins="${plugins},archive,blackhole,example,federated,partition"
493
499
		if [ "${PN#mysql-}" = "mariadb" ] ; then
494
		elog "Before using the Federated storage engine, please be sure to read"
500
			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"
501
			elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
502
		else
503
			elog "MariaDB includes the FederatedX engine. Be sure to read"
504
			elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine"
505
		fi
496
	fi
506
	fi
497
507
498
	# Upstream specifically requests that InnoDB always be built.
508
	# Upstream specifically requests that InnoDB always be built.
Lines 508-513 Link Here
508
		plugins="${plugins},falcon"
518
		plugins="${plugins},falcon"
509
	fi
519
	fi
510
520
521
	if [ "${PN#mysql-}" == "mariadb" ] ; then
522
		plugins="${plugins},maria"
523
		if use pbxt ; then
524
			plugins="${plugins},pbxt"
525
		else
526
			myconf="${myconf} --without-plugin-pbxt"
527
		fi
528
		myconf="${myconf} $(use_with maria-tmp-tables) $(use_with libevent)"
529
	fi
530
511
	myconf="${myconf} --with-plugins=${plugins}"
531
	myconf="${myconf} --with-plugins=${plugins}"
512
}
532
}
513
533
Lines 659-664 Link Here
659
679
660
	local rebuilddirlist d
680
	local rebuilddirlist d
661
681
682
	if  [ "${PN}" != "mysql-mariadb" ] ; then 
662
	if mysql_version_is_at_least "5.1.26" && use xtradb ; then
683
	if mysql_version_is_at_least "5.1.26" && use xtradb ; then
663
		einfo "Replacing InnoDB with Percona XtraDB"
684
		einfo "Replacing InnoDB with Percona XtraDB"
664
		pushd "${S}"/storage
685
		pushd "${S}"/storage
Lines 671-676 Link Here
671
		ln -s "${WORKDIR}/${XTRADB_P}" "${i}"
692
		ln -s "${WORKDIR}/${XTRADB_P}" "${i}"
672
		popd
693
		popd
673
	fi
694
	fi
695
	fi
674
696
675
	if mysql_version_is_at_least "5.1.12" ; then
697
	if mysql_version_is_at_least "5.1.12" ; then
676
		einfo "Updating innobase cmake"
698
		einfo "Updating innobase cmake"
Lines 773-779 Link Here
773
	-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
795
	-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
774
796
775
	if [[ $EAPI == 2 ]]; then
797
	if [[ $EAPI == 2 ]]; then
776
		mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_configure
798
		mysql_version_is_at_least "5.1.12" && [ "${PN#mysql-}" != "mariadb" ] && use pbxt && pbxt_src_configure
777
	fi
799
	fi
778
}
800
}
779
801
Lines 789-795 Link Here
789
811
790
	emake || die "emake failed"
812
	emake || die "emake failed"
791
813
792
	mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_compile
814
	mysql_version_is_at_least "5.1.12" && [ "${PN#mysql-}" != "mariadb" ] && use pbxt && pbxt_src_compile
793
}
815
}
794
816
795
# @FUNCTION: mysql_src_install
817
# @FUNCTION: mysql_src_install
Lines 801-807 Link Here
801
823
802
	emake install DESTDIR="${D}" benchdir_root="${MY_SHAREDSTATEDIR}" || die "emake install failed"
824
	emake install DESTDIR="${D}" benchdir_root="${MY_SHAREDSTATEDIR}" || die "emake install failed"
803
825
804
	mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_install
826
	mysql_version_is_at_least "5.1.12" && [ "${PN#mysql-}" != "mariadb" ] && use pbxt && pbxt_src_install
805
827
806
	# Convenience links
828
	# Convenience links
807
	einfo "Making Convenience links for mysqlcheck multi-call binary"
829
	einfo "Making Convenience links for mysqlcheck multi-call binary"
Lines 941-947 Link Here
941
		einfo
963
		einfo
942
	fi
964
	fi
943
965
944
	if mysql_version_is_at_least "5.1.12" && use pbxt ; then
966
	if mysql_version_is_at_least "5.1.12" && [ "${PN#mysql-}" != "mariadb" ] && use pbxt ; then
945
		# TODO: explain it better
967
		# TODO: explain it better
946
		elog "    mysql> INSTALL PLUGIN pbxt SONAME 'libpbxt.so';"
968
		elog "    mysql> INSTALL PLUGIN pbxt SONAME 'libpbxt.so';"
947
		elog "    mysql> CREATE TABLE t1 (c1 int, c2 text) ENGINE=pbxt;"
969
		elog "    mysql> CREATE TABLE t1 (c1 int, c2 text) ENGINE=pbxt;"

Return to bug 303130