Sync with portage [Mon May 10 11:15:36 MSK 2021].

akrasnyh 1960
Calculate Linux 3 years ago
parent a0bbb20bd8
commit 8190b8bc0d

Binary file not shown.

Binary file not shown.

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>robbat2@gentoo.org</email>
</maintainer>
<maintainer type="project">
<email>games@gentoo.org</email>
<name>Gentoo Games Project</name>
<email>perl@gentoo.org</email>
</maintainer>
</pkgmetadata>

@ -0,0 +1,9 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit acct-group
DESCRIPTION="MogileFS group"
ACCT_GROUP_ID=231

Binary file not shown.

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>robbat2@gentoo.org</email>
</maintainer>
<maintainer type="project">
<email>perl@gentoo.org</email>
</maintainer>
</pkgmetadata>

@ -0,0 +1,13 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit acct-user
DESCRIPTION="MogileFS user"
ACCT_USER_ID=460
ACCT_USER_ENFORCE_ID=1
ACCT_USER_GROUPS=( mogile )
acct-user_add_deps

Binary file not shown.

@ -1,3 +1,2 @@
DIST speech_tools-2.1-r3-patches.tar.gz 6876 BLAKE2B 84ddc30de90459f913cc32d4338097feb35dc08c48cbda7fc47a78ee0384668828d7166a5ebb1264272a6c326afd4ff2efdf1d793bb8f33937c09d2c7cd9a2b5 SHA512 db4d656a77e3fcfc43447c11b160cf9b45f0c4ec10f2697e4357f0ec86ea56e2841f1b887493a781406975003f5d8065ffbb75eeebb79fcd9873055b52c248e3
DIST speech_tools-2.1-release.tar.gz 1681999 BLAKE2B 572e7877e195c098dd2df03cda86fe58b7a55379cd01adcc22faf5e12b8c004e8c006b852cfe88c5c20df4a0e54e357b445050cdb63088edd55714a98e3eda90 SHA512 6ef9a7dd01ede152c4dafd0b2037312d62a79d875813d74ea048899a52eee505b93ffbabef9b6c0a1d15aeadb5508fd18a2f392e85276847fe071173aec5db96
DIST speech_tools-2.5.0-release.tar.gz 1328624 BLAKE2B 445dd5a5e39c02352a850fd92de5b3852ae382a4bd013dccb3fdd46b0b22ce0bd10d089f9e860ae3d3e73a489b20b7c8b78335e57a49e40ae01b0f4997d55315 SHA512 013540a5252efb57633f442143a51bc87aac719dfb46c8f47e750322d19dac9b504f55125462a2ee74a6b0bd2661a63a1fc73a8c3c6d2886e38b136a80447fd7

@ -1,20 +0,0 @@
--- a/siod/siod.cc
+++ b/siod/siod.cc
@@ -459,7 +459,7 @@ char **siod_variable_generator(char *text,int length)
matches = walloc(char *,siod_llength(lmatches)+1);
for (l=lmatches,i=0; l; l=cdr(l),i++)
matches[i] = wstrdup(PNAME(car(l)));
- matches[i] = '\0';
+ *matches[i] = '\0';
return matches;
}
@@ -498,7 +498,7 @@ char **siod_command_generator (char *text,int length)
matches = walloc(char *,siod_llength(lmatches)+1);
for (l=lmatches,i=0; l; l=cdr(l),i++)
matches[i] = wstrdup(PNAME(car(l)));
- matches[i] = '\0';
+ *matches[i] = '\0';
return matches;
}

@ -1,120 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils epatch flag-o-matic multilib toolchain-funcs
MY_P=${P/speech-/speech_}
PATCHSET="r3"
DESCRIPTION="Speech tools for Festival Text to Speech engine"
HOMEPAGE="http://www.cstr.ed.ac.uk/projects/speech_tools/"
SRC_URI="http://www.festvox.org/packed/festival/${PV}/${MY_P}-release.tar.gz
https://dev.gentoo.org/~neurogeek/${PN}/${MY_P}-${PATCHSET}-patches.tar.gz"
LICENSE="FESTIVAL HPND BSD rc regexp-UofT"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
IUSE="nas X"
RDEPEND="
nas? ( media-libs/nas )
X? ( x11-libs/libX11
x11-libs/libXt )
>=media-libs/alsa-lib-1.0.20-r1
!<app-accessibility/festival-1.96_beta
!sys-power/powerman
>=sys-libs/ncurses-5.6-r2:0=
"
DEPEND="${RDEPEND}
virtual/pkgconfig
"
S="${WORKDIR}/speech_tools"
src_prepare() {
EPATCH_SUFFIX="patch"
epatch
sed -i -e 's,{{HORRIBLELIBARCHKLUDGE}},"/usr/$(get_libdir)",' \
main/siod_main.cc || die
#WRT bug #309983
sed -i -e "s:\(GCC_SYSTEM_OPTIONS =\).*:\1:" \
"${S}"/config/systems/sparc_SunOS5.mak || die
# Fix underlinking, bug #493204
epatch "${FILESDIR}"/${PN}-2.1-underlinking.patch
# Fix gcc7 build failure, bug #634224
epatch "${FILESDIR}"/${PN}-2.1-gcc7.patch
}
src_configure() {
local CONFIG=config/config.in
sed -i -e 's/@COMPILERTYPE@/gcc42/' ${CONFIG} || die
if use nas; then
sed -i -e "s/#.*\(INCLUDE_MODULES += NAS_AUDIO\)/\1/" \
${CONFIG} || die
fi
if ! use X; then
sed -i -e "s/-lX11 -lXt//" config/modules/esd_audio.mak || die
fi
econf
}
src_compile() {
emake -j1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" CXX_OTHER_FLAGS="${CXXFLAGS}" CC_OTHER_FLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}"
}
src_install() {
dolib.so lib/libest*.so*
dodoc "${S}"/README
dodoc "${S}"/lib/cstrutt.dtd
insinto /usr/share/doc/${PF}
doins -r lib/example_data
insinto /usr/share/speech-tools
doins -r config base_class
insinto /usr/share/speech-tools/lib
doins -r lib/siod
cd include || die
insinto /usr/include/speech-tools
doins -r *
dosym ../../include/speech-tools /usr/share/speech-tools/include
cd ../bin || die
for file in *; do
[ "${file}" = "Makefile" ] && continue
dobin ${file}
dstfile="${D}/usr/bin/${file}"
sed -i -e "s:${S}/testsuite/data:/usr/share/speech-tools/testsuite:g" \
${dstfile} || die
sed -i -e "s:${S}/bin:/usr/$(get_libdir)/speech-tools:g" \
${dstfile} || die
sed -i -e "s:${S}/main:/usr/$(get_libdir)/speech-tools:g" \
${dstfile} || die
# This just changes LD_LIBRARY_PATH
sed -i -e "s:${S}/lib:/usr/$(get_libdir):g" ${dstfile} || die
done
cd "${S}" || die
exeinto /usr/$(get_libdir)/speech-tools
for file in `find main -perm /111 -type f`; do
doexe ${file}
done
#Remove /usr/bin/resynth as it is broken. See bug #253556
rm "${D}/usr/bin/resynth" || die
# Remove bcat (only useful for testing on windows, see bug #418301).
rm "${D}/usr/bin/bcat" || die
rm "${D}/usr/$(get_libdir)/speech-tools/bcat" || die
}

@ -16,7 +16,7 @@ S="${WORKDIR}/speech_tools"
LICENSE="FESTIVAL HPND BSD rc regexp-UofT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
IUSE="nas openmp X"
RDEPEND="

Binary file not shown.

@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -19,7 +19,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
>=x11-libs/gtk+-3.10.0:3
>=dev-libs/libreport-2.0.20[python,${PYTHON_USEDEP}]
>=dev-libs/libreport-2.0.20:0=[python,${PYTHON_USEDEP}]
>=app-admin/abrt-2.10.10-r1
>=dev-python/pygobject-3.29.1:3[${PYTHON_USEDEP}]
>=dev-python/pyxdg-0.19[${PYTHON_USEDEP}]

@ -0,0 +1,18 @@
--- a/print-ar.sh
+++ b/print-ar.sh
@@ -1,7 +1,7 @@
cat warn-auto.sh
echo 'main="$1"; shift'
echo 'rm -f "$main"'
-echo 'ar cr "$main" ${1+"$@"}'
+echo '${AR} cr "$main" ${1+"$@"}'
case "`cat systype`" in
sunos-5.*) ;;
unix_sv*) ;;
@@ -10,5 +10,5 @@
dgux-*) ;;
hp-ux-*) ;;
sco*) ;;
- *) echo 'ranlib "$main"' ;;
+ *) echo '${RANLIB} "$main"' ;;
esac

