Skip to content

Commit

Permalink
dev-db/percona-server: small changes
Browse files Browse the repository at this point in the history
- Build system will always check for dev-libs/protobuf when USE=server

- Make sure to subscribe to protobuf's subslot when USE=rocksdb

- Don't install files in /usr/share/doc/${P}/scripts -- they are
  already installed in /usr/share/mysql

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <[email protected]>
  • Loading branch information
Whissi committed Oct 16, 2018
1 parent 9f42bca commit d7f7628
Showing 1 changed file with 17 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2

EAPI="6"
MY_EXTRAS_VER="20181014-2320Z"
MY_EXTRAS_VER="20181016-1606Z"

CMAKE_MAKEFILE_GENERATOR=emake

Expand Down Expand Up @@ -92,14 +92,17 @@ COMMON_DEPEND="net-misc/curl:=
server? (
>=app-arch/lz4-0_p131:=
cjk? ( app-text/mecab:= )
numa? ( sys-process/numactl )
pam? ( virtual/pam:0= )
experimental? (
dev-libs/libevent:=
dev-libs/protobuf:=
net-libs/libtirpc:=
)
rocksdb? ( app-arch/zstd:= )
numa? ( sys-process/numactl )
pam? ( virtual/pam:0= )
rocksdb? (
app-arch/zstd:=
dev-libs/protobuf:=
)
tokudb? (
app-arch/snappy:=
app-arch/xz-utils:=
Expand All @@ -121,8 +124,10 @@ COMMON_DEPEND="net-misc/curl:=
"
DEPEND="${COMMON_DEPEND}
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
dev-libs/protobuf
virtual/yacc
server? (
dev-libs/libevent
experimental? ( net-libs/rpcsvc-proto )
)
static? ( sys-libs/ncurses[static-libs] )
Expand Down Expand Up @@ -279,9 +284,9 @@ pkg_postinst() {
# Note about configuration change
einfo
elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
elog "to several files in /etc/mysql/${PN}.d."
elog "to several files in /etc/mysql/mysql.d."
elog "Please backup any changes you made to /etc/mysql/my.cnf"
elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
elog "You may have as many files as needed and they are read alphabetically."
elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
einfo
Expand Down Expand Up @@ -323,11 +328,11 @@ src_prepare() {
# Remove bundled libs so we cannot accidentally use them
# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
rm -rv \
"${S}"/libevent \
"${S}"/zlib \
"${S}"/extra/protobuf \
"${S}"/libevent \
"${S}"/storage/rocksdb/third_party \
"${S}"/storage/tokudb/PerconaFT/third_party \
"${S}"/zlib \
|| die

# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
Expand Down Expand Up @@ -773,31 +778,21 @@ multilib_src_install_all() {
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
"${FILESDIR}/${mycnf_src}" \
> "${TMPDIR}/my.cnf.ok" || die

if use prefix ; then
sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
"${TMPDIR}/my.cnf.ok" || die
fi

if use latin1 ; then
sed -i \
-e "/character-set/s|utf8|latin1|g" \
"${TMPDIR}/my.cnf.ok" || die
fi
eprefixify "${TMPDIR}/my.cnf.ok"
newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf

einfo "Including support files and sample configurations"
docinto "support-files"
local script
for script in \
"${S}"/support-files/magic
do
[[ -f "$script" ]] && dodoc "${script}"
done
eprefixify "${TMPDIR}/my.cnf.ok"

docinto "scripts"
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf

if use tokudb ; then
# Remove some unwanted files
Expand All @@ -810,12 +805,6 @@ multilib_src_install_all() {
fi
fi

if ! use client-libs ; then
rm -rv \
"${ED%/}"/usr/$(get_libdir)/pkgconfig \
|| die
fi

#Remove mytop if perl is not selected
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
}
Expand Down

0 comments on commit d7f7628

Please sign in to comment.