@ -1,13 +1,14 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit flag-o-matic toolchain-funcs
DESCRIPTION="Small secure replacement for syslogd with automatic log rotation"
HOMEPAGE="http://smarden.org/socklog/"
SRC_URI="http://smarden.org/socklog/${P}.tar.gz"
S="${WORKDIR}/admin/${P}/src"
LICENSE="BSD"
SLOT="0"
@ -16,15 +17,16 @@ IUSE="static"
RDEPEND=">=sys-process/runit-1.4.0"
PATCHES=( "${FILESDIR}"/${PN}-2.1.0-headers.patch )
PATCHES=(
"${FILESDIR}"/${PN}-2.1.0-headers.patch
"${FILESDIR}"/${PN}-2.1.0-respect-ar-ranlib.patch
)
S=${WORKDIR}/admin/${P}/src
src_prepare() {
default
src_configure() {
use static && append-ldflags -static
echo "$(tc-getCC) ${CFLAGS} ${CPPFLAGS}" > conf-cc || die
echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS}" > conf-ld || die
tc-export AR RANLIB
}
src_install() {
@ -33,6 +35,8 @@ src_install() {
cd .. || die
dodoc package/CHANGES
dohtml doc/*.html
docinto html
dodoc doc/*.html
doman man/*
}

Binary file not shown.

@ -0,0 +1,11 @@
--- a/src/kfoldersync.cxx 2017-01-24 10:27:17.000000000 +0100
+++ b/src/kfoldersync.cxx 2021-05-08 23:52:28.891166974 +0200
@@ -173,7 +173,7 @@
{
// Connect to dbus (keep it without parent to avoid potential SIGABRT)
static const KDBusService dbus_service(KDBusService::Unique);
- connect(&dbus_service, &KDBusService::activateRequested, this, [&]{KStartupInfo::setNewStartupId(this, KStartupInfo::startupId()); KWindowSystem::forceActiveWindow(winId());}, Qt::DirectConnection);
+ connect(&dbus_service, &KDBusService::activateRequested, this, [&]{KStartupInfo::setNewStartupId(this->window()->windowHandle(), KStartupInfo::startupId()); KWindowSystem::forceActiveWindow(winId());}, Qt::DirectConnection);
// Setup toolbar
QMenu * const app_menu = new QMenu(this);

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -34,3 +34,5 @@ DEPEND="
>=kde-frameworks/kxmlgui-${KFMIN}:5
"
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}/${P}-kwindowsystem-5.82.patch" ) # downstream patch

Binary file not shown.

@ -12,11 +12,11 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Brasero"
LICENSE="GPL-2+ CC-BY-SA-3.0"
SLOT="0/3.1" # subslot is 3.suffix of libbrasero-burn3
IUSE="+css +introspection +libburn mp3 nautilus packagekit playlist test tracker"
IUSE="+css +introspection +libburn mp3 nautilus playlist test tracker"
RESTRICT="!test? ( test )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
COMMON_DEPEND="
DEPEND="
>=dev-libs/glib-2.29.14:2
>=x11-libs/gtk+-3:3[introspection?]
media-libs/gstreamer:1.0
@ -36,7 +36,7 @@ COMMON_DEPEND="
playlist? ( >=dev-libs/totem-pl-parser-2.29.1:= )
tracker? ( app-misc/tracker:3= )
"
RDEPEND="${COMMON_DEPEND}
RDEPEND="${DEPEND}
media-libs/gst-plugins-good:1.0
media-plugins/gst-plugins-meta:1.0[mp3?]
x11-themes/hicolor-icon-theme
@ -46,9 +46,8 @@ RDEPEND="${COMMON_DEPEND}
app-cdr/cdrtools
app-cdr/dvd+rw-tools
)
packagekit? ( app-admin/packagekit-base )
"
DEPEND="${COMMON_DEPEND}
BDEPEND="
>=dev-util/intltool-0.50
dev-util/itstool
>=dev-util/gtk-doc-am-1.12

Binary file not shown.

@ -11,7 +11,7 @@ if [[ ${PV} == 9999* ]]; then
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/certbot/certbot/archive/v${PV}.tar.gz -> certbot-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
S=${WORKDIR}/certbot-${PV}/acme
fi

@ -11,7 +11,7 @@ if [[ ${PV} == 9999* ]]; then
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-apache}/${PN%-apache}/archive/v${PV}.tar.gz -> ${PN%-apache}-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86"
KEYWORDS="amd64 ~arm64 x86"
S=${WORKDIR}/${PN%-apache}-${PV}/${PN}
fi

@ -11,7 +11,7 @@ if [[ ${PV} == 9999* ]]; then
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-nginx}/${PN%-nginx}/archive/v${PV}.tar.gz -> ${PN%-nginx}-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
KEYWORDS="amd64 ~arm ~arm64 x86"
S=${WORKDIR}/${PN%-nginx}-${PV}/${PN}
fi

@ -10,7 +10,7 @@ if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
fi
S=${WORKDIR}/${P}/${PN}

Binary file not shown.

@ -5,4 +5,7 @@
<email>vim@gentoo.org</email>
<name>Gentoo Vim Project</name>
</maintainer>
<upstream>
<changelog>https://invisible-island.net/vile/CHANGES.html</changelog>
</upstream>
</pkgmetadata>

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>vim@gentoo.org</email>
<name>Gentoo Vim Project</name>
</maintainer>
<maintainer type="project">
<email>vim@gentoo.org</email>
<name>Gentoo Vim Project</name>
</maintainer>
<upstream>
<changelog>https://invisible-island.net/vile/CHANGES.html</changelog>
</upstream>
</pkgmetadata>

Binary file not shown.

@ -0,0 +1,93 @@
From 91ad9b94bcd964adfbaa8d84d8f39304d39835d0 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner@ubuntu.com>
Date: Thu, 6 May 2021 18:16:45 +0200
Subject: [PATCH] conf: handle kernels with CAP_SETFCAP
LXC is being very clever and sometimes maps the caller's uid into the
child userns. This means that the caller can technically write fscaps
that are valid in the ancestor userns (which can be a security issue in
some scenarios) so newer kernels require CAP_SETFCAP to do this. Until
newuidmap/newgidmap are updated to account for this simply write the
mapping directly in this case.
Cc: stable-4.0
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
src/lxc/conf.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 72e21b5300..f388946970 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -2978,6 +2978,9 @@ static int lxc_map_ids_exec_wrapper(void *args)
return -1;
}
+static struct id_map *find_mapped_hostid_entry(const struct lxc_list *idmap,
+ unsigned id, enum idtype idtype);
+
int lxc_map_ids(struct lxc_list *idmap, pid_t pid)
{
int fill, left;
@@ -2991,12 +2994,22 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid)
char mapbuf[STRLITERALLEN("new@idmap") + STRLITERALLEN(" ") +
INTTYPE_TO_STRLEN(pid_t) + STRLITERALLEN(" ") +
LXC_IDMAPLEN] = {0};
- bool had_entry = false, use_shadow = false;
+ bool had_entry = false, maps_host_root = false, use_shadow = false;
int hostuid, hostgid;
hostuid = geteuid();
hostgid = getegid();
+ /*
+ * Check whether caller wants to map host root.
+ * Due to a security fix newer kernels require CAP_SETFCAP when mapping
+ * host root into the child userns as you would be able to write fscaps
+ * that would be valid in the ancestor userns. Mapping host root should
+ * rarely be the case but LXC is being clever in a bunch of cases.
+ */
+ if (find_mapped_hostid_entry(idmap, 0, ID_TYPE_UID))
+ maps_host_root = true;
+
/* If new{g,u}idmap exists, that is, if shadow is handing out subuid
* ranges, then insist that root also reserve ranges in subuid. This
* will protected it by preventing another user from being handed the
@@ -3014,7 +3027,9 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid)
else if (!gidmap)
WARN("newgidmap is lacking necessary privileges");
- if (uidmap > 0 && gidmap > 0) {
+ if (maps_host_root) {
+ INFO("Caller maps host root. Writing mapping directly");
+ } else if (uidmap > 0 && gidmap > 0) {
DEBUG("Functional newuidmap and newgidmap binary found");
use_shadow = true;
} else {
@@ -4229,14 +4244,14 @@ static struct id_map *mapped_nsid_add(const struct lxc_conf *conf, unsigned id,
return retmap;
}
-static struct id_map *find_mapped_hostid_entry(const struct lxc_conf *conf,
+static struct id_map *find_mapped_hostid_entry(const struct lxc_list *idmap,
unsigned id, enum idtype idtype)
{
struct id_map *map;
struct lxc_list *it;
struct id_map *retmap = NULL;
- lxc_list_for_each (it, &conf->id_map) {
+ lxc_list_for_each (it, idmap) {
map = it->elem;
if (map->idtype != idtype)
continue;
@@ -4265,7 +4280,7 @@ static struct id_map *mapped_hostid_add(const struct lxc_conf *conf, uid_t id,
return NULL;
/* Reuse existing mapping. */
- tmp = find_mapped_hostid_entry(conf, id, type);
+ tmp = find_mapped_hostid_entry(&conf->id_map, id, type);
if (tmp) {
memcpy(entry, tmp, sizeof(*entry));
} else {

@ -72,6 +72,7 @@ pkg_setup() {
}
PATCHES=(
"${FILESDIR}"/lxc-4.0.9-handle-kernels-with-CAP_SETFCAP.patch # bug 789012
"${FILESDIR}"/${PN}-3.0.0-bash-completion.patch
"${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch # bug 558854
)

@ -1,2 +1 @@
DIST xcpc-0.35.0.tar.gz 1058202 BLAKE2B f5002fcc69a078cd05c05a981522edd15900295136419157f997effd81a89f7452cec335bbdba0be3b303bdc8f8537d4aac255ee7cf4e9ec53cc1143413ad1c1 SHA512 667db6db33f2cab85647960edb5b1c200037bfc464527a60eca85c31549360226893853a38d98e657bde111a28aca47d9741b16b13284759b66cb6213da27458
DIST xcpc-0.36.0.tar.gz 1092363 BLAKE2B 4f799aefa417f6e2c04c0c3760c4d15b10b863f528e5051cfe90ea5a8ccb4c3f83fb592bbf510a351c02dc42a2a2a42f9fcb33b65a5e2dd997feeb5ea22f5342 SHA512 0cf6e718daf6b7db981aa607036e57eddb2ae18665393b0a691d8fd6978278ca077ae45a205eae93b6107b83d5d219702018f1afcda84ae7b83a7b6d68a68cba
DIST xcpc-0.37.0.tar.gz 1094259 BLAKE2B 670de05f53d05d375c9cb252e672f8fa9027419302b521b88dc1904ec99571fa95b390bfdc5eea3eb2355730c02a955c10cbc2f29d7e4c52506173e8f5d6c540 SHA512 8579711595ac5234c1c8a6e9d0279950c97966a2a8919d4f0ba404c5bd5609f299ab0b5131d6973f5decfc12bff184facf3009522bef568a108b5cfb7e74be11

@ -1,29 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit xdg
DESCRIPTION="XCPC is a portable Amstrad CPC 464/664/6128 emulator written in C."
HOMEPAGE="http://www.xcpc-emulator.net/doku.php/index"
SRC_URI="https://bitbucket.org/ponceto/xcpc/downloads/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
app-arch/bzip2
sys-libs/zlib
x11-libs/libX11
x11-libs/libXext
x11-libs/libXt
x11-libs/motif"
RDEPEND="${DEPEND}"
src_configure() {
econf \
--disable-athena \
--enable-motif2
}

Binary file not shown.

@ -1,2 +1,2 @@
DIST ibus-m17n-1.4.3.tar.gz 489392 BLAKE2B bd37fb1f7160d4306be008e4f27fc5852db54318e6075f0887294f7ce30406ff697f41c5cc56734cffa4605b37f28cb89b3eb04a942e6acf352be50a273bd71f SHA512 8b42bcac8662b4924f54b6fe56427b32603746a3d1b0dfafb6dfec1296ec52847119f94fabb0a276f9de5918414fdf5f7b5aceaaabd8c01632cfd677344598ab
DIST ibus-m17n-1.4.4.tar.gz 490328 BLAKE2B e7b5c417d4cc16cea736dfadc504137218397ed1ce6318dc6edc48ec33b13051b43d2f7926a959aafe79025c2af1a35374a7dcb4cb4fee952df85b25b604d07a SHA512 df8be7ceaa2183ffb377e39f52b271f18825a8970f88972d0a43ed1fa2721d36bf564a20f89311541ffe19546441322fc568c4819e42e41bdff45ee137d6de80
DIST ibus-m17n-1.4.5.tar.gz 493250 BLAKE2B a5fd4de169997dea78acf6273a7e44cefbc9ab4499cbee92c30f394ef7267c15fb1af42d45d227bc160150f35195477f9ec3d2534f9764bab4fa86c0fae046eb SHA512 64bed564d59b0992ebc8a931e0845f687c176e5336d7c7fbc1d575433eb276714615f8fee412a532ec2c8870e46d8d6c41636c984b666c92427dadbdc84838b5

@ -11,7 +11,7 @@ SRC_URI="https://github.com/ibus/${PN}/releases/download/${PV}/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
IUSE="gtk gtk2 nls"
REQUIRED_USE="gtk2? ( gtk )"

@ -11,7 +11,7 @@ SRC_URI="https://github.com/ibus/${PN}/releases/download/${PV}/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="~amd64 ~x86"
IUSE="gtk gtk2 nls"
REQUIRED_USE="gtk2? ( gtk )"

@ -0,0 +1,24 @@
https://github.com/rime/librime/issues/462
https://github.com/rime/librime/pull/463
https://github.com/rime/librime/commit/57cffcd02ac70148e21ce982be834876b3df87db
--- /src/rime/gear/script_translator.cc
+++ /src/rime/gear/script_translator.cc
@@ -8,6 +8,7 @@
//
#include <algorithm>
#include <stack>
+#include <cmath>
#include <boost/algorithm/string/join.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <rime/composition.h>
--- /src/rime/gear/table_translator.cc
+++ /src/rime/gear/table_translator.cc
@@ -6,6 +6,7 @@
//
#include <boost/algorithm/string.hpp>
#include <boost/range/adaptor/reversed.hpp>
+#include <cmath>
#include <utf8.h>
#include <rime/candidate.h>
#include <rime/common.h>

@ -1,4 +1,4 @@
# Copyright 2012-2020 Gentoo Authors
# Copyright 2012-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -43,6 +43,7 @@ DEPEND="${RDEPEND}
DOCS=(CHANGELOG.md README.md)
src_prepare() {
eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch"
eapply "${FILESDIR}/${PN}-1.6.0-plugins.patch"
# Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto.

@ -1,4 +1,4 @@
# Copyright 2012-2020 Gentoo Authors
# Copyright 2012-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -43,6 +43,7 @@ DEPEND="${RDEPEND}
DOCS=(CHANGELOG.md README.md)
src_prepare() {
eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch"
eapply "${FILESDIR}/${PN}-1.6.1-plugins.patch"
# Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto.

@ -43,6 +43,8 @@ DEPEND="${RDEPEND}
DOCS=(CHANGELOG.md README.md)
src_prepare() {
eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch"
# Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto.
sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die
rm -r thirdparty || die

Binary file not shown.

@ -1,108 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic
MY_P=${P/_/-}
DESCRIPTION="GNU Midnight Commander is a text based file manager"
HOMEPAGE="https://www.midnight-commander.org"
SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
IUSE="+edit gpm nls samba sftp +slang spell test unicode X +xdg"
REQUIRED_USE="spell? ( edit )"
RDEPEND=">=dev-libs/glib-2.26.0:2
gpm? ( sys-libs/gpm )
kernel_linux? ( sys-fs/e2fsprogs )
samba? ( net-fs/samba )
sftp? ( net-libs/libssh2 )
slang? ( >=sys-libs/slang-2 )
!slang? ( sys-libs/ncurses:0=[unicode?] )
spell? ( app-text/aspell )
X? ( x11-libs/libX11
x11-libs/libICE
x11-libs/libXau
x11-libs/libXdmcp
x11-libs/libSM )"
DEPEND="${RDEPEND}
app-arch/xz-utils
virtual/pkgconfig
nls? ( sys-devel/gettext )
test? ( dev-libs/check )
"
PATCHES=("${FILESDIR}"/${P}-shadow-crash.patch)
RESTRICT="!test? ( test )"
S="${WORKDIR}/${MY_P}"
pkg_pretend() {
if use slang && use unicode ; then
ewarn "\"unicode\" USE flag only takes effect when the \"slang\" USE flag is disabled."
fi
}
src_configure() {
[[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
local myeconfargs=(
--enable-charset
--enable-vfs
--with-homedir=$(usex xdg 'XDG' '.mc')
--with-screen=$(usex slang 'slang' "ncurses$(usex unicode 'w' '')")
$(use_enable kernel_linux vfs-undelfs)
# Today mclib does not expose any headers and is linked to
# single 'mc' binary. Thus there is no advantage of having
# a library. Let's avoid shared library altogether
# as it also conflicts with sci-libs/mc: bug #685938
--disable-mclib
$(use_enable nls)
$(use_enable samba vfs-smb)
$(use_enable sftp vfs-sftp)
$(use_enable spell aspell)
$(use_enable test tests)
$(use_with gpm gpm-mouse)
$(use_with X x)
$(use_with edit internal-edit)
)
econf "${myeconfargs[@]}"
}
src_test() {
# CK_FORK=no to avoid using fork() in check library
# as mc mocks fork() itself: bug #644462.
#
# VERBOSE=1 to make test failures contain detailed
# information.
CK_FORK=no emake check VERBOSE=1
}
src_install() {
emake DESTDIR="${D}" install
dodoc AUTHORS README NEWS
# fix bug #334383
if use kernel_linux && [[ ${EUID} == 0 ]] ; then
fowners root:tty /usr/libexec/mc/cons.saver
fperms g+s /usr/libexec/mc/cons.saver
fi
if ! use xdg ; then
sed 's@MC_XDG_OPEN="xdg-open"@MC_XDG_OPEN="/bin/false"@' \
-i "${ED}"/usr/libexec/mc/ext.d/*.sh || die
fi
}
pkg_postinst() {
elog "To enable exiting to latest working directory,"
elog "put this into your ~/.bashrc:"
elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
}

Binary file not shown.

@ -1,4 +1,2 @@
DIST nattka-0.2.11.1.tar.gz 94986 BLAKE2B fa80b514913e1752c2bb581b7d7f2dc1f9e2b7ffdf7672a61fdd2cf49ff5677cd1842949885beb9f9fd7228aa89e1e7b9091fcf77a4a7d3c71b372ba40c9edb3 SHA512 22fb3f3685fb454f768c754a2574efc4b40d1c3abaa4b8283e38a426d1f443f5328ca5c6eb2c06a7240166de36ee9e3af88623dc7ef3f14b99903177bde1cdc5
DIST nattka-0.2.11.tar.gz 93992 BLAKE2B ad088de5f96ec5f7f8b0922420d22ef507e1e79ef3bc3161e6a88cd4714f1007a000ab06a7e21245b2792fd3056474459bf424da0560b8666c5cf46f04a2d763 SHA512 5d9de9f437a15e149ce58348f40f86101c10fe1f4c4ce869e7038ba25fc212c22e024a9999a6197179a0a1e1e82380356d304841c33333e04949caaadef96db7
DIST nattka-0.2.12.tar.gz 92954 BLAKE2B c4ffd44030da0224963d7fa367336d7ab9076b17f03292f5e65b7855823b34374b8d7626c4b97c155d10797f2d550f3c20cac39f68cfbfc4b8038406f37b21b0 SHA512 f1e775895d66505b09a3098525f998f87bb1561538f0e75b993b264f87f61937d7d5c71999018fe93c683366ef81dff5b7fef1e1d44af63153003f70d7933273
DIST nattka-0.2.13.tar.gz 93917 BLAKE2B 48e5245234d0ef0fd47353bac0d971d6187f59d94c0fb58f4cce160ee28f847a8fb32f8399af3148daaac299b32b590899de716dee1ee9cf107b1efe2451189f SHA512 0d3428cb3b5dee3fcdc29b9d22b5c05d626d26060fcd5518f789493fc68e51762edf9162a9b5b19c6c08fb9cb9c0e350faa41d96c53bd924b50475176140ccdb

@ -1,37 +0,0 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1
DESCRIPTION="A New Arch Tester Toolkit -- open-source stable-bot replacement"
HOMEPAGE="https://github.com/mgorny/nattka/"
SRC_URI="https://github.com/mgorny/nattka/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-macos"
IUSE="depgraph-order"
RESTRICT="test"
RDEPEND="
dev-python/lxml[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
<dev-util/pkgcheck-0.9[${PYTHON_USEDEP}]
dev-vcs/git
<sys-apps/pkgcore-0.11.3[${PYTHON_USEDEP}]
depgraph-order? (
dev-python/networkx[${PYTHON_USEDEP}]
)"
BDEPEND="
test? (
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/vcrpy[${PYTHON_USEDEP}]
)"
distutils_enable_sphinx doc --no-autodoc
distutils_enable_tests pytest

@ -1,36 +0,0 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1
DESCRIPTION="A New Arch Tester Toolkit -- open-source stable-bot replacement"
HOMEPAGE="https://github.com/mgorny/nattka/"
SRC_URI="https://github.com/mgorny/nattka/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~x64-macos"
IUSE="depgraph-order"
RDEPEND="
dev-python/lxml[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-util/pkgcheck[${PYTHON_USEDEP}]
dev-vcs/git
sys-apps/pkgcore[${PYTHON_USEDEP}]
depgraph-order? (
dev-python/networkx[${PYTHON_USEDEP}]
)"
BDEPEND="
test? (
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/vcrpy[${PYTHON_USEDEP}]
)"
distutils_enable_sphinx doc --no-autodoc
distutils_enable_tests pytest

Binary file not shown.

@ -1,20 +1,32 @@
DIST fzf-0.25.0.tar.gz 176905 BLAKE2B fd0fa18643947428d8a7257f9aebf579e3d57fbc0216d4629ed77616d1729d2cc68514125b5de5b2e85b65b26d6c95e69942f076aa99aa27e57d4f9b778f8923 SHA512 73b65374334531ac81a64bb973cb976f4dab7c6458eb2705f323349223880294fa6238b0eeea3412ff121c5c1b70905b261ceb7994c2b00425b02c88286b36e3
DIST fzf-0.25.1.tar.gz 177955 BLAKE2B e5bb5e40ccdb36ba015196ba6e5abfff6b7c6f4b6ebc4c824d5e2c4e8107a08d49f03210732358bcbb56d1765448f8eecfe4a2e61405ebdd36984c3c54b7d818 SHA512 755046b4a8604fd3d1f2b66b967ad79cf5d4581dba1e40abed338c767d4421620df0f1f6a81a6c22c20da54dfdb1ff6847bad8f58ed83fc5e1928038c9d042f2
DIST fzf-0.27.0.tar.gz 182950 BLAKE2B 07aecedddded92af879d0ffc3e15721834cc0b2942b19cb9471b25e60c802b43bcbbbb0cfebbd6e7ea647c0654228974097a04ef7ac2428c2b1307d586249f83 SHA512 7a14a85d962a409e5008a135acb3f18d489dbd615696e925d2854e6304e289f59f573bcb267d8447ca2112087099b7115143b85f11decaa893ac2196328109ed
DIST github.com%2Fgdamore%2Fencoding%2F@v%2Fv1.0.0.mod 77 BLAKE2B 1b81c4c20a890027242b50f1566f4dfdaf120ee26d3dc56d0c2b6465df2ba79b208289eb40c3d7b666a4e7e874210f59aea545d5125c9a55c5597a3ca7f37feb SHA512 fb153c4e481c073133f0c933c67eba8a1f160ab146921f2c77125b6ff5c348cea57e3a5701a557c8db2212d32e3cba1c09b9509210660c17b66c2a45ba97cb75
DIST github.com%2Fgdamore%2Fencoding%2F@v%2Fv1.0.0.zip 19867 BLAKE2B a772206ce6dc48b32d7125a25b26694325d367ebcbad85466b2e6cfdb9fc9f0e08b98b7ecede5397344e5f7e623c4c76edcf69dcee99917adccf5b31aad80bf8 SHA512 127767c725e376b43fe4e2003ddc12fe89693d6d7e52b01e6d47d73fd04496decc0fd60b64c7a65303428e00a52ece1848610ea35231789a814187ef8503bee3
DIST github.com%2Fgdamore%2Ftcell%2F@v%2Fv1.4.0.mod 250 BLAKE2B 46093e9211011e814962ba2eafec4392948f185d27a202a8b626e16299e3a3fa4554a604933ceab584b27cca2b7a6b1f51d4e5fe10d673e875e38eca08de64ec SHA512 412dee57c525bd5a3c0ce9c482e7933814758e36ebb226a16392e648f57e280485f86e30f17be2339eed427b52e4b0b601401503d0bd324c7fa874e2fcba2b60
DIST github.com%2Fgdamore%2Ftcell%2F@v%2Fv1.4.0.zip 226363 BLAKE2B e690c6673285d12ffbf0d3ee6ff39f0bb1d072c872767c709150ef34b8ea40f0c8adc8196388a704126596051c3e1b722aae96fa54ee2baccdbca4f7683316ba SHA512 5fdd7b7b3b2826de6142d2dc0e6b19372636c4442c8878925f8c2af8bdfd2eef3c0cdbe331d0889345eb1e5a1d8c04ac80b3e46be7203d2475df86e04819af80
DIST github.com%2Flucasb-eyer%2Fgo-colorful%2F@v%2Fv1.0.3.mod 51 BLAKE2B be532e33c9a0e83b9d0b760b21d97ac83850299adb329f754f31e4b46dc7fb7a7157d2a41cdc258924ef8ee5c111a95ac3b0037d749cc936e1988a46612522cd SHA512 270b19446ac9a396f5ce7a000873928a44edb1457f86d294971dae08be37cd64ddb8edc0293e100ee60d56c504851aa69ab11db0b4cfd46649c5f79459e40011
DIST github.com%2Flucasb-eyer%2Fgo-colorful%2F@v%2Fv1.0.3.zip 442291 BLAKE2B 02ee4982a588e0fd1575206340bd97663147459664a2942edf151c4aec2bd20da83984c68c76e1c505c1ef930b77f934a8210f6c0ca106a0c0c91ff63733b92d SHA512 8e275955eb9e5034c155c6e469e2a3117bee30fbe42e8ae394f496b83f473a1568847707707716dd5a3c57dd0e0a4bb4f4cc9af04940218ce24420493e923f14
DIST github.com%2Flucasb-eyer%2Fgo-colorful%2F@v%2Fv1.2.0.mod 51 BLAKE2B be532e33c9a0e83b9d0b760b21d97ac83850299adb329f754f31e4b46dc7fb7a7157d2a41cdc258924ef8ee5c111a95ac3b0037d749cc936e1988a46612522cd SHA512 270b19446ac9a396f5ce7a000873928a44edb1457f86d294971dae08be37cd64ddb8edc0293e100ee60d56c504851aa69ab11db0b4cfd46649c5f79459e40011
DIST github.com%2Flucasb-eyer%2Fgo-colorful%2F@v%2Fv1.2.0.zip 958042 BLAKE2B 62ba67a66c0b5e159d7b12c8e32aec36f6f442411951024fe0b95fddce22c0e00d1f855f987aa39eddcb59165da582d0ee17fbf410630b6bad8424c17b85c431 SHA512 89b52255dd45791100b58a693036c772d27b26011754caa15df2badc4a93038b70060c7358aa12e01494e2f24e94533cd4ea7f7cb78686e61540383d1680ba2f
DIST github.com%2Fmattn%2Fgo-isatty%2F@v%2Fv0.0.12.mod 104 BLAKE2B a8f54d5566d54ac27763dd535705d64dddd862f32d23f234b1ffbf759cbf4aa16886c90a96198ae2f4c0d0bc892932f1b8244e8ff0f8150bb87123947d734016 SHA512 7bd9f6a38aa9a16c3569142164389d1c4046170f66b5e9044f7aaa3192e9d2e2ccec486e3bc7fbac868c9693b6d333068c1a34ccd9e79dec1746a86348951503
DIST github.com%2Fmattn%2Fgo-isatty%2F@v%2Fv0.0.12.zip 8902 BLAKE2B 7257687403b9f8f066147fdd4ee1bec7e4b02cfd3fddda8349a89d9b9ea5b93d9bef61280ed48d68adac4dfed7e382ee96886aa0d65d85406fb93dc6fe0c53b1 SHA512 79ba14a04838c509500e6098553e8aadcd7105445387160a8aa1a6d7b0e70f0e807c99036c31faf51920544da2156195174c8530e317a72728719cb0a9a66098
DIST github.com%2Fmattn%2Fgo-runewidth%2F@v%2Fv0.0.12.mod 84 BLAKE2B 9eb09ef8bbaf550ee520bdc9e35c7c221f85842959082d661425c15073001853e3b9bcf1ca1b552626f418de752f0a5542bbd76dd7f1d23ef131f4a169606e30 SHA512 939623ea34e482faf1cb055cd861471367cd69257abb28bd348efb4572ac95428330947ca0a1cac2820cc2cf7bbc6cada12623ff873d9ebc8c4af490d8237fbe
DIST github.com%2Fmattn%2Fgo-runewidth%2F@v%2Fv0.0.12.zip 20977 BLAKE2B e9a9da9c1383fd4011c9d934467ce94b00b04cdfb58faa0a531fa4b71d956b45cc1e6b9afc9011a2dad60fadd3a0c1fce7eda5de1e6eeabd53cc9f541ed48029 SHA512 05a554dc62146f8251376ec07e521594941e6f7c0173fb0c0ca48e6d9e512a92a29e059acdce83a5a0af503c0391fee4bbab57d2e256efb44b1ac137bfae59c2
DIST github.com%2Fmattn%2Fgo-runewidth%2F@v%2Fv0.0.7.mod 45 BLAKE2B a7d3b1ffaf20b96cc98161ea6756d62d8380e7557859606dc7975b3de91a2d4142932d5008caf40b41d8ff2ac1ff33f672dbfac351f3e518922a036d7c116a93 SHA512 0cfd4101dd8ed90f80b7f4ce2928cd322b93855764abae65d66c5ff9888a7c8aec6ee6581c7f05d1c80db5c78003ee2afc8537fda8a3855e2349bfb8267aba61
DIST github.com%2Fmattn%2Fgo-runewidth%2F@v%2Fv0.0.9.mod 45 BLAKE2B a7d3b1ffaf20b96cc98161ea6756d62d8380e7557859606dc7975b3de91a2d4142932d5008caf40b41d8ff2ac1ff33f672dbfac351f3e518922a036d7c116a93 SHA512 0cfd4101dd8ed90f80b7f4ce2928cd322b93855764abae65d66c5ff9888a7c8aec6ee6581c7f05d1c80db5c78003ee2afc8537fda8a3855e2349bfb8267aba61
DIST github.com%2Fmattn%2Fgo-runewidth%2F@v%2Fv0.0.9.zip 20005 BLAKE2B c0f71323efd262296b78867d2b387a74491cfae3f4498e0dd22c036b20dd6fc1b6569171eebf267effd140ec009527fa5ccbcedda4f8cebab2679582766331ea SHA512 fad08292597cbd4a359e06f85bc7cc37b3d3d84b8046e47828259e36872063069c4ab17b7c89f2a5de4b5d0ab1ca5cc66cc515847a7887339a3a04b5f44e3c92
DIST github.com%2Fmattn%2Fgo-shellwords%2F@v%2Fv1.0.10.mod 47 BLAKE2B 4a848f4f2e5cc615dfc3fc62a9523eb7b3d79244393ce8203978051a34f981b0219f13f10bbae5169e03d919404f0ed6502b39c536218f8c8c8a5492561c1112 SHA512 c1a6d910b914ceef7ffea53c61f2225ebffeba2fc87c290aebdb739bf520494e35fef046eb9ced4fc9a3767523efefcce41ef5026fe11bad97c005b8e55d96f8
DIST github.com%2Fmattn%2Fgo-shellwords%2F@v%2Fv1.0.10.zip 7653 BLAKE2B 634fa4a231f31f291e49731e9a5e5d57aa289c86ec8c8fe879e6d03a28291dac034547b6bcc239539cf67f36d6e6e6990bd4e03a92621ecdf01ec899e1c03325 SHA512 075011dfc750263fdc03e80c69feaea71db12c9af8c99b49ebb35c494f5e3ac5a4faab3bdc1530322ea38ff3eb2671f0a3871097dea918f736f757e50cb05b4f
DIST github.com%2Fmattn%2Fgo-shellwords%2F@v%2Fv1.0.11.mod 47 BLAKE2B 4a848f4f2e5cc615dfc3fc62a9523eb7b3d79244393ce8203978051a34f981b0219f13f10bbae5169e03d919404f0ed6502b39c536218f8c8c8a5492561c1112 SHA512 c1a6d910b914ceef7ffea53c61f2225ebffeba2fc87c290aebdb739bf520494e35fef046eb9ced4fc9a3767523efefcce41ef5026fe11bad97c005b8e55d96f8
DIST github.com%2Fmattn%2Fgo-shellwords%2F@v%2Fv1.0.11.zip 8916 BLAKE2B 2d3735c7229348b12148a77ab7057473bb37db5667024f481d7ba309b90e92046416e17cc4ca8db0b903eac6311716c01052c9959ca2f884ce4f9bead6a21575 SHA512 54ac2b14cc0b8cd161d6514f9ee877aaa0035edf09c883680595e49e4b572f5cf5db1f88ef5a192a32c6f14cd8e049ebd73097e7866e199a289ce4ffe2934f54
DIST github.com%2Frivo%2Funiseg%2F@v%2Fv0.1.0.mod 39 BLAKE2B c619b92efed318039eb06878b084372e8f3f45426623a9c1f045f21bf44f86347472a28a4164f607cb9fca3c253d4c9df0dd33d1dd8baaa02230af9feb8dc7f6 SHA512 d6089badd618722b8d3584965f1a10290097f259024a444744f625fe5b439fef62c7e14f060fb8593197d003ecd6c29f0cb85700de0bdfbf2511ca66729db3bc
DIST github.com%2Frivo%2Funiseg%2F@v%2Fv0.2.0.mod 39 BLAKE2B c619b92efed318039eb06878b084372e8f3f45426623a9c1f045f21bf44f86347472a28a4164f607cb9fca3c253d4c9df0dd33d1dd8baaa02230af9feb8dc7f6 SHA512 d6089badd618722b8d3584965f1a10290097f259024a444744f625fe5b439fef62c7e14f060fb8593197d003ecd6c29f0cb85700de0bdfbf2511ca66729db3bc
DIST github.com%2Frivo%2Funiseg%2F@v%2Fv0.2.0.zip 45731 BLAKE2B f4a1442027b29625c694298e10ec9c107edd8437d8749110cd56440dae791c0e6d88a68187240cbc521f79fa7bdc4307e4b3b4edad38d57d5834644342a066e0 SHA512 88f37961ebe3a1701265a2f5cb606e97fe4ddd09e36ff13ca8c026e98640af5d35cb930e4d12b6690a97e5d934705102554c6d2912ebbb5ee08976c698cce2db
DIST github.com%2Fsaracen%2Fwalker%2F@v%2Fv0.1.1.mod 104 BLAKE2B dd83516b0472a51d68d638c72db945b5640bae9fb4a81687b7c406f7bb67eb086161b99fd7f69ff13476b352c90ced4906b7a30db52a6adfbb3c862a1185a37d SHA512 21f6fea86dafb4b32ef61014700a7563e6c273fa8c23c6ce0a8776408511a8b4ab2d3391e21628054be2a94062f72aa7e9cc2f133b7ba1b2b10a758dce783d43
DIST github.com%2Fsaracen%2Fwalker%2F@v%2Fv0.1.1.zip 16956 BLAKE2B e948f2d90376ac6a14e890d4e39b035e0cfa00eec384977126adcad7e8064e6d1da57b709ac1943b67a7d94b9aca71b276effdcce1866dfa026fb5c984a6d806 SHA512 05597cd8812d21477152a021a982405d18e65884ca5658bca43bc4c933eccdc9450ec9d57a3dc6a39da72a7a7a821f5c953cbd2b35c6e04f1d757df1cb0be453
DIST github.com%2Fsaracen%2Fwalker%2F@v%2Fv0.1.2.mod 104 BLAKE2B dd83516b0472a51d68d638c72db945b5640bae9fb4a81687b7c406f7bb67eb086161b99fd7f69ff13476b352c90ced4906b7a30db52a6adfbb3c862a1185a37d SHA512 21f6fea86dafb4b32ef61014700a7563e6c273fa8c23c6ce0a8776408511a8b4ab2d3391e21628054be2a94062f72aa7e9cc2f133b7ba1b2b10a758dce783d43
DIST github.com%2Fsaracen%2Fwalker%2F@v%2Fv0.1.2.zip 17973 BLAKE2B 841f2a011bcda5fe793802c7caf80b8811cc871060259b126707647220ad12b13fb2548e2a094255fac635b4ac42dd67141fd5606a59c957e716a7c41d25c975 SHA512 805094a1745b2c20d9c6265e84f92ee9fa05a46fd93408d10e62c855985a7f2838ff9fffed61e705875eb0c49530fe9b21c7586ccba01a4b53c8f4dffba3b228
DIST golang.org%2Fx%2Fcrypto%2F@v%2Fv0.0.0-20190308221718-c2843e01d9a2.mod 88 BLAKE2B aec7d0eea1278eb3d1568d5bfb4041267501ad14457ebfcbdbc5fe21473170b8616ca4028f52af2edbfd85922cbe04540b4b0df7f69f63197698143cc5557a7a SHA512 2df49895053b36fed7ea905aa73f86568fbafd79ff0a7976679d8c77cf15025129435d9dbfd89367b611b1aadbea4f4bd1835eb4efa9ea702466e443638d379e
DIST golang.org%2Fx%2Fcrypto%2F@v%2Fv0.0.0-20190308221718-c2843e01d9a2.zip 1776515 BLAKE2B 5833fc2a16dec541a1362c9df7c02abe04a54e92e04eaafd5767c1a923e3a9cf90bc8d8ae0ee3c60b9745f5f0e3234350be1cafd984052353594d6e6b9fba041 SHA512 a1418dbc50d1e41495fd68ccba2ac84fed5edfd3e613c68850068afcce1136c3456e99d226674908a77c9648f16d7861edacb70afebcf3a7e73ea3dcdf8edbe7
DIST golang.org%2Fx%2Fcrypto%2F@v%2Fv0.0.0-20201016220609-9e8e0b390897.mod 155 BLAKE2B 8bba3353db8ceb3b9fe40b8fd59aacde169776a4a553a069a04836bbf15e5a9a8d7a2d39feed98dac6cb890198180fda39f26b528ff95f24c5b2bbf6601b45c3 SHA512 7c5a755a03063d47d259fda0a6c2faa63c2f30b98dbac583e106aaa817d6cde3e07551e0b5e08f3a25db4c4ca45a23cebe993ae6f3d39c88deeaf2c7d8086a06
@ -23,6 +35,8 @@ DIST golang.org%2Fx%2Fnet%2F@v%2Fv0.0.0-20190404232315-eb5bcb51f2a3.mod 119 BLAK
DIST golang.org%2Fx%2Fsync%2F@v%2Fv0.0.0-20200317015054-43a5402ce75a.mod 25 BLAKE2B 01f7f78a0324ca728efd4d662ea130d7e200ab25805125e472720ca01feaaf2625b15bf53f51837a6913e35e060a19018928a38851d7445f39e6e42e237dfda2 SHA512 a9dd073f69c5be1153aaab6e84dd3bb1610a0df8b9882ca4c486c6625d4b5201e5032f86e5014421358dff564d93c4e67f20e5fd1d21ed5e259ddfbc90af43c0
DIST golang.org%2Fx%2Fsync%2F@v%2Fv0.0.0-20201020160332-67f06af15bc9.mod 25 BLAKE2B 01f7f78a0324ca728efd4d662ea130d7e200ab25805125e472720ca01feaaf2625b15bf53f51837a6913e35e060a19018928a38851d7445f39e6e42e237dfda2 SHA512 a9dd073f69c5be1153aaab6e84dd3bb1610a0df8b9882ca4c486c6625d4b5201e5032f86e5014421358dff564d93c4e67f20e5fd1d21ed5e259ddfbc90af43c0
DIST golang.org%2Fx%2Fsync%2F@v%2Fv0.0.0-20201020160332-67f06af15bc9.zip 28627 BLAKE2B 616de462c5c7d1ad7d5b792caf2e3c9d45c5095d723dace2038e012672055b6c052a043414db7b87b26f43c1688d8c353fc63b666ebd9569f832fc08f7ac99ca SHA512 eda82aa21a23db9ccdf960f6fb0583223839623643525410764e5684d8551e725c3bf76fcf68a4b4ef1d1fb48505d248b9600c736e0e9497d9efd4bfe5bd059e
DIST golang.org%2Fx%2Fsync%2F@v%2Fv0.0.0-20210220032951-036812b2e83c.mod 25 BLAKE2B 01f7f78a0324ca728efd4d662ea130d7e200ab25805125e472720ca01feaaf2625b15bf53f51837a6913e35e060a19018928a38851d7445f39e6e42e237dfda2 SHA512 a9dd073f69c5be1153aaab6e84dd3bb1610a0df8b9882ca4c486c6625d4b5201e5032f86e5014421358dff564d93c4e67f20e5fd1d21ed5e259ddfbc90af43c0
DIST golang.org%2Fx%2Fsync%2F@v%2Fv0.0.0-20210220032951-036812b2e83c.zip 28693 BLAKE2B 3d6a34fa6da642f5ca71c930bd69a41439013f20ee60dde5d4dfab4bf688f1edb150a0477cb006670424c6c59e90d4bac9e5eb34f9fb4c518d903dfd26fb6cb7 SHA512 48b983589bd682ff9275c47733ec73637ebb5e58e1bca0c7744101229237d5cb34170efab63db0061aec857052cce9ef03c3497702b90a86287e6be88e1b33aa
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190215142949-d0b11bdaac8a.mod 24 BLAKE2B 64a70c4594f5d3c37d962c1ed07630fba8abeaf534242f8f1509af271684499252af9a2320d5bac8e44064dba344b807535e4e9dd085fc0fb47bd9304120601a SHA512 ffe50fccf7f1d200f2ebc805b190e3f10c5a3184458a38f4590e520d7ce115e1520fbabe56651bbdc2e08da4a8db5ac86d0e88728efde3ab26c64ab4e0cd604c
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190412213103-97732733099d.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190626150813-e07cf5db2756.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab
@ -30,8 +44,15 @@ DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190626150813-e07cf5db2756.zip 1810550
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20200116001909-b77594299b42.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20201026173827-119d4633e4d1.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20201026173827-119d4633e4d1.zip 1496749 BLAKE2B 6f665574261f31847b1fafb76bf05483808610124bdf9bb22b976b93ef0d722a8cfd4892f48320ee0e7404b0876f65c37d945ce4466547d692d6fc00f4802c63 SHA512 604c6790250b7d05360cbd341cde88fc5c2a499bae119d51de5b073df0704089abd3b1536c5ef7008db7a5ef6dd8512824e77553ee8216134a2daa6cacb357c2
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20201119102817-f84b799fce68.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20210403161142-5e06dd20ab57.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab
DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20210403161142-5e06dd20ab57.zip 1668376 BLAKE2B 1011c91fa59172406554b0d169e83b2d82121f5902f7d29f444a7df4cf1d5545595fcb9e150fed96478dc9328608af540fae5baf5bde49d3f3e09b258d3a3745 SHA512 77c0219da635612968016f4f7e95c0e5394384f736eeb457e359ddebb95a0079c07be7c106a2364b89bfe8064583024eba675fda5c9b3d0da9f67973ce9036c1
DIST golang.org%2Fx%2Fterm%2F@v%2Fv0.0.0-20210317153231-de623e64d2a6.mod 95 BLAKE2B 8385688f2081360fc2694f05d128ff0c587ef131e1b5757a942d9335870200e06545318afb1a7d1f059d060f51fe94fc16a48a1d7ec31a9a83e07b3c93f34ce3 SHA512 a3401e3d20dc1aaaebbf3c296a783668003f2182ed77ec830431f97339e07eda1859fe8c3c7fdfb0125b3ed331d23208519df520f86e20c1a05c822b3d766b08
DIST golang.org%2Fx%2Fterm%2F@v%2Fv0.0.0-20210317153231-de623e64d2a6.zip 23415 BLAKE2B 7b67ba682ce566564d78910a6854418708f329ee424c922ad8c8082df64a4ac3f643647fe235e64340f91364005d361c398c19c546faba0db070ab4da7b52a05 SHA512 390acf2a26428b88b213f16d28860c00f2255ee49a1d516e044c5ce51cbcb01545d10dd5868dba88c7aee5381ec07c68fb62a9e391eacf1a26ea4c318356175d
DIST golang.org%2Fx%2Ftext%2F@v%2Fv0.3.0.mod 25 BLAKE2B 31009af0fdcd0f8730c9985287e6e364ec4e5183e57e92560dbc80a2010eced51b8a90f01a82b49384268c8a0adbf69d179c205d3f68e0eb459169d2ea9528f0 SHA512 ca081ef7cccd7bbedc6843fbe0c452352661a07e1298cd02ff338ed79d807c6401d613a3cf20011189d2f98a794ffa410547b3e352eb58a6f0a84822285d391d
DIST golang.org%2Fx%2Ftext%2F@v%2Fv0.3.0.zip 6349244 BLAKE2B 0aa464ac7b7d17fa7ec0627b64cd2301ed4f2819f837807db7a55725950dacb40be899b5148b07ea31b51530818edcccc6444a9800755e1d369ba8f1bce949b0 SHA512 982d78f580a7eac99a0c51e6f1fd2b2c3b91f56cd5e2b96fe960510049f7daf5915264f73f55f05675eee232a52998f9667fa84a9ccba15ed7819e4c93f583a7
DIST golang.org%2Fx%2Ftext%2F@v%2Fv0.3.3.mod 97 BLAKE2B ed93c1d43f199d8cbd43cb25edac5de569cb78773d7f3232d59a0a4de6d174c5c100db2b02ca42c51f3e17e0f5e781ba9b5641a512b0dc72dcfaa5f6bd7d451b SHA512 f3f68808ccf5223453f765f59db1ef551b2130069eb83518878961c2d4a2044f9049f8d49df6e67699fcd2645cf90b84d35626590b2cfbca302fcf0eac76dc8b
DIST golang.org%2Fx%2Ftext%2F@v%2Fv0.3.3.zip 8010747 BLAKE2B 78d999113a75f84966ffd23356e7cf60811b614754936851f197e547657cb6ff40acd074593c9cb6a2ae39ba625b36731c2fc0bc4b2b5ff68a2d377a6c7192db SHA512 024719305765ca737b225fec6268f84fc4c7d17c04e31eadfacafbb24a5f30af61920f4633e95d74dd2a266de40d1d2d13587881a3c22829ffeafb01fd75959f
DIST golang.org%2Fx%2Ftext%2F@v%2Fv0.3.6.mod 97 BLAKE2B ed93c1d43f199d8cbd43cb25edac5de569cb78773d7f3232d59a0a4de6d174c5c100db2b02ca42c51f3e17e0f5e781ba9b5641a512b0dc72dcfaa5f6bd7d451b SHA512 f3f68808ccf5223453f765f59db1ef551b2130069eb83518878961c2d4a2044f9049f8d49df6e67699fcd2645cf90b84d35626590b2cfbca302fcf0eac76dc8b
DIST golang.org%2Fx%2Ftext%2F@v%2Fv0.3.6.zip 8610726 BLAKE2B 78870544de29f5cd9216befa8822c2387654c3987e09994dccf55d210ad7c517edb93bddcc68bd981f2c083a4ec5e012d558b0164901e2d74f6f447e75edfadf SHA512 494d58f2bc02819ec24d8e55f668a06694568e63bc4b41064a7e44aefcb2778c74983fc9126b50277845da8e6739e83fc1334aed989981e8e53b869878803d17
DIST golang.org%2Fx%2Ftools%2F@v%2Fv0.0.0-20180917221912-90fa682c2a6e.mod 26 BLAKE2B 2a44c2cc034af3473d9a1d4e1c23b0f4542333853bfc0ecbfcf9eacacbb3593b449fcfc94d23f49ccc16e5a844bc72a3462a3e08a5c26194106a64d1f2732e0a SHA512 3c166b18c0ce47a47e95da9eeede63879a92b0205bd4589d554f7bae89699be0efa83e1f5bba8e50f47714ea23e759b07f4543fe06301995d39373da2db16fc0

@ -0,0 +1,104 @@
# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit bash-completion-r1 go-module
DESCRIPTION="A general-purpose command-line fuzzy finder, written in GoLang"
HOMEPAGE="https://github.com/junegunn/fzf"
# For fancy versioning only. Bump on the next release!
MY_GIT_REV=6654239
EGO_SUM=(
"github.com/gdamore/encoding v1.0.0"
"github.com/gdamore/encoding v1.0.0/go.mod"
"github.com/gdamore/tcell v1.4.0"
"github.com/gdamore/tcell v1.4.0/go.mod"
"github.com/lucasb-eyer/go-colorful v1.0.3/go.mod"
"github.com/lucasb-eyer/go-colorful v1.2.0"
"github.com/lucasb-eyer/go-colorful v1.2.0/go.mod"
"github.com/mattn/go-isatty v0.0.12"
"github.com/mattn/go-isatty v0.0.12/go.mod"
"github.com/mattn/go-runewidth v0.0.7/go.mod"
"github.com/mattn/go-runewidth v0.0.12"
"github.com/mattn/go-runewidth v0.0.12/go.mod"
"github.com/mattn/go-shellwords v1.0.11"
"github.com/mattn/go-shellwords v1.0.11/go.mod"
"github.com/rivo/uniseg v0.1.0/go.mod"
"github.com/rivo/uniseg v0.2.0"
"github.com/rivo/uniseg v0.2.0/go.mod"
"github.com/saracen/walker v0.1.2"
"github.com/saracen/walker v0.1.2/go.mod"
"golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod"
"golang.org/x/sync v0.0.0-20210220032951-036812b2e83c"
"golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod"
"golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod"
"golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod"
"golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod"
"golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57"
"golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod"
"golang.org/x/term v0.0.0-20210317153231-de623e64d2a6"
"golang.org/x/term v0.0.0-20210317153231-de623e64d2a6/go.mod"
"golang.org/x/text v0.3.0/go.mod"
"golang.org/x/text v0.3.6"
"golang.org/x/text v0.3.6/go.mod"
"golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod"
)
go-module_set_globals
SRC_URI="
https://github.com/junegunn/fzf/archive/${PV}.tar.gz -> ${P}.tar.gz
${EGO_SUM_SRC_URI}
"
LICENSE="MIT BSD-with-disclosure"
SLOT="0"
KEYWORDS="~amd64 ~x86"
src_compile() {
emake PREFIX="${EPREFIX}"/usr VERSION=${PV} REVISION=${MY_GIT_REV} bin/${PN}
}
src_install() {
dobin bin/${PN}
doman man/man1/${PN}.1
dobin bin/${PN}-tmux
doman man/man1/${PN}-tmux.1
insinto /usr/share/vim/vimfiles/plugin
doins plugin/${PN}.vim
insinto /usr/share/nvim/runtime/plugin
doins plugin/${PN}.vim
newbashcomp shell/completion.bash ${PN}
insinto /usr/share/zsh/site-functions
newins shell/completion.zsh _${PN}
insinto /usr/share/fzf
doins shell/key-bindings.bash
doins shell/key-bindings.fish
doins shell/key-bindings.zsh
}
pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]]; then
elog "To add fzf support to your shell, make sure to use the right file"
elog "from /usr/share/fzf."
elog
elog "For bash, add the following line to ~/.bashrc:"
elog
elog " # source /usr/share/bash-completion/completions/fzf"
elog " # source /usr/share/fzf/key-bindings.bash"
elog
elog "Plugins for Vim and Neovim are installed to respective directories"
elog "and will work out of the box."
elog
elog "For fzf support in tmux see fzf-tmux(1)."
fi
}

Binary file not shown.

@ -1,4 +1,2 @@
DIST poppler-21.02.0.tar.xz 1684496 BLAKE2B f62399a70baa0af36abd9bf7f5bc69003fcdc9b668a64475a6373dbdd9885092a8beb42f887eafdafac5ee17e9aac5b610bad1c9a64af8112e72c82f47e6a304 SHA512 3964990749f38f4468b244c579ff1f2dab7357dfddecb3035d14d3aaeac6ee4be42e76b4a1cc1a8cf53715518def9e92cc59d08c1e22592ced00a9c948989035
DIST poppler-21.03.0.tar.xz 1690848 BLAKE2B 60aef92bdfdc603b38dfb2a1aebd59c9085e6d51a2e22864edb3b0fd535421f47fb8041241e321d44cd8539538b61c6e19fe2d99a8a2d21fd85c3757ccadb5d2 SHA512 0eea1b5f32d79c3a497351a6491b5f617b089bef0a9a446723e87185acadba535e3146c0c141f4c2165ced1aa6fa853b54760a322d0932cfe3049c0ad94d64fa
DIST poppler-21.04.0.tar.xz 1694132 BLAKE2B 759a22b175ca8b64fa666d61e394cb7b6baa34a3dbc9c6cceb24c7ad4b0892ee34faea90278d9889d72d7b9558fc9abf52ab74fd739dc12e7314c3a755661350 SHA512 c3391787456e8a4a3bd6e57f96faa25051bb5e15ae7eeb7072ad6fbc25e3f8a34818945cc49d90a0e6ebc3d38dd4e70d3c60ba0a5cb42c4000bd8c15c947e5bc
DIST poppler-21.05.0.tar.xz 1700632 BLAKE2B 5e277f3d9d6fafbd39b395d7730182ec028c0ccdbb59e0b9d6ea93e079eb6dc8ff6e46a2b378ec4502055e8748973d353e1f947d734cdee4c5abb9f1bb6dba2c SHA512 428f63a85fc8a227efebcd64ca7e89fec487fea07c93f9dd990fae343532547bcfec29a3288dd9ffce698cf994ccc2ce5055e4fa677ebceb216c1caaa3e0cdae

@ -1,122 +0,0 @@
# Copyright 2005-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake toolchain-funcs xdg-utils
if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.freedesktop.org/git/poppler/poppler.git"
SLOT="0/9999"
else
SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0/108" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
fi
DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
HOMEPAGE="https://poppler.freedesktop.org/"
LICENSE="GPL-2"
IUSE="cairo cjk curl +cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils"
# No test data provided
RESTRICT="test"
BDEPEND="
dev-util/glib-utils
virtual/pkgconfig
"
DEPEND="
media-libs/fontconfig
media-libs/freetype
sys-libs/zlib
cairo? (
dev-libs/glib:2
x11-libs/cairo
introspection? ( dev-libs/gobject-introspection:= )
)
curl? ( net-misc/curl )
jpeg? ( virtual/jpeg:0 )
jpeg2k? ( >=media-libs/openjpeg-2.3.0-r1:2= )
lcms? ( media-libs/lcms:2 )
nss? ( >=dev-libs/nss-3.19:0 )
png? ( media-libs/libpng:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtxml:5
)
tiff? ( media-libs/tiff:0 )
"
RDEPEND="${DEPEND}
cjk? ( app-text/poppler-data )
"
DOCS=( AUTHORS NEWS README.md README-XPDF )
PATCHES=(
"${FILESDIR}/${PN}-20.12.1-qt5-deps.patch"
"${FILESDIR}/${PN}-21.04.0-respect-cflags.patch"
"${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch"
)
src_prepare() {
cmake_src_prepare
# Clang doesn't grok this flag, the configure nicely tests that, but
# cmake just uses it, so remove it if we use clang
if [[ ${CC} == clang ]] ; then
sed -e 's/-fno-check-new//' -i cmake/modules/PopplerMacros.cmake || die
fi
if ! grep -Fq 'cmake_policy(SET CMP0002 OLD)' CMakeLists.txt ; then
sed -e '/^cmake_minimum_required/acmake_policy(SET CMP0002 OLD)' \
-i CMakeLists.txt || die
else
einfo "policy(SET CMP0002 OLD) - workaround can be removed"
fi
}
src_configure() {
xdg_environment_reset
local mycmakeargs=(
-DBUILD_GTK_TESTS=OFF
-DBUILD_QT5_TESTS=OFF
-DBUILD_CPP_TESTS=OFF
-DRUN_GPERF_IF_PRESENT=OFF
-DENABLE_SPLASH=ON
-DENABLE_ZLIB=ON
-DENABLE_ZLIB_UNCOMPRESS=OFF
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON
-DUSE_FLOAT=OFF
-DWITH_Cairo=$(usex cairo)
-DENABLE_LIBCURL=$(usex curl)
-DENABLE_CPP=$(usex cxx)
-DWITH_JPEG=$(usex jpeg)
-DENABLE_DCTDECODER=$(usex jpeg libjpeg none)
-DENABLE_LIBOPENJPEG=$(usex jpeg2k openjpeg2 none)
-DENABLE_CMS=$(usex lcms lcms2 none)
-DWITH_NSS3=$(usex nss)
-DWITH_PNG=$(usex png)
$(cmake_use_find_package qt5 Qt5Core)
-DWITH_TIFF=$(usex tiff)
-DENABLE_UTILS=$(usex utils)
-DENABLE_QT6=OFF
)
use cairo && mycmakeargs+=( -DWITH_GObjectIntrospection=$(usex introspection) )
cmake_src_configure
}
src_install() {
cmake_src_install
# live version doesn't provide html documentation
if use cairo && use doc && [[ ${PV} != *9999* ]]; then
# For now install gtk-doc there
insinto /usr/share/gtk-doc/html/poppler
doins -r "${S}"/glib/reference/html/*
fi
}

@ -1,122 +0,0 @@
# Copyright 2005-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake toolchain-funcs xdg-utils
if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.freedesktop.org/git/poppler/poppler.git"
SLOT="0/9999"
else
SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0/109" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
fi
DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
HOMEPAGE="https://poppler.freedesktop.org/"
LICENSE="GPL-2"
IUSE="cairo cjk curl +cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils"
# No test data provided
RESTRICT="test"
BDEPEND="
dev-util/glib-utils
virtual/pkgconfig
"
DEPEND="
media-libs/fontconfig
media-libs/freetype
sys-libs/zlib
cairo? (
dev-libs/glib:2
x11-libs/cairo
introspection? ( dev-libs/gobject-introspection:= )
)
curl? ( net-misc/curl )
jpeg? ( virtual/jpeg:0 )
jpeg2k? ( >=media-libs/openjpeg-2.3.0-r1:2= )
lcms? ( media-libs/lcms:2 )
nss? ( >=dev-libs/nss-3.19:0 )
png? ( media-libs/libpng:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtxml:5
)
tiff? ( media-libs/tiff:0 )
"
RDEPEND="${DEPEND}
cjk? ( app-text/poppler-data )
"
DOCS=( AUTHORS NEWS README.md README-XPDF )
PATCHES=(
"${FILESDIR}/${PN}-20.12.1-qt5-deps.patch"
"${FILESDIR}/${PN}-21.04.0-respect-cflags.patch"
"${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch"
)
src_prepare() {
cmake_src_prepare
# Clang doesn't grok this flag, the configure nicely tests that, but
# cmake just uses it, so remove it if we use clang
if [[ ${CC} == clang ]] ; then
sed -e 's/-fno-check-new//' -i cmake/modules/PopplerMacros.cmake || die
fi
if ! grep -Fq 'cmake_policy(SET CMP0002 OLD)' CMakeLists.txt ; then
sed -e '/^cmake_minimum_required/acmake_policy(SET CMP0002 OLD)' \
-i CMakeLists.txt || die
else
einfo "policy(SET CMP0002 OLD) - workaround can be removed"
fi
}
src_configure() {
xdg_environment_reset
local mycmakeargs=(
-DBUILD_GTK_TESTS=OFF
-DBUILD_QT5_TESTS=OFF
-DBUILD_CPP_TESTS=OFF
-DRUN_GPERF_IF_PRESENT=OFF
-DENABLE_SPLASH=ON
-DENABLE_ZLIB=ON
-DENABLE_ZLIB_UNCOMPRESS=OFF
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON
-DUSE_FLOAT=OFF
-DWITH_Cairo=$(usex cairo)
-DENABLE_LIBCURL=$(usex curl)
-DENABLE_CPP=$(usex cxx)
-DWITH_JPEG=$(usex jpeg)
-DENABLE_DCTDECODER=$(usex jpeg libjpeg none)
-DENABLE_LIBOPENJPEG=$(usex jpeg2k openjpeg2 none)
-DENABLE_CMS=$(usex lcms lcms2 none)
-DWITH_NSS3=$(usex nss)
-DWITH_PNG=$(usex png)
$(cmake_use_find_package qt5 Qt5Core)
-DWITH_TIFF=$(usex tiff)
-DENABLE_UTILS=$(usex utils)
-DENABLE_QT6=OFF
)
use cairo && mycmakeargs+=( -DWITH_GObjectIntrospection=$(usex introspection) )
cmake_src_configure
}
src_install() {
cmake_src_install
# live version doesn't provide html documentation
if use cairo && use doc && [[ ${PV} != *9999* ]]; then
# For now install gtk-doc there
insinto /usr/share/gtk-doc/html/poppler
doins -r "${S}"/glib/reference/html/*
fi
}

@ -10,7 +10,7 @@ SRC_URI="mirror://sourceforge/qpdf/${P}.tar.gz"
LICENSE="|| ( Apache-2.0 Artistic-2 )"
# subslot = libqpdf soname version
SLOT="0/28"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris"
IUSE="doc examples ssl test"
RESTRICT="!test? ( test )"

Binary file not shown.

@ -1,4 +1,2 @@
DIST eigen-3.3.7-gitlab.tar.bz2 1663474 BLAKE2B 70c2f6305ca205d62755cf5e90961088938b8daf56b7cc27abf52f0731064858ada523009d6bf5f014e24b34ceeafe59f918c385d12ccfe249ddb675e13d37a8 SHA512 ea3f1570de3be9ec230d2fbd0f2ae246bf5fd13da79835bf546eb31524796f26f9f633ee779f77942b370a8d540c5cbbd8dd033ccec53a44b692c7e407d6266f
DIST eigen-3.3.7.tar.bz2 1665168 BLAKE2B 544d35d1c7a4125affa094c6aa372c2aeca4e99bc60c496ff393d538c1c467b454491a772121450e3a1a43a582d073b4b7584918354d0b9175121fde88947c4b SHA512 c12bfd034d0a1112bf2df3f773ad98f36b2b53fbbfceac5f143ee1793322746fb8a6546d7db7da2a1000da6a535bd8cea0c4125b549afc90a6570743b02dcf3d
DIST eigen-3.3.8.tar.gz 2141903 BLAKE2B c33e699ba08338e7b9b215c9466e161229164ed3c466ce3d760c6917749af33c0414c3bc4bbdd216e3466e69ece8a38ca8beb78b7e0f1609894df6bb4a7fcca3 SHA512 5b4b5985b0294e07b3ed1155720cbbfea322fe9ccad0fc8b0a10060b136a9169a15d5b9cb7a434470cadd45dff0a43049edc20d2e1070005481a120212edc355
DIST eigen-3.3.9.tar.gz 2142379 BLAKE2B 437dc190fdf7a416d0a5cf81703ef4cc73c195f0f3e7c853e0ab38cf904608ddd4485cc4e15eb0cd5e3c401276f270f3c86f538f205cc91b8c83e131d1bc916d SHA512 16244cc89f2e1879543232b965cbf653b3ccf10e967c8c437a41e27d8320392bdf584d8c24b8a97406ab7d1481d5154da74e0702ec1334ae6a46de83f4573a46

@ -1,107 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
FORTRAN_NEEDED="test"
inherit cmake-utils cuda fortran-2
DESCRIPTION="C++ template library for linear algebra"
HOMEPAGE="http://eigen.tuxfamily.org/"
SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
LICENSE="MPL-2.0"
SLOT="3"
KEYWORDS="amd64 ~arm arm64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
IUSE="c++11 cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_ppc_vsx cuda debug doc openmp test" #zvector
RESTRICT="!test? ( test )"
RDEPEND="!dev-cpp/eigen:0"
DEPEND="
cuda? ( dev-util/nvidia-cuda-toolkit )
doc? (
app-doc/doxygen[dot]
dev-texlive/texlive-bibtexextra
dev-texlive/texlive-fontsextra
dev-texlive/texlive-fontutils
dev-texlive/texlive-latex
dev-texlive/texlive-latexextra
)
test? (
dev-libs/gmp:0
dev-libs/mpfr:0
media-libs/freeglut
media-libs/glew
sci-libs/adolc[sparse]
sci-libs/cholmod
sci-libs/fftw:3.0
sci-libs/pastix
sci-libs/umfpack
sci-libs/scotch
sci-libs/spqr
sci-libs/superlu
virtual/opengl
virtual/pkgconfig
)
"
# Missing:
# METIS-5
# GOOGLEHASH
src_unpack() {
default
mv ${PN}* ${P} || die
}
src_prepare() {
cmake-utils_src_prepare
sed -e 's:-g2::g' \
-i cmake/EigenConfigureTesting.cmake || die
sed -e "/add_subdirectory(demos/d" \
-i CMakeLists.txt || die
if ! use test; then
sed -e "/add_subdirectory(test/d" \
-i CMakeLists.txt || die
sed -e "/add_subdirectory(blas/d" \
-e "/add_subdirectory(lapack/d" \
-i CMakeLists.txt || die
fi
sed -e "/Unknown build type/d" \
-i CMakeLists.txt || die
use cuda && cuda_src_prepare
}
src_compile() {
cmake-utils_src_compile
use doc && cmake-utils_src_compile doc
}
src_test() {
local mycmakeargs=(
-DEIGEN_TEST_NOQT=ON
-DEIGEN_TEST_ALTIVEC="$(usex cpu_flags_ppc_altivec)"
-DEIGEN_TEST_CXX11="$(usex c++11)"
-DEIGEN_TEST_CUDA="$(usex cuda)"
-DEIGEN_TEST_OPENMP="$(usex openmp)"
-DEIGEN_TEST_NEON64="$(usex cpu_flags_arm_neon)"
-DEIGEN_TEST_VSX="$(usex cpu_flags_ppc_vsx)"
)
cmake-utils_src_configure
cmake-utils_src_compile blas
cmake-utils_src_compile buildtests
cmake-utils_src_test
}
src_install() {
use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
cmake-utils_src_install
# Debian installs it and some projects started using it.
insinto /usr/share/cmake/Modules/
doins "${S}/cmake/FindEigen3.cmake"
}

@ -1,101 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
FORTRAN_NEEDED="test"
inherit cmake cuda fortran-2
DESCRIPTION="C++ template library for linear algebra"
HOMEPAGE="http://eigen.tuxfamily.org/index.php?title=Main_Page"
SRC_URI="https://gitlab.com/lib${PN}/${PN}/-/archive/${PV}/${P}.tar.gz"
LICENSE="MPL-2.0"
SLOT="3"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
IUSE="cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_ppc_vsx cuda debug doc openmp test" #zvector
RESTRICT="!test? ( test )"
BDEPEND="
doc? (
app-doc/doxygen[dot]
dev-texlive/texlive-bibtexextra
dev-texlive/texlive-fontsextra
dev-texlive/texlive-fontutils
dev-texlive/texlive-latex
dev-texlive/texlive-latexextra
)
test? ( virtual/pkgconfig )
"
DEPEND="
cuda? ( dev-util/nvidia-cuda-toolkit )
test? (
dev-libs/gmp:0
dev-libs/mpfr:0
media-libs/freeglut
media-libs/glew
sci-libs/adolc[sparse]
sci-libs/cholmod
sci-libs/fftw:3.0
sci-libs/pastix
sci-libs/scotch
sci-libs/spqr
sci-libs/superlu
sci-libs/umfpack
virtual/opengl
)
"
# Missing:
# METIS-5
# GOOGLEHASH
PATCHES=(
"${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch
"${FILESDIR}"/${P}-no-error-counting-in-openmp-parallelize_gemm.patch
)
src_prepare() {
cmake_src_prepare
cmake_comment_add_subdirectory demos
if ! use test; then
sed -e "/add_subdirectory(test/s/^/#DONOTCOMPILE /g" \
-e "/add_subdirectory(blas/s/^/#DONOTCOMPILE /g" \
-e "/add_subdirectory(lapack/s/^/#DONOTCOMPILE /g" \
-i CMakeLists.txt || die
fi
use cuda && cuda_src_prepare
}
src_configure() {
local mycmakeargs=(
-DCMAKEPACKAGE_INSTALL_DIR=$(get_libdir)/cmake/${PN}${SLOT}
)
use test && mycmakeargs+=(
-DEIGEN_TEST_CXX11=ON
-DEIGEN_TEST_NOQT=ON
-DEIGEN_TEST_ALTIVEC=$(usex cpu_flags_ppc_altivec)
-DEIGEN_TEST_CUDA=$(usex cuda)
-DEIGEN_TEST_OPENMP=$(usex openmp)
-DEIGEN_TEST_NEON64=$(usex cpu_flags_arm_neon)
-DEIGEN_TEST_VSX=$(usex cpu_flags_ppc_vsx)
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
use doc && cmake_src_compile doc
if use test; then
cmake_src_compile blas
cmake_src_compile buildtests
fi
}
src_install() {
use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
cmake_src_install
}

@ -17,7 +17,6 @@
providing optimal speed with GCC.
</longdescription>
<use>
<flag name="c++11">Build using the C++11 standard</flag>
<flag name="cuda">Build with cuda support</flag>
</use>
<upstream>

Binary file not shown.

@ -1,4 +1,3 @@
DIST mariadb-10.2.22.tar.gz 71907765 BLAKE2B e7781a9e1bb0becca543ebb0b9e03912fbafa9de45bbd5c7232f92d29b934148dd124ad462bf8aa5aec2e4ee0bf75a03fae5e5fe97a77e1d93095052a577c14b SHA512 cd61d0c2d528b23b975e6ea142560d9b9ebff7ecda6fa9b3659b25b3406e8cc925918f4c3bb0e200ddb8d0520bcaa4d4f70d245b4731896f9ba2f1bdf0a817b2
DIST mariadb-10.2.32-patches-03.tar.xz 6048 BLAKE2B a6f8f25ec23d1d86d228d719927daa9131779239917b86eab9f82086744294c0a4f03b1a73a3baa599e367775457d6c345fa0820b89063b2e6379c0fb7076ad0 SHA512 324804f13f59593d26cc5fd8c1cdeac2f16cf55012ca65b0a7223512920e1ea94619991fdcb3d19184b6428e4a627fec75532c88ae8297f9b8398fcf730058a9
DIST mariadb-10.2.32.tar.gz 73646729 BLAKE2B 581906d67f0aada9e85aec7bfee03ed8927a4e836f0639fa5f31576f5df70ce2b6ed3da0b96ad616f5ed71d7717531a073cb911c6d92274f6724911e086104af SHA512 824aa94724b639337a5b4c2e86a1f5ceaeaa940eb234f852df1ba0aafd64e269335e2aca0b05d52164e090cfd6f7d14477df9e096473aa5d9286d47944a765b4
DIST mariadb-10.2.33-patches-01.tar.xz 6024 BLAKE2B cb4283a36b303b1422d53c454bc6390ce80f3a88c9f9cd459468cf9bff792a1af197a5e5b3f7e45376024ef78bc6049cecafd8654e1b767f741f35129624ab12 SHA512 ebe9c1295089c04e869516f3ef278673986c1227b92bb9cd96cc561b0392f22870200cf58db91fdfe7e113b04b5b6d66c904b2d1353011cbd89723a8ce83fec2
@ -9,16 +8,14 @@ DIST mariadb-10.2.36-patches-01.tar.xz 6032 BLAKE2B d1ca7e8469e0f0b8a14d5f993894
DIST mariadb-10.2.36.tar.gz 73892597 BLAKE2B 610fea30b944e46483f4a9630f8af22afcbcc8b461ce2b13e28b3376271dce8436df9bd771f048fb8af5e0ef9e5e3986be02af742937504e71413710e4f6462d SHA512 0f1ced570a79036fafd318ceaae06de71cfc748b0c99d31487a00f7fcebed993ef7e05614e866f48b1811660a7a4ad7c36d6bb0133bdb0228cc017199f182406
DIST mariadb-10.2.37-patches-03.tar.xz 6404 BLAKE2B c814ae967beac459810d1ecf4b5b21da99241e571c9c42fadeef0a27a1928459bb7d2a79461693fb6dd8821302891e459c3848f65738cda61f27bc8e174657e9 SHA512 b2b002ca1b390b251a0b6bce3dd996cc6aa0da4a9787d747c4ae276237e5c67ada7fc79a1acef9e3469232d5903ac8d1dcc30540e29974899c4128239a1569ba
DIST mariadb-10.2.37.tar.gz 74041747 BLAKE2B 81ed5ada9f27c7dadf2daa88c52e1e40c834e8f243eb416a4a1e486d7e756d2bcb86f545b013fb1bb83987eef19239b2e8c3312a50be10eb13fee1a9c824095f SHA512 e4214d5f013917fff2606aa0b827373c228c06ba72ceaddee01459105ba08316f360ad930bd36e71bcc98d371162a0894560a7a36d2b242629cc970798660854
DIST mariadb-10.3.23-patches-03.tar.xz 5520 BLAKE2B 30bc247ed6d97aefaa1ed48f379fc9aab3df3409aa9a108728313c7c69ab0641b69ccb0289eda9539df367f85b2db494473d3836807dfbf60df1e0c832e57369 SHA512 64bff196d1651348d303571fd551a5666d9514c1ee17cd9296b9d420c4b3d7d9b339644a1cad029bae3c35a666b405d471a37846138f2551f3b1b88d99b80844
DIST mariadb-10.3.23.tar.gz 72582611 BLAKE2B 493605519f714cbe87b938f6ca3243d29189adbfcbb33c4e10a4a3f01b08d875f18b96b647dc92566b785c2cef9862ebacfd55954d13ab0a7a745606e40fb6e9 SHA512 535cd2ce80a95b6c0a1aa559cc3275dfcd559c3a4f958fab3382923190a16e6bc5b4ad79acaa518244512ff618568c239c0edef8a701d958362ede19a29c2986
DIST mariadb-10.3.24-patches-01.tar.xz 5508 BLAKE2B c3b75205ecec0b73c85696a3382dd9271d495389f05d1bff66548f5f316f6d5f2ee7204020f265a6dd7ee7c28e1a010d74b056b9c9ab244651ba417e496fb1a9 SHA512 d9d408e6ba08a8a321b9a6e72a6347c4317652e91ade0056ff8621dafbbaf398e33d6b15247e89a2d60b731021d30cba9611356ced2cf848d1807cb3d376c378
DIST mariadb-10.3.25.tar.gz 72710424 BLAKE2B 95029946e2ed04368beadf33b42121c612fa9d146e648fd584078e4df88e3c93f6373e1e996817644e06f3b2713a257e3079167434e9227db01dc1a2ad08aad0 SHA512 9504e401db3b65b2b2bd4d3c91a468d357e82fdafbf90d54539a291e46570c2bed66ae047b17b9da95e925f8970fa048d329ba06c2dd6de7d46d5a0f2aad1f4d
DIST mariadb-10.3.26-patches-01.tar.xz 6720 BLAKE2B 5c7ae688e628bc5831bf4c1680bddbfda8aae33a033444a2a2cc27a920804570c669834779342db21fff1c1c4da3efc689bf5e7b1ee3b058dbac02a68695ab01 SHA512 e906fdb75c6b0baa495c10ffdc2ed4d28851193f123d70b2f8c1f4b0171f1c2cc75c54bad5f511892e542cbc75bad6b01a0e83577094aababcb69145cd9a537b
DIST mariadb-10.3.26.tar.gz 72867143 BLAKE2B 5ab012e014e855bc5dab9bc5060bdf179fbe0fc67e564e25bb1059a0f19d5c90fa8fb6ccb9482eff6babe602eaf7b6c768eaa0ecb53bfed5ad6db9eb4e18e97c SHA512 28c593b26dcfd2208105ace87e85e86b37511821bc5f1fa65c7bfa5732d386e0b68af3b83a8259feb9af878e29d61f1da5c45b50c8e2f57a22e4001652c61140
DIST mariadb-10.2.38-patches-01.tar.xz 5796 BLAKE2B 51a574eab28c16394e3e953654d31f9d6fe88f55292ccaea35b0463d122a749ed52cb8d5e19f14b0d630bf22381ee0bddcf1e1b80c1445a82b931dd9461339ac SHA512 48fcfdb685bac516ee3388fc05adce5b53bbb42bee7b3681a887c76c63cb71b671d4089721a9b16f281496be9e9a87a556d44e4a6834c96345c6ada900dc9fe8
DIST mariadb-10.2.38.tar.gz 74250852 BLAKE2B 5d75a38d7d892d93c5971713a4ab47c2803c03934ba301ea239b0a7565692272339ca0c3360a7bd533adcfef1af392c906b8f0136c18a25f5a1dd6127c8a6902 SHA512 4918a04877e16a0d33baca61b7c207b21b646df3be5e9ac125cb65404c0c6d6706b054106f437acfeef402238b35018a3cd764ceb31144a98791137c44e273a9
DIST mariadb-10.3.27-patches-01.tar.xz 5516 BLAKE2B e78cc8514a3597b6ab38f00142a82c81e7482f1fd9afbcfd6f10ee92803a131f483f32361aebf288f9912e58140caeee1c536086e3f733c3a8dfe9c5afc5a590 SHA512 d1744bd83e099b67faa3c5385803c4eac58200c1a2ca30b5723e401c72e434d752be26c80da3b036431024c6a7d1ee889bde34a3143a43a9851984697d43e362
DIST mariadb-10.3.27.tar.gz 72870472 BLAKE2B 46d203ba018ba00ffee2e5e9bec7f0a9a4d27f0aa30b26651215c7b3fca803dae1080d075bb4938a403c1f78a46ec4fec4bd59736c0eb9a0b84763445efe097b SHA512 96507307cf95d319898e23cb46a5f46937907592e421eb4a4373f47ca54291623010d18414e58bdba88a78255b1996984b14b41fb8f32e3593a3b02ed852aac5
DIST mariadb-10.3.28-patches-03.tar.xz 5896 BLAKE2B bd9d7c3b32f17e0ce8c2149e5c2981dbb09647d56295eb9a2585a2c79f7e3aef46267e55a30a3440e57b1dbebe98a5a72d08aacb9a4b2fc3f30bb1f83d3b38c3 SHA512 0f8e8f9a50bbcb037bd22116ec826d01b15937f934d91fee11a37da0d4f91944762bfe3560c8edc4e5b9cdd9443fcce9b0e02373c4bfd97ed8570ff944d0b803
DIST mariadb-10.3.28.tar.gz 73040177 BLAKE2B 4fff746e7c04b239055c8528bcfd31e4911e6daae3427dc8a6e2e0e21c2888d2145b5383c6b0876b307949f122c2645d42fc7efaeec594bae1f02aff4037e676 SHA512 f6941bcc818f9b3640e4b5fdbdd3a32b45c62c04087e583f1f0e1c0258b09a21c7639abd1c902e183c057838308ad5eedc00ffee76d44a02043e8e349015fb20
DIST mariadb-10.3.29-patches-01.tar.xz 5280 BLAKE2B 262c8f89508d915a13c3c309c885af68ff044ba28b4c3d631a5be90b709c882fa3cf521380c9d2a2f7695477d7bcd364ccb98d90750e524deb0aa0daddb94bde SHA512 95d04edf54b722ed7022bd2b915d722ae4153eb2c12a3d6c499469be0de4d03582226ef525be9e9af265674ef31ce2376442a09c583222c64ad9994ddc51c8b7
DIST mariadb-10.3.29.tar.gz 73261682 BLAKE2B 81ac5c7d1ad343c7d1c6788dafe07c45ec096d975a3197c6a6940da60a4a73383dff18e15d1940f1248dc34f290603629e95fbeca31c0749c5b0ae2b3de92b8f SHA512 fe868cde5ac3536ff5bbf34f235253c79e897e61bb34f7fdaca8fa8fcdb83e4a19c615beab27d3fdb5daee64ac0c8f36ec7e8089a9422c8540f7e92b1999a769
DIST mariadb-10.4.13-patches-03.tar.xz 5520 BLAKE2B 949b7f6ee5a9a6077424264e53d2b7af8ceb56cb38b204800e1c3ec93fc929d57b201e075f8ed735364b5421a3b922ba45fc94ba006f1e6d94494efa17b521ef SHA512 042c3ca8a75ebbb1c2baa508603d4248a178f87b7126b439ef6894eaab979f01c47cd8fbea3c106cce2a951e9308c76e72b4e444dcbee09a991cb524f2b9fac8
DIST mariadb-10.4.13.tar.gz 80608459 BLAKE2B e9ada14da6ec7492311068549a5b6e5a66e1177312013b25472c084a21fbace543ec43b47f2e12190d45432648d508f311198521f42359561f8d75ea60f98205 SHA512 68919ceffb3d4afdd0d94daa77439a954c82ce4e08fbe06044fc397940eeb88a39ec75932cbd08ff26ef3cf7636fdb779947cda5b2764aa1fd888be19c44b566
DIST mariadb-10.4.14-patches-01.tar.xz 5512 BLAKE2B f32e1d383ffd99de431bc34c36101c71c5e631344527e96b80ca6bd0a68015b45a4c33d6f0518cb4aa2bcfd493b64b6607671450ca045243404c0d65ebbc66fd SHA512 201fe82cbcca705dba52b32405d463b5569d97a5ffd9fd2967ec7fc3c3ff305011b3d2c3c0e9f7c19aaac57b26661bd361f3b6da6f3812f25934ec18856c7051
@ -29,12 +26,9 @@ DIST mariadb-10.4.17-patches-01.tar.xz 5524 BLAKE2B a9424a8cd68a5106087e24f08a3c
DIST mariadb-10.4.17.tar.gz 80986181 BLAKE2B 68dc7e0a7a809d1d26c75351e2f934f07a7c2e73651a8253db658d8d93375545a97f50650f0ea92387b4f5e13aabe6de8567d22fb0434d40058a392a58ad9ee4 SHA512 51bbdbae9ba48e3e7b0b614a5e19a0549979b727797e2742a130c6bed23d06eea6d18da63759a3f5f3ba751bcaaef4cdbf6a3456f4d23ff9149b3b0ea07e7079
DIST mariadb-10.4.18-patches-03.tar.xz 5896 BLAKE2B e7d16fb0177a468b190ed0a3fd1c9e1bac369e0ddff034a999351af1a1020271013dd6dec52013aa7055c4b4177436ca3f5ebcca06d14355be88f55f0bd875f3 SHA512 2b6acff0ad88d4bca3dfa4703c651de6f7c94cf209f5c00d03d5cc4bac220490e7ec7ccd257bdc19617847074d372f24b2804aa6d37fd24f1c4acf40315890f9
DIST mariadb-10.4.18.tar.gz 81733656 BLAKE2B 6eb0a9bff586dab3efc4edb4e9d1a7e2f5ceb1341de08ffc4d63787a83b8eece18b96fcfae48e68262350e71dd28e2e4d328746fadcb006cd9d5e1bfb63187a3 SHA512 085c2468484d997facb021ea7cba4895729b6c5769d715e30cf1dfd62c3a291e5025774420ed278f9470de20be8d3537f03c7d1cc5482d957bc91eb072cd9c12
DIST mariadb-10.5.5-patches-02.tar.xz 6060 BLAKE2B 185a2016836721f76c19228ca39c1c7610c34210e23b42f254e4c4fde34c74d9c77bb0d1a441175c14938ecafea3e9575fa3b7349db826aef63e7d7e7a21901a SHA512 8a26bdbec19d45739ef7accd3cea999bde465714141532d999500df2ebd93bb98a00b8b86b1e855ea4f0cba6984b21ff09beee75372f840282a91f5dc95db432
DIST mariadb-10.5.6.tar.gz 86884252 BLAKE2B b0230acf43d54e976c4e757139dbaa2bb6ed992b0d056728142fc7fa41bd62539be22eae5aac614ea49acf220646ee57ecc67ff1373c6aa142434e6743a4d174 SHA512 c62bd6278d389baf179962bc6f617693cf3ba748382e96963b1ef5bbee8d1c9f0964025cf00fb7ff5de088a79362b65657ed30a8adbb61fe524bfd0d8d753421
DIST mariadb-10.5.7-patches-02.tar.xz 8992 BLAKE2B ec9acc1f09ac08319c5ad7e952e7521d722bf1c4deba15c3f2cfd72b89eea6c724b00c83be1b28e6261aadc94abcdffde8e978e4f13910367f4ccf56a3d02f45 SHA512 2adc499fbcf6fc895a5cf8643ca86866ab29d216cbdd62f55c1b0e66939e222fac310fb6a34f39cc76142b404febdb592e21be75aa3d16fab6c2bc7e725c44a1
DIST mariadb-10.5.7.tar.gz 88214625 BLAKE2B 8ec53b4b98565d99a707899fd6adfdc5bffbf722528e0042ab16b5e186d32229a386881f2781a0ce435585f338b48dc66459bef9d8921fadc00a3d770b62bf5c SHA512 d964c61d6ba7cf21fea97b8e0b6a0bf1ee50fc7a7995753dafd710f4656001bd6e03c243896efb5802cce16dd6470849ed036d09b17415a538e008f64e974a9f
DIST mariadb-10.5.8-patches-01.tar.xz 6212 BLAKE2B 7e4358d02d25edc51f5926a75646052ccf07fe2b5cab1901a133b27764793c94ca2a6c4d4b90b5d911b25a6d86f1cb7d2659edbcdab52c445fd6959ea080275d SHA512 f7a5d948c6d7d97896538b7df0de60c8e7969dd15b4ff406e8955a282e69fb7f19fe91424afc332029ac2a36c52781617bbf1c5f6d57dd3bfc21d3ea20ff4c5a
DIST mariadb-10.5.8.tar.gz 88206163 BLAKE2B eaaddaf240102428a23602655920bdf543d25cf85e669b1b07bedba5119a5e0f4498e999db39031dcff168ac810ed0b28f5fa9ac995b3634b84b99b753b4636c SHA512 9801a68440a3502b49655e34dcbfd09734f4a4f1ba8621ed9b895e194cea461a8c69fb0ff66488d5defd3065b43f73e5083a60142e11cc7e4a442f86769b06e5
DIST mariadb-10.4.19-patches-01.tar.xz 5288 BLAKE2B b97a8b2c55ad2b78b4f27dbab3893c777e15ef237fc66a9ef62d391772caaada3e23949a63ae170aa72e4b07f9bf34f32da72614756bdbe0712efe6c39f0da59 SHA512 e26b12230b965fe0facfd447a815a88fe8edaaeb8e209cc53df2d76c580dacdab59afb09c09ef471fb0b46c0cde8eeed84f3eff851751316eb12f06de235d52f
DIST mariadb-10.4.19.tar.gz 82042449 BLAKE2B 6137c84852b6b770efa908b49f03ca52726a537bda410b324ed388a82667bf0e3ff37cbb62d6a541ca39ce4841efa861553c7cead11030dc9deacdeb7cdb0d5f SHA512 837bd4e46e2033d0e996c33125c50b98e141e4c31cf4753a4bd1a7bd1e6a25ebe2a0ea7c8061d29f3c635e24d8e4bf2bbca62ea3b0089bde6576c39ffc6f5e28
DIST mariadb-10.5.10-patches-01.tar.xz 5944 BLAKE2B ce374e58b7730d45a8dbca4cccd459c1660182d6aed4ac54f06139e28ec254d4993b2135b2774e08eee740099803398a25b28ce9d227702bffab1867f1725fc2 SHA512 9d41b7796c5e43d037e75eb8d6c9b570a9b3d72166f832d3d0831646b2ec8c838fe94eb8eab8c6e427e96640287d58f7eca2c653a3c503bf01240c9f7c60a8c5
DIST mariadb-10.5.10.tar.gz 99019617 BLAKE2B 85b5c43ae9eeb1dbf9ff7935d4cf4bddbd18cadeffb79a3bff172b4522e196c7ac8916c63a6750d0b3b910c6f0f933213b3b4f6c7bf0d43bbb07714ed9337750 SHA512 93dd1405f8b31989e130dee5b7d4a0b447aa0e017fb9ee02c792c52142d84d1103e8fd591101d72deda1ac65b10c48053582f6e61bd1757e6aa92e42d98c56cd
DIST mariadb-10.5.9-patches-05.tar.xz 17120 BLAKE2B a6ea7c3ba3718e9667510db9fdfcedb3fa4a6a2da89f1c49f9a419c84191af9bf6148815afa836e31f47d752cafdaefdd98b530c29c849fa86af4ff0be9732ea SHA512 e39393505d5c5d45b3352d15b9e10a02a1057d5eb381335953c5dfca312791976be9e0e3b2adb6536a2f5cc6f00f01b9379a17806a029a9b73eb674a2a1fb583
DIST mariadb-10.5.9.tar.gz 88639930 BLAKE2B 512c3fb0541bbeb19878979104f7858ce18ce67187507c8395798cfc9ffe92bd83e39bd47251419363600348a85716406286bd27b3c28662ea63e8ec761a4e01 SHA512 d23d5bf8510b3c36a6521fb3244cf323ef0f5d100ba379ed7b5bbc2acae1765a5b46c17bd929f0b27b28923eb1b5975314abdf7ffb96905cf7a93a5c8837294e
DIST mysql-extras-20190305-2052Z.tar.bz2 331304 BLAKE2B 1d2c35a961159fa5ce9ee6699fce943f5a5b5cf60b11c9bb4bcccee4943f4508a9eb6d01050c642353ac592ce1a6b421abf2a1bebc706c44c4c8a36aa698ec43 SHA512 ae63403320e010acbb92f8aec6da8ed4f267cef0bad37147d594076fd94571de7f98bfc2afbe94af5d716f58d57696fd958b1e13e20e87052f252ed4a188cd3c

@ -1,975 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20190305-2052Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
# Keeping eutils in EAPI=6 for emktemp in pkg_config
inherit eutils systemd flag-o-matic prefix toolchain-funcs \
java-pkg-opt-2 user cmake-utils
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
# Gentoo patches to MySQL
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
SRC_URI="${SRC_URI}
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
fi
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2 LGPL-2.1+"
SLOT="10.2/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 mroonga
numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
sst-rsync sst-mariabackup sst-xtrabackup static systemd systemtap tcmalloc
test tokudb xml yassl"
RESTRICT="!bindist? ( bindist ) !test? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="ppc ppc64"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
S="${WORKDIR}/mysql"
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
EGIT_CLONE_TYPE=shallow
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
else
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
fi
PATCHES=(
"${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
"${MY_PATCH_DIR}"/20018_all_mariadb-10.2.16-without-clientlibs-tools.patch
"${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
"${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
"${MY_PATCH_DIR}"/20035_all_mariadb-10.2-atomic-detection.patch
)
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
COMMON_DEPEND="
kernel_linux? (
sys-process/procps:0=
dev-libs/libaio:0=
)
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
jemalloc? ( dev-libs/jemalloc:0= )
tcmalloc? ( dev-util/google-perftools:0= )
systemtap? ( >=dev-util/systemtap-1.3:0= )
>=sys-libs/zlib-1.2.3:0=
kerberos? ( virtual/krb5 )
yassl? ( net-libs/gnutls:0= )
!yassl? (
>=dev-libs/openssl-1.0.0:0=
)
sys-libs/ncurses:0=
!bindist? (
sys-libs/binutils-libs:0=
>=sys-libs/readline-4.1:0=
)
server? (
backup? ( app-arch/libarchive:0= )
cracklib? ( sys-libs/cracklib:0= )
extraengine? (
odbc? ( dev-db/unixODBC:0= )
xml? ( dev-libs/libxml2:2= )
)
innodb-lz4? ( app-arch/lz4 )
innodb-lzo? ( dev-libs/lzo )
innodb-snappy? ( app-arch/snappy )
mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
numa? ( sys-process/numactl )
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
pam? ( sys-libs/pam:0= )
systemd? ( sys-apps/systemd:= )
tokudb? ( app-arch/snappy )
)
>=dev-libs/libpcre-8.41-r1:3=
"
DEPEND="virtual/yacc
static? ( sys-libs/ncurses[static-libs] )
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
${COMMON_DEPEND}"
RDEPEND="selinux? ( sec-policy/selinux-mysql )
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
!dev-db/mariadb:0
!dev-db/mariadb:5.5
!dev-db/mariadb:10.1
!dev-db/mariadb:10.3
!dev-db/mariadb:10.4
!dev-db/mariadb:10.5
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
!<virtual/mysql-5.6-r11
${COMMON_DEPEND}
server? ( galera? (
sys-apps/iproute2
=sys-cluster/galera-25*
sst-rsync? ( sys-process/lsof )
sst-mariabackup? ( net-misc/socat[ssl] )
sst-xtrabackup? ( net-misc/socat[ssl] )
) )
perl? ( !dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes )
server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
"
# For other stuff to bring us in
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
server? ( ~virtual/mysql-5.6[static=]
galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
local GCC_MAJOR_SET=$(gcc-major-version)
local GCC_MINOR_SET=$(gcc-minor-version)
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
# non x86{,_64} arches
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
fi
java-pkg-opt-2_pkg_setup
if has test ${FEATURES} && \
use server && ! has userpriv ${FEATURES} ; then
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
# This should come after all of the die statements
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
pkg_preinst() {
java-pkg-opt-2_pkg_preinst
# Here we need to see if the implementation switched client libraries
# We check if this is a new instance of the package and a client library already exists
local SHOW_ABI_MESSAGE libpath
if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
elog "Due to ABI changes when switching between different client libraries,"
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
elog "Please run: revdep-rebuild --library ${libpath}"
ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
fi
}
pkg_postinst() {
# Make sure the vars are correctly initialized
mysql_init_vars
# Create log directory securely if it does not exist
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
if use server ; then
if use pam; then
einfo
elog "This install includes the PAM authentication plugin."
elog "To activate and configure the PAM plugin, please read:"
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
einfo
fi
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
einfo
elog "You might want to run:"
elog "\"emerge --config =${CATEGORY}/${PF}\""
elog "if this is a new install."
elog
elog "If you are switching server implentations, you should run the"
elog "mysql_upgrade tool."
einfo
else
einfo
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
fi
if use galera ; then
einfo
elog "Be sure to edit the my.cnf file to activate your cluster settings."
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
elog "The first time the cluster is activated, you should add"
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
elog "This option should then be removed for subsequent starts."
einfo
if use sst-xtrabackup ; then
ewarn "As per https://mariadb.com/kb/en/meta/xtrabackup_warning/, XtraBackup"
ewarn "as an SST is broken by default beginning with 10.2.19 with the setting"
ewarn "innodb_safe_truncate=ON. Please migrate to sst-mariabackup instead."
ewarn "sst-xtrabackup is being removed in 10.3 and higher."
fi
fi
fi
# Note about configuration change
einfo
elog "This version of mariadb reorganizes the configuration from a single my.cnf"
elog "to several files in /etc/mysql/${PN}.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 "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
}
src_unpack() {
unpack ${A}
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
mv -f "${WORKDIR%/}/${P}" "${S}" || die
}
src_prepare() {
_disable_plugin() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
_disable_engine() {
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
}
local malloc
for malloc in jemalloc tcmalloc ; do
if use ${malloc}; then
echo "TARGET_LINK_LIBRARIES(mysqld ${malloc})" >> "${S}/sql/CMakeLists.txt"
fi
done
# Don't build bundled xz-utils for tokudb
echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
local plugin
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
locale_info qc_info server_audit sql_errlog )
local test_plugins=( audit_null auth_examples daemon_example fulltext
debug_key_management example_key_management )
if ! use server; then # These plugins are for the server
for plugin in "${server_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
if ! use test; then # These plugins are only used during testing
for plugin in "${test_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
_disable_engine test_sql_discovery
fi
_disable_engine example
if ! use oqgraph ; then # avoids extra library checks
_disable_engine oqgraph
fi
if use mroonga ; then
# Remove the bundled groonga
# There is no CMake flag, it simply checks for existance
rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
else
_disable_engine mroonga
fi
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure() {
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
append-cxxflags -felide-constructors
# bug #283926, with GCC4.4, this is required to get correct behavior.
append-flags -fno-strict-aliasing
CMAKE_BUILD_TYPE="RelWithDebInfo"
# debug hack wrt #497532
mycmakeargs=(
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-DINSTALL_BINDIR=bin
-DINSTALL_DOCDIR=share/doc/${PF}
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_INFODIR=share/info
-DINSTALL_LIBDIR=$(get_libdir)
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
-DWITH_COMMENT="Gentoo Linux ${PF}"
-DWITH_UNIT_TESTS=$(usex test ON OFF)
-DWITH_LIBEDIT=0
-DWITH_ZLIB=system
-DWITHOUT_LIBWRAP=1
-DENABLED_LOCAL_INFILE=1
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-DWITH_DEFAULT_COMPILER_OPTIONS=0
-DWITH_DEFAULT_FEATURE_SET=0
-DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
# The build forces this to be defined when cross-compiling. We pass it
# all the time for simplicity and to make sure it is actually correct.
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
-DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
-DCONC_WITH_EXTERNAL_ZLIB=YES
-DWITH_EXTERNAL_ZLIB=YES
-DSUFFIX_INSTALL_DIR=""
-DWITH_UNITTEST=OFF
-DWITHOUT_CLIENTLIBS=YES
-DCLIENT_PLUGIN_DIALOG=OFF
-DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
-DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
-DCLIENT_PLUGIN_CACHING_SHA2_PASSWORD=OFF
)
if use test ; then
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
else
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
fi
if ! use yassl ; then
mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
else
mycmakeargs+=( -DWITH_SSL=bundled )
fi
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
mycmakeargs+=(
-DWITH_READLINE=$(usex bindist 1 0)
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
-DENABLE_DTRACE=$(usex systemtap)
)
if use server ; then
# Federated{,X} must be treated special otherwise they will not be built as plugins
if ! use extraengine ; then
mycmakeargs+=(
-DPLUGIN_FEDERATED=NO
-DPLUGIN_FEDERATEDX=NO )
fi
mycmakeargs+=(
-DWITH_JEMALLOC=$(usex jemalloc system)
-DWITH_PCRE=system
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
-DPLUGIN_TOKUDB=$(usex tokudb YES NO)
-DPLUGIN_AUTH_PAM=$(usex pam YES NO)
-DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
-DPLUGIN_CASSANDRA=NO
-DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
-DPLUGIN_SPIDER=$(usex extraengine YES NO)
-DPLUGIN_CONNECT=$(usex extraengine YES NO)
-DCONNECT_WITH_MYSQL=1
-DCONNECT_WITH_LIBXML2=$(usex xml)
-DCONNECT_WITH_ODBC=$(usex odbc)
-DCONNECT_WITH_JDBC=$(usex jdbc)
# Build failure and autodep wrt bug 639144
-DCONNECT_WITH_MONGO=OFF
-DWITH_WSREP=$(usex galera)
-DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
-DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
-DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
-DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
-DWITH_MARIABACKUP=$(usex backup ON OFF)
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
-DINSTALL_SQLBENCHDIR=share/mariadb
-DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
# systemd is only linked to for server notification
-DWITH_SYSTEMD=$(usex systemd yes no)
-DWITH_NUMA=$(usex numa ON OFF)
)
# Workaround for MDEV-14524
use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
if use test ; then
# This is needed for the new client lib which tests a real, open server
mycmakeargs+=( -DSKIP_TESTS=ON )
fi
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
mycmakeargs+=(
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
)
elif ! use latin1 ; then
mycmakeargs+=(
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
)
else
mycmakeargs+=(
-DDEFAULT_CHARSET=latin1
-DDEFAULT_COLLATION=latin1_swedish_ci
)
fi
mycmakeargs+=(
-DEXTRA_CHARSETS=all
-DMYSQL_USER=mysql
-DDISABLE_SHARED=$(usex static YES NO)
-DWITH_DEBUG=$(usex debug)
-DWITH_EMBEDDED_SERVER=OFF
-DWITH_PROFILING=$(usex profiling)
)
if use static; then
mycmakeargs+=( -DWITH_PIC=1 )
fi
if use jemalloc || use tcmalloc ; then
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
fi
# Storage engines
mycmakeargs+=(
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_CSV_STORAGE_ENGINE=1
-DWITH_HEAP_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
)
else
mycmakeargs+=(
-DWITHOUT_SERVER=1
-DWITH_EMBEDDED_SERVER=OFF
-DEXTRA_CHARSETS=none
-DINSTALL_SQLBENCHDIR=
-DWITH_SYSTEMD=no
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
}
src_install() {
cmake-utils_src_install
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
rm "${ED}/usr/include/mysql/server/private/config.h" || die
fi
# Make sure the vars are correctly initialized
mysql_init_vars
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
if [[ -d "${ED}/usr/data" ]] ; then
rm -Rf "${ED}/usr/data" || die
fi
# Unless they explicitly specific USE=test, then do not install the
# testsuite. It DOES have a use to be installed, esp. when you want to do a
# validation of your database configuration after tuning it.
if ! use test ; then
rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
fi
# Configuration stuff
einfo "Building default configuration ..."
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
eprefixify "${TMPDIR}/my.cnf"
doins "${TMPDIR}/my.cnf"
insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
eprefixify "${TMPDIR}/50-distro-client.cnf"
doins "${TMPDIR}/50-distro-client.cnf"
if use server ; then
mycnf_src="my.cnf.distro-server"
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
docinto "scripts"
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
}
# Official test instructions:
# USE='extraengine perl server' \
# FEATURES='test userpriv -usersandbox' \
# ebuild mariadb-X.X.XX.ebuild \
# digest clean package
src_test() {
_disable_test() {
local rawtestname reason
rawtestname="${1}" ; shift
reason="${@}"
ewarn "test '${rawtestname}' disabled: '${reason}'"
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
}
local TESTDIR="${BUILD_DIR}/mysql-test"
local retstatus_unit
local retstatus_tests
if ! use server ; then
einfo "Skipping server tests due to minimal build."
return 0
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ $UID -eq 0 ]]; then
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
# Run CTest (test-units)
cmake-utils_src_test
retstatus_unit=$?
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# Enable parallel testing, auto will try to detect number of cores
# You may set this by hand.
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
# create directories because mysqladmin might run out of order
mkdir -p "${T}"/var-tests{,/log} || die
# Run mysql tests
pushd "${TESTDIR}" > /dev/null || die
touch "${T}/disabled.def"
# These are failing in MariaDB 10.0 for now and are believed to be
# false positives:
#
# main.mysql_client_test, main.mysql_client_test_nonblock
# main.mysql_client_test_comp:
# segfaults at random under Portage only, suspect resource limits.
local t
for t in plugins.cracklib_password_check plugins.two_password_validations ; do
_disable_test "$t" "False positive due to varying policies"
done
for t in main.mysql_client_test main.mysql_client_test_nonblock \
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
_disable_test "$t" "False positives in Gentoo"
done
_disable_test main.plugin_auth "Needs client libraries built"
_disable_test main.mysqldump "Test fails past 2018-12-31 due to event expiration"
# Likely environment issues as only number of clients connected fails
_disable_test rpl.rpl_semi_sync_uninstall_plugin \
"Fails intermittently on parallel testing"
# run mysql-test tests
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
retstatus_tests=$?
popd > /dev/null || die
# Cleanup is important for these testcases.
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
local failures=""
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
[[ -z "$failures" ]] || die "Test failures: $failures"
einfo "Tests successfully completed"
}
mysql_init_vars() {
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=""
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
| sed -e 's/.*=\s*//' \
| tail -n1`
fi
fi
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR="${MY_LOCALSTATEDIR}"
einfo "Using default MY_DATADIR"
fi
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
if [[ -e "${MY_DATADIR}" ]] ; then
# If you get this and you're wondering about it, see bug #207636
elog "MySQL datadir found in ${MY_DATADIR}"
elog "A new one will not be created."
PREVIOUS_DATADIR="yes"
else
PREVIOUS_DATADIR="no"
fi
export PREVIOUS_DATADIR
fi
else
if [[ ${EBUILD_PHASE} == "config" ]]; then
local new_MY_DATADIR
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
ewarn "MySQL MY_DATADIR has changed"
ewarn "from ${MY_DATADIR}"
ewarn "to ${new_MY_DATADIR}"
MY_DATADIR="${new_MY_DATADIR}"
fi
fi
fi
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
export MY_LOCALSTATEDIR MY_LOGDIR
export MY_DATADIR
}
pkg_config() {
_getoptval() {
local mypd="${EROOT}"/usr/bin/my_print_defaults
local section="$1"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
fi
einfo "Found password in '${tmp_mysqld_password_source}' section!"
break
fi
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
einfo "Please provide a password for the mysql 'root' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
fi
local options
local sqltmp="$(emktemp)"
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
pushd "${TMPDIR}" &>/dev/null || die
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [ $? -ne 0 ]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
fi
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
eend $?
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
}

@ -25,7 +25,7 @@ IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
sst-rsync sst-mariabackup sst-xtrabackup static systemd systemtap tcmalloc
test tokudb xml yassl"
RESTRICT="!bindist? ( bindist ) test? ( test )"
RESTRICT="!bindist? ( bindist ) !test? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )

@ -10,7 +10,7 @@ inherit eutils systemd flag-o-matic prefix toolchain-funcs \
multiprocessing java-pkg-opt-2 cmake
# Patch version
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.3.24-patches-01.tar.xz"
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.2.38-patches-01.tar.xz"
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
${PATCH_SET}"
@ -18,11 +18,11 @@ SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2 LGPL-2.1+"
SLOT="10.3/${SUBSLOT:-0}"
SLOT="10.2/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 mroonga
numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
sst-rsync sst-mariabackup static systemd systemtap tcmalloc
sst-rsync sst-mariabackup sst-xtrabackup static systemd systemtap tcmalloc
test tokudb xml yassl"
RESTRICT="!bindist? ( bindist ) !test? ( test )"
@ -85,7 +85,7 @@ BDEPEND="virtual/yacc
"
DEPEND="static? ( sys-libs/ncurses[static-libs] )
server? (
extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
extraengine? ( jdbc? ( >=virtual/jdk-1.8 ) )
test? ( acct-group/mysql acct-user/mysql )
)
${COMMON_DEPEND}"
@ -94,9 +94,10 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql )
!dev-db/mariadb:0
!dev-db/mariadb:5.5
!dev-db/mariadb:10.1
!dev-db/mariadb:10.2
!dev-db/mariadb:10.3
!dev-db/mariadb:10.4
!dev-db/mariadb:10.5
!dev-db/mariadb:10.6
!<virtual/mysql-5.6-r11
${COMMON_DEPEND}
server? (
@ -105,21 +106,23 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql )
=sys-cluster/galera-25*
sst-rsync? ( sys-process/lsof )
sst-mariabackup? ( net-misc/socat[ssl] )
sst-xtrabackup? ( net-misc/socat[ssl] )
)
!prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
)
perl? (
!dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes
extraengine? ( jdbc? ( >=virtual/jre-1.8 ) )
)
"
# For other stuff to bring us in
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
server? (
galera? (
sst-xtrabackup? (
|| ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup )
)
)
)"
mysql_init_vars() {
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
@ -245,7 +248,7 @@ src_prepare() {
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
locale_info qc_info server_audit sql_errlog auth_ed25519 )
local test_plugins=( audit_null auth_examples daemon_example fulltext
debug_key_management example_key_management versioning )
debug_key_management example_key_management )
if ! use server; then # These plugins are for the server
for plugin in "${server_plugins[@]}" ; do
_disable_plugin "${plugin}"
@ -309,7 +312,7 @@ src_configure() {
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_SCRIPTDIR=bin
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
@ -370,6 +373,7 @@ src_configure() {
fi
mycmakeargs+=(
-DWITH_JEMALLOC=$(usex jemalloc system)
-DWITH_PCRE=system
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
@ -394,7 +398,7 @@ src_configure() {
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
-DWITH_MARIABACKUP=$(usex backup ON OFF)
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
-DINSTALL_SQLBENCHDIR=""
-DINSTALL_SQLBENCHDIR=share/mariadb
-DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
# systemd is only linked to for server notification
-DWITH_SYSTEMD=$(usex systemd yes no)
@ -556,9 +560,12 @@ src_test() {
local -a disabled_tests
disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
disabled_tests+=( "innodb_gis.1;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "innodb_gis.gis;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
disabled_tests+=( "main.grant;0;Sporadically failing test" )
disabled_tests+=( "main.join_cache;0;Sporadically failing test" )
disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
@ -571,6 +578,7 @@ src_test() {
if ! use latin1 ; then
disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
fi
@ -682,23 +690,21 @@ src_install() {
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
# Remove mytop if perl is not selected
if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
rm -f "${ED}/usr/bin/mytop" || die
fi
# Remove bundled mytop in favor of dev-db/mytop
local mytop_file
for mytop_file in \
"${ED}/usr/bin/mytop" \
"${ED}/usr/share/man/man1/mytop.1" \
; do
if [[ -e "${mytop_file}" ]] ; then
rm -v "${mytop_file}" || die
fi
done
# Fix a dangling symlink when galera is not built
if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
rm "${ED}/usr/bin/wsrep_sst_rsync_wan" || die
fi
# Remove broken SST scripts that are incompatible
local scriptremove
for scriptremove in wsrep_sst_xtrabackup wsrep_sst_xtrabackup-v2 ; do
if [[ -e "${ED}/usr/bin/${scriptremove}" ]] ; then
rm "${ED}/usr/bin/${scriptremove}" || die
fi
done
}
pkg_preinst() {
@ -756,6 +762,12 @@ pkg_postinst() {
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
elog "This option should then be removed for subsequent starts."
einfo
if use sst-xtrabackup ; then
ewarn "As per https://mariadb.com/kb/en/meta/xtrabackup_warning/, XtraBackup"
ewarn "as an SST is broken by default beginning with 10.2.19 with the setting"
ewarn "innodb_safe_truncate=ON. Please migrate to sst-mariabackup instead."
ewarn "sst-xtrabackup is being removed in 10.3 and higher."
fi
fi
fi
@ -772,63 +784,312 @@ pkg_postinst() {
pkg_config() {
_getoptval() {
local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults
local section="$1"
local section="${1}"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
local cmd=(
"${my_print_defaults_binary}"
"${extra_options}"
"${section}"
)
local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
if [[ ${#results[@]} -gt 0 ]] ; then
# When option is set multiple times only return last value
echo "${results[-1]}"
fi
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
_mktemp_dry() {
# emktemp has no --dry-run option
local template="${1}"
if [[ -z "${template}" ]] ; then
if [[ -z "${T}" ]] ; then
template="/tmp/XXXXXXX"
else
template="${T}/XXXXXXX"
fi
fi
local template_wo_X=${template//X/}
local n_X
let n_X=${#template}-${#template_wo_X}
if [[ ${n_X} -lt 3 ]] ; then
echo "${FUNCNAME[0]}: too few X's in template ${template}" >&2
return
fi
local attempts=0
local character tmpfile
while [[ true ]] ; do
let attempts=attempts+1
new_file=
while read -n1 character ; do
if [[ "${character}" == "X" ]] ; then
tmpfile+="${RANDOM:0:1}"
else
tmpfile+="${character}"
fi
done < <(echo -n "${template}")
if [[ ! -f "${tmpfile}" ]]
then
echo "${tmpfile}"
return
fi
if [[ ${attempts} -ge 100 ]] ; then
echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
return
fi
done
}
local mysql_binary="${EROOT}/usr/bin/mysql"
if [[ ! -x "${mysql_binary}" ]] ; then
die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysqld_binary="${EROOT}/usr/sbin/mysqld"
if [[ ! -x "${mysqld_binary}" ]] ; then
die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db"
if [[ ! -x "${mysql_install_db_binary}" ]] ; then
die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
if [[ ! -x "${my_print_defaults_binary}" ]] ; then
die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
fi
if [[ -z "${MYSQL_USER}" ]] ; then
MYSQL_USER=mysql
if use prefix ; then
MYSQL_USER=$(id -u -n 2>/dev/null)
if [[ -z "${MYSQL_USER}" ]] ; then
die "Failed to determine current username!"
fi
fi
fi
if [[ -z "${MYSQL_GROUP}" ]] ; then
MYSQL_GROUP=mysql
if use prefix ; then
MYSQL_GROUP=$(id -g -n 2>/dev/null)
if [[ -z "${MYSQL_GROUP}" ]] ; then
die "Failed to determine current user groupname!"
fi
fi
fi
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
local -x HOME="${EROOT}/root"
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
# Read currently set data directory
MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MY_DATADIR}" ]] ; then
die "Sorry, unable to find MY_DATADIR!"
elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
ewarn "Please rename or delete its content if you wish to initialize a new data directory."
die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
# These are dir+prefix
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
# Create missing directories.
# Always check if mysql user can write to directory even if we just
# created directory because a parent directory might be not
# accessible for that user.
PID_DIR="${EROOT}/run/mysqld"
if [[ ! -d "${PID_DIR}" ]] ; then
einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
|| die "Failed to create PID directory '${PID_DIR}'!"
fi
local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_pid_dir_testfile}" ]] \
&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_pid_dir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
else
rm "${_pid_dir_testfile}" || die
unset _pid_dir_testfile
fi
if [[ ! -d "${MY_DATADIR}" ]] ; then
einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
fi
local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_datadir_testfile}" ]] \
&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_datadir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
else
rm "${_my_datadir_testfile}" || die
unset _my_datadir_testfile
fi
if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
fi
if [[ -z "${MYSQL_TMPDIR}" ]] ; then
MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
[[ -z "${MYSQL_TMPDIR}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
mkdir "${MYSQL_TMPDIR}" || die
chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
fi
# Now we need to test MYSQL_TMPDIR...
local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_tmpdir_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_tmpdir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
else
rm "${_my_tmpdir_testfile}" || die
unset _my_tmpdir_testfile
fi
if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
fi
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_logbin_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_logbin_testfile}" &>/dev/null
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
else
rm "${_my_logbin_testfile}" || die
unset _my_logbin_testfile
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_relaylog_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
if use prefix ; then
touch "${_my_relaylog_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
else
rm "${_my_relaylog_testfile}" || die
unset _my_relaylog_testfile
fi
fi
local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null)
[[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir"
# Limit access
chmod 0770 "${SETUP_TMPDIR}" || die
chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die
local mysql_install_log="${SETUP_TMPDIR}/install_db.log"
local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log"
echo ""
einfo "Detected settings:"
einfo "=================="
einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
fi
einfo "PID DIR:\t\t\t\t${PID_DIR}"
einfo "Install db log:\t\t\t${mysql_install_log}"
einfo "Install server log:\t\t\t${mysqld_logfile}"
echo
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
for tmp_mysqld_password_source in mysql client ; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
@ -840,167 +1101,188 @@ pkg_config() {
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then
einfo "Please provide a password for the mysql 'root'@'localhost' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local pwd1="a"
local pwd2="b"
echo
einfo "No password for mysql 'root' user was specified via environment"
einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
einfo "file like '${HOME}/.my.cnf'."
einfo "To continue please provide a password for the mysql 'root' user"
einfo "now on console:"
ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
if [[ "x${pwd1}" != "x${pwd2}" ]] ; then
die "Passwords are not the same!"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
echo
fi
local options
local sqltmp="$(emktemp)"
local -a mysqld_options
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# see http://bugs.mysql.com/bug.php?id=31312
use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
local opt optexp optfull
for opt in host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Prepare timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
local tz_sql="${SETUP_TMPDIR}/tz.sql"
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
echo "USE mysql;" >"${tz_sql}"
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
if [[ $? -ne 0 ]] ; then
die "mysql_tzinfo_to_sql failed!"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
local cmd=(
"${mysql_install_db_binary}"
"${mysqld_options[@]}"
"--init-file='${tz_sql}'"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
"--log-error='${mysql_install_log}'"
"--rpm"
"--cross-bootstrap"
"--user=${MYSQL_USER}"
)
pushd "${TMPDIR}" &>/dev/null || die
einfo "Initializing ${PN} data directory: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [[ $? -ne 0 ]]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
local x=${RANDOM}
local socket="${PID_DIR}/mysqld.${x}.sock"
[[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!"
local pidfile="${PID_DIR}/mysqld.${x}.pid"
[[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!"
unset x
cmd=(
"${mysqld_binary}"
"${mysqld_options[@]}"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
--max_allowed_packet=8M
--net_buffer_length=16K
"--socket='${socket}'"
"--pid-file='${pidfile}'"
"--log-error='${mysqld_logfile}'"
"--user=${MYSQL_USER}"
)
einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
echo -n "Waiting for mysqld to accept connections "
local maxtry=15
while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
if [[ -S "${socket}" ]] ; then
# Even with a socket we don't know if mysqld will abort
# start due to an error so just wait a little bit more...
maxtry=5
while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
fi
echo
if [[ ! -S "${socket}" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
fi
local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log"
touch "${mysql_logfile}" || die
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
eend $?
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
cmd=(
"${mysql_binary}"
--no-defaults
"--socket='${socket}'"
-hlocalhost
"-e \"${sql}\""
)
eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
local rc=$?
eend ${rc}
if [[ ${rc} -ne 0 ]] ; then
# Poor man's solution which tries to avoid having password
# in log. NOTE: sed can fail if user didn't follow advice
# and included character which will require escaping...
sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
fi
# Stop the server
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
echo -n "Stopping the server "
pkill -F "${pidfile}" &>/dev/null
maxtry=10
while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
echo
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
# We somehow failed to stop server.
# However, not a fatal error. Just warn the user.
ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
fi
fi
rm -r "${SETUP_TMPDIR}" || die
einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
}

File diff suppressed because it is too large Load Diff

@ -10,7 +10,7 @@ inherit eutils systemd flag-o-matic prefix toolchain-funcs \
multiprocessing java-pkg-opt-2 cmake
# Patch version
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.3.26-patches-01.tar.xz"
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.3.29-patches-01.tar.xz"
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
${PATCH_SET}"
@ -85,7 +85,7 @@ BDEPEND="virtual/yacc
"
DEPEND="static? ( sys-libs/ncurses[static-libs] )
server? (
extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
extraengine? ( jdbc? ( >=virtual/jdk-1.8 ) )
test? ( acct-group/mysql acct-user/mysql )
)
${COMMON_DEPEND}"
@ -97,6 +97,7 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql )
!dev-db/mariadb:10.2
!dev-db/mariadb:10.4
!dev-db/mariadb:10.5
!dev-db/mariadb:10.6
!<virtual/mysql-5.6-r11
${COMMON_DEPEND}
server? (
@ -107,14 +108,7 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql )
sst-mariabackup? ( net-misc/socat[ssl] )
)
!prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
)
perl? (
!dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes
extraengine? ( jdbc? ( >=virtual/jre-1.8 ) )
)
"
# For other stuff to bring us in
@ -231,9 +225,9 @@ src_prepare() {
}
if use jemalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt"
echo "TARGET_LINK_LIBRARIES(mysqld LINK_PUBLIC jemalloc)" >> "${S}/sql/CMakeLists.txt"
elif use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
echo "TARGET_LINK_LIBRARIES(mysqld LINK_PUBLIC tcmalloc)" >> "${S}/sql/CMakeLists.txt"
fi
# Don't build bundled xz-utils for tokudb
@ -309,7 +303,7 @@ src_configure() {
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_SCRIPTDIR=bin
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
@ -556,6 +550,8 @@ src_test() {
local -a disabled_tests
disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
disabled_tests+=( "innodb_gis.1;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "innodb_gis.gis;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
disabled_tests+=( "main.grant;0;Sporadically failing test" )
@ -683,10 +679,16 @@ src_install() {
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
# Remove mytop if perl is not selected
if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
rm -f "${ED}/usr/bin/mytop" || die
fi
# Remove bundled mytop in favor of dev-db/mytop
local mytop_file
for mytop_file in \
"${ED}/usr/bin/mytop" \
"${ED}/usr/share/man/man1/mytop.1" \
; do
if [[ -e "${mytop_file}" ]] ; then
rm -v "${mytop_file}" || die
fi
done
# Fix a dangling symlink when galera is not built
if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
@ -773,63 +775,312 @@ pkg_postinst() {
pkg_config() {
_getoptval() {
local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults
local section="$1"
local section="${1}"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
local cmd=(
"${my_print_defaults_binary}"
"${extra_options}"
"${section}"
)
local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
if [[ ${#results[@]} -gt 0 ]] ; then
# When option is set multiple times only return last value
echo "${results[-1]}"
fi
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
_mktemp_dry() {
# emktemp has no --dry-run option
local template="${1}"
if [[ -z "${template}" ]] ; then
if [[ -z "${T}" ]] ; then
template="/tmp/XXXXXXX"
else
template="${T}/XXXXXXX"
fi
fi
local template_wo_X=${template//X/}
local n_X
let n_X=${#template}-${#template_wo_X}
if [[ ${n_X} -lt 3 ]] ; then
echo "${FUNCNAME[0]}: too few X's in template ${template}" >&2
return
fi
local attempts=0
local character tmpfile
while [[ true ]] ; do
let attempts=attempts+1
new_file=
while read -n1 character ; do
if [[ "${character}" == "X" ]] ; then
tmpfile+="${RANDOM:0:1}"
else
tmpfile+="${character}"
fi
done < <(echo -n "${template}")
if [[ ! -f "${tmpfile}" ]]
then
echo "${tmpfile}"
return
fi
if [[ ${attempts} -ge 100 ]] ; then
echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
return
fi
done
}
local mysql_binary="${EROOT}/usr/bin/mysql"
if [[ ! -x "${mysql_binary}" ]] ; then
die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysqld_binary="${EROOT}/usr/sbin/mysqld"
if [[ ! -x "${mysqld_binary}" ]] ; then
die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db"
if [[ ! -x "${mysql_install_db_binary}" ]] ; then
die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
if [[ ! -x "${my_print_defaults_binary}" ]] ; then
die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
fi
if [[ -z "${MYSQL_USER}" ]] ; then
MYSQL_USER=mysql
if use prefix ; then
MYSQL_USER=$(id -u -n 2>/dev/null)
if [[ -z "${MYSQL_USER}" ]] ; then
die "Failed to determine current username!"
fi
fi
fi
if [[ -z "${MYSQL_GROUP}" ]] ; then
MYSQL_GROUP=mysql
if use prefix ; then
MYSQL_GROUP=$(id -g -n 2>/dev/null)
if [[ -z "${MYSQL_GROUP}" ]] ; then
die "Failed to determine current user groupname!"
fi
fi
fi
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
local -x HOME="${EROOT}/root"
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
# Read currently set data directory
MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MY_DATADIR}" ]] ; then
die "Sorry, unable to find MY_DATADIR!"
elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
ewarn "Please rename or delete its content if you wish to initialize a new data directory."
die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
# These are dir+prefix
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
# Create missing directories.
# Always check if mysql user can write to directory even if we just
# created directory because a parent directory might be not
# accessible for that user.
PID_DIR="${EROOT}/run/mysqld"
if [[ ! -d "${PID_DIR}" ]] ; then
einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
|| die "Failed to create PID directory '${PID_DIR}'!"
fi
local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_pid_dir_testfile}" ]] \
&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_pid_dir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
else
rm "${_pid_dir_testfile}" || die
unset _pid_dir_testfile
fi
if [[ ! -d "${MY_DATADIR}" ]] ; then
einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
fi
local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_datadir_testfile}" ]] \
&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_datadir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
else
rm "${_my_datadir_testfile}" || die
unset _my_datadir_testfile
fi
if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
fi
if [[ -z "${MYSQL_TMPDIR}" ]] ; then
MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
[[ -z "${MYSQL_TMPDIR}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
mkdir "${MYSQL_TMPDIR}" || die
chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
fi
# Now we need to test MYSQL_TMPDIR...
local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_tmpdir_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_tmpdir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
else
rm "${_my_tmpdir_testfile}" || die
unset _my_tmpdir_testfile
fi
if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
fi
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_logbin_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_logbin_testfile}" &>/dev/null
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
else
rm "${_my_logbin_testfile}" || die
unset _my_logbin_testfile
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_relaylog_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
if use prefix ; then
touch "${_my_relaylog_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
else
rm "${_my_relaylog_testfile}" || die
unset _my_relaylog_testfile
fi
fi
local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null)
[[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir"
# Limit access
chmod 0770 "${SETUP_TMPDIR}" || die
chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die
local mysql_install_log="${SETUP_TMPDIR}/install_db.log"
local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log"
echo ""
einfo "Detected settings:"
einfo "=================="
einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
fi
einfo "PID DIR:\t\t\t\t${PID_DIR}"
einfo "Install db log:\t\t\t${mysql_install_log}"
einfo "Install server log:\t\t\t${mysqld_logfile}"
echo
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
for tmp_mysqld_password_source in mysql client ; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
@ -841,167 +1092,189 @@ pkg_config() {
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then
einfo "Please provide a password for the mysql 'root'@'localhost' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local pwd1="a"
local pwd2="b"
echo
einfo "No password for mysql 'root' user was specified via environment"
einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
einfo "file like '${HOME}/.my.cnf'."
einfo "To continue please provide a password for the mysql 'root' user"
einfo "now on console:"
ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
if [[ "x${pwd1}" != "x${pwd2}" ]] ; then
die "Passwords are not the same!"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
echo
fi
local options
local sqltmp="$(emktemp)"
local -a mysqld_options
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# see http://bugs.mysql.com/bug.php?id=31312
use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
local opt optexp optfull
for opt in host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Prepare timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
local tz_sql="${SETUP_TMPDIR}/tz.sql"
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
echo "USE mysql;" >"${tz_sql}"
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
if [[ $? -ne 0 ]] ; then
die "mysql_tzinfo_to_sql failed!"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
local cmd=(
"${mysql_install_db_binary}"
"${mysqld_options[@]}"
"--init-file='${tz_sql}'"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
"--log-error='${mysql_install_log}'"
"--rpm"
"--cross-bootstrap"
"--skip-test-db"
"--user=${MYSQL_USER}"
)
pushd "${TMPDIR}" &>/dev/null || die
einfo "Initializing ${PN} data directory: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [[ $? -ne 0 ]]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
local x=${RANDOM}
local socket="${PID_DIR}/mysqld.${x}.sock"
[[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!"
local pidfile="${PID_DIR}/mysqld.${x}.pid"
[[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!"
unset x
cmd=(
"${mysqld_binary}"
"${mysqld_options[@]}"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
--max_allowed_packet=8M
--net_buffer_length=16K
"--socket='${socket}'"
"--pid-file='${pidfile}'"
"--log-error='${mysqld_logfile}'"
"--user=${MYSQL_USER}"
)
einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
echo -n "Waiting for mysqld to accept connections "
local maxtry=15
while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
if [[ -S "${socket}" ]] ; then
# Even with a socket we don't know if mysqld will abort
# start due to an error so just wait a little bit more...
maxtry=5
while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
fi
echo
if [[ ! -S "${socket}" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
fi
local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log"
touch "${mysql_logfile}" || die
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
eend $?
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
cmd=(
"${mysql_binary}"
--no-defaults
"--socket='${socket}'"
-hlocalhost
"-e \"${sql}\""
)
eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
local rc=$?
eend ${rc}
if [[ ${rc} -ne 0 ]] ; then
# Poor man's solution which tries to avoid having password
# in log. NOTE: sed can fail if user didn't follow advice
# and included character which will require escaping...
sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
fi
# Stop the server
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
echo -n "Stopping the server "
pkill -F "${pidfile}" &>/dev/null
maxtry=10
while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
echo
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
# We somehow failed to stop server.
# However, not a fatal error. Just warn the user.
ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
fi
fi
rm -r "${SETUP_TMPDIR}" || die
einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
}

@ -10,7 +10,7 @@ inherit eutils systemd flag-o-matic prefix toolchain-funcs \
multiprocessing java-pkg-opt-2 cmake
# Patch version
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.5.8-patches-01.tar.xz"
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.4.19-patches-01.tar.xz"
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
${PATCH_SET}"
@ -18,16 +18,17 @@ SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2 LGPL-2.1+"
SLOT="10.5/${SUBSLOT:-0}"
IUSE="+backup bindist columnstore cracklib debug extraengine galera innodb-lz4
SLOT="10.4/${SUBSLOT:-0}"
IUSE="+backup bindist cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 mroonga
numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
sst-rsync sst-mariabackup static systemd systemtap s3 tcmalloc
test xml yassl"
sst-rsync sst-mariabackup static systemd systemtap tcmalloc
test tokudb xml yassl"
RESTRICT="!bindist? ( bindist ) !test? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
@ -40,30 +41,28 @@ S="${WORKDIR}/mysql"
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
COMMON_DEPEND="
>=dev-libs/libpcre-8.41-r1:3=
kernel_linux? (
sys-process/procps:0=
dev-libs/libaio:0=
)
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
sys-libs/ncurses:0=
jemalloc? ( dev-libs/jemalloc:0= )
tcmalloc? ( dev-util/google-perftools:0= )
systemtap? ( >=dev-util/systemtap-1.3:0= )
>=sys-libs/zlib-1.2.3:0=
kerberos? ( virtual/krb5 )
yassl? ( net-libs/gnutls:0= )
!yassl? (
>=dev-libs/openssl-1.0.0:0=
)
sys-libs/ncurses:0=
!bindist? (
sys-libs/binutils-libs:0=
>=sys-libs/readline-4.1:0=
)
jemalloc? ( dev-libs/jemalloc:0= )
kerberos? ( virtual/krb5 )
kernel_linux? (
sys-process/procps:0=
dev-libs/libaio:0=
)
server? (
app-arch/bzip2
app-arch/xz-utils
backup? ( app-arch/libarchive:0= )
columnstore? (
app-arch/snappy
dev-libs/boost:0=
dev-libs/libxml2:2=
)
cracklib? ( sys-libs/cracklib:0= )
extraengine? (
odbc? ( dev-db/unixODBC:0= )
@ -76,40 +75,33 @@ COMMON_DEPEND="
numa? ( sys-process/numactl )
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
pam? ( sys-libs/pam:0= )
s3? ( net-misc/curl )
systemd? ( sys-apps/systemd:= )
tokudb? ( app-arch/snappy )
)
systemtap? ( >=dev-util/systemtap-1.3:0= )
tcmalloc? ( dev-util/google-perftools:0= )
yassl? ( net-libs/gnutls:0= )
!yassl? (
>=dev-libs/openssl-1.0.0:0=
)
>=dev-libs/libpcre-8.41-r1:3=
"
BDEPEND="virtual/yacc
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
"
DEPEND="${COMMON_DEPEND}
DEPEND="static? ( sys-libs/ncurses[static-libs] )
server? (
extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
extraengine? ( jdbc? ( >=virtual/jdk-1.8 ) )
test? ( acct-group/mysql acct-user/mysql )
)
static? ( sys-libs/ncurses[static-libs] )
"
RDEPEND="${COMMON_DEPEND}
${COMMON_DEPEND}"
RDEPEND="selinux? ( sec-policy/selinux-mysql )
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
!dev-db/mariadb:0
!dev-db/mariadb:5.5
!dev-db/mariadb:10.1
!dev-db/mariadb:10.2
!dev-db/mariadb:10.3
!dev-db/mariadb:10.4
!dev-db/mariadb:10.5
!dev-db/mariadb:10.6
!<virtual/mysql-5.6-r11
!<virtual/libmysqlclient-18-r1
selinux? ( sec-policy/selinux-mysql )
${COMMON_DEPEND}
server? (
columnstore? ( dev-db/mariadb-connector-c )
extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
galera? (
sys-apps/iproute2
=sys-cluster/galera-26*
@ -117,13 +109,7 @@ RDEPEND="${COMMON_DEPEND}
sst-mariabackup? ( net-misc/socat[ssl] )
)
!prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
)
perl? (
!dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes
extraengine? ( jdbc? ( >=virtual/jre-1.8 ) )
)
"
# For other stuff to bring us in
@ -191,6 +177,13 @@ pkg_setup() {
local GCC_MAJOR_SET=$(gcc-major-version)
local GCC_MINOR_SET=$(gcc-minor-version)
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
# non x86{,_64} arches
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
@ -233,11 +226,16 @@ src_prepare() {
}
if use jemalloc; then
echo "TARGET_LINK_LIBRARIES(mariadbd jemalloc)" >> "${S}/sql/CMakeLists.txt"
echo "TARGET_LINK_LIBRARIES(mysqld LINK_PUBLIC jemalloc)" >> "${S}/sql/CMakeLists.txt"
elif use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mariadbd tcmalloc)" >> "${S}/sql/CMakeLists.txt"
echo "TARGET_LINK_LIBRARIES(mysqld LINK_PUBLIC tcmalloc)" >> "${S}/sql/CMakeLists.txt"
fi
# Don't build bundled xz-utils for tokudb
echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
local plugin
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
locale_info qc_info server_audit sql_errlog auth_ed25519 )
@ -319,7 +317,7 @@ src_configure() {
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_SCRIPTDIR=bin
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
@ -376,21 +374,19 @@ src_configure() {
if ! use extraengine ; then
mycmakeargs+=(
-DPLUGIN_FEDERATED=NO
-DPLUGIN_FEDERATEDX=NO
)
-DPLUGIN_FEDERATEDX=NO )
fi
mycmakeargs+=(
-DWITH_PCRE=system
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
-DPLUGIN_TOKUDB=$(usex tokudb YES NO)
-DPLUGIN_AUTH_PAM=$(usex pam YES NO)
-DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
-DPLUGIN_CASSANDRA=NO
-DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
-DPLUGIN_SPIDER=$(usex extraengine YES NO)
-DPLUGIN_S3=$(usex s3 YES NO)
-DPLUGIN_COLUMNSTORE=$(usex columnstore YES NO)
-DPLUGIN_CONNECT=$(usex extraengine YES NO)
-DCONNECT_WITH_MYSQL=1
-DCONNECT_WITH_LIBXML2=$(usex xml)
@ -413,6 +409,9 @@ src_configure() {
-DWITH_NUMA=$(usex numa ON OFF)
)
# Workaround for MDEV-14524
use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
if use test ; then
# This is needed for the new client lib which tests a real, open server
mycmakeargs+=( -DSKIP_TESTS=ON )
@ -565,17 +564,21 @@ src_test() {
local -a disabled_tests
disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
disabled_tests+=( "innodb_gis.1;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "innodb_gis.gis;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
disabled_tests+=( "main.upgrade_MDEV-19650;25096;Known to be broken" )
disabled_tests+=( "mariabackup.*;0;Broken test suite" )
disabled_tests+=( "perfschema.nesting;23458;Known to be broken" )
disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
disabled_tests+=( "sys_vars.wsrep_on_without_provider;25625;Known to be broken" )
if ! use latin1 ; then
disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
@ -599,7 +602,7 @@ src_test() {
# run mysql-test tests
pushd "${TESTDIR}" &>/dev/null || die
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test-list="${T}/disabled.def"
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
retstatus_tests=$?
popd &>/dev/null || die
@ -697,10 +700,16 @@ src_install() {
fi
fi
# Remove mytop if perl is not selected
if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
rm -f "${ED}/usr/bin/mytop" || die
fi
# Remove bundled mytop in favor of dev-db/mytop
local mytop_file
for mytop_file in \
"${ED}/usr/bin/mytop" \
"${ED}/usr/share/man/man1/mytop.1" \
; do
if [[ -e "${mytop_file}" ]] ; then
rm -v "${mytop_file}" || die
fi
done
# Fix a dangling symlink when galera is not built
if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
@ -787,63 +796,312 @@ pkg_postinst() {
pkg_config() {
_getoptval() {
local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults
local section="$1"
local section="${1}"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
local cmd=(
"${my_print_defaults_binary}"
"${extra_options}"
"${section}"
)
local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
if [[ ${#results[@]} -gt 0 ]] ; then
# When option is set multiple times only return last value
echo "${results[-1]}"
fi
}
_mktemp_dry() {
# emktemp has no --dry-run option
local template="${1}"
if [[ -z "${template}" ]] ; then
if [[ -z "${T}" ]] ; then
template="/tmp/XXXXXXX"
else
template="${T}/XXXXXXX"
fi
fi
local template_wo_X=${template//X/}
local n_X
let n_X=${#template}-${#template_wo_X}
if [[ ${n_X} -lt 3 ]] ; then
echo "${FUNCNAME[0]}: too few X's in template ${template}" >&2
return
fi
local attempts=0
local character tmpfile
while [[ true ]] ; do
let attempts=attempts+1
new_file=
while read -n1 character ; do
if [[ "${character}" == "X" ]] ; then
tmpfile+="${RANDOM:0:1}"
else
tmpfile+="${character}"
fi
done < <(echo -n "${template}")
if [[ ! -f "${tmpfile}" ]]
then
echo "${tmpfile}"
return
fi
if [[ ${attempts} -ge 100 ]] ; then
echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
return
fi
done
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
local mysql_binary="${EROOT}/usr/bin/mysql"
if [[ ! -x "${mysql_binary}" ]] ; then
die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysqld_binary="${EROOT}/usr/sbin/mysqld"
if [[ ! -x "${mysqld_binary}" ]] ; then
die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db"
if [[ ! -x "${mysql_install_db_binary}" ]] ; then
die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
if [[ ! -x "${my_print_defaults_binary}" ]] ; then
die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
fi
if [[ -z "${MYSQL_USER}" ]] ; then
MYSQL_USER=mysql
if use prefix ; then
MYSQL_USER=$(id -u -n 2>/dev/null)
if [[ -z "${MYSQL_USER}" ]] ; then
die "Failed to determine current username!"
fi
fi
fi
if [[ -z "${MYSQL_GROUP}" ]] ; then
MYSQL_GROUP=mysql
if use prefix ; then
MYSQL_GROUP=$(id -g -n 2>/dev/null)
if [[ -z "${MYSQL_GROUP}" ]] ; then
die "Failed to determine current user groupname!"
fi
fi
fi
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
local -x HOME="${EROOT}/root"
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
# Read currently set data directory
MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MY_DATADIR}" ]] ; then
die "Sorry, unable to find MY_DATADIR!"
elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
ewarn "Please rename or delete its content if you wish to initialize a new data directory."
die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
# These are dir+prefix
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
# Create missing directories.
# Always check if mysql user can write to directory even if we just
# created directory because a parent directory might be not
# accessible for that user.
PID_DIR="${EROOT}/run/mysqld"
if [[ ! -d "${PID_DIR}" ]] ; then
einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
|| die "Failed to create PID directory '${PID_DIR}'!"
fi
local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_pid_dir_testfile}" ]] \
&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_pid_dir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
else
rm "${_pid_dir_testfile}" || die
unset _pid_dir_testfile
fi
if [[ ! -d "${MY_DATADIR}" ]] ; then
einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
fi
local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_datadir_testfile}" ]] \
&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_datadir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
else
rm "${_my_datadir_testfile}" || die
unset _my_datadir_testfile
fi
if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
fi
if [[ -z "${MYSQL_TMPDIR}" ]] ; then
MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
[[ -z "${MYSQL_TMPDIR}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
mkdir "${MYSQL_TMPDIR}" || die
chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
fi
# Now we need to test MYSQL_TMPDIR...
local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_tmpdir_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_tmpdir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
else
rm "${_my_tmpdir_testfile}" || die
unset _my_tmpdir_testfile
fi
if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
fi
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_logbin_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_logbin_testfile}" &>/dev/null
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
else
rm "${_my_logbin_testfile}" || die
unset _my_logbin_testfile
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_relaylog_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_relaylog_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
else
rm "${_my_relaylog_testfile}" || die
unset _my_relaylog_testfile
fi
fi
local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null)
[[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
# Limit access
chmod 0770 "${SETUP_TMPDIR}" || die
chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die
local mysql_install_log="${SETUP_TMPDIR}/install_db.log"
local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log"
echo ""
einfo "Detected settings:"
einfo "=================="
einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
fi
einfo "PID DIR:\t\t\t\t${PID_DIR}"
einfo "Install db log:\t\t\t${mysql_install_log}"
einfo "Install server log:\t\t\t${mysqld_logfile}"
echo
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
for tmp_mysqld_password_source in mysql client ; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
@ -855,179 +1113,189 @@ pkg_config() {
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then
einfo "Please provide a password for the mysql 'root'@'localhost' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
einfo "Not entering a password defaults to UNIX authentication"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local pwd1="a"
local pwd2="b"
echo
einfo "No password for mysql 'root' user was specified via environment"
einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
einfo "file like '${HOME}/.my.cnf'."
einfo "To continue please provide a password for the mysql 'root' user"
einfo "now on console:"
ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
read -rsp " >" pwd1 ; echo
if [[ -n "${pwd1}" ]] ; then
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
if [[ "x${pwd1}" != "x${pwd2}" ]] ; then
die "Passwords are not the same!"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
echo
fi
local options
local sqltmp="$(emktemp)"
local -a mysqld_options
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# see http://bugs.mysql.com/bug.php?id=31312
use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
local opt optexp optfull
for opt in host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Prepare timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
local tz_sql="${SETUP_TMPDIR}/tz.sql"
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
echo "USE mysql;" >"${tz_sql}"
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
if [[ $? -ne 0 ]] ; then
die "mysql_tzinfo_to_sql failed!"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
local cmd=(
"${mysql_install_db_binary}"
"${mysqld_options[@]}"
"--init-file='${tz_sql}'"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
"--log-error='${mysql_install_log}'"
"--rpm"
"--cross-bootstrap"
"--skip-test-db"
"--user=${MYSQL_USER}"
)
pushd "${TMPDIR}" &>/dev/null || die
einfo "Initializing ${PN} data directory: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [[ $? -ne 0 ]]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then
einfo "Done"
exit 0
fi
local x=${RANDOM}
local socket="${PID_DIR}/mysqld.${x}.sock"
[[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!"
local pidfile="${PID_DIR}/mysqld.${x}.pid"
[[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!"
unset x
cmd=(
"${mysqld_binary}"
"${mysqld_options[@]}"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
--max_allowed_packet=8M
--net_buffer_length=16K
"--socket='${socket}'"
"--pid-file='${pidfile}'"
"--log-error='${mysqld_logfile}'"
"--user=${MYSQL_USER}"
)
einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
echo -n "Waiting for mysqld to accept connections "
local maxtry=15
while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
if [[ -S "${socket}" ]] ; then
# Even with a socket we don't know if mysqld will abort
# start due to an error so just wait a little bit more...
maxtry=5
while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
fi
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
unset sql
eend $?
echo
if [[ ! -S "${socket}" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
fi
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log"
touch "${mysql_logfile}" || die
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
cmd=(
"${mysql_binary}"
--no-defaults
"--socket='${socket}'"
-hlocalhost
"-e \"${sql}\""
)
eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
local rc=$?
eend ${rc}
if [[ ${rc} -ne 0 ]] ; then
# Poor man's solution which tries to avoid having password
# in log. NOTE: sed can fail if user didn't follow advice
# and included character which will require escaping...
sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
# Stop the server
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
echo -n "Stopping the server "
pkill -F "${pidfile}" &>/dev/null
maxtry=10
while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
echo
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
# We somehow failed to stop server.
# However, not a fatal error. Just warn the user.
ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
fi
fi
rm -r "${SETUP_TMPDIR}" || die
einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
}

@ -10,7 +10,7 @@ inherit eutils systemd flag-o-matic prefix toolchain-funcs \
multiprocessing java-pkg-opt-2 cmake
# Patch version
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.5.7-patches-02.tar.xz"
PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.5.10-patches-01.tar.xz"
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
${PATCH_SET}"
@ -40,7 +40,7 @@ S="${WORKDIR}/mysql"
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
COMMON_DEPEND="
>=dev-libs/libpcre-8.41-r1:3=
>=dev-libs/libpcre2-10.34:=
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
sys-libs/ncurses:0=
@ -91,7 +91,7 @@ BDEPEND="virtual/yacc
"
DEPEND="${COMMON_DEPEND}
server? (
extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
extraengine? ( jdbc? ( >=virtual/jdk-1.8 ) )
test? ( acct-group/mysql acct-user/mysql )
)
static? ( sys-libs/ncurses[static-libs] )
@ -104,12 +104,13 @@ RDEPEND="${COMMON_DEPEND}
!dev-db/mariadb:10.2
!dev-db/mariadb:10.3
!dev-db/mariadb:10.4
!dev-db/mariadb:10.6
!<virtual/mysql-5.6-r11
!<virtual/libmysqlclient-18-r1
selinux? ( sec-policy/selinux-mysql )
server? (
columnstore? ( dev-db/mariadb-connector-c )
extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
extraengine? ( jdbc? ( >=virtual/jre-1.8 ) )
galera? (
sys-apps/iproute2
=sys-cluster/galera-26*
@ -118,13 +119,6 @@ RDEPEND="${COMMON_DEPEND}
)
!prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
)
perl? (
!dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes
)
"
# For other stuff to bring us in
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
@ -233,9 +227,9 @@ src_prepare() {
}
if use jemalloc; then
echo "TARGET_LINK_LIBRARIES(mariadbd jemalloc)" >> "${S}/sql/CMakeLists.txt"
echo "TARGET_LINK_LIBRARIES(mariadbd LINK_PUBLIC jemalloc)" >> "${S}/sql/CMakeLists.txt"
elif use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mariadbd tcmalloc)" >> "${S}/sql/CMakeLists.txt"
echo "TARGET_LINK_LIBRARIES(mariadbd LINK_PUBLIC tcmalloc)" >> "${S}/sql/CMakeLists.txt"
fi
local plugin
@ -319,7 +313,7 @@ src_configure() {
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_SCRIPTDIR=bin
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
@ -565,17 +559,21 @@ src_test() {
local -a disabled_tests
disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
disabled_tests+=( "innodb_gis.1;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "innodb_gis.gis;25095;Known rounding error with latest AMD processors" )
disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
disabled_tests+=( "main.upgrade_MDEV-19650;25096;Known to be broken" )
disabled_tests+=( "mariabackup.*;0;Broken test suite" )
disabled_tests+=( "perfschema.nesting;23458;Known to be broken" )
disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
disabled_tests+=( "sys_vars.wsrep_on_without_provider;25625;Known to be broken" )
if ! use latin1 ; then
disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
@ -697,10 +695,16 @@ src_install() {
fi
fi
# Remove mytop if perl is not selected
if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
rm -f "${ED}/usr/bin/mytop" || die
fi
# Remove bundled mytop in favor of dev-db/mytop
local mytop_file
for mytop_file in \
"${ED}/usr/bin/mytop" \
"${ED}/usr/share/man/man1/mytop.1" \
; do
if [[ -e "${mytop_file}" ]] ; then
rm -v "${mytop_file}" || die
fi
done
# Fix a dangling symlink when galera is not built
if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
@ -787,63 +791,312 @@ pkg_postinst() {
pkg_config() {
_getoptval() {
local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults
local section="$1"
local section="${1}"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
local cmd=(
"${my_print_defaults_binary}"
"${extra_options}"
"${section}"
)
local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
if [[ ${#results[@]} -gt 0 ]] ; then
# When option is set multiple times only return last value
echo "${results[-1]}"
fi
}
_mktemp_dry() {
# emktemp has no --dry-run option
local template="${1}"
if [[ -z "${template}" ]] ; then
if [[ -z "${T}" ]] ; then
template="/tmp/XXXXXXX"
else
template="${T}/XXXXXXX"
fi
fi
local template_wo_X=${template//X/}
local n_X
let n_X=${#template}-${#template_wo_X}
if [[ ${n_X} -lt 3 ]] ; then
echo "${FUNCNAME[0]}: too few X's in template ${template}" >&2
return
fi
local attempts=0
local character tmpfile
while [[ true ]] ; do
let attempts=attempts+1
new_file=
while read -n1 character ; do
if [[ "${character}" == "X" ]] ; then
tmpfile+="${RANDOM:0:1}"
else
tmpfile+="${character}"
fi
done < <(echo -n "${template}")
if [[ ! -f "${tmpfile}" ]]
then
echo "${tmpfile}"
return
fi
if [[ ${attempts} -ge 100 ]] ; then
echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
return
fi
done
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
local mysql_binary="${EROOT}/usr/bin/mysql"
if [[ ! -x "${mysql_binary}" ]] ; then
die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysqld_binary="${EROOT}/usr/sbin/mysqld"
if [[ ! -x "${mysqld_binary}" ]] ; then
die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db"
if [[ ! -x "${mysql_install_db_binary}" ]] ; then
die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
fi
local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
if [[ ! -x "${my_print_defaults_binary}" ]] ; then
die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
fi
if [[ -z "${MYSQL_USER}" ]] ; then
MYSQL_USER=mysql
if use prefix ; then
MYSQL_USER=$(id -u -n 2>/dev/null)
if [[ -z "${MYSQL_USER}" ]] ; then
die "Failed to determine current username!"
fi
fi
fi
if [[ -z "${MYSQL_GROUP}" ]] ; then
MYSQL_GROUP=mysql
if use prefix ; then
MYSQL_GROUP=$(id -g -n 2>/dev/null)
if [[ -z "${MYSQL_GROUP}" ]] ; then
die "Failed to determine current user groupname!"
fi
fi
fi
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
local -x HOME="${EROOT}/root"
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
# Read currently set data directory
MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MY_DATADIR}" ]] ; then
die "Sorry, unable to find MY_DATADIR!"
elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
ewarn "Please rename or delete its content if you wish to initialize a new data directory."
die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
# These are dir+prefix
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
# Create missing directories.
# Always check if mysql user can write to directory even if we just
# created directory because a parent directory might be not
# accessible for that user.
PID_DIR="${EROOT}/run/mysqld"
if [[ ! -d "${PID_DIR}" ]] ; then
einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
|| die "Failed to create PID directory '${PID_DIR}'!"
fi
local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_pid_dir_testfile}" ]] \
&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_pid_dir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
else
rm "${_pid_dir_testfile}" || die
unset _pid_dir_testfile
fi
if [[ ! -d "${MY_DATADIR}" ]] ; then
einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
fi
local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_datadir_testfile}" ]] \
&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_datadir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
else
rm "${_my_datadir_testfile}" || die
unset _my_datadir_testfile
fi
if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
fi
if [[ -z "${MYSQL_TMPDIR}" ]] ; then
MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
[[ -z "${MYSQL_TMPDIR}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
mkdir "${MYSQL_TMPDIR}" || die
chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
fi
# Now we need to test MYSQL_TMPDIR...
local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_tmpdir_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_tmpdir_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
else
rm "${_my_tmpdir_testfile}" || die
unset _my_tmpdir_testfile
fi
if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
fi
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_logbin_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
if use prefix ; then
touch "${_my_logbin_testfile}" &>/dev/null
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
else
rm "${_my_logbin_testfile}" || die
unset _my_logbin_testfile
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_relaylog_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
if use prefix ; then
touch "${_my_relaylog_testfile}" &>/dev/null
else
su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
fi
if [[ $? -ne 0 ]] ; then
die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
else
rm "${_my_relaylog_testfile}" || die
unset _my_relaylog_testfile
fi
fi
local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null)
[[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir"
# Limit access
chmod 0770 "${SETUP_TMPDIR}" || die
chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die
local mysql_install_log="${SETUP_TMPDIR}/install_db.log"
local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log"
echo ""
einfo "Detected settings:"
einfo "=================="
einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
fi
if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
fi
einfo "PID DIR:\t\t\t\t${PID_DIR}"
einfo "Install db log:\t\t\t${mysql_install_log}"
einfo "Install server log:\t\t\t${mysqld_logfile}"
echo
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
for tmp_mysqld_password_source in mysql client ; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
@ -855,179 +1108,189 @@ pkg_config() {
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then
einfo "Please provide a password for the mysql 'root'@'localhost' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
einfo "Not entering a password defaults to UNIX authentication"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
local pwd1="a"
local pwd2="b"
echo
einfo "No password for mysql 'root' user was specified via environment"
einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
einfo "file like '${HOME}/.my.cnf'."
einfo "To continue please provide a password for the mysql 'root' user"
einfo "now on console:"
ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
read -rsp " >" pwd1 ; echo
if [[ -n "${pwd1}" ]] ; then
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
MYSQL_ROOT_PASSWORD="${pwd1}"
if [[ "x${pwd1}" != "x${pwd2}" ]] ; then
die "Passwords are not the same!"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
echo
fi
local options
local sqltmp="$(emktemp)"
local -a mysqld_options
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# see http://bugs.mysql.com/bug.php?id=31312
use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
local opt optexp optfull
for opt in host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Prepare timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
local tz_sql="${SETUP_TMPDIR}/tz.sql"
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
echo "USE mysql;" >"${tz_sql}"
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
if [[ $? -ne 0 ]] ; then
die "mysql_tzinfo_to_sql failed!"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
local cmd=(
"${mysql_install_db_binary}"
"${mysqld_options[@]}"
"--init-file='${tz_sql}'"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
"--log-error='${mysql_install_log}'"
"--rpm"
"--cross-bootstrap"
"--skip-test-db"
"--user=${MYSQL_USER}"
)
pushd "${TMPDIR}" &>/dev/null || die
einfo "Initializing ${PN} data directory: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [[ $? -ne 0 ]]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then
einfo "Done"
exit 0
fi
local x=${RANDOM}
local socket="${PID_DIR}/mysqld.${x}.sock"
[[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!"
local pidfile="${PID_DIR}/mysqld.${x}.pid"
[[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!"
unset x
cmd=(
"${mysqld_binary}"
"${mysqld_options[@]}"
"--basedir='${EROOT}/usr'"
"--datadir='${MY_DATADIR}'"
"--tmpdir='${MYSQL_TMPDIR}'"
--max_allowed_packet=8M
--net_buffer_length=16K
"--socket='${socket}'"
"--pid-file='${pidfile}'"
"--log-error='${mysqld_logfile}'"
"--user=${MYSQL_USER}"
)
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
echo -n "Waiting for mysqld to accept connections "
local maxtry=15
while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
if [[ -S "${socket}" ]] ; then
# Even with a socket we don't know if mysqld will abort
# start due to an error so just wait a little bit more...
maxtry=5
while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
fi
echo
if [[ ! -S "${socket}" ]] ; then
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
fi
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
unset sql
eend $?
local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log"
touch "${mysql_logfile}" || die
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
cmd=(
"${mysql_binary}"
--no-defaults
"--socket='${socket}'"
-hlocalhost
"-e \"${sql}\""
)
eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
local rc=$?
eend ${rc}
if [[ ${rc} -ne 0 ]] ; then
# Poor man's solution which tries to avoid having password
# in log. NOTE: sed can fail if user didn't follow advice
# and included character which will require escaping...
sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
fi
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
# Stop the server
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
echo -n "Stopping the server "
pkill -F "${pidfile}" &>/dev/null
maxtry=10
while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
echo
if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
# We somehow failed to stop server.
# However, not a fatal error. Just warn the user.
ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
fi
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
rm -r "${SETUP_TMPDIR}" || die
einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
}

File diff suppressed because it is too large Load Diff

@ -4,9 +4,11 @@ DIST sqlite-doc-3350100.zip 10175402 BLAKE2B c8ac8814837dc88320ae0f6973b5ec0b815
DIST sqlite-doc-3350200.zip 10182547 BLAKE2B f50b04495aa79eca1ce935c8a96fe83d0a415f15ec55fda0cd982d02b4473ba8f5175c97d9816de2b79526787bc958b3be5e1234994e5f00d8ee1b432627391e SHA512 7ef973b804d059cf00c759a0ae001b7714df0472398e7cd55e34f59222df816a36511cefd15fa99abf67dec4291ee6babbc12bd87855194608ff556a5c1182ae
DIST sqlite-doc-3350300.zip 10197905 BLAKE2B ffe3e800fa7c9066c6f180a5989cceb89dfff81729258278256901eee717872ef6993a8bb30ebb6c1de5a66c128009c21494ec9bf0011accdd6f8beef712213a SHA512 260981abaf54f452777e37e99474d100010ec2340c740f78445b7794fa17bcbb814e90f004f870d929a9ccab1d89417ee3d65ffe3b65dbf511ca1de7b6a6a4c8
DIST sqlite-doc-3350400.zip 10206227 BLAKE2B 82572a771e72e76149fc7ca4e3d5b6f268d6b2d441cc8a4c02be7f2062582b55cefd1577dbb3c77d2e932e93f1a0403f55a9ffc8b74f7eada06435ef23a6b065 SHA512 cc967b6625e0ae3ffb4a84f87a6efb5bc0e2d3cb2080e438c9e1ba3b8c2ba707612b8bdfc2bf3291ef2ad2836780127050762945a3ff7503f662cf30ab4fde4a
DIST sqlite-doc-3350500.zip 10205830 BLAKE2B e078713786522f8da7984df6ddf62671c24ec5381cac88fe976c97fcdf4800cff8dc1a595df9c9010c687c9929cb5ab070957f8ccbc0b5e8bd7add88ae9a0514 SHA512 2da5357623f4db7003f46ec7ea8bdd8a794ad6e1be9a25a8ebccfe5222da43eabc32d9d17acfd7766aa4cf1fd010e476a8087fab78ac6f6596c7c5b8a06de685
DIST sqlite-src-3340100.zip 12623711 BLAKE2B 08c98d0c56d46fe909f449f322002ae4d69fd952930d2f04514988a939b31744a13aea85935d84bc05db52faca1aad6a70d7c31e7da0e396bb649685a49699bb SHA512 5ed02fe609b3d08c3297cc43b21e6ee3f56fb51a6616ac391a0e50cd1677dbad03c6bf9bf9c8409cf94b83b16fe6b6e4a112640b18c7d4fd95328066da3c3943
DIST sqlite-src-3350000.zip 12814378 BLAKE2B f77880bfb335da078623841f9d9d9fc690085630757d8d8e3d40d42646902f809febf8dcc5048d38be0e2d74c0114c35f09789bc261e51d49f9685201f6d1297 SHA512 4b77d963092a6aed61b50e59450edf2af187f16b185b05ca54d81c3eecf71b1cb9bc2883a8aadeb971fcebe343fa430ea788aedb77e3712c8b39d4892c93a797
DIST sqlite-src-3350100.zip 12814875 BLAKE2B bc4f6913ce93c32e1c6fbd39f45666a14476096b09f7534047aee56cbb18e949bf5225c080c813281a0abae9198a35165161393db39df0c2af2a92138b4604d9 SHA512 004bcca9c2ae883b05d8f15c8bf28a12fd2fdf9527d1560d137f8e2570c153d14ea5405c500d0e79966a3881a516df4d9ed07be751712f1584df411e86c60977
DIST sqlite-src-3350200.zip 12815298 BLAKE2B a65034fc59c32e950b5337ef4fe1b2476190fe6f1272494b12f9e1d048aac759ac31e7c0f252774c850b0f313bf44b34a97fc563c049e30d2a896f262b199dce SHA512 d5382bf31d812bc51533d28a583c78d3f389b1ecbe1f9f30cc755059f2867f832c0529e9f97b090be5c5bc855c45611b220b8c29b5648c451490566a70cc5122
DIST sqlite-src-3350300.zip 12817388 BLAKE2B 5b07d15ec5ed934ffa776ae4e079d4b4a3d9c91c526577683c7eea4f95ba62738d82b6fd26f1c10560a6f87fd02b070e5786bcc45e908a338a316071009e5b92 SHA512 5b994833e37e5f7579f4e3eefbbadd5b2a3d691b5f662b7d3dc2bbf80ff1cdaf89262ce5612513fcb2daa0a7d1db3de871dfc462f9d162c954593ff7f4ad90fd
DIST sqlite-src-3350400.zip 12818802 BLAKE2B c671c5666d754c763e70f20e742e017320ceb27e1a8668e8713dbe5257aa0842ba8d7343e535be06eefd371dc2bae9ded6718194b7891e46c6eb4081531b4944 SHA512 3a3fa1df47b8f148fffbb056522e0e671d9e295c154173124208b7b1348d321eba410a40fbdea02fdc1af3b55cdfce37044ed09f328502fc50f42f5ecabc1236
DIST sqlite-src-3350500.zip 12819198 BLAKE2B 0f0d39cd663d78a3c698df62dd533019c32244e8c998e625354cb069f5839cc374476b825e2e2a6408916301333a9954c0c7b9cbab5493522fdffe8859f9b6a5 SHA512 f9afd11b3c42a8241f91e2ecafc3928e7391cc0f1fbee236b8122c2d3ca922d0c82d2605968b131351b6c5e38f983f8eed29b86c94cfa72799e2387b3b3db561

@ -320,12 +320,6 @@ multilib_src_configure() {
options+=(--disable-tcl)
fi
if [[ "${CHOST}" == *-mint* ]]; then
# sys/mman.h not available in MiNTLib.
# https://sqlite.org/compile.html#omit_wal
append-cppflags -DSQLITE_OMIT_WAL
fi
if [[ "${ABI}" == "x86" ]]; then
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
append-cflags -mfpmath=sse

@ -320,12 +320,6 @@ multilib_src_configure() {
options+=(--disable-tcl)
fi
if [[ "${CHOST}" == *-mint* ]]; then
# sys/mman.h not available in MiNTLib.
# https://sqlite.org/compile.html#omit_wal
append-cppflags -DSQLITE_OMIT_WAL
fi
if [[ "${ABI}" == "x86" ]]; then
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
append-cflags -mfpmath=sse

@ -320,12 +320,6 @@ multilib_src_configure() {
options+=(--disable-tcl)
fi
if [[ "${CHOST}" == *-mint* ]]; then
# sys/mman.h not available in MiNTLib.
# https://sqlite.org/compile.html#omit_wal
append-cppflags -DSQLITE_OMIT_WAL
fi
if [[ "${ABI}" == "x86" ]]; then
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
append-cflags -mfpmath=sse

@ -320,12 +320,6 @@ multilib_src_configure() {
options+=(--disable-tcl)
fi
if [[ "${CHOST}" == *-mint* ]]; then
# sys/mman.h not available in MiNTLib.
# https://sqlite.org/compile.html#omit_wal
append-cppflags -DSQLITE_OMIT_WAL
fi
if [[ "${ABI}" == "x86" ]]; then
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
append-cflags -mfpmath=sse

@ -320,12 +320,6 @@ multilib_src_configure() {
options+=(--disable-tcl)
fi
if [[ "${CHOST}" == *-mint* ]]; then
# sys/mman.h not available in MiNTLib.
# https://sqlite.org/compile.html#omit_wal
append-cppflags -DSQLITE_OMIT_WAL
fi
if [[ "${ABI}" == "x86" ]]; then
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
append-cflags -mfpmath=sse

@ -320,12 +320,6 @@ multilib_src_configure() {
options+=(--disable-tcl)
fi
if [[ "${CHOST}" == *-mint* ]]; then
# sys/mman.h not available in MiNTLib.
# https://sqlite.org/compile.html#omit_wal
append-cppflags -DSQLITE_OMIT_WAL
fi
if [[ "${ABI}" == "x86" ]]; then
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
append-cflags -mfpmath=sse

@ -0,0 +1,428 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit autotools flag-o-matic multilib-minimal toolchain-funcs
if [[ "${PV}" != "9999" ]]; then
SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
DOC_PV="${SRC_PV}"
# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
fi
DESCRIPTION="SQL database engine"
HOMEPAGE="https://sqlite.org/"
if [[ "${PV}" == "9999" ]]; then
SRC_URI=""
else
SRC_URI="https://sqlite.org/2021/${PN}-src-${SRC_PV}.zip
doc? ( https://sqlite.org/2021/${PN}-doc-${DOC_PV}.zip )"
fi
LICENSE="public-domain"
SLOT="3"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
if [[ "${PV}" == "9999" ]]; then
PROPERTIES="live"
fi
RESTRICT="!test? ( test )"
if [[ "${PV}" == "9999" ]]; then
BDEPEND=">=dev-lang/tcl-8.6:0
dev-vcs/fossil"
else
BDEPEND="app-arch/unzip
>=dev-lang/tcl-8.6:0"
fi
RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
tools? ( dev-lang/tcl:0= )"
DEPEND="${RDEPEND}
test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
if [[ "${PV}" == "9999" ]]; then
S="${WORKDIR}/${PN}"
else
S="${WORKDIR}/${PN}-src-${SRC_PV}"
fi
_fossil_fetch() {
local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
local repo_id="${1}"
local repo_uri="${2}"
local -x FOSSIL_HOME="${HOME}"
mkdir -p "${T}/fossil/${repo_id}" || die
pushd "${T}/fossil/${repo_id}" > /dev/null || die
if [[ -n "${EVCS_OFFLINE}" ]]; then
if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
fi
else
if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
echo
else
cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
echo
fi
(
addwrite "${distdir}"
mkdir -p "${distdir}/fossil-src/${repo_id}" || die
cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
)
fi
popd > /dev/null || die
}
_fossil_checkout() {
local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
local repo_id="${1}"
local branch_or_commit="${2}"
local target_directory="${3}"
local -x FOSSIL_HOME="${HOME}"
if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
fi
if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
mkdir -p "${T}/fossil/${repo_id}" || die
cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
fi
mkdir "${target_directory}" || die
pushd "${target_directory}" > /dev/null || die
einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
echo
popd > /dev/null || die
}
fossil_fetch() {
local repo_id="${1}"
local repo_uri="${2}"
local target_directory="${3}"
local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
_fossil_fetch "${repo_id}" "${repo_uri}"
_fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
}
src_unpack() {
if [[ "${PV}" == "9999" ]]; then
fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
if use doc; then
fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
fi
else
default
fi
}
src_prepare() {
eapply "${FILESDIR}/"${PN}-3.35.0-build_{1.1,1.2,2.1,2.2}.patch
eapply_user
eautoreconf
multilib_copy_sources
}
multilib_src_configure() {
local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
local options=()
options+=(
--enable-load-extension
--enable-threadsafe
)
# Support detection of misuse of SQLite API.
# https://sqlite.org/compile.html#enable_api_armor
append-cppflags -DSQLITE_ENABLE_API_ARMOR
# Support bytecode and tables_used virtual tables.
# https://sqlite.org/compile.html#enable_bytecode_vtab
# https://sqlite.org/bytecodevtab.html
append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
# Support column metadata functions.
# https://sqlite.org/compile.html#enable_column_metadata
# https://sqlite.org/c3ref/column_database_name.html
append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
# Support sqlite_dbpage virtual table.
# https://sqlite.org/compile.html#enable_dbpage_vtab
# https://sqlite.org/dbpage.html
append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
# Support dbstat virtual table.
# https://sqlite.org/compile.html#enable_dbstat_vtab
# https://sqlite.org/dbstat.html
append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
# Support sqlite3_serialize() and sqlite3_deserialize() functions.
# https://sqlite.org/compile.html#enable_deserialize
# https://sqlite.org/c3ref/serialize.html
# https://sqlite.org/c3ref/deserialize.html
append-cppflags -DSQLITE_ENABLE_DESERIALIZE
# Support comments in output of EXPLAIN.
# https://sqlite.org/compile.html#enable_explain_comments
append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
# Support Full-Text Search versions 3, 4 and 5.
# https://sqlite.org/compile.html#enable_fts3
# https://sqlite.org/compile.html#enable_fts3_parenthesis
# https://sqlite.org/compile.html#enable_fts4
# https://sqlite.org/compile.html#enable_fts5
# https://sqlite.org/fts3.html
# https://sqlite.org/fts5.html
append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
options+=(--enable-fts5)
# Support hidden columns.
append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
# Support JSON1 extension.
# https://sqlite.org/compile.html#enable_json1
# https://sqlite.org/json1.html
append-cppflags -DSQLITE_ENABLE_JSON1
# Support memsys5 memory allocator.
# https://sqlite.org/compile.html#enable_memsys5
# https://sqlite.org/malloc.html#memsys5
append-cppflags -DSQLITE_ENABLE_MEMSYS5
# Support sqlite3_normalized_sql() function.
# https://sqlite.org/c3ref/expanded_sql.html
append-cppflags -DSQLITE_ENABLE_NORMALIZE
# Support sqlite_offset() function.
# https://sqlite.org/compile.html#enable_offset_sql_func
# https://sqlite.org/lang_corefunc.html#sqlite_offset
append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
# Support pre-update hook functions.
# https://sqlite.org/compile.html#enable_preupdate_hook
# https://sqlite.org/c3ref/preupdate_count.html
append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
# Support Resumable Bulk Update extension.
# https://sqlite.org/compile.html#enable_rbu
# https://sqlite.org/rbu.html
append-cppflags -DSQLITE_ENABLE_RBU
# Support R*Trees.
# https://sqlite.org/compile.html#enable_rtree
# https://sqlite.org/compile.html#enable_geopoly
# https://sqlite.org/rtree.html
# https://sqlite.org/geopoly.html
append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
# Support Session extension.
# https://sqlite.org/compile.html#enable_session
# https://sqlite.org/sessionintro.html
append-cppflags -DSQLITE_ENABLE_SESSION
# Support scan status functions.
# https://sqlite.org/compile.html#enable_stmt_scanstatus
# https://sqlite.org/c3ref/stmt_scanstatus.html
# https://sqlite.org/c3ref/stmt_scanstatus_reset.html
append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
# Support sqlite_stmt virtual table.
# https://sqlite.org/compile.html#enable_stmtvtab
# https://sqlite.org/stmt.html
append-cppflags -DSQLITE_ENABLE_STMTVTAB
# Support unknown() function.
# https://sqlite.org/compile.html#enable_unknown_sql_function
append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
# Support unlock notification.
# https://sqlite.org/compile.html#enable_unlock_notify
# https://sqlite.org/c3ref/unlock_notify.html
# https://sqlite.org/unlock_notify.html
append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
# Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
# https://sqlite.org/compile.html#enable_update_delete_limit
# https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
# https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
# Support soundex() function.
# https://sqlite.org/compile.html#soundex
# https://sqlite.org/lang_corefunc.html#soundex
append-cppflags -DSQLITE_SOUNDEX
# Support URI filenames.
# https://sqlite.org/compile.html#use_uri
# https://sqlite.org/uri.html
append-cppflags -DSQLITE_USE_URI
# debug USE flag.
options+=($(use_enable debug))
# icu USE flag.
if use icu; then
# Support ICU extension.
# https://sqlite.org/compile.html#enable_icu
append-cppflags -DSQLITE_ENABLE_ICU
sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
fi
# readline USE flag.
options+=(
--disable-editline
$(use_enable readline)
)
if use readline; then
options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
fi
# secure-delete USE flag.
if use secure-delete; then
# Enable secure_delete pragma by default.
# https://sqlite.org/compile.html#secure_delete
# https://sqlite.org/pragma.html#pragma_secure_delete
append-cppflags -DSQLITE_SECURE_DELETE
fi
# static-libs USE flag.
options+=($(use_enable static-libs static))
# tcl, test, tools USE flags.
if use tcl || use test || { use tools && multilib_is_native_abi; }; then
options+=(
--enable-tcl
--with-tcl="${ESYSROOT}/usr/$(get_libdir)"
)
else
options+=(--disable-tcl)
fi
if [[ "${ABI}" == "x86" ]]; then
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
append-cflags -mfpmath=sse
else
append-cflags -ffloat-store
fi
fi
econf "${options[@]}"
}
multilib_src_compile() {
emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
if use tools && multilib_is_native_abi; then
emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
fi
if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
emake tclsqlite3.c
local build_directory="$(pwd)"
build_directory="${build_directory##*/}"
mkdir "${WORKDIR}/${PN}-doc-build" || die
pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
emake -f "../${PN}-doc/Makefile" -j1 SRC="../${PN}" BLD="../${build_directory}" DOC="../${PN}-doc" CC="$(tc-getBUILD_CC)" TCLINC="" TCLFLAGS="$($(tc-getBUILD_PKG_CONFIG) --libs tcl) -ldl -lm" base doc
rmdir doc/matrix{/*,} || die
popd > /dev/null || die
fi
}
multilib_src_test() {
if [[ "${EUID}" -eq 0 ]]; then
ewarn "Skipping tests due to root permissions"
return
fi
local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
}
multilib_src_install() {
emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
if use tools && multilib_is_native_abi; then
install_tool() {
if [[ -f ".libs/${1}" ]]; then
newbin ".libs/${1}" "${2}"
else
newbin "${1}" "${2}"
fi
}
install_tool changeset sqlite3-changeset
install_tool dbdump sqlite3-db-dump
install_tool dbhash sqlite3-db-hash
install_tool dbtotxt sqlite3-db-to-txt
install_tool index_usage sqlite3-index-usage
install_tool rbu sqlite3-rbu
install_tool scrub sqlite3-scrub
install_tool showdb sqlite3-show-db
install_tool showjournal sqlite3-show-journal
install_tool showshm sqlite3-show-shm
install_tool showstat4 sqlite3-show-stat4
install_tool showwal sqlite3-show-wal
install_tool sqldiff sqlite3-diff
install_tool sqlite3_analyzer sqlite3-analyzer
install_tool sqlite3_checker sqlite3-checker
install_tool sqlite3_expert sqlite3-expert
install_tool sqltclsh sqlite3-tclsh
unset -f install_tool
fi
}
multilib_src_install_all() {
find "${ED}" -name "*.la" -delete || die
doman sqlite3.1
if use doc; then
if [[ "${PV}" == "9999" ]]; then
pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
else
pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
fi
find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
if [[ "${PV}" != "9999" ]]; then
rm search search.d/admin || die
rmdir search.d || die
find -name "*~" -delete || die
fi
(
docinto html
dodoc -r *
)
popd > /dev/null || die
fi
}

Binary file not shown.

@ -13,7 +13,7 @@ SRC_URI="https://repo1.maven.org/maven2/${PN}/${PN}/${PV}/${P}-sources.jar -> ${
LICENSE="JDOM"
SLOT="1.1"
KEYWORDS="amd64 ~arm ~arm64 ppc64 ~x86"
KEYWORDS="amd64 ~arm ~arm64 ppc64 x86"
RDEPEND="
${CDEPEND}

@ -22,7 +22,7 @@ else
fi
LICENSE="BSD"
SLOT="0/26"
SLOT="0/27"
KEYWORDS=""
IUSE=""

Binary file not shown.

@ -1,8 +1,4 @@
DIST erlang-23.2.7.tar.gz 56600356 BLAKE2B 84daf8810716ac02b50527805b834f9f2ae83fc7ebd89a22e4cba34133a52347f53a72ba65614b492bf1932d0dc47eb68c9ce8731cdfaeecdf57b9f20bde32e8 SHA512 1e94b641644edb1edc3d15679222dd5d198abf1cae6daa4b91304317f8df21514029971f208767396625c0a0be7107c357c9ef80974c9865113a760aa2655220
DIST erlang-23.3.1.tar.gz 56654422 BLAKE2B b1ccd870d4a47f12d1a65b424d6c6b0f59a4654c0779c595fb28fdc2d3e179bb9b12d2473770b239b65665b2f6a3281d239f9fb3d6b86548df3ee69fce8fe5ed SHA512 03d4be9b25a14359e9f8db52d8e7d8edff1e8c53686a189caae15373c7e15d03f05e1138c549b8b41b8e6b7c55ab154cea47356f6fe79f7b72d5fb4ce759c4b0
DIST erlang-23.3.2.tar.gz 56662450 BLAKE2B 70ead26fe6a416c1b89bc9f8ad8d368bd38d994f9aa9967c916ccbef25aac7a059d89422e0d3b03397b08f1376c9e2eef4e827ecaa9d1114c453771e51acb490 SHA512 bb3dc1d827314b71f7e4da2082681e449859a69589d566a810baf554131e239ad3fe0555f352d69506467162016d6c6864abb20926843ee4da5876b26650810e
DIST erlang-23.3.3.tar.gz 56671339 BLAKE2B 19455670d411adfb6a34a42e27ee8ff9eda052c9e096404f1d1061376ffecb136b912cb89a21cb84a7758c925ccccee5bbbb4ca31ac6b164af4813b0a5e9e747 SHA512 191243df10e0ee03db1a16c94253fefd4b008915464b2966f6fbe93faae3053b2a8950297054a6a8554c180fd3fcc18eda16e2f87e0c1a7a73570e753ec557d4
DIST erlang_doc_html_23.2.tar.gz 36537148 BLAKE2B b19d3fb5836b50512db6913ccb9116bc06ef4677c9514db89714ac72a9e7569b2c52612c357ccbf9a12610000885cbc8a43cc17f80c533a3c65af89c1b592ba6 SHA512 0d334dfe46ecffd6ff720d176c4514e2d49ba1b5feccd80f8392a8335100a6c289207431d2c0da02043c923de083290f9fd23726a1d1481508acdd7596f67ea4
DIST erlang_doc_html_23.3.tar.gz 36224657 BLAKE2B 7e2a3e16f4cfa0f15c01074740e02af7a45b480b4a94e764463717658ab7e5d0281f928c3ec585582b10168645e3e06cfe72cf6a0ba1b88f539b80f2b7ad99be SHA512 8be4aae46839239604b875b39339e7b6b6c677c099b3d749d5f1041c4508c1c3b4aa8136a93df12b1e5cb6333ef907276f5965c9726ed2b9e77a6043c8ef53b1
DIST erlang_doc_man_23.2.tar.gz 1386417 BLAKE2B 91fb2646461330c2f3793e7819e4c77ba9259366098b710fd102ffbcbcf38fa84ad720613313e3c59c1d419aaddd5a1a85d26c5d41a71d6692d428a494f57012 SHA512 464fa2c3608a6c096a241e5fc2cee710ef51394b169e3b3ce3ab5f69d847437c54780d4afc1a799d13f88ea88ac64056b19bff4d927e1e6bbe54a773b0ccd89d
DIST erlang_doc_man_23.3.tar.gz 1456501 BLAKE2B 414bedee0e316d97b26d9d6418b799a9434a22e9980e7d3a83e2478d184d63d1633c0e10d0e180d929a3cacd82b4d703be86cbc8e99996037f6b37ea122f7a8c SHA512 6c661c210ffec4752afe624fa46700a0f62cc6589b74b859ab1dfde77d289e992988ac8744f7b4126d7512cd6d0aab3321f710a6324552b259bd7acd5b54a05e

@ -1,155 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
WX_GTK_VER="3.0-gtk3"
inherit elisp-common java-pkg-opt-2 systemd wxwidgets
# NOTE: If you need symlinks for binaries please tell maintainers or
# open up a bug to let it be created.
UPSTREAM_V="$(ver_cut 1-2)"
DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
HOMEPAGE="https://www.erlang.org/"
SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
LICENSE="Apache-2.0"
# We use this subslot because Compiled HiPE Code can be loaded on the exact
# same build of ERTS that was used when compiling the code. See
# http://erlang.org/doc/system_principles/misc.html for more information.
SLOT="0/${PV}"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="doc emacs +hipe java +kpoll odbc sctp ssl systemd tk wxwidgets"
RDEPEND="
acct-group/epmd
acct-user/epmd
sys-libs/ncurses:0
sys-libs/zlib
emacs? ( >=app-editors/emacs-23.1:* )
java? ( >=virtual/jdk-1.8:* )
odbc? ( dev-db/unixODBC )
sctp? ( net-misc/lksctp-tools )
ssl? ( >=dev-libs/openssl-0.9.7d:0= )
systemd? ( sys-apps/systemd )
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
"
DEPEND="${RDEPEND}
dev-lang/perl
"
S="${WORKDIR}/otp-OTP-${PV}"
PATCHES=(
"${FILESDIR}"/18.2.1-wx3.0.patch
"${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
)
SITEFILE=50"${PN}"-gentoo.el
src_prepare() {
default
./otp_build autoconf || die
}
src_configure() {
use wxwidgets && setup-wxwidgets
local myconf=(
--disable-builtin-zlib
$(use_enable hipe)
$(use_enable kpoll kernel-poll)
$(use_with java javac)
$(use_enable sctp)
$(use_with ssl ssl "${EPREFIX}"/usr)
$(use_enable ssl dynamic-ssl-lib)
$(use_enable systemd)
$(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
)
econf "${myconf[@]}"
}
src_compile() {
emake
if use emacs ; then
pushd lib/tools/emacs &>/dev/null || die
elisp-compile *.el
popd &>/dev/null || die
fi
}
extract_version() {
local path="$1"
local var_name="$2"
sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
}
src_install() {
local erl_libdir_rel="$(get_libdir)/erlang"
local erl_libdir="/usr/${erl_libdir_rel}"
local erl_interface_ver="$(extract_version lib/erl_interface EI_VSN)"
local erl_erts_ver="$(extract_version erts VSN)"
local my_manpath="/usr/share/${PN}/man"
[[ -z "${erl_erts_ver}" ]] && die "Couldn't determine erts version"
[[ -z "${erl_interface_ver}" ]] && die "Couldn't determine interface version"
emake INSTALL_PREFIX="${D}" install
if use doc ; then
# Note: we explicitly install docs into:
# /usr/share/doc/${PF}/{doc,lib,erts-*}
# To maintain that layout we gather everything in 'html-docs'.
# See bug #684376.
mkdir html-docs || die
mv "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* html-docs/ || die
local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" html-docs/. )
docompress -x /usr/share/doc/${PF}
else
local DOCS=("README.md")
fi
einstalldocs
dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
## Clean up the no longer needed files
rm "${ED}/${erl_libdir}/Install" || die
insinto "${my_manpath}"
doins -r "${WORKDIR}"/man/*
# extend MANPATH, so the normal man command can find it
# see bug 189639
newenvd - "90erlang" <<-_EOF_
MANPATH="${my_manpath}"
_EOF_
if use emacs ; then
elisp-install erlang lib/tools/emacs/*.{el,elc}
sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
"${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
elisp-site-file-install "${T}/${SITEFILE}"
fi
newinitd "${FILESDIR}"/epmd.init-r2 epmd
newconfd "${FILESDIR}"/epmd.confd-r2 epmd
use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 epmd.service
}
pkg_postinst() {
use emacs && elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
}

@ -1,155 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
WX_GTK_VER="3.0-gtk3"
inherit elisp-common java-pkg-opt-2 systemd wxwidgets
# NOTE: If you need symlinks for binaries please tell maintainers or
# open up a bug to let it be created.
UPSTREAM_V="$(ver_cut 1-2)"
DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
HOMEPAGE="https://www.erlang.org/"
SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
LICENSE="Apache-2.0"
# We use this subslot because Compiled HiPE Code can be loaded on the exact
# same build of ERTS that was used when compiling the code. See
# http://erlang.org/doc/system_principles/misc.html for more information.
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="doc emacs +hipe java +kpoll odbc sctp ssl systemd tk wxwidgets"
RDEPEND="
acct-group/epmd
acct-user/epmd
sys-libs/ncurses:0
sys-libs/zlib
emacs? ( >=app-editors/emacs-23.1:* )
java? ( >=virtual/jdk-1.8:* )
odbc? ( dev-db/unixODBC )
sctp? ( net-misc/lksctp-tools )
ssl? ( >=dev-libs/openssl-0.9.7d:0= )
systemd? ( sys-apps/systemd )
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
"
DEPEND="${RDEPEND}
dev-lang/perl
"
S="${WORKDIR}/otp-OTP-${PV}"
PATCHES=(
"${FILESDIR}"/18.2.1-wx3.0.patch
"${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
)
SITEFILE=50"${PN}"-gentoo.el
src_prepare() {
default
./otp_build autoconf || die
}
src_configure() {
use wxwidgets && setup-wxwidgets
local myconf=(
--disable-builtin-zlib
$(use_enable hipe)
$(use_enable kpoll kernel-poll)
$(use_with java javac)
$(use_enable sctp)
$(use_with ssl ssl "${EPREFIX}"/usr)
$(use_enable ssl dynamic-ssl-lib)
$(use_enable systemd)
$(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
)
econf "${myconf[@]}"
}
src_compile() {
emake
if use emacs ; then
pushd lib/tools/emacs &>/dev/null || die
elisp-compile *.el
popd &>/dev/null || die
fi
}
extract_version() {
local path="$1"
local var_name="$2"
sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
}
src_install() {
local erl_libdir_rel="$(get_libdir)/erlang"
local erl_libdir="/usr/${erl_libdir_rel}"
local erl_interface_ver="$(extract_version lib/erl_interface EI_VSN)"
local erl_erts_ver="$(extract_version erts VSN)"
local my_manpath="/usr/share/${PN}/man"
[[ -z "${erl_erts_ver}" ]] && die "Couldn't determine erts version"
[[ -z "${erl_interface_ver}" ]] && die "Couldn't determine interface version"
emake INSTALL_PREFIX="${D}" install
if use doc ; then
# Note: we explicitly install docs into:
# /usr/share/doc/${PF}/{doc,lib,erts-*}
# To maintain that layout we gather everything in 'html-docs'.
# See bug #684376.
mkdir html-docs || die
mv "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* html-docs/ || die
local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" html-docs/. )
docompress -x /usr/share/doc/${PF}
else
local DOCS=("README.md")
fi
einstalldocs
dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
## Clean up the no longer needed files
rm "${ED}/${erl_libdir}/Install" || die
insinto "${my_manpath}"
doins -r "${WORKDIR}"/man/*
# extend MANPATH, so the normal man command can find it
# see bug 189639
newenvd - "90erlang" <<-_EOF_
MANPATH="${my_manpath}"
_EOF_
if use emacs ; then
elisp-install erlang lib/tools/emacs/*.{el,elc}
sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
"${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
elisp-site-file-install "${T}/${SITEFILE}"
fi
newinitd "${FILESDIR}"/epmd.init-r2 epmd
newconfd "${FILESDIR}"/epmd.confd-r2 epmd
use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 epmd.service
}
pkg_postinst() {
use emacs && elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
}

@ -1,11 +1,10 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils
MY_PN=mozart2-stdlib
inherit cmake
PATCHSET_VER="0"
@ -23,14 +22,10 @@ RDEPEND=">=dev-lang/mozart-2.0.1"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_PN}"
BUILD_DIR="${S}/build"
CMAKE_USE_DIR="${S}"
src_prepare() {
if [[ -d "${WORKDIR}"/${PV} ]] ; then
eapply "${WORKDIR}"/${PV}
fi
eapply_user
cmake-utils_src_prepare
cmake_src_prepare
}

@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils java-pkg-2 java-ant-2
inherit cmake java-pkg-2 java-ant-2
PATCHSET_VER="1"
@ -31,50 +31,46 @@ DEPEND="${RDEPEND}
test? ( dev-cpp/gtest:= )"
S="${WORKDIR}/${PN}2-${PV}"
BUILD_DIR="${S}/build"
CMAKE_USE_DIR="${S}"
src_prepare() {
if [[ -d "${WORKDIR}"/${PV} ]] ; then
eapply "${WORKDIR}"/${PV}
fi
eapply_user
touch "${S}"/stdlib/CMakeLists.txt
touch "${S}"/vm/vm/test/gtest/CMakeLists.txt
touch stdlib/CMakeLists.txt || die
touch vm/vm/test/gtest/CMakeLists.txt || die
cmake-utils_src_prepare
cmake_src_prepare
}
src_configure() {
mycmakeargs=(
local mycmakeargs=(
-DMOZART_BOOST_USE_STATIC_LIBS=OFF
-DEMACS=$(if use emacs; then echo /usr/bin/emacs; fi)
)
-DEMACS=$(usex emacs "/usr/bin/emacs" "")
)
cmake-utils_src_configure
cmake_src_configure
}
src_compile() {
EANT_GENTOO_CLASSPATH="scala:2.12"
cd "${S}"/bootcompiler
pushd bootcompiler > /dev/null || die
ANT_OPTS="-Xss2M" eant jar
popd > /dev/null || die
cd "${S}"
cmake-utils_src_compile
cmake_src_compile
}
src_test() {
cmake-utils_src_compile vmtest platform-test
cmake-utils_src_test -V
cmake_build vmtest platform-test
cmake_src_test -V
}
src_install() {
cmake-utils_src_install
cmake_src_install
cd "${BUILD_DIR}"
dolib.so vm/vm/main/libmozartvm.so
dolib.so vm/boostenv/main/libmozartvmboost.so
dolib.so "${BUILD_DIR}"/vm/vm/main/libmozartvm.so
dolib.so "${BUILD_DIR}"/vm/boostenv/main/libmozartvmboost.so
}
pkg_postinst() {

@ -4,5 +4,6 @@ DIST perl-5.30.3.tar.xz 12375128 BLAKE2B ff0668c896e46ea35a1b8bd4a7d800c8668d699
DIST perl-5.32.0-patches-1.tar.xz 20220 BLAKE2B 46ebca5c74f59aa935ceec2a5807426c0e653ad7ba27de441d26e049e62dc67b17d58dfe5755f31bdd157e349d47fd46a98699207729f8f4f747930ed1064ba2 SHA512 42ed00f5f6be40af59e02691ff439a048cccd96fb970cca0976209faa921af98a773cc4cb1466e164328350d58cb46950ffa8c6f2fddabbeb3e8819349b06849
DIST perl-5.32.0.tar.xz 12717336 BLAKE2B 4abad9f1ddabaad5f2bbfe8ab6d061aeb8c558e458d4bf1bcf737a8ecc1cf20f7dffaddd0bc867578b457787ec284fa81be3fae1edd7f72d58aeec7b5cd744e5 SHA512 1540247415893bbd94dfeede7b4fba6052688dc0bf27ced817f448246fcdc6e9a6486abc34577dec5b00bf02ed607b2d24ccd4977c3b3c51e8e6edfc0b81c760
DIST perl-5.32.1.tar.xz 12610988 BLAKE2B 9f89bcf9cffb245a0f2cb0afa17c25f092c84cc2f29bb1c744294c2f0393c72dc3beb9fcbe256cf252677b33bc594b294b3f6a4774ad9e30b771aceed1f4f147 SHA512 3443c75aea91f0fe3712fee576239f1946d2301b8f7390b690e2f5d070fe71af8f9fa7769e42086c2d33d5f84370f80368fa9350b4f10cc0ac3e6c1f6209d8f9
DIST perl-5.34.0-RC1.tar.xz 12881680 BLAKE2B acb26d65b3a439676cb7cf9477d2590e33f24bc4d0f7af6b2069c81aab2c74b047ceae349ef58fa49ce2ed8668cf7eec1922498bd2db144d08968a4fd1b7d9a3 SHA512 fdf686349c00f637eb95691efadb5042f15bce8ec1174595869815761e779f616504d19d01d52a6d13ec444974e7d90bfdb15a83aa36d2acb840bf1ff7dc97d6
DIST perl-cross-1.3.2.tar.gz 108350 BLAKE2B ddb352fdbec66a04de62425f5cae1aaa3bc7251b9d6f4837b66a0bd79c53c60212fad3997dad4c38055774a2769d45b5b83927bf48b0fb00a130fee429eba702 SHA512 d61d25066a8d87c34aeacc5b9bd86fab964b33c4c65e84a89e4077fe1d8011c0bdf810a304631af44fae32edcffd6c99fc17b0c584ea83d1ce5ce492aaedfea5
DIST perl-cross-1.3.4.tar.gz 108461 BLAKE2B 28f207d235f51ebf681598cf85f7f16923574aafb593426a59d67578135ee3632efb12b9e1a672759195a79f80e49f5c929ec42b2b4571b1d36f5d8c8dceadc2 SHA512 7e1fc7b2b19d8c2e2fb8615e074e218b2e1a4d276b563ffabccfd0c7398bc8680fca96da89cc61d611993f38a2c67dfbb0201c58658e05437395ad8c00d31874

@ -0,0 +1,816 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
PATCH_VER=1
CROSS_VER=1.3.4
PATCH_BASE="perl-5.32.0-patches-${PATCH_VER}"
PATCH_DEV=kentnl
DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
# Yes we can.
PERL_SINGLE_SLOT=y
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
SUBSLOT="${DIST_VERSION%-RC*}"
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
MY_PV="${DIST_VERSION%-RC*}"
DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
SRC_URI="
mirror://cpan/src/5.0/${MY_P}.tar.xz
mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz
https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
"
HOMEPAGE="https://www.perl.org/"
LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS=""
fi
IUSE="berkdb debug doc gdbm ithreads minimal"
RDEPEND="
berkdb? ( sys-libs/db:= )
gdbm? ( >=sys-libs/gdbm-1.8.3:= )
app-arch/bzip2
sys-libs/zlib
virtual/libcrypt:=
"
DEPEND="${RDEPEND}"
BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
)
"
# bug 390719, bug 523624
# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
S="${WORKDIR}/${MY_P}"
dual_scripts() {
src_remove_dual perl-core/Archive-Tar 2.360.0 ptar ptardiff ptargrep
src_remove_dual perl-core/CPAN 2.270.0 cpan
src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
src_remove_dual perl-core/Encode 3.60.0 enc2xs piconv
src_remove_dual perl-core/ExtUtils-MakeMaker 7.440.0 instmodsh
src_remove_dual perl-core/ExtUtils-ParseXS 3.400.0 xsubpp
src_remove_dual perl-core/IO-Compress 2.93.0 zipdetails
src_remove_dual perl-core/JSON-PP 4.40.0 json_pp
src_remove_dual perl-core/Module-CoreList 5.202.101.23 corelist
src_remove_dual perl-core/Pod-Checker 1.730.0 podchecker
src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
src_remove_dual perl-core/Pod-Usage 1.690.0 pod2usage
src_remove_dual perl-core/Test-Harness 3.420.0 prove
src_remove_dual perl-core/podlators 4.140.0 pod2man pod2text
src_remove_dual_man perl-core/podlators 4.140.0 /usr/share/man/man1/perlpodstyle.1
}
check_rebuild() {
# Fresh install
if [[ -z "${REPLACING_VERSIONS}" ]]; then
return 0;
# Major Upgrade
# doesn't matter if there's multiple copies, it still needs a rebuild
# if the string is anything other than "5.CURRENTMAJOR"
elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
echo ""
ewarn "UPDATE THE PERL MODULES:"
ewarn "After updating dev-lang/perl the installed Perl modules"
ewarn "have to be re-installed. In most cases, this is done automatically"
ewarn "by the package manager, but subsequent steps are still recommended"
ewarn "to ensure system consistency."
ewarn
ewarn "You should start with a depclean to remove any unused perl dependencies"
ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
ewarn "Recommended: emerge --depclean -va"
ewarn
ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
ewarn "remaining rebuilds portage may have missed."
ewarn "Use: perl-cleaner --all"
return 0;
# Reinstall w/ USE Change
elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
ewarn "You changed one of the use-flags ithreads or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
}
pkg_setup() {
case ${CHOST} in
*-freebsd*) osname="freebsd" ;;
*-dragonfly*) osname="dragonfly" ;;
*-netbsd*) osname="netbsd" ;;
*-openbsd*) osname="openbsd" ;;
*-darwin*) osname="darwin" ;;
*-solaris*) osname="solaris" ;;
*-cygwin*) osname="cygwin" ;;
*) osname="linux" ;;
esac
myarch="${CHOST%%-*}-${osname}"
if use debug ; then
myarch+="-debug"
fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
fi
PRIV_BASE="/usr/$(get_libdir)/perl5"
SITE_BASE="/usr/local/$(get_libdir)/perl5"
VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
LIBPERL="libperl$(get_libname ${MY_PV} )"
# This ENV var tells perl to build with a directory like "5.30"
# regardless of its patch version. This is for experts only
# at this point.
if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
PRIV_LIB="${PRIV_BASE}/${MY_PV}"
ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${MY_PV}"
SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
else
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
fi
dual_scripts
}
src_remove_dual_file() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
alternatives_auto_makesym "${i}" "${i}-[0-9]*"
done
;;
setup)
for i in "$@" ; do
if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
break
fi
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i}{,-${ver}-${P}} || die
done
;;
esac
}
src_remove_dual_man() {
local i pkg ver ff
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
ff=${ff##*${i#${i%.[0-9]}}}
alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
done
;;
esac
}
src_remove_dual() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
for i in "$@" ; do
src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
done
}
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
}
# Copy a patch into the patch series
# add_patch SRC_PATH DEST_NAME ['description'] ['bug'] ['bug']
# - description is optional, but recommended
# - all arguments after descriptions are bug URLs
add_patch() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local src_name dest_name desc
src_name="$1"
dest_name="$2"
desc="$3"
shift; shift; shift;
einfo "Adding ${dest_name} to patch bundle"
cp "${src_name}" "${patchdir}/${dest_name}" || die "Couldn't copy ${src_name} to ${dest_name}"
if [[ -n "${desc}" ]]; then
printf "%s" "${desc}" > "${infodir}/${dest_name}.desc" || die "Couldn't write ${dest_name}.desc"
fi
if [[ $# -gt 0 ]]; then
# Note: when $@ is more than one element, this emits a
# line for each element
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
local expr="$1"
local patch="$( cd "${patchdir}"; echo $expr )"
einfo "Removing $patch ($expr) from patch bundle"
if [[ -e "${patchdir}/${patch}" ]]; then
rm -f "${patchdir}/${patch}" || die "Can't remove ${patch} ( $expr )"
else
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
# requires circumnavigating both bash and sed escape mechanisms.
c_escape_string() {
local slash dquote
slash='\'
dquote='"'
re_slash="${slash}${slash}"
re_dquote="${slash}${dquote}"
# Convert \ to \\,
# " to \"
echo "$1" |\
sed "s|${re_slash}|${re_slash}${re_slash}|g" |\
sed "s|${re_dquote}|${re_slash}${re_dquote}|g"
}
c_escape_file() {
c_escape_string "$(cat "$1")"
}
apply_patchdir() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local patchoutput="patchlevel-gentoo.h"
# Inject Patch-Level info into description for patchlevel.h patch
# to show in -V
local patch_expr="*List-packaged-patches*"
local patch="$( cd "${patchdir}"; echo $patch_expr )";
einfo "Injecting patch-level info into ${patch}.desc ( $patch_expr )"
if [[ -e "${patchdir}/${patch}" ]]; then
printf "List packaged patches for %s(%s) in patchlevel.h" "${PF}" "${PATCH_BASE}"\
>"${infodir}/${patch}.desc" || die "Can't rewrite ${patch}.desc"
else
eerror "No $patch_expr found in ${patchdir}"
fi
# Compute patch list to apply
# different name other than PATCHES to stop default
# reapplying it
# Single depth is currently only supported, as artifacts can reside
# from the old layout being multiple-directories, as well as it grossly
# simplifying the patchlevel_gentoo.h generation.
local PERL_PATCHES=($(
find "${patchdir}" -maxdepth 1 -mindepth 1 -type f -printf "%f\n" |\
grep -E '[.](diff|patch)$' |\
sort -n
))
for patch in "${PERL_PATCHES[@]}"; do
eapply "${WORKDIR}"/patches/${patch}
done
einfo "Generating $patchoutput"
# This code creates a header file, each iteration
# creates one-or-more-lines for each entry found in PERL_PATCHES
# and STDOUT is redirected to the .h file
for patch in "${PERL_PATCHES[@]}"; do
local desc_f="${infodir}/${patch}.desc"
local bugs_f="${infodir}/${patch}.bugs"
printf ',"%s"\n' "${patch}"
if [[ ! -e "${desc_f}" ]]; then
ewarn "No description provided for ${patch} (expected: ${desc_f} )"
else
local desc="$(c_escape_file "${desc_f}")"
printf ',"- %s"\n' "${desc}"
fi
if [[ -e "${bugs_f}" ]]; then
while read -d $'\n' -r line; do
local esc_line="$(c_escape_string "${line}")"
printf ',"- Bug: %s"\n' "${esc_line}"
done <"${bugs_f}"
fi
done > "${S}/${patchoutput}"
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
# Prepare Patch dir with additional patches / remove unwanted patches
# Inject bug/desc entries for perl -V
if use hppa ; then
# bug 634162
add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
"Fix broken miniperl on hppa"\
"https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
rm_patch "*-nsl-and-cl*"
fi
apply_patchdir
tc-is-cross-compiler && src_prepare_perlcross
tc-is-static-only || src_prepare_dynamic
if use gdbm; then
sed -i "s:INC => .*:INC => \"-I${EROOT}/usr/include/gdbm\":g" \
ext/NDBM_File/Makefile.PL || die
fi
# Use errno.h from prefix rather than from host system, bug #645804
if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then
sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# set a soname, fix linking against just built libperl
sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die
fi
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
fi
default
}
myconf() {
# the myconf array is declared in src_configure
myconf=( "${myconf[@]}" "$@" )
}
# Outputs a list of versions which have been seen in any of the
# primary perl @INC prefix paths, such as:
# /usr/lib64/perl5/<NUMBER>
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
# is enabled, where it will also allow numbers like "5.x"
#
# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
# if you used that.
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+[.][0-9]+$';
if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
fi
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
"${EROOT}${VENDOR_BASE}"
)
for dir in "${dirs[@]}"; do
if [[ ! -e "${dir}" ]]; then
continue
fi
# Without access to readdir() on these dirs, find will not be able
# to reveal any @INC directories inside them, and will subsequently prune
# them from the built perl's @INC support, breaking our compatiblity options
# entirely.
if [[ ! -r "${dir}" || ! -x "${dir}" ]]; then
eerror "Bad permissions on ${dir}, this will probably break things"
eerror "Ensure ${dir} is +rx for at least uid=$EUID"
eerror "Recommended permission is +rx for all"
eerror "> chmod o+rx ${dir}"
fi
done
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${DIST_VERSION%-RC}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
vexclude="${SUBSLOT}"
fi
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
# for the last component, or unique will convert
# 5.30.0 + 5.30 into just 5.30
printf "%s\n" "$@" |\
grep -vxF "${vexclude}" |\
sort -u -nr -t'.' -k1,1rn -k2,2rn -k3,3rg
}
versions_to_inclist() {
local oldv="${PERL_BIN_OLDVERSEN}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${PERL_BIN_OLDVERSEN}"
local root
local v
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
if [[ -e "${fullpath}" ]]; then
has "${v}" ${oldv} && printf "%s:" "${fullpath}/${myarch}${mythreading}";
printf "%s:" "${fullpath}"
fi
done
done
}
src_configure() {
declare -a myconf
export LC_ALL="C"
[[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
# Perl has problems compiling with -Os in your flags with glibc
use elibc_uclibc || replace-flags "-Os" "-O2"
# xlocale.h is going away in glibc-2.26, so it's counterproductive
# if we use it and include it in CORE/perl.h ... Perl builds just
# fine with glibc and locale.h only.
# However, the darwin prefix people have no locale.h ...
use elibc_glibc && myconf -Ui_xlocale
# This flag makes compiling crash in interesting ways
filter-flags "-malign-double"
# Generic LTO broken since 5.28, triggers EUMM failures
filter-flags "-flto"
use sparc && myconf -Ud_longdbl
export BUILD_BZIP2=0
export BZIP2_INCLUDE=${EROOT}/usr/include
export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
export BUILD_ZLIB=False
export ZLIB_INCLUDE=${EROOT}/usr/include
export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
myndbm='U'
mygdbm='U'
mydb='U'
if use gdbm ; then
mygdbm='D'
if use berkdb ; then
myndbm='D'
fi
fi
if use berkdb ; then
mydb='D'
has_version '=sys-libs/db-1*' && myndbm='D'
fi
myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
myconf -Ui_db -Ui_ndbm
fi
use ithreads && myconf -Dusethreads
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
elif [[ ${CFLAGS} == *-g* ]] ; then
myconf -DDEBUGGING=-g
else
myconf -DDEBUGGING=none
fi
# Autodiscover all old version directories, some of them will even be newer
# if you downgrade
if [[ -z ${PERL_OLDVERSEN} ]]; then
PERL_OLDVERSEN="$( find_candidate_inc_versions )"
fi
# Fixup versions, removing self match, fixing order and dupes
PERL_OLDVERSEN="$( sanitize_inc_versions ${PERL_OLDVERSEN} )"
# Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
if [[ -n "${PERL_OLDVERSEN// }" ]]; then
local inclist="$( versions_to_inclist ${PERL_OLDVERSEN} )"
einfo "This version of perl may partially support modules previously"
einfo "installed in any of the following paths:"
for incpath in ${inclist}; do
[[ -e "${EROOT}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT}${VENDOR_BASE}/${incpath}"
[[ -e "${EROOT}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROOT}${PRIV_BASE}/${incpath}"
[[ -e "${EROOT}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT}${SITE_BASE}/${incpath}"
done
einfo "This is a temporary measure and you should aim to cleanup these paths"
einfo "via world updates and perl-cleaner"
# myconf -Dinc_version_list="${inclist}"
myconf -Dgentoolibdirs="$( versions_to_gentoolibdirs ${PERL_OLDVERSEN} )"
fi
[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
# Make sure we can do the final link #523730, need to set deployment
# target to override hardcoded 10.3 which breaks on modern OSX
[[ ${CHOST} == *-darwin* ]] && \
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
myconf -Ud_flock
# Prefix: the host system needs not to follow Gentoo multilib stuff, and in
# Prefix itself we don't do multilib either, so make sure perl can find
# something compatible.
if use prefix ; then
# Set a hook to check for each detected library whether it actually works.
export libscheck="
( echo 'main(){}' > '${T}'/conftest.c &&
$(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
) || xxx=/dev/null"
# Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
elif [[ $(get_libdir) != "lib" ]] ; then
# We need to use " and not ', as the written config.sh use ' ...
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
fi
# don't try building ODBM, bug #354453
disabled_extensions="ODBM_File"
if ! use gdbm ; then
# workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
fi
myconf -Dnoextensions="${disabled_extensions}"
[[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
[[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
# allow fiddling via EXTRA_ECONF, bug 558070
eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
# setting -Dld= to tc-getLD breaks perl and all perl things
# https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
myconf \
-Duseshrplib \
-Darchname="${myarch}" \
-Dcc="$(tc-getCC)" \
-Dar="$(tc-getAR)" \
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
-Dsiteprefix="${EPREFIX}"'/usr/local' \
-Dvendorprefix="${EPREFIX}"'/usr' \
-Dscriptdir="${EPREFIX}"'/usr/bin' \
-Dprivlib="${EPREFIX}${PRIV_LIB}" \
-Darchlib="${EPREFIX}${ARCH_LIB}" \
-Dsitelib="${EPREFIX}${SITE_LIB}" \
-Dsitearch="${EPREFIX}${SITE_ARCH}" \
-Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
-Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
-Dman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
-Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dman1ext='1' \
-Dman3ext='3pm' \
-Dlibperl="${LIBPERL}" \
-Dlocincpth="${EPREFIX}"'/usr/include ' \
-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
-Duselargefiles \
-Dd_semctl_semun \
-Dcf_by='Gentoo' \
-Dmyhostname='localhost' \
-Dperladmin='root@localhost' \
-Ud_csh \
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
./configure \
--target="${CHOST}" \
--build="${CBUILD}" \
-Dinstallprefix='' \
-Dinstallusrbinperl='undef' \
-Dusevendorprefix='define' \
"${myconf[@]}" \
|| die "Unable to configure"
else
sh Configure \
-des \
-Dinstallprefix="${EPREFIX}"'/usr' \
-Dinstallusrbinperl='n' \
"${myconf[@]}" \
|| die "Unable to configure"
fi
}
src_test() {
export NO_GENTOO_NETWORK_TESTS=1;
export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
if [[ ${EUID} == 0 ]] ; then
ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
return 0
fi
use elibc_uclibc && export MAKEOPTS+=" -j1"
TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
}
src_install() {
local i
local coredir="${ARCH_LIB}/CORE"
emake DESTDIR="${D}" install
rm -f "${ED}/usr/bin/perl${MY_PV}"
ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
if ! tc-is-static-only ; then
dolib.so "${ED}"${coredir}/${LIBPERL}
rm -f "${ED}"${coredir}/${LIBPERL}
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
fi
rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
# This removes ${D} from Config.pm
for i in $(find "${D}" -iname "Config.pm" ) ; do
einfo "Removing ${D} from ${i}..."
sed -i -e "s:${D}::" "${i}" || die "Sed failed"
done
dodoc Changes* README AUTHORS
if use doc ; then
# HTML Documentation
# We expect errors, warnings, and such with the following.
dodir /usr/share/doc/${PF}/html
LD_LIBRARY_PATH=. ./perl installhtml \
--podroot='.' \
--podpath='lib:ext:pod:vms' \
--recurse \
--htmldir="${ED}/usr/share/doc/${PF}/html"
fi
[[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
dual_scripts
}
pkg_preinst() {
check_rebuild
}
pkg_postinst() {
dual_scripts
if [[ "${ROOT}" = "/" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
rm -f "${file}"
einfo "<< ${file}"
done
fi
done
# Silently remove the now empty dirs
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
fi
done
fi
}
pkg_postrm() {
dual_scripts
}

@ -1,8 +1,5 @@
DIST swi-prolog-8.2.2-gentoo-patchset-0.tar.gz 539 BLAKE2B 53d8f4aeb6f83eae628027f3f4d581f7a8c4e7e6c763350acc85bd0cc4ec4f6e8d7afe680763afc4bef9e5babb8100aeca0f887d029ffa115f4ead89cbc48cdd SHA512 d745b978c6926ed6b9f84d98c5cfd08716aaebe05bcf4a6fd9bd647a5d265b731e4daf2c0f5028eac36d7cea052eb52f80fe8287d4e9e285b3b8ffd544408da1
DIST swi-prolog-8.2.3-gentoo-patchset-0.tar.gz 535 BLAKE2B bb7869c5166104a3a7faa88dd14284ea147ab5090695ff1c950365823451ac656403bee97c7dd4a039e2d58085456842f8bbc7caa26d18916c6f8718a204097c SHA512 c1f0dce1e336c79fe84a3f9d0fe5e873d33c00071f91cbb683a73fbceaba1c6ca8c2875b58045829eafcbee78a0e713009a07bd51a2c56bf146f14881899f934
DIST swipl-8.2.2.tar.gz 11002077 BLAKE2B 581c3ea83d2440cbe2454ba12ea2752bec9fda926f3afef6e36de1bbf70b43b34931ad768335bb15809a3d76959c7eec7dd3ad54a0a4085ad8ba34075dd3f4d9 SHA512 fb77cfd58932dc35c3d808899c1f493ffb22a58f56fe364ce0c0b48b8cabdd204d4f920346c39f696fadd9ee8335e163a8eb8d0a770c2835d803f030c1f3f878
DIST swipl-8.2.3.tar.gz 10999577 BLAKE2B 57cfa9f6fb97f0136a35da1850c7ae8da123d1c18fe6e18597d1b2131b7304a638d42d673efad2a01eaf3f9dad7b4754e6feb64917423abda002323bfc8dec8c SHA512 cd9ffc8a963682c0d02cec4b76338352459e004e07f3e5c0f02b3c2f9b19f23fe9639e037cf52531491a41c201113138f0b6a039d401e891ad5774383b0d852f
DIST swipl-8.2.4.tar.gz 10998859 BLAKE2B b18f26102a685ff5c66aeaf0c14a08c532f9327f9f995cd46657a71b6779d021eb4f5651b2be77883197c7c5ee31c23259f46ed559aeeb0bb53ad10aea0081ed SHA512 cdbd23d4a0e9699ecc32bdcad9979e4042fb0f24de84010f6f097bc7148af38150b0e61e393c057b0dbae932d0fc1c02a41808bcbafd2c23e24fd73070bed470
DIST swipl-8.3.20.tar.gz 11136550 BLAKE2B 83dd6ea056fd579816b88ca1faa3f857cb880d39d0cebc186aab0a0bf7cfdde19348874d4a7efb5e27995adfffb3ee075c42aa7fde1088ee17a5a05c137667ed SHA512 7f64ba639db0e1d75bd459e61ec14c30498035bbb59995f888702174fac159ebc96c47f22be2c3e466f5ba5547b39aaf83d296da2b2419ed89ff9195f355f3a4
DIST swipl-8.3.21.tar.gz 11143843 BLAKE2B 4e4a009e40609d17f33bd783c477295e20805d471ffdb8f6451b52a7c51a749c123e79d0e5087a473fe20c5a673648208540e7039403c35c7ffb044851f72f04 SHA512 fe8596a4d0ecc5d2d48e7532619bdf09364d1b52beffc4ea73cdd79d29dde9d68ddc1a66a4f2f579d7eee1a3e215e13e918ca59b26788957e5e2dd5af2905139
DIST swipl-8.3.22.tar.gz 11153417 BLAKE2B a02638ca29d4a19978b10062ab7f8913480e397551cb88327dd020bb2ae40bf623911f673f88e41074f68c667e7075fa18fc7dcf7b3013e582cbc70d59a6a729 SHA512 6fdf0ce6743c042ef7af0195e8c92fb81fe9fef2f16e9ec2d4ff355de70d21b325dd6058c9e7a0a0dd3e41cc168a251784ab7a473108d272e323470c601d5839

@ -1,104 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils flag-o-matic multilib
PATCHSET_VER="0"
DESCRIPTION="versatile implementation of the Prolog programming language"
HOMEPAGE="https://www.swi-prolog.org/"
SRC_URI="https://www.swi-prolog.org/download/stable/src/swipl-${PV}.tar.gz
https://dev.gentoo.org/~keri/distfiles/swi-prolog/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="archive berkdb debug doc +gmp java +libedit minimal odbc pcre qt5 readline ssl test uuid X yaml"
RESTRICT="!test? ( test )"
RDEPEND="sys-libs/ncurses:=
sys-libs/zlib
archive? ( app-arch/libarchive )
berkdb? ( >=sys-libs/db-4:= )
odbc? ( dev-db/unixODBC )
pcre? ( dev-libs/libpcre )
readline? ( sys-libs/readline:= )
libedit? ( dev-libs/libedit )
gmp? ( dev-libs/gmp:0 )
ssl? (
dev-libs/openssl:0
)
java? ( >=virtual/jdk-1.8:* )
uuid? ( dev-libs/ossp-uuid )
qt5? (
dev-qt/qtwidgets:5
dev-qt/qtgui:5
)
X? (
virtual/jpeg:0
x11-libs/libX11
x11-libs/libXft
x11-libs/libXinerama
x11-libs/libXpm
x11-libs/libXt
x11-libs/libICE
x11-libs/libSM )
yaml? ( dev-libs/libyaml )"
DEPEND="${RDEPEND}
X? ( x11-base/xorg-proto )
java? ( test? ( =dev-java/junit-3.8* ) )"
S="${WORKDIR}/swipl-${PV}"
BUILD_DIR="${S}/build"
CMAKE_USE_DIR="${S}"
src_prepare() {
if [[ -d "${WORKDIR}"/${PV} ]] ; then
eapply "${WORKDIR}"/${PV}
fi
eapply_user
sed -i -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" CMakeLists.txt || die
sed -i -e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" CMakeLists.txt || die
cmake-utils_src_prepare
}
src_configure() {
append-flags -fno-strict-aliasing
use debug && append-flags -DO_DEBUG
mycmakeargs=(
-DSWIPL_INSTALL_PREFIX=$(get_libdir)/swipl
-DUSE_GMP=$(usex gmp)
-DINSTALL_DOCUMENTATION=$(use doc && usex archive)
-DSWIPL_PACKAGES_BASIC=$(usex !minimal)
-DSWIPL_PACKAGES_ARCHIVE=$(usex archive)
-DSWIPL_PACKAGES_ODBC=$(usex odbc)
-DSWIPL_PACKAGES_BDB=$(usex berkdb)
-DSWIPL_PACKAGES_PCRE=$(usex pcre)
-DSWIPL_PACKAGES_YAML=$(usex yaml)
-DSWIPL_PACKAGES_SSL=$(usex ssl)
-DSWIPL_PACKAGES_JAVA=$(usex java)
-DSWIPL_PACKAGES_QT=$(usex qt5)
-DSWIPL_PACKAGES_X=$(usex X)
-DSWIPL_PACKAGES_TERM=$(if use libedit || use readline; then echo yes; else echo no; fi)
)
cmake-utils_src_configure
}
src_compile() {
XDG_CONFIG_DIRS="${HOME}" \
XDG_DATA_DIRS="${HOME}" \
cmake-utils_src_compile
}
src_test() {
USE_PUBLIC_NETWORK_TESTS=false \
USE_ODBC_TESTS=false \
cmake-utils_src_test -V
}

@ -3,11 +3,11 @@
EAPI=7
inherit cmake desktop xdg-utils flag-o-matic multilib
inherit cmake desktop xdg-utils flag-o-matic
PATCHSET_VER="0"
DESCRIPTION="versatile implementation of the Prolog programming language"
DESCRIPTION="Versatile implementation of the Prolog programming language"
HOMEPAGE="https://www.swi-prolog.org/"
SRC_URI="https://www.swi-prolog.org/download/stable/src/swipl-${PV}.tar.gz"
@ -49,17 +49,15 @@ DEPEND="${RDEPEND}
java? ( test? ( =dev-java/junit-3.8* ) )"
S="${WORKDIR}/swipl-${PV}"
BUILD_DIR="${S}/build"
CMAKE_USE_DIR="${S}"
src_prepare() {
if [[ -d "${WORKDIR}"/${PV} ]] ; then
eapply "${WORKDIR}"/${PV}
fi
eapply_user
sed -i -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" CMakeLists.txt || die
sed -i -e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" CMakeLists.txt || die
sed -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" \
-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" \
-i CMakeLists.txt || die
cmake_src_prepare
}
@ -68,7 +66,7 @@ src_configure() {
append-flags -fno-strict-aliasing
use debug && append-flags -DO_DEBUG
mycmakeargs=(
local mycmakeargs=(
-DSWIPL_INSTALL_PREFIX=$(get_libdir)/swipl
-DUSE_GMP=$(usex gmp)
-DINSTALL_DOCUMENTATION=$(use doc && usex archive)
@ -83,7 +81,7 @@ src_configure() {
-DSWIPL_PACKAGES_QT=$(usex qt5)
-DSWIPL_PACKAGES_X=$(usex X)
-DSWIPL_PACKAGES_TERM=$(if use libedit || use readline; then echo yes; else echo no; fi)
)
)
cmake_src_configure
}

@ -1,103 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils flag-o-matic multilib
PATCHSET_VER="0"
DESCRIPTION="versatile implementation of the Prolog programming language"
HOMEPAGE="http://www.swi-prolog.org/"
SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="archive berkdb debug doc +gmp java +libedit minimal odbc pcre qt5 readline ssl test uuid X yaml"
RESTRICT="!test? ( test )"
RDEPEND="sys-libs/ncurses:=
sys-libs/zlib
archive? ( app-arch/libarchive )
berkdb? ( >=sys-libs/db-4:= )
odbc? ( dev-db/unixODBC )
pcre? ( dev-libs/libpcre )
readline? ( sys-libs/readline:= )
libedit? ( dev-libs/libedit )
gmp? ( dev-libs/gmp:0 )
ssl? (
dev-libs/openssl:0
)
java? ( >=virtual/jdk-1.8:* )
uuid? ( dev-libs/ossp-uuid )
qt5? (
dev-qt/qtwidgets:5
dev-qt/qtgui:5
)
X? (
virtual/jpeg:0
x11-libs/libX11
x11-libs/libXft
x11-libs/libXinerama
x11-libs/libXpm
x11-libs/libXt
x11-libs/libICE
x11-libs/libSM )
yaml? ( dev-libs/libyaml )"
DEPEND="${RDEPEND}
X? ( x11-base/xorg-proto )
java? ( test? ( =dev-java/junit-3.8* ) )"
S="${WORKDIR}/swipl-${PV}"
BUILD_DIR="${S}/build"
CMAKE_USE_DIR="${S}"
src_prepare() {
if [[ -d "${WORKDIR}"/${PV} ]] ; then
eapply "${WORKDIR}"/${PV}
fi
eapply_user
sed -i -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" CMakeLists.txt || die
sed -i -e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" CMakeLists.txt || die
cmake-utils_src_prepare
}
src_configure() {
append-flags -fno-strict-aliasing
use debug && append-flags -DO_DEBUG
mycmakeargs=(
-DSWIPL_INSTALL_PREFIX=$(get_libdir)/swipl
-DUSE_GMP=$(usex gmp)
-DINSTALL_DOCUMENTATION=$(use doc && usex archive)
-DSWIPL_PACKAGES_BASIC=$(usex !minimal)
-DSWIPL_PACKAGES_ARCHIVE=$(usex archive)
-DSWIPL_PACKAGES_ODBC=$(usex odbc)
-DSWIPL_PACKAGES_BDB=$(usex berkdb)
-DSWIPL_PACKAGES_PCRE=$(usex pcre)
-DSWIPL_PACKAGES_YAML=$(usex yaml)
-DSWIPL_PACKAGES_SSL=$(usex ssl)
-DSWIPL_PACKAGES_JAVA=$(usex java)
-DSWIPL_PACKAGES_QT=$(usex qt5)
-DSWIPL_PACKAGES_X=$(usex X)
-DSWIPL_PACKAGES_TERM=$(if use libedit || use readline; then echo yes; else echo no; fi)
)
cmake-utils_src_configure
}
src_compile() {
XDG_CONFIG_DIRS="${HOME}" \
XDG_DATA_DIRS="${HOME}" \
cmake-utils_src_compile
}
src_test() {
USE_PUBLIC_NETWORK_TESTS=false \
USE_ODBC_TESTS=false \
cmake-utils_src_test -V
}

@ -3,13 +3,11 @@
EAPI=7
inherit cmake flag-o-matic multilib
inherit cmake flag-o-matic
PATCHSET_VER="0"
DESCRIPTION="versatile implementation of the Prolog programming language"
HOMEPAGE="http://www.swi-prolog.org/"
SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
DESCRIPTION="Versatile implementation of the Prolog programming language"
HOMEPAGE="https://www.swi-prolog.org/"
SRC_URI="https://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
@ -49,17 +47,15 @@ DEPEND="${RDEPEND}
java? ( test? ( =dev-java/junit-3.8* ) )"
S="${WORKDIR}/swipl-${PV}"
BUILD_DIR="${S}/build"
CMAKE_USE_DIR="${S}"
src_prepare() {
if [[ -d "${WORKDIR}"/${PV} ]] ; then
eapply "${WORKDIR}"/${PV}
fi
eapply_user
sed -i -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" CMakeLists.txt || die
sed -i -e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" CMakeLists.txt || die
sed -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" \
-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" \
-i CMakeLists.txt || die
cmake_src_prepare
}
@ -68,7 +64,7 @@ src_configure() {
append-flags -fno-strict-aliasing
use debug && append-flags -DO_DEBUG
mycmakeargs=(
local mycmakeargs=(
-DSWIPL_INSTALL_PREFIX=$(get_libdir)/swipl
-DUSE_GMP=$(usex gmp)
-DINSTALL_DOCUMENTATION=$(use doc && usex archive)
@ -83,7 +79,7 @@ src_configure() {
-DSWIPL_PACKAGES_QT=$(usex qt5)
-DSWIPL_PACKAGES_X=$(usex X)
-DSWIPL_PACKAGES_TERM=$(if use libedit || use readline; then echo yes; else echo no; fi)
)
)
cmake_src_configure
}

@ -3,11 +3,11 @@
EAPI=7
inherit cmake desktop xdg-utils flag-o-matic multilib
inherit cmake desktop xdg-utils flag-o-matic
PATCHSET_VER="0"
DESCRIPTION="versatile implementation of the Prolog programming language"
DESCRIPTION="Versatile implementation of the Prolog programming language"
HOMEPAGE="https://www.swi-prolog.org/"
SRC_URI="https://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
@ -49,17 +49,15 @@ DEPEND="${RDEPEND}
java? ( test? ( =dev-java/junit-3.8* ) )"
S="${WORKDIR}/swipl-${PV}"
BUILD_DIR="${S}/build"
CMAKE_USE_DIR="${S}"
src_prepare() {
if [[ -d "${WORKDIR}"/${PV} ]] ; then
eapply "${WORKDIR}"/${PV}
fi
eapply_user
sed -i -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" CMakeLists.txt || die
sed -i -e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" CMakeLists.txt || die
sed -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" \
-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" \
-i CMakeLists.txt || die
cmake_src_prepare
}
@ -68,7 +66,7 @@ src_configure() {
append-flags -fno-strict-aliasing
use debug && append-flags -DO_DEBUG
mycmakeargs=(
local mycmakeargs=(
-DSWIPL_INSTALL_PREFIX=$(get_libdir)/swipl
-DUSE_GMP=$(usex gmp)
-DINSTALL_DOCUMENTATION=$(use doc && usex archive)
@ -83,7 +81,7 @@ src_configure() {
-DSWIPL_PACKAGES_QT=$(usex qt5)
-DSWIPL_PACKAGES_X=$(usex X)
-DSWIPL_PACKAGES_TERM=$(if use libedit || use readline; then echo yes; else echo no; fi)
)
)
cmake_src_configure
}

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save