Sync with portage [Wed Feb 13 10:08:55 MSK 2019].

mhiretskiy 1350
root 5 years ago
parent ae6942e4a5
commit 372426c1c0

Binary file not shown.

Binary file not shown.

@ -1 +1,2 @@
DIST gcab-0.8.tar.xz 337016 BLAKE2B 6f9ccf6d33c4bd32b6cda09083c98ee9b24ffc3b42be9019493a864011a4d3f1e2d1fa766bbdd0a5de29eb04608d91a2ad5c17aa25302e3d94d2ef6ca659d764 SHA512 044b1cbe71b08946031161ca97379df8500be5569d6f4989b8fd8f1d8c48ba0fe757306955de9137958eb870cd4024e4c56f833ce847e5a972339883b39454f2
DIST gcab-1.2.tar.xz 76088 BLAKE2B 4d8f04ec6211745e841b88e93c5d156843bce9ca8668daf9d39f1197c814d619f7e61b1e20d163c8631da36bf395776c3b20a91a0ec97ff7c609997fa84a538d SHA512 b5cc114f5cea21c21d9ef2009cefce700b5a7f97609e20aa455b84fcefe1693ce2566ddc58dc2b7c97f7db772f8ae3a2f3cc9a0e1d2c23d93d5fbee9101d3f64

@ -0,0 +1,44 @@
From 5ac7272bba9635234fc08ab526b80a9f259d0fc6 Mon Sep 17 00:00:00 2001
From: Mart Raudsepp <leio@gentoo.org>
Date: Tue, 12 Feb 2019 11:44:10 +0200
Subject: [PATCH] build-sys: Support disabling vapi generation independent of
introspection
---
libgcab/meson.build | 12 +++++++-----
meson_options.txt | 1 +
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/libgcab/meson.build b/libgcab/meson.build
index f939617..3c4ac68 100644
--- a/libgcab/meson.build
+++ b/libgcab/meson.build
@@ -93,9 +93,11 @@ if get_option('introspection')
],
install : true
)
- gnome.generate_vapi('libgcab-1.0',
- sources: gir[0],
- packages : ['gio-2.0'],
- install : true,
- )
+ if get_option('vapi')
+ gnome.generate_vapi('libgcab-1.0',
+ sources: gir[0],
+ packages : ['gio-2.0'],
+ install : true,
+ )
+ endif
endif
diff --git a/meson_options.txt b/meson_options.txt
index bbcbbea..b7ade3f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
option('docs', type : 'boolean', value : true, description : 'enable developer documentation')
option('introspection', type : 'boolean', value : true, description : 'generate GObject Introspection data')
+option('vapi', type : 'boolean', value : true, description: 'generate Vala bindings (requires introspection)')
option('tests', type : 'boolean', value : true, description : 'enable tests')
--
2.17.0

@ -0,0 +1,50 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
VALA_USE_DEPEND="vapigen"
inherit gnome.org meson vala
DESCRIPTION="Library and tool for working with Microsoft Cabinet (CAB) files"
HOMEPAGE="https://wiki.gnome.org/msitools"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="gtk-doc +introspection test vala"
REQUIRED_USE="vala? ( introspection )"
RDEPEND="
>=dev-libs/glib-2.44:2
sys-libs/zlib
introspection? ( >=dev-libs/gobject-introspection-1.54:= )
"
DEPEND="${RDEPEND}
dev-util/glib-utils
gtk-doc? ( >=dev-util/gtk-doc-1.14
app-text/docbook-xml-dtd:4.3 )
>=sys-devel/gettext-0.19.8
virtual/pkgconfig
vala? ( $(vala_depend) )
"
RESTRICT="!test? ( test )"
PATCHES=( "${FILESDIR}"/${PV}-optional-vapi.patch ) # https://gitlab.gnome.org/GNOME/gcab/merge_requests/1
src_prepare() {
use vala && vala_src_prepare
default
}
src_configure() {
local emesonargs=(
$(meson_use gtk-doc docs)
$(meson_use introspection)
$(meson_use vala vapi)
$(meson_use test tests)
)
meson_src_configure
}

@ -12,7 +12,7 @@ SRC_URI="mirror://gnu/tar/${P}.tar.bz2
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="acl elibc_glibc minimal nls selinux static userland_GNU xattr"
LIB_DEPEND="acl? ( virtual/acl[static-libs(+)] )"

Binary file not shown.

@ -1,4 +1,2 @@
DIST borgbackup-1.1.6.tar.gz 3441523 BLAKE2B 13b1892774e857432a77d1f67d981046a0670b4ba2f3665502f7b729a211fc47e10a87feca308d5089c984cfe4665e7e70ca68bb9aa6e188893a0d088e84df93 SHA512 5741c48bdb70a26d40bd583f207460e35bb7dd560424889d37eb4d90ee96947457faf09bae0fa2b26b42ec71ef6eeaec1b770ba3257223a2637fcb55266e4a17
DIST borgbackup-1.1.7.tar.gz 3446832 BLAKE2B c4e2ce7c08f0df479d3333e5766ea070d0c1e18abc88fc8787e4212eff27e8e4505759f80f3bdda80d2b9a737241b907a41749edca9a6138eae2a5620913908d SHA512 586420b9cad7e731f2f1b8b05f3cd3dc606691c5a5ec307e887035d941ac5ac6d4c988783660969960a1221e4d9f2b865ee5558d4007ea7524632d0a50a8a402
DIST borgbackup-1.1.8.tar.gz 3456058 BLAKE2B cad55216f92025418e1a427f4b578d6b7eafa03f6b3e9c4fccb148dd3856c4f6649928fb4227249c534add125f9b3a2a0b6ed808ae12c5e60a28f9df4fb0031a SHA512 1455e68bcedab8f35f9426dc73958c6a6565ad1f1cc274ce59d34a12e3a7bfa1d12fa2b8e8dd3e71824e1cd0927babf79f4e99d4e516454ed12dbd3970d0e921
DIST borgbackup-1.1.9.tar.gz 3468259 BLAKE2B 91c89304cf22328a0bd74583c22370343915209a204f52c65290dbec0cb688392c2e80b946a55317f8c58ef23099e710c16a34c6bfbbfb547a3e4b38c3c81c37 SHA512 466288258700fb0b3dae936c79fd423d26bea2d721dd70112b3cfd0f8e2bb335144a00de76743c31d336f6c19793775260d154326ec70d6d6d0a4e5ad6a59e59

@ -1,46 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{4,5,6} )
inherit distutils-r1
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/${PN}/borg.git"
inherit git-r3
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="amd64 x86"
fi
DESCRIPTION="Deduplicating backup program with compression and authenticated encryption"
HOMEPAGE="https://borgbackup.readthedocs.io/"
LICENSE="BSD"
SLOT="0"
IUSE="libressl"
# Unfortunately we have a file conflict with app-office/borg, bug #580402
RDEPEND="
!!app-office/borg
app-arch/lz4
dev-python/llfuse[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/pyzmq[${PYTHON_USEDEP}]
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
"
DEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
dev-python/cython[${PYTHON_USEDEP}]
${RDEPEND}
"
python_prepare_all() {
# allow use of new (renamed) msgpack
sed -i "s|'msgpack-python.*',||g" setup.py || die
distutils-r1_python_prepare_all
}

@ -1,46 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{4,5,6} )
inherit distutils-r1
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/${PN}/borg.git"
inherit git-r3
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
DESCRIPTION="Deduplicating backup program with compression and authenticated encryption"
HOMEPAGE="https://borgbackup.readthedocs.io/"
LICENSE="BSD"
SLOT="0"
IUSE="libressl"
# Unfortunately we have a file conflict with app-office/borg, bug #580402
RDEPEND="
!!app-office/borg
app-arch/lz4
dev-python/llfuse[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/pyzmq[${PYTHON_USEDEP}]
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
"
DEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
dev-python/cython[${PYTHON_USEDEP}]
${RDEPEND}
"
python_prepare_all() {
# allow use of new (renamed) msgpack
sed -i "s|'msgpack-python.*',||g" setup.py || die
distutils-r1_python_prepare_all
}

@ -26,6 +26,7 @@ IUSE="libressl"
RDEPEND="
!!app-office/borg
app-arch/lz4
virtual/acl
dev-python/llfuse[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/pyzmq[${PYTHON_USEDEP}]

@ -26,6 +26,7 @@ IUSE="libressl"
RDEPEND="
!!app-office/borg
app-arch/lz4
virtual/acl
dev-python/llfuse[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/pyzmq[${PYTHON_USEDEP}]

@ -26,6 +26,7 @@ IUSE="libressl"
RDEPEND="
!!app-office/borg
app-arch/lz4
virtual/acl
dev-python/llfuse[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/pyzmq[${PYTHON_USEDEP}]

Binary file not shown.

@ -1,2 +1 @@
DIST extract-xiso-2.7.1.tar.gz 207518 BLAKE2B bf99e2555e85344db318bdedf0e6dfb80b5f8cd079dc2083ba94e06c62032235d88296909a1aa887180ce94ce9d80a6b39aab25ed99b04741951aed79c2e8cdb SHA512 a7153d96fa7cfb01dfa385a0984d94dc0fa5ac14ce9f7e2d50287b7e1edbb6a4ba84b6b874aa2628b1a82f23b30687958e411699487896cc48787f48e0e012c6
DIST extract-xiso_v2.5_src.tgz 207052 BLAKE2B 36363ac23bff01c28ddfee46990cae5e193841a294549b1b9f29c401f833e42e5f92e0157aa07d1cb2bfe272eb25a0f96e3e285b6a06abc3a7d06868258cf649 SHA512 ae73d5814167894f60530f9cb88485a9bcc39a60da87ed20b8b579f8e3f91542df102c2f9cb868ce61ff61c1a5add63d4bec66097f039c906353762358760dec

@ -1,39 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=0
inherit toolchain-funcs
MY_PV=${PV/_beta/b}
DESCRIPTION="Tool for extracting and creating optimised Xbox ISO images"
HOMEPAGE="https://sourceforge.net/projects/extract-xiso"
SRC_URI="mirror://sourceforge/extract-xiso/${PN}_v${MY_PV}_src.tgz"
LICENSE="BSD-4"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE=""
S=${WORKDIR}/${PN}
src_unpack() {
unpack ${A}
cd "${S}"
sed -i \
-e 's:__LINUX__:__linux__:' \
*.[ch] */*.[ch] || die
}
doit() { echo "$@"; "$@"; }
src_compile() {
doit $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} \
extract-xiso.c libftp-*/*.c -o extract-xiso || die
}
src_install() {
dobin extract-xiso || die
dodoc README.TXT
}

@ -13,7 +13,7 @@ SRC_URI="mirror://sourceforge/extract-xiso/${P}.tar.gz"
LICENSE="BSD-4"
SLOT="0"
KEYWORDS="~amd64 ppc x86"
KEYWORDS="amd64 ppc x86"
IUSE=""
S=${WORKDIR}/${PN}

Binary file not shown.

@ -11,5 +11,5 @@ inherit aspell-dict-r1 versionator
SRC_URI="mirror://gnu/aspell/dict/${ASPELL_SPELLANG}/${PN%-*}${ASPELL_VERSION}-${PN#*-}-$(replace_version_separator 3 '-').tar.bz2"
LICENSE="myspell-en_CA-KevinAtkinson public-domain Princeton Ispell"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE=""

Binary file not shown.

@ -11,7 +11,7 @@ SRC_URI="http://www.inf.bme.hu/~mszeredi/spectemu/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ppc x86"
KEYWORDS="amd64 ppc x86"
IUSE="readline svga +X"
REQUIRED_USE="|| ( svga X )"

@ -1,47 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=0
### Several versions of specemu exist, xspect & vgaspect, utilising X11
### and/or svgalib. libreadline provides optional runtime features.
### The ./configure script automagically figures out which binaries to build
### so the run/compiletime dependancies here are use dependant
inherit eutils
DESCRIPTION="48k ZX Spectrum Emulator"
HOMEPAGE="http://kempelen.iit.bme.hu/~mszeredi/spectemu/spectemu.html"
SRC_URI="http://www.inf.bme.hu/~mszeredi/spectemu/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="X readline svga"
DEPEND="X? ( x11-base/xorg-proto
>=x11-libs/libX11-1.0.0
>=x11-libs/libXext-1.0.0
>=x11-libs/libXxf86vm-1.0.0 )
readline? ( sys-libs/readline )"
RDEPEND="svga? ( media-libs/svgalib )"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-qa.patch
}
src_compile() {
econf \
$(use_with readline) \
$(use_with X x)
emake CC="$(tc-getCC)" \
CPP="$(tc-getCPP)" \
|| die "emake failed"
}
src_install() {
# Parallel install bug #255777
emake -j1 install_root="${D}" install || die "emake install failed"
}

Binary file not shown.

@ -1,2 +1,4 @@
DIST chkrootkit-0.51-gentoo.diff.xz 4708 BLAKE2B 0dacba47222319d9e5bb5d39e0eb4b7074fb3025be885c5fd9564c10f592e04ba4afe2d0c792a2e54fe4c9b1103e366f65af949e7c0db730bf61981fe8fe2364 SHA512 13dca9c272d85d35d736e14896058612f62e1781aac034f06882fe63d956f074a3c67bf308c104f0080323bb127ba01373967b2c28481741d17d83310fe52dd0
DIST chkrootkit-0.52.tar 40031 BLAKE2B 8bd3518edc11a22dbc7e866de622454f55baa9fcd06a4034489596c0a24d867fec16d134dbc0aaf8b936640177d7dee8e061e39813a3ed261ae657d70f54a47d SHA512 45d66227c185c60166c9ea2a1f89f4594fa7c943c280fd6da5b59b5b355d5fe0d36806ef133fb29f9b2cac0bc05e9c10773ed4fae923a7115cc900818a596d42
DIST chkrootkit-0.53-gentoo.diff.xz 4844 BLAKE2B b4f0077989e032154f190f6bad98e8882390a2ac7e144a2c755fbeb560c809c8289563e57dd8fda23eca07dcb1b3e59d6fb016e72ecbb29d184fdf8feb4949d0 SHA512 664c203b093fb91963bae8f70d5711dfd0023c789ddd4265031c84f91f01a53b3b28757cd08b8633c3f6c184a257616b05bc12d8c84202ff98db523aaff5a6f3
DIST chkrootkit-0.53.tar.gz 40483 BLAKE2B ee78afc5bb5453fe7b30d966988060a68b7286fce0f87fb76d8ea3b1dd548c287c8bfc6f0772e05e6eee362af873148399a0a8af91d48765e542970dc3149c9d SHA512 f8de19d0a61ccb6ac184ad6642d78041729cba799eedcc8088cb6d2c5cf4de0574c6083caad364576a601265322e61c183b266304f00667527bf29fdc51359c7

@ -0,0 +1,58 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
GENTOO_PATCH="${PN}-0.53-gentoo.diff"
DESCRIPTION="Tool to locally check for signs of a rootkit"
HOMEPAGE="http://www.chkrootkit.org/"
SRC_URI="ftp://ftp.pangeia.com.br/pub/seg/pac/${P}.tar.gz
https://dev.gentoo.org/~polynomial-c/${GENTOO_PATCH}.xz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="+cron"
RDEPEND="cron? ( virtual/cron )"
PATCHES=(
"${WORKDIR}/${GENTOO_PATCH}"
)
src_prepare() {
default
sed -e 's:/var/adm/:/var/log/:g' \
-i chklastlog.c || die
}
src_compile() {
emake CC="$(tc-getCC)" STRIP=true sense
}
src_install() {
dosbin chkdirs chklastlog chkproc chkrootkit chkwtmp chkutmp ifpromisc strings-static
dodoc ACKNOWLEDGMENTS README*
if use cron ; then
exeinto /etc/cron.weekly
newexe "${FILESDIR}"/${PN}.cron ${PN}
fi
}
pkg_postinst() {
if use cron ; then
elog
elog "Edit /etc/cron.weekly/chkrootkit to activate chkrootkit!"
elog
fi
elog
elog "Some applications, such as portsentry, will cause chkrootkit"
elog "to produce false positives. Read the chkrootkit FAQ at"
elog "http://www.chkrootkit.org/ for more information."
elog
}

Binary file not shown.

@ -1,2 +1 @@
DIST man-pages-fr-3.40.1.tar.bz2 1136351 BLAKE2B ed175105dbcccc6c1fd8e888d5c015e91d166949821ff4441aa62e9bb002a0b79c493bba7b9a247103201c9f6a12f9d2a8618a00930669196a02e99dc9bb2cfa SHA512 58027da7b78a442a84448ed6d7c6c89ccbe97fd811afb26a9c6580da2e15b86f7fae4c876d773f7ceca1fbe92c265693eae01b76ad4795b52c0298ba25ac1330
DIST man-pages-fr-3.70-1.tar.xz 1143156 BLAKE2B 09a86733caf03246e530e898688d0f93ef401a74cc66eb1f5ee05ded5dee0be45fc27fcbcf458f2c5a3286a6655c7b7302eb1b2759be6e0205e69db95ce989dc SHA512 7bb6991b2278c898d67d465ebe434dc3a969e9ec5c962ed6b6fdb41e66121a1924573f529d310adf30cd8494515888627b3226f26b906452a8882c4851c290d8

@ -1,23 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="A somewhat comprehensive collection of french Linux man pages"
HOMEPAGE="https://traduc.org/perkamon"
SRC_URI="https://alioth.debian.org/frs/download.php/3722/${P}.tar.bz2"
LICENSE="man-pages GPL-1+ GPL-2+ GPL-2 BSD BSD-2 MIT rc LDP-1 public-domain"
SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="virtual/man"
DEPEND=""
S="${WORKDIR}/fr"
src_install() {
dodoc README.fr
doman -i18n=fr man*/*
}

@ -9,7 +9,7 @@ SRC_URI="https://alioth.debian.org/frs/download.php/file/4119/${P}-1.tar.xz"
LICENSE="BSD FDL-1.1 FDL-1.2 GPL-2 GPL-2+"
SLOT="0"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="virtual/man"

@ -12,7 +12,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="FDL-1.2"
SLOT="0"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="virtual/man"

Binary file not shown.

@ -1,2 +1,3 @@
DIST snmp_exporter-0.13.0.tar.gz 4096479 BLAKE2B a41ad876ca73a997bc48ac6fcdbc3ca01ff1c689f2f908cf14874f948a50ecd846a2996fc0cbf7d86a473fb80e42e15a7aca1c1b57f2cb3ebfa68a62db8d13ac SHA512 6e4a607cb58e6721acfd77b570dc62589cba5b23d250c9f654659632c97039156869722e1e43bec2b0656f08021ff89b4089f6b91ef28229964f32a34e0067f3
DIST snmp_exporter-0.14.0.tar.gz 1458373 BLAKE2B 3251022b236b1da7c675fff1119bf358a7b19bec02c552357dde689654e655f7ab5569c5580db8d8cb587860dfb18a5111220bcb07041488ff2d02fe4d204d44 SHA512 58439e9ef8f05e48ebfb4ea82d42568e40968224e609485960f8a81c6e349ca18d16ec3f4eee469dfaa0b9fd50feb28c1e6a6a988fb251485748f10dbc4f8d12
DIST snmp_exporter-0.15.0.tar.gz 1482592 BLAKE2B f7695eb37f2d702f3a6792337de7a1e878229ec20c8f4bea17d35e174219b71958aaf09bf91daaaffe12c5d03840887ce2ef3b37ce58a56352e8bcbb418bdb5f SHA512 1050a25d12a8201deab0ab7ea95dc35e250954a321d14251c10f87b016c879cf036e01f4043e3463607200381de63f12ea6bcf094dea2939707545f978c2675b

@ -0,0 +1,55 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit user golang-build golang-vcs-snapshot
EGO_PN="github.com/prometheus/snmp_exporter"
EGIT_COMMIT="v${PV/_rc/-rc.}"
SNMP_EXPORTER_COMMIT="92a3da4"
ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
DESCRIPTION="Prometheus exporter for snmp metrics"
HOMEPAGE="https://github.com/prometheus/snmp_exporter"
SRC_URI="${ARCHIVE_URI}"
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
DEPEND=">=dev-lang/go-1.11
dev-util/promu
net-analyzer/net-snmp"
pkg_setup() {
enewgroup ${PN}
enewuser ${PN} -1 -1 -1 ${PN}
}
src_prepare() {
default
sed -i -e "s/{{.Revision}}/${SNMP_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die
}
src_compile() {
pushd src/${EGO_PN} || die
GO111MODULE=on GOPATH="${S}" GOCACHE="${T}"/go-cache promu build -v || die
pushd generator || die
GO111MODULE=on GOPATH="${S}" GOCACHE="${T}"/go-cache go build -mod=vendor -o ../bin/generator . || die
popd || die
}
src_install() {
pushd src/${EGO_PN} || die
dobin bin/generator snmp_exporter
dodoc {README,CONTRIBUTING}.md generator/{FORMAT,README}.md generator/generator.yml
insinto /etc/snmp_exporter
newins snmp.yml snmp.yml.example
popd || die
keepdir /var/lib/snmp_exporter /var/log/snmp_exporter
fowners ${PN}:${PN} /var/lib/snmp_exporter /var/log/snmp_exporter
newinitd "${FILESDIR}"/${PN}.initd ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
}

Binary file not shown.

@ -13,7 +13,7 @@ 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 ~sh sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
IUSE="+edit gpm mclib nls samba sftp +slang spell test unicode X +xdg"
REQUIRED_USE="spell? ( edit )"

@ -17,9 +17,6 @@
<flag name="iptc">Enable extraction of IPTC data from pictures</flag>
<flag name="iso">Enable extraction of metadata from ISO disk images</flag>
<flag name="miner-fs">Enable tracker-miner-fs (required for filesystem indexing)</flag>
<flag name="nautilus">Enable tracker to integrate with
<pkg>gnome-base/nautilus</pkg> by providing entries in its context menu
</flag>
<flag name="playlist">Add support for playlists</flag>
<flag name="stemmer">Add word stemming via <pkg>dev-libs/snowball-stemmer</pkg>.</flag>
<flag name="thunderbird">Install email data miner plugin for

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -12,9 +12,7 @@ HOMEPAGE="https://wiki.gnome.org/Projects/Tracker"
LICENSE="GPL-2+ LGPL-2.1+"
SLOT="0/100"
IUSE="cue elibc_glibc exif ffmpeg firefox-bookmarks flac gif gsf gstreamer
gtk iptc +iso +jpeg libav +miner-fs mp3 nautilus networkmanager pdf playlist
rss seccomp stemmer test thunderbird +tiff upnp-av upower +vorbis +xml xmp xps"
IUSE="cue elibc_glibc exif ffmpeg firefox-bookmarks flac gif gsf gstreamer gtk iptc +iso +jpeg libav +miner-fs mp3 networkmanager pdf playlist rss seccomp stemmer test thunderbird +tiff upnp-av upower +vorbis +xml xmp xps"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc x86"
@ -98,7 +96,6 @@ DEPEND="${RDEPEND}
>=dev-libs/dbus-glib-0.82-r1
>=sys-apps/dbus-1.3.1[X] )
"
PDEPEND="nautilus? ( ~gnome-extra/nautilus-tracker-tags-${PV} )"
function inotify_enabled() {
if linux_config_exists; then
@ -150,7 +147,6 @@ src_configure() {
# unicode-support: libunistring, libicu or glib ?
# According to NEWS, introspection is required
# is not being generated
# nautilus extension is in a separate package, nautilus-tracker-tags
# miner-evolution disabled as it's incompatible with current eds
gnome2_src_configure \
--disable-hal \

Binary file not shown.

@ -13,7 +13,7 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2
LICENSE="|| ( GPL-2 LGPL-2 )"
SLOT="0"
KEYWORDS="alpha ~amd64 ~arm ~hppa ia64 ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="alpha ~amd64 ~arm ~hppa ia64 ppc ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
IUSE="bluetooth debug java perl png python static-libs threads usb"
COMMON_DEPEND="

Binary file not shown.

@ -23,7 +23,7 @@ DIST libsqlite3-sys-0.10.0.crate 2175426 BLAKE2B dc7cbbcb632e2de1e8fcd6372cb0a82
DIST linked-hash-map-0.4.2.crate 15980 BLAKE2B f31e0dc6f6bb3af355981491e42ce70ac91cbcf059c3d7da8ad2160c40c379bf6d10aab1fdc8400df4497e30ae8dc8c37149ec23084b589fb9a17b8dcf7fbdb4 SHA512 e9ca0dcf09338b8bf2e669eae241b1d07a08c430b2c1fb8adde9a79218aac8f0ad3a13d515202fbf7d0d6f3607e64c4fb3b8b9fe9190655897ae7aeeeb91dbce
DIST lru-cache-0.1.1.crate 8645 BLAKE2B 027f7051ce930701b97017638f2091efef0b3be330fe1cf534d31c7040c8eb55d73d8e397644584d642e370ed2c109f6df61a6da020f6df5f5756cfccbdf9216 SHA512 f397be62edf59bcb36767e338427684274c3ec900d96f92c75859c61ae52f78c42a551bb298e256b76f65bc7b5765c453a07baa61dcb01bfb93ca8a41612b521
DIST mcfly-0.3.1.tar.gz 242505 BLAKE2B 178dc23567708593b89daa653ebdb5dab823197c56d9655abf8b15996736cfbc92acdd8643931c669678aab31eb8a14a4771c98373dec816d61ce0fb0e097b4d SHA512 308aeba0243b59d04655ffb06ce8ad20a3b7077543a3232e783581ef453a64f20c9c6fb5869cff23eac818103cc634c466340e8225346fb135c1b7cbe01d72bf
DIST mcfly-0.3.2.tar.gz 242564 BLAKE2B 17a5c4720eaeb5f409d29382a7867375820328eebf6932a0a378ba63aa3ef636ae009bfed396fa7a0a03d9f12f838ffe1c7ef2bb382168a8ff8450195870e1f0 SHA512 fb2b22f9c42a1826b4d7c623714172832579f21ee1c17f4ef1ab61b3d49e178418bb71f438e2e52c136459ebc708dbfecf4d4cb8e14a9ac7cbf39fe9a70e0ece
DIST mcfly-0.3.3.tar.gz 242714 BLAKE2B 05f038bfb502d0dd6938c6ecf2a8f36673a26e7bebd8b8f543f12c500db0b1b431c476384641fc0d66efc9fd537a2c94c0ef41bf26d1b2f78f3ddd551e94b51c SHA512 b68484256421f0e8f11326cc4e321fdc0bdccb9fb01e919c143338ec315c0a69c90e2d9977265096a34d3db5f2709663579e851f41b637903e3d12ca92959631
DIST memchr-2.0.1.crate 9858 BLAKE2B ccf5530245bdcf1b892b98858d1cfd8cdeec3765422f6d1503bfaf3e48744dabfbc1767212b310d1951f1594ec3d4ca09447ca72782ed272cc396113a7f9fef8 SHA512 50daeb73062c30b244c8fec965ff0c69c29571022a9228dafd1ed397164956e39fbe260b8adce33522b5cedcd7f9135500ac45d6bc0b5e72bf9e89ebea0954d1
DIST nodrop-0.1.12.crate 3033 BLAKE2B 69792f5ac9722dc570749795b6e0e6c6373c44614bf5861846af08d426d18e5929ad3c5b957adf3480e8c77444cec9d33b3e8b272eea9c7200f0cedf0d78e7ac SHA512 8f2856a6467715565ea5b3be181fc957f6cbc885797c15582ef5be5a71089201292ea58f94877496737dfd427b19523228fa4bde49d9413a8399d2e7888b99aa
DIST pkg-config-0.3.11.crate 13227 BLAKE2B f22a748d9330848379d9bcc32026c9ba4bcffc043495b864af95dde36ce3fe71344bf5b0534aa61574f677b9a3d1ec0e09f774dea0ee57c1810f1e6bd7edc1e4 SHA512 c5e53a9dd777bce55889fdf7028418443896890ff120beb2fda5e5fcc55624aaefc2ac058c2b4bc88519d48bacc477351b0ab1c4d4a65b4e4bf66a69a419aae6

Binary file not shown.

@ -14,7 +14,7 @@ SRC_URI="http://www.oasis-open.org/docbook/xml/simple/${PV}/${MY_P}.zip"
LICENSE="docbook"
SLOT="1.0"
KEYWORDS="alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris"
IUSE=""
RDEPEND=">=app-text/build-docbook-catalog-1.6"

@ -12,7 +12,7 @@ SRC_URI="mirror://gentoo/${MY_P}.zip"
LICENSE="docbook"
SLOT="0"
KEYWORDS="alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
IUSE=""
RDEPEND=">=app-text/build-docbook-catalog-1.6"

@ -10,7 +10,7 @@ SRC_URI="mirror://sourceforge/openjade/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="static-libs"
RDEPEND="

@ -1,3 +1 @@
DIST poppler-data-0.4.7.tar.gz 4182339 BLAKE2B 85a731e738cce9b6adc7c236ee5183b6494b641a20e4c823900314bfec5bc3c327ae49e35511936c0f3a6f13e25be098b24bd6a91ae04815be6a02149a636563 SHA512 9a865f077f8760a106c6b28302357253c6d63a8f4f10a9506724d1f0ba42e3481bd790ca07e7ee245c63de3650a33c12e80e20e94415a0e37b05225cfe0efce2
DIST poppler-data-0.4.8.tar.gz 4209901 BLAKE2B ed4dc809044240141db3ec483b7fb272d976eb61febf13b3f1297b27146f8597eb6d817a799da4729192f39873226f6eae6374b86bcf4dad8cde7d0bc9388b94 SHA512 c9435f557ca696fb1e94b6a0b42d401cc911a08f995e3494a7352b47bde5091226f2bb99792ff2b1ee02dfebee66f50f736daca72020a19217ce1c27bde92d54
DIST poppler-data-0.4.9.tar.gz 4196919 BLAKE2B a986dcff2c2295eeb952adbb4bfc59ccbc53c27668ecc44fcf862bbe3d65062ccdb9302ebdd9b530d9d0ed155666922086b368c81c0772bdab284e323e6ac436 SHA512 45afd378d0bb415c5e1bc9718025328058712c0bde6d529d2c7a4813b12f600be46ecd2ed2454b3f83fb9f8cad157b75d11d8c5d1ca849f347c310b58132ff7a

@ -1,22 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="Data files for poppler to support uncommon encodings without xpdfrc"
HOMEPAGE="https://poppler.freedesktop.org/"
SRC_URI="https://poppler.freedesktop.org/${P}.tar.gz"
LICENSE="BSD GPL-2 MIT"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
SLOT="0"
IUSE=""
src_install() {
emake prefix="${EPREFIX}"/usr DESTDIR="${D}" install
# bug 409361
dodir /usr/share/poppler/cMaps
cd "${D}/${EPREFIX}"/usr/share/poppler/cMaps || die
find ../cMap -type f -exec ln -s {} . \; || die
}

@ -1,22 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="Data files for poppler to support uncommon encodings without xpdfrc"
HOMEPAGE="https://poppler.freedesktop.org/"
SRC_URI="https://poppler.freedesktop.org/${P}.tar.gz"
LICENSE="BSD GPL-2 MIT"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
SLOT="0"
IUSE=""
src_install() {
emake prefix="${EPREFIX}"/usr DESTDIR="${D}" install
# bug 409361
dodir /usr/share/poppler/cMaps
cd "${D}/${EPREFIX}"/usr/share/poppler/cMaps || die
find ../cMap -type f -exec ln -s {} . \; || die
}

@ -8,7 +8,7 @@ HOMEPAGE="https://poppler.freedesktop.org/"
SRC_URI="https://poppler.freedesktop.org/${P}.tar.gz"
LICENSE="BSD GPL-2 MIT"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
SLOT="0"
IUSE=""

Binary file not shown.

@ -2,10 +2,7 @@ DIST mariadb-10.0.35.tar.gz 66551252 BLAKE2B 69cc9c78f7c47a4b1760940cb0f395b4053
DIST mariadb-10.0.37.tar.gz 64728382 BLAKE2B 3d794633cc400013be05c326681f11f8b27c7d6758b43f357ca93976a75ff931f6f6d205510b5df305c6f487485864d346e4fa14383be32dafcf2b8756eb045a SHA512 c3ba749f519cce3bb63fec6ee6819ad931f72d54258d4b7700c515cfeb137453271a408a9a353bf78715fe66a0c06539bdbf15f1c556a7b89a5c01af84f7fd49
DIST mariadb-10.1.34.tar.gz 65298561 BLAKE2B 3f3af7b8bad68a08f69befd3f3e7bd88b8cf058feb20309dc2cdbd16bf5d015c2cb0d1d9d2fdf831f6183c0b9bb25405124c24b2940467489e05d42c57f7b0a6 SHA512 3c18359006b340dcf724d1fce36dcc19916c42492269a7545e0726172b8f7b84860e10725c74e4458dae34572395f1650bf17838e9058544e0a6cfcbffd54f6d
DIST mariadb-10.1.37.tar.gz 63492946 BLAKE2B 0f19b402c597443ef970cbe2a2d85d51743cc2d05ab741897efb150f007d7be8b645706a2d0dc5a9f91c7a380d2313840f77d6e9b15f3335495f275b415e5a33 SHA512 b7c35cd67ad265ce2e3a4db20a2ae2b78745db96dc70a211f027a39b6dbb3dc900991c2ee1021ee6a97d12489c3e2a70252e2adf348a458af38b99c3de5a4f25
DIST mariadb-10.2.19.tar.gz 71856357 BLAKE2B 7e55760b85d7b8b19f9d1afe22e7cf5c3001ab03d64062bd702442cb771b2c76f62cf8794b027098b6fb4ade5bf3de39d68dbede65c72fc9e1482083fb19a9c9 SHA512 7bfd65687c923d50b04d598fccea60a23a3fafc3e57b803b2a06c2f25ae68bd25206e18bd71af4797492792d821f4be05cef19e8075080b82b539afdd8af9f46
DIST mariadb-10.2.20.tar.gz 71876032 BLAKE2B cb170dc8e341dd4406112ec66aa3d9754662f2a5fa986e3ebc7ebfc96f475cd993189bb2b9b60b2258299e363376c2c50bfdd1abbcf09525b951c2cac9c5ed0b SHA512 24f5ec7381aa3c9dc8862260e5ed2296034c41286fe81aa2e2547b3d02e1a3b6146cbde7396c6ef803e7aebb98a59c24c815dd0cc4fae462789f2362690c6ba6
DIST mariadb-10.2.21.tar.gz 71878359 BLAKE2B cad6a24480b476128d419ad85cfa67777bc0641c8cc30884f90ba61e73e2e009e51742bbe132b2c9736478ee6997fd576bd5c96660bf4f321617382716881cee SHA512 b723ddda5fb22ff41ec8a031a1a0f15bbd13ffec09099c7e0138d7b25028d0807b0bd3ac71957b825516386088bba28b0bf561706e99a6396e599ef21e720cda
DIST mariadb-10.3.11.tar.gz 70669435 BLAKE2B e16346519b60aa11a0ffd2c19254ef888c44c054d55b7f98a8d696e3df2c0801c6141adddfb9169098ad5efa5d881c83681c3c5741f68b10c9ce4d15def34254 SHA512 1adc1f9bbabf848726c669a7a0ab01257ba31882758b53fbf3b1316f2295670dba1c3d1f3292d7c1a749c701504588694a55d020839e690595897b0e20435298
DIST mariadb-10.2.22.tar.gz 71907765 BLAKE2B e7781a9e1bb0becca543ebb0b9e03912fbafa9de45bbd5c7232f92d29b934148dd124ad462bf8aa5aec2e4ee0bf75a03fae5e5fe97a77e1d93095052a577c14b SHA512 cd61d0c2d528b23b975e6ea142560d9b9ebff7ecda6fa9b3659b25b3406e8cc925918f4c3bb0e200ddb8d0520bcaa4d4f70d245b4731896f9ba2f1bdf0a817b2
DIST mariadb-10.3.12.tar.gz 70666408 BLAKE2B 90e734a5617e44e2c273a1cd22ed2f81493e9458249dc0eb478c3b2b106dd7a0f81d130841be7632272bf6dc01e64350057c2d3e8162e8e8cef1f5a4ac2fb18c SHA512 9dd2939684c4591db306be6afb34663626dfaae133f88dd31125c759dce16b9e9d767a9254e30d9ee5fa2ea027e223dd4799effba8a8b0e4638d5de9e2512003
DIST mariadb-5.5.63.tar.gz 45946425 BLAKE2B bddfd67d8393ec22c4bc8d7dab2838825394636bd690c04574bdc4da84fbf6c779fcae7f6be5d596458baa732cb5278475f308f03df083cdfcecffc486950d81 SHA512 4699d8af2210e12d0eea659a4d3fd4bfa68ce11a38cffaf939a96cb7a1fe64dd0827d39c3a0a36fa7cc1981a804a9af7a6d5cfaf23a8cfc8440e54c0163c2acb
DIST mysql-extras-20180809-1700Z.tar.bz2 322999 BLAKE2B 8b5feb32085dc35b2f68dae985b2d266c4eaa0e956b490050a2df04bbff99bf8623b67e75af9326d84e3ad625c4d86b0d21d23c9a96df5a0c9cd5ed730958970 SHA512 fbd7af9284bbf09d55f128361e7cc52d94f24ac491aac800cd6d61f2e444aeca66a4d5e6ae94c2fb4044e00cec9b232bae9a76a229f87f19d90b7aecf70792ec

@ -1,958 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20181211-1735Z"
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="0/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl 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"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="!bindist? ( bindist ) libressl? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# 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
"${MY_PATCH_DIR}"/20037_all_mariadb-10.2-restore-jemalloc.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? (
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
libressl? ( dev-libs/libressl: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? ( virtual/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
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
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
}
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld 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 )
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')"
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-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
)
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"
# 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)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
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"
}

File diff suppressed because it is too large Load Diff

@ -1,965 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20181211-1735Z"
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="0/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl 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"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="!bindist? ( bindist ) libressl? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# 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? (
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
libressl? ( dev-libs/libressl: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? ( virtual/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
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
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')"
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-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"
# 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)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
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"
}

@ -1,967 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20181211-1735Z"
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="0/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl 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"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="!bindist? ( bindist ) libressl? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# 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.3-atomic-detection.patch
"${MY_PATCH_DIR}"/20037_all_mariadb-10.3-restore-jemalloc.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? (
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
libressl? ( dev-libs/libressl: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? ( virtual/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
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
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/_rc/}" "${S}" || die
}
src_prepare() {
_disable_plugin() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
_disable_engine() {
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
}
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld 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 )
local test_plugins=( audit_null auth_examples daemon_example fulltext
debug_key_management example_key_management versioning )
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')"
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-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
)
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=""
-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
if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
rm -f "${ED}/usr/bin/mytop" || die
fi
# 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
}
# 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.func_time "Dependent on time test was written"
# 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/libexec/mariadb/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)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
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"
}

Binary file not shown.

@ -10,6 +10,7 @@ DIST apache-tomcat-8.0.53-src.tar.gz 5057041 BLAKE2B 3a50d2f61baecb5244909972384
DIST apache-tomcat-8.5.23-src.tar.gz 5086043 BLAKE2B 9bcad0d465aff6da1ba4a846042491bc8d5963283ed1d2530a26ab48289d14e8b85834d24ca476c95a75c1a5f51ee3ecd71c190b9609983cce56b56bc046b6d3 SHA512 2848331553f2c1bc51a4113960c6fe7e2beddf9146341dbfde1a27e2232802cfc364c8e8b988ae862371ca1a3be34665a56a28be9eadf80f8b317e0e2525cbef
DIST apache-tomcat-8.5.31-src.tar.gz 5154531 BLAKE2B cce0388e5c8c5fb5fcb3dba3b5961dc21d9f19d9a2f6177660a41410bddf241f73dda1e52c3875e28cfa13041c85a458a92c9a23c509b645f042cfa472081fde SHA512 659137ef4809af329ae4dd6f5825a603c1408ef3e48153abe7480a722e7f4bebef68a64af9cbef4a4ad9a7e8da76494f825035bbadbb983a097525f476f32f33
DIST apache-tomcat-8.5.37-src.tar.gz 5233414 BLAKE2B 1848180c3e0a3f4559e5c232bea8bad6d05f09d9c4f2f9f903178012b7b8837d395a5ac73c8ac0504fbd3d1df3c2dc785022e1c97da4441cfdcf8b790170ff7c SHA512 29ddbf7bfef19441a8a043020b5f1149d12590dac8120012a2167b6892e3db7c644990e49ba14cc4b4c7339faed65f010a7b24d660db0fb8adde34f032099cec
DIST apache-tomcat-8.5.38-src.tar.gz 5253678 BLAKE2B b2ecc732128934a3afa314ddc569b1b3d330ccb12b99b0ce4b12e1952347ac57cafb3a5637595997a0c9e77752ae41665e637c826c3b9ae9925799124e735480 SHA512 b84d96fa972a9d24957ef047cdce0fb49de3d365401b07990eaa5bad8f3c87a6b1ad1eac077c4be595ee291daef68720381fe63461815de47664275b486ceeee
DIST apache-tomcat-9.0.14-src.tar.gz 5472704 BLAKE2B ee533afd733dacbe4a20baadb4c5dc9fa7620d695c1c57b1662894945731f978508b45ef0d8169068c13ba862804868f12d3e494873643589b9f57bc9ec0a342 SHA512 46119f6ae9003b7a178dd5158c1eae3b5116461e73c5d78cd763bff82b80f282ff08cee5175cf850d3f209af900677e93bab31c556035a6eaf6aae86a5d42fc6
DIST apache-tomcat-9.0.16-src.tar.gz 5654943 BLAKE2B a412457c2d34367301b4335a3a4bf46a647f8e60440be751874e1eaad400a0832b64fcae4c9f81585a4afbddafd75f2929bc78c12eb05b20539b11de686dfecc SHA512 60fbdefbddaa6fac4bc9d0ca4c1d9a119dd53063fd4574c474daf5f346fddc9cb7fd174f1be189e965d5ae4670710347d84fcf443c7df01faac9a1b84ecb33ce
DIST apache-tomcat-9.0.7-src.tar.gz 5106551 BLAKE2B b4552146a40c2e7cbb2e454fb5ec9169425db5c08cf269c391ec3144425ad388a2b6f003a7c05f59a9fd724fb5c848102890a24fcfd43d5fea3d881141aa7798 SHA512 cb7dc5547671d94f7c7fb0b58eeb94d05128349cdabf576fc8ad837a4bf3ea655a8eab3342245dfa84a9db23f1cbee2918846eedd48e3ca372eecebfef13c5b2

@ -0,0 +1,39 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
JAVA_PKG_IUSE="source"
inherit eutils java-pkg-2 java-ant-2
MY_A="apache-${P}-src"
MY_P="${MY_A/-servlet-api/}"
DESCRIPTION="Tomcat's Servlet API 3.1/JSP API 2.3/EL API 3.0 implementation"
HOMEPAGE="https://tomcat.apache.org/"
SRC_URI="mirror://apache/tomcat/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="3.1"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
IUSE=""
DEPEND=">=virtual/jdk-1.7"
RDEPEND=">=virtual/jre-1.7"
S="${WORKDIR}/${MY_P}/"
src_prepare() {
default
cp "${FILESDIR}/${SLOT}-build.xml" build.xml || die "Could not replace build.xml"
rm -fR */*/build.xml
einfo "Removing bundled jars and classes"
find "${S}" '(' -name '*.class' -o -name '*.jar' ')' -exec rm -frv {} +
java-pkg-2_src_prepare
}
src_install() {
java-pkg_dojar "${S}"/output/build/lib/*.jar
use source && java-pkg_dosrc java/javax/servlet/
}

Binary file not shown.

@ -1,2 +1 @@
DIST mujs-1.0.4.tar.xz 91520 BLAKE2B 6ffe62b19b140e2ae63ebe59a3b3bd352936ccba53dda3b0fcf575440dc790a0767c7de8c0a1441d26c11c65074520a80050cc0efa1113be0df51a802e719574 SHA512 a32498fee20ab6ddc8bbf79b4fdd82f3560d4e4b28bbe57c4e8f1df4a8a5367a689b6c9a391761abe47a8f15d2832fede4a508330eb181744b9563ae9954c102
DIST mujs-1.0.5.tar.gz 119353 BLAKE2B 48f1b598e50d5804b0d64230cdd6b4d3f719187ea0906f45c9f45baee2c8df59c6fd09dc25afc9e1ce4e20a9866d158d16a4632bec552fddd8fac70b20e2363f SHA512 c1c59b5e80e0e5f580f30dfc0b4707b6a1e44a73c746b9783bb24d91429ddf8ed670a7663478300cc568cfc15a511720b6d18be2ade40a3a66fc7ab8f3933c2d

@ -1,23 +0,0 @@
1. Add to user-defined CFLAGS instead of being overwritten by them
2. Don't strip binaries: it leads to QA warnings
diff --git a/Makefile b/Makefile
index 7284f51..7615158 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ endif
# Compiler flags for various configurations:
-CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
+CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
ifeq "$(CC)" "clang"
CFLAGS += -Wunreachable-code
@@ -32,7 +32,6 @@ else ifeq "$(build)" "sanitize"
LDFLAGS += -fsanitize=address
else
CFLAGS += -Os
- LDFLAGS += -Wl,-s
endif
ifeq "$(HAVE_READLINE)" "yes"

@ -1,42 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic multilib toolchain-funcs
DESCRIPTION="lightweight Javascript interpreter"
HOMEPAGE="http://mujs.com/"
SRC_URI="https://mujs.com/downloads/${P}.tar.xz"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="static-libs"
PATCHES=(
"${FILESDIR}"/${PN}-1.0.4-gentoo.patch
)
src_prepare() {
default
append-cflags -fPIC -Wl,-soname=lib${PN}.so.${PV}
tc-export CC
}
src_compile() {
emake VERSION=${PV} prefix=/usr shared
}
src_install() {
emake \
DESTDIR="${ED}" \
VERSION=${PV} \
prefix=/usr \
libdir="/usr/$(get_libdir)" \
install-shared \
$(usex static-libs install-static '')
mv -v "${D}"/usr/$(get_libdir)/lib${PN}.so{,.${PV}} || die
dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so || die
dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV:0:1} || die
}

@ -14,7 +14,7 @@ SRC_URI="https://github.com/ccxvii/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="static-libs"
RDEPEND="sys-libs/readline:0="

Binary file not shown.

@ -1,2 +1,3 @@
DIST capnproto-0.6.0.tar.gz 1199198 BLAKE2B 90db934f8fd2affeef8908a9f8aa955892c8d25d556a76003f7d2e8e5634ea76e3759ace94b3bff42235e6da666e97657f69327ecdf620067e13ad2dde2a8105 SHA512 4882b2e5d1544517348e436600705d18b41fc82e6fc141a934ad960556ed73781c974d4a45f8c949a297edd5c95fb156fd75f1d7179666dc7ab881f98ac9e69d
DIST capnproto-0.6.1.tar.gz 1720489 BLAKE2B 5fad902bb4221fa872bd52311442a4073c4e58e3d21726f24e06430246f1d757bc4d4e7e122df0a7cd9401ff2c47cb48d1791bb0b7ceda8889a819ac52edc02b SHA512 baea7f867bb789d3bf8cdc9c1a4a0d31cdce3beb7ae1fd9464690a006a86eca841aaac5d86599c2a84a39d62c4d01213b29789c2b7385ad6636fef95fc867dd6
DIST capnproto-0.7.0.tar.gz 1983172 BLAKE2B d88b5f8e3278f8e3aceccdc459001b99328b0440812352dcb6b54bd11e18aa7fee6d337252841c86e9c3eb1afcdbd99884c965156d6cec37e3c0996c9ec1241f SHA512 a3ea278ded6a866759c0517d16b99bd38ffea1c163ce63a3604b752d8bdaafbc38a600de94afe12db35e7f7f06e29cc94c911dc2e0ecec6fe1185452df2a2bd3

@ -0,0 +1,38 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
DESCRIPTION="RPC/Serialization system with capabilities support"
HOMEPAGE="https://capnproto.org"
SRC_URI="https://github.com/sandstorm-io/capnproto/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0/070"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="+ssl static-libs test"
RDEPEND="ssl? ( dev-libs/openssl:0= )"
DEPEND="${RDEPEND} test? ( dev-cpp/gtest )"
S=${WORKDIR}/${P}/c++
src_prepare() {
sed -e 's/ldconfig/true/' -i Makefile.am || die
sed -e 's#gtest/lib/libgtest.la gtest/lib/libgtest_main.la#-lgtest -lgtest_main#' -i Makefile.am || die
default
eautoreconf
}
src_configure() {
econf \
$(use_enable static-libs static) \
$(use_with ssl openssl)
}
src_install() {
default
find "${ED}" -name '*.la' -delete
}

@ -11,7 +11,7 @@ SRC_URI="http://www.digip.org/jansson/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd"
IUSE="doc static-libs"
DEPEND="doc? ( >=dev-python/sphinx-1.0.4 )"

@ -0,0 +1,43 @@
From 13c32916b4baab58d93940d57fea9ff0777f1931 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Tue, 5 Jun 2018 19:21:46 +0300
Subject: flopen: Add missing <fcntl.h> include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 993828d84ee (Add flopenat() function from FreeBSD) dropped the
fcntl.h header. This breaks the build with musl libc:
flopen.c: In function vflopenat:
flopen.c:60:14: error: O_CREAT undeclared (first use in this function)
if (flags & O_CREAT) {
^~~~~~~
Restore the fcntl.h header include to fix the build.
Fixes: commit 993828d84eed0468c6c15b2818e534e6b134b8e4
Submitted-also-by: parazyd <parazyd@dyne.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
---
src/flopen.c | 1 +
1 file changed, 1 insertion(+)
(limited to 'src/flopen.c')
diff --git a/src/flopen.c b/src/flopen.c
index b9972c9..ff20d07 100644
--- a/src/flopen.c
+++ b/src/flopen.c
@@ -32,6 +32,7 @@
#include <sys/stat.h>
#include <errno.h>
+#include <fcntl.h>
#include <stdarg.h>
#include <unistd.h>
--
cgit v1.1

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -16,6 +16,10 @@ IUSE="static-libs"
DEPEND=">=sys-kernel/linux-headers-3.17"
RDEPEND=""
PATCHES=(
"${FILESDIR}/${P}-missing-header.patch"
)
pkg_setup() {
local f="${EROOT}/usr/$(get_libdir)/${PN}.a"
local m="You need to remove ${f} by hand or re-emerge sys-libs/glibc first."

@ -16,7 +16,7 @@ SRC_URI="mirror://gnu/${PN%-*}/${MY_P}.tar.gz"
# clause "or later" so we use LGPL-2.1 without +
LICENSE="GPL-3+ GPL-2+ LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE="+cxx static-libs test"
RDEPEND="app-eselect/eselect-cdparanoia

@ -12,7 +12,7 @@ SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
LICENSE="MIT"
SLOT="0/10"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ppc ppc64 ~sparc ~x86"
IUSE="doc input_devices_wacom"
# Tests require write access to udev rules directory which is a no-no for live system.
# Other tests are just about logs, exported symbols and autotest of the test library.

@ -12,7 +12,7 @@ SRC_URI="https://download.netsurf-browser.org/libs/releases/${MY_P}-src.tar.gz"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~ppc ~ppc64 sparc x86"
KEYWORDS="alpha amd64 arm hppa ~ia64 ~ppc ~ppc64 sparc x86"
IUSE=""
DEPEND="dev-util/netsurf-buildsystem"

@ -15,7 +15,7 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.
LICENSE="BSD-2"
# Subslot == SONAME version
SLOT="0/1.0.0"
KEYWORDS="alpha ~amd64 ~arm arm64 hppa ia64 ~mips ppc ~ppc64 ~s390 sparc x86"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86"
IUSE="static-libs test"
RDEPEND=">=dev-libs/protobuf-2.6.0:0=[${MULTILIB_USEDEP}]"

@ -10,7 +10,7 @@ if [[ ${PV} == *9999 ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/zeux/${PN}/releases/download/v${PV}/${P}.tar.gz"
KEYWORDS="amd64 ~arm ~hppa ia64 ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="amd64 ~arm ~hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
fi
DESCRIPTION="Light-weight, simple, and fast XML parser for C++ with XPath support"

@ -1,4 +1,2 @@
DIST sway-0.15.2.tar.gz 5398956 BLAKE2B 6bb527e802b7837ef39cb1e29597d55fd33831231dbfb7f12225e50c38e49ae17d8bf2eb43672c195c6e074986d254b1680bac7c9d60b80b84feaf07e09718df SHA512 c457ace514f5c69ebd366d313cce93a76b199bb51c7540debc9c0586bff490401e6374f9725c784474afdfcca15bcab686a972c6c178117e45e2de83825ed370
DIST sway-1.0_beta1.tar.gz 5444424 BLAKE2B b2803b6770ac3fbb3c21b892a208008e60780b6002e983e6d144d4f97e04992d3a3e5589abe36042221d67a107e31f5e76ae193cbf3e36c71fcf027095140944 SHA512 745b16be7641446c54e1b8777be1f8a26e8275f7826590f594bf4a2001a6de42e394b602e1ccd26a1e8ebe256fde6f9b393f5560a1dd0a610867819076645c69
DIST sway-1.0_beta2.tar.gz 5454362 BLAKE2B 2cb7f3042a53879c962e7204917765b4a7a2e90f2a6a7eb6bbb63383e31d7526e71ad7ac4edd708c47a31f3166f70c1633719c9cddf5b751327da79b523d6780 SHA512 532acb6f1510578b7d9d222f04ff8104c836428ef215ddb6d7181839231d65101b3d47c8389a38f14cf59692116495b60759062ebd797edf83cf77aebaac379f
DIST sway-1.0_rc1.tar.gz 5461910 BLAKE2B a9b3a14dfbb40a616b58fce896f0088dfc722e942129e12e7dae3f2121cb84ffcd565902ee49712275e01d6b6a344642d85d8cf394a35b151725dcc94d19b40d SHA512 6532bae679774fcdb1bcc3044740ff5c56f5f6a007a08e910f4d9ee43ac0488be7666a87106b493923432f975088c90ff47369fa1a01c5e1cb67d3a1f9b74bce
DIST sway-1.0_rc2.tar.gz 5462530 BLAKE2B 95868df3d03a61be33e04602d6891a2827cd1b5eab08644f74e04c3cbae39e686ee046be5ae9762595774fd22190e2460e246b564db92c50509ad61a16bb0835 SHA512 78c93f2326952d9e56ebf38f5d6b646934230b1bf5fac50cf35f16b2c1753ffa31dd9ec874a05025ed0d1d828b9a8643c78e739abbcfba55301255b3d0ed4a3e

@ -13,7 +13,7 @@
<email>hilobakho@gmail.com</email>
<name>Mykyta Holubakha</name>
</maintainer>
<maintainer restrict="&gt;=dev-libs/sway-1.0_beta1" type="person">
<maintainer type="person">
<email>speedjack95@gmail.com</email>
<name>Niccolò Scatena</name>
</maintainer>
@ -30,14 +30,11 @@
something else.
</longdescription>
<use>
<flag name="clipboard">Install 'wl-clipboard': clipboard management</flag>
<flag name="elogind">Enable support for rootless session via elogind</flag>
<flag name="filecaps">Use Linux capability SYS_CAP_ADMIN rather than set*id for sway binary</flag>
<flag name="fish-completion">Enable fish completion support</flag>
<flag name="gdk-pixbuf">Enable additional image format support via the <pkg>x11-libs/gdk-pixbuf</pkg> library</flag>
<flag name="man">Build and install man pages</flag>
<flag name="swaybar">Install 'swaybar': sway's status bar component</flag>
<flag name="swaybg">Install 'swaybg': allows to set a desktop background image</flag>
<flag name="swaygrab">Install 'swaygrab': allows taking screenshots or screencasts</flag>
<flag name="swayidle">Install 'swayidle': idle manager to run commands when user is inactive</flag>
<flag name="swaylock">Install 'swaylock': sway's screen locker</flag>
<flag name="swaymsg">Install 'swaymsg': tool for communicating with a running sway instance</flag>

@ -1,83 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit eutils cmake-utils
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="http://swaywm.org/"
SRC_URI="https://github.com/swaywm/sway/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="+gdk-pixbuf +swaybar +swaybg swaygrab swaylock +swaymsg systemd +tray wallpapers zsh-completion"
REQUIRED_USE="tray? ( swaybar )"
RDEPEND=">=dev-libs/wlc-0.0.8[systemd=]
dev-libs/json-c:0=
dev-libs/libpcre
dev-libs/libinput
dev-libs/wayland
sys-libs/libcap
x11-libs/libxkbcommon
x11-libs/cairo
x11-libs/pango
gdk-pixbuf? ( x11-libs/gdk-pixbuf[jpeg] )
swaylock? ( virtual/pam )
tray? ( sys-apps/dbus )"
DEPEND="${RDEPEND}
app-text/asciidoc
virtual/pkgconfig"
src_prepare() {
cmake-utils_src_prepare
# remove bad CFLAGS that upstream is trying to add
sed -i -e '/add_compile_options/s/-Werror//' CMakeLists.txt || die
}
src_configure() {
local mycmakeargs=(
-Denable-swaybar=$(usex swaybar)
-Denable-swaybg=$(usex swaybg)
-Denable-swaygrab=$(usex swaygrab)
-Denable-swaylock=$(usex swaylock)
-Denable-swaymsg=$(usex swaymsg)
-Denable-tray=$(usex tray)
-Ddefault-wallpaper=$(usex wallpapers)
-Denable-gdk-pixbuf=$(usex gdk-pixbuf)
-Dzsh-completions=$(usex zsh-completion)
-DCMAKE_INSTALL_SYSCONFDIR="/etc"
-DVERSION="${PV}"
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
use !systemd && fperms u+s /usr/bin/sway
}
pkg_postinst() {
if use swaygrab
then
optfeature "swaygrab screenshot support" media-gfx/imagemagick[png]
optfeature "swaygrab video capture support" virtual/ffmpeg
fi
if use tray
then
optfeature "experimental xembed tray icons support" kde-plasma/xembed-sni-proxy
fi
optfeature "X11 applications support" dev-libs/wlc[xwayland] x11-base/xorg-server[wayland]
}

@ -1,95 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/swaywm/sway.git"
inherit git-r3
else
# Version format: major.minor-beta.betanum
SWAY_PV="$(ver_cut 1-2)-$(ver_cut 3).$(ver_cut 4)"
SRC_URI="https://github.com/swaywm/sway/archive/${SWAY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/sway-${SWAY_PV}"
KEYWORDS="~amd64 ~x86"
fi
inherit eutils fcaps meson pam
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +swaybar +swaybg +swaylock systemd +tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND="~dev-libs/wlroots-0.1[systemd=,elogind=,X=]
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
>=dev-libs/wayland-protocols-1.14
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
swaybar? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaybg? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaylock? (
virtual/pam
x11-libs/gdk-pixbuf:2[jpeg]
)
systemd? ( >=sys-apps/systemd-237 )
tray? ( >=sys-apps/dbus-1.10 )
X? ( x11-libs/libxcb:0=[xkb] )"
DEPEND="${RDEPEND}"
BDEPEND="app-text/scdoc
virtual/pkgconfig"
FILECAPS=( cap_sys_admin usr/bin/sway )
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -i meson.build || die
use swaylock || sed -e "s/subdir('swaylock')//g" -i meson.build || die
}
src_configure() {
local emesonargs=(
"-Dsway-version=${SWAY_PV}"
$(meson_use wallpapers default-wallpaper)
$(meson_use zsh-completion zsh-completions)
$(meson_use fish-completion fish-completions)
$(meson_use X enable-xwayland)
"-Dbash-completions=true"
"-Dwerror=false"
)
meson_src_configure
}
src_install() {
meson_src_install
use swaylock && newpamd swaylock/pam/swaylock.linux swaylock
}
pkg_postinst() {
elog "You must be in the input group to allow sway to access input devices!"
local dbus_cmd=""
if use tray ; then
elog ""
optfeature "experimental xembed tray icons support" kde-plasma/xembed-sni-proxy
dbus_cmd="dbus-launch --sh-syntax --exit-with-session "
fi
if ! use systemd && ! use elogind ; then
fcaps_pkg_postinst
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session ${dbus_cmd}sway"
fi
}

@ -1,99 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/swaywm/sway.git"
inherit git-r3
else
# Version format: major.minor-beta.betanum
SWAY_PV="$(ver_cut 1-2)-$(ver_cut 3).$(ver_cut 4)"
SRC_URI="https://github.com/swaywm/sway/archive/${SWAY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/sway-${SWAY_PV}"
KEYWORDS="~amd64 ~x86"
fi
inherit eutils fcaps meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +pam +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd +tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND="~dev-libs/wlroots-0.2[systemd=,elogind=,X=]
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
>=dev-libs/wayland-protocols-1.14
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
swaybar? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaybg? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaylock? (
pam? ( virtual/pam )
x11-libs/gdk-pixbuf:2[jpeg]
)
systemd? ( >=sys-apps/systemd-237 )
tray? ( >=sys-apps/dbus-1.10 )
X? ( x11-libs/libxcb:0= )"
DEPEND="${RDEPEND}"
BDEPEND="app-text/scdoc
virtual/pkgconfig"
FILECAPS=( cap_sys_admin usr/bin/sway )
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -i meson.build || die
use swayidle || sed -e "s/subdir('swayidle')//g" -e "/swayidle.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swayidle/d" -i meson.build || die
use swaylock || sed -e "s/subdir('swaylock')//g" -e "/swaylock.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaylock/d" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}
src_configure() {
local emesonargs=(
"-Dsway-version=${SWAY_PV}"
$(meson_use wallpapers default-wallpaper)
$(meson_use zsh-completion zsh-completions)
$(meson_use fish-completion fish-completions)
$(meson_use X enable-xwayland)
"-Dbash-completions=true"
"-Dwerror=false"
)
meson_src_configure
}
pkg_postinst() {
elog "You must be in the input group to allow sway to access input devices!"
local dbus_cmd=""
if use tray ; then
elog ""
optfeature "experimental xembed tray icons support" kde-plasma/xembed-sni-proxy
dbus_cmd="dbus-launch --sh-syntax --exit-with-session "
fi
if ! use systemd && ! use elogind ; then
fcaps_pkg_postinst
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session ${dbus_cmd}sway"
fi
if use swaylock && ! use pam; then
fcaps cap_sys_admin usr/bin/swaylock
fi
}

@ -0,0 +1,113 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( x11-libs/gdk-pixbuf:2 )
swayidle? ( dev-libs/swayidle )
swaylock? ( dev-libs/swaylock )
systemd? ( >=sys-apps/systemd-239 )
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~dev-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=dev-libs/wlroots-0.3[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
man? ( >=app-text/scdoc-1.8.1 )
"
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar || use swaybg; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
if [[ ${PV} != 9999 ]]; then
emesonargs+=("-Dsway-version=${MY_PV}")
fi
meson_src_configure
}
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

@ -3,59 +3,64 @@
EAPI=7
inherit eutils fcaps meson
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/sway.git"
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/sway/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="bash-completion clipboard doc elogind fish-completion +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd +tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
RDEPEND="
>=dev-libs/wlroots-0.3[elogind=,systemd=,X=]
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
>=dev-libs/wayland-protocols-1.14
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
sys-libs/libcap
clipboard? ( dev-libs/wl-clipboard )
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaybg? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( x11-libs/gdk-pixbuf:2 )
swayidle? ( dev-libs/swayidle )
swaylock? ( dev-libs/swaylock )
systemd? ( >=sys-apps/systemd-239 )
tray? ( >=sys-apps/dbus-1.10 )
X? ( x11-libs/libxcb:0= )"
DEPEND="${RDEPEND}"
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~dev-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=dev-libs/wlroots-0.3[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
dev-libs/wayland-protocols
doc? ( >=app-text/scdoc-1.8.1 )
virtual/pkgconfig"
FILECAPS=( cap_sys_admin usr/bin/sway )
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
man? ( >=app-text/scdoc-1.8.1 )
"
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -i meson.build || die
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
@ -65,36 +70,40 @@ src_prepare() {
src_configure() {
local emesonargs=(
$(meson_use bash-completion bash-completions)
$(meson_use fish-completion fish-completions)
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dtray=$(usex tray enabled disabled)"
"-Dxwayland=$(usex X enabled disabled)"
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar || use swaybg; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
if [[ ${PV} != 9999 ]]; then
emesonargs+=("-Dsway-version=${PV}")
fi
meson_src_configure
}
pkg_postinst() {
elog "You must be in the input group to allow sway to access input devices!"
local dbus_cmd=""
if use tray; then
dbus_cmd="dbus-launch --sh-syntax --exit-with-session "
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
fcaps_pkg_postinst
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session ${dbus_cmd}sway"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

@ -3,59 +3,64 @@
EAPI=7
inherit eutils fcaps meson
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/sway.git"
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/sway/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="bash-completion clipboard doc elogind fish-completion +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd +tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
RDEPEND="
>=dev-libs/wlroots-0.3[elogind=,systemd=,X=]
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
>=dev-libs/wayland-protocols-1.14
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
sys-libs/libcap
clipboard? ( dev-libs/wl-clipboard )
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaybg? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( x11-libs/gdk-pixbuf:2 )
swayidle? ( dev-libs/swayidle )
swaylock? ( dev-libs/swaylock )
systemd? ( >=sys-apps/systemd-239 )
tray? ( >=sys-apps/dbus-1.10 )
X? ( x11-libs/libxcb:0= )"
DEPEND="${RDEPEND}"
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~dev-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=dev-libs/wlroots-0.3[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
dev-libs/wayland-protocols
doc? ( >=app-text/scdoc-1.8.1 )
virtual/pkgconfig"
FILECAPS=( cap_sys_admin usr/bin/sway )
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
man? ( >=app-text/scdoc-1.8.1 )
"
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -i meson.build || die
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
@ -65,36 +70,40 @@ src_prepare() {
src_configure() {
local emesonargs=(
$(meson_use bash-completion bash-completions)
$(meson_use fish-completion fish-completions)
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dtray=$(usex tray enabled disabled)"
"-Dxwayland=$(usex X enabled disabled)"
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar || use swaybg; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
if [[ ${PV} != 9999 ]]; then
emesonargs+=("-Dsway-version=${PV}")
fi
meson_src_configure
}
pkg_postinst() {
elog "You must be in the input group to allow sway to access input devices!"
local dbus_cmd=""
if use tray; then
dbus_cmd="dbus-launch --sh-syntax --exit-with-session "
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
fcaps_pkg_postinst
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session ${dbus_cmd}sway"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

@ -5,11 +5,26 @@
<email>prometheanfire@gentoo.org</email>
<name>Matthew Thode</name>
</maintainer>
<maintainer type="person">
<email>speedjack95@gmail.com</email>
<name>Niccolò Scatena</name>
</maintainer>
<longdescription lang="en">
Sway's idle management daemon, compatible with any Wayland compositor which implements the KDE idle protocol.
Sway's idle management daemon, compatible with any Wayland compositor
which implements the KDE idle protocol.
</longdescription>
<use>
<flag name="elogind">Enable support for rootless session via elogind</flag>
<flag name="fish-completion">Enable fish completion support</flag>
<flag name="man">Build and install man pages</flag>
</use>
<upstream>
<remote-id type="github">swaywm/swayidle</remote-id>
<maintainer status="active">
<email>sir@cmpwn.com</email>
<name>Drew DeVault</name>
</maintainer>
<bugs-to>https://github.com/swaywm/swayidle/issues</bugs-to>
<changelog>https://github.com/swaywm/swayidle/releases</changelog>
</upstream>
</pkgmetadata>

@ -7,33 +7,47 @@ inherit meson
DESCRIPTION="Idle management daemon for Wayland"
HOMEPAGE="https://github.com/swaywm/swayidle"
SRC_URI="https://github.com/swaywm/swayidle/archive/${PV}.tar.gz -> ${P}.tar.gz"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="systemd elogind zsh-completion bash-completion fish-completion +doc"
IUSE="elogind fish-completion +man systemd zsh-completion"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND="dev-libs/wayland
elogind? ( >=sys-auth/elogind-237 )
systemd? ( >=sys-apps/systemd-237 )
DEPEND="
dev-libs/wayland
elogind? ( >=sys-auth/elogind-237[policykit] )
systemd? ( >=sys-apps/systemd-237[policykit] )
"
RDEPEND="
${DEPEND}
!<=dev-libs/sway-1.0_beta1
!~dev-libs/sway-1.0_beta2[swayidle]
"
DEPEND="${RDEPEND}
BDEPEND="
>=dev-libs/wayland-protocols-1.14
doc? ( app-text/scdoc )
!<dev-libs/sway-1.0_rc1
virtual/pkgconfig
man? ( app-text/scdoc )
"
src_configure() {
local emesonargs=(
-Dman-pages=$(usex doc enabled disabled)
-Dzsh-completions=$(usex zsh-completion true false)
-Dbash-completions=$(usex bash-completion true false)
-Dfish-completions=$(usex fish-completion true false)
-Dman-pages=$(usex man enabled disabled)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use systemd ; then
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind ; then
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")

@ -0,0 +1,57 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit meson
DESCRIPTION="Idle management daemon for Wayland"
HOMEPAGE="https://github.com/swaywm/swayidle"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +man systemd zsh-completion"
REQUIRED_USE="?? ( elogind systemd )"
DEPEND="
dev-libs/wayland
elogind? ( >=sys-auth/elogind-237[policykit] )
systemd? ( >=sys-apps/systemd-237[policykit] )
"
RDEPEND="
${DEPEND}
!<=dev-libs/sway-1.0_beta1
!~dev-libs/sway-1.0_beta2[swayidle]
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
man? ( app-text/scdoc )
"
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}

@ -5,11 +5,30 @@
<email>prometheanfire@gentoo.org</email>
<name>Matthew Thode</name>
</maintainer>
<maintainer type="person">
<email>speedjack95@gmail.com</email>
<name>Niccolò Scatena</name>
</maintainer>
<longdescription lang="en">
Swaylock is a screen locking utility for Wayland compositors.
Swaylock is a screen locking utility for Wayland compositors. It is
compatible with any Wayland compositor which implements the following
Wayland protocols: wlr-layer-shell, wlr-input-inhibitor, xdg-output,
xdg-shell.
Swaylock is the official screen locker for <pkg>dev-libs/sway</pkg>.
</longdescription>
<use>
<flag name="gdk-pixbuf">Enable additional image format support via the <pkg>x11-libs/gdk-pixbuf</pkg> library</flag>
<flag name="fish-completion">Enable fish completion support</flag>
<flag name="gdk-pixbuf">Enable additional image format support via the <pkg>x11-libs/gdk-pixbuf</pkg> library</flag>
<flag name="man">Build and install man pages</flag>
</use>
<upstream>
<remote-id type="github">swaywm/swaylock</remote-id>
<maintainer status="active">
<email>sir@cmpwn.com</email>
<name>Drew DeVault</name>
</maintainer>
<bugs-to>https://github.com/swaywm/swaylock/issues</bugs-to>
<changelog>https://github.com/swaywm/swaylock/releases</changelog>
</upstream>
</pkgmetadata>

@ -7,34 +7,49 @@ inherit fcaps meson
DESCRIPTION="Screen locker for Wayland"
HOMEPAGE="https://github.com/swaywm/swaylock"
SRC_URI="https://github.com/swaywm/swaylock/archive/${PV}.tar.gz -> ${P}.tar.gz"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+pam +gdk-pixbuf zsh-completion bash-completion fish-completion +doc"
IUSE="fish-completion +gdk-pixbuf +man +pam zsh-completion"
RDEPEND="dev-libs/wayland
x11-libs/libxkbcommon
DEPEND="
dev-libs/wayland
x11-libs/cairo
gdk-pixbuf? ( x11-libs/gdk-pixbuf:2[jpeg] )
x11-libs/libxkbcommon
gdk-pixbuf? ( x11-libs/gdk-pixbuf:2 )
pam? ( virtual/pam )
"
DEPEND="${RDEPEND}
RDEPEND="
${DEPEND}
!<=dev-libs/sway-1.0_beta2[swaylock]
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
doc? ( app-text/scdoc )
!<dev-libs/sway-1.0_rc1
virtual/pkgconfig
man? ( app-text/scdoc )
"
src_configure() {
local emesonargs=(
-Dman-pages=$(usex doc enabled disabled)
-Dman-pages=$(usex man enabled disabled)
-Dpam=$(usex pam enabled disabled)
-Dgdk-pixbuf=$(usex gdk-pixbuf enabled disabled)
$(meson_use bash-completion bash-completions)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
-Dswaylock-version=${PV}
"-Dbash-completions=true"
"-Dwerror=false"
)
if [[ ${PV} != 9999 ]]; then
emesonargs+=("-Dswaylock-version=${PV}")
fi
meson_src_configure
}

@ -0,0 +1,61 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps meson
DESCRIPTION="Screen locker for Wayland"
HOMEPAGE="https://github.com/swaywm/swaylock"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="fish-completion +gdk-pixbuf +man +pam zsh-completion"
DEPEND="
dev-libs/wayland
x11-libs/cairo
x11-libs/libxkbcommon
gdk-pixbuf? ( x11-libs/gdk-pixbuf:2 )
pam? ( virtual/pam )
"
RDEPEND="
${DEPEND}
!<=dev-libs/sway-1.0_beta2[swaylock]
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
man? ( app-text/scdoc )
"
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
-Dpam=$(usex pam enabled disabled)
-Dgdk-pixbuf=$(usex gdk-pixbuf enabled disabled)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if [[ ${PV} != 9999 ]]; then
emesonargs+=("-Dswaylock-version=${PV}")
fi
meson_src_configure
}
pkg_postinst() {
if ! use pam; then
fcaps cap_sys_admin usr/bin/swaylock
fi
}

@ -1,3 +1,2 @@
DIST wlroots-0.1.tar.gz 436459 BLAKE2B 8545adb7a9ffe1c4b071ddad1093472f45b24638b29b3c2898b4aa3629c364936be7bec348c9aac5a7d3ecda677df108361fbef08cda8fca9c6bb21639883c86 SHA512 43897ac5a512ea26ad9703182dab5de9c714a087449b108472f638148538a632a67cfc778edf3e77940fdd7bdba91d64a4dc4e4ed1903a150f13ca59237ce01e
DIST wlroots-0.2.tar.gz 437638 BLAKE2B dd7ca737ba2dfc00e30c83e973616cefb77fccb793161794361422a2fcbdf7299aacea8d794b910fdf06c9a191a89f7f1530d312545d08d126a729be41eeb424 SHA512 b7727b29ed7e5188d5fa6099687f8e6f48b6b3f17f7a6e136956ad6b607054595de3779118bffd4b9730115eaca2f00c2d30d52f4915b2753a749432ec0c3f2a
DIST wlroots-0.3.tar.gz 473490 BLAKE2B 552bcc5d8bb847dbac5caaddeac830a4de25b4cc80abb6c8b8e610b5e40cc20ff50a145fdfb6bb5f0aa53d218400777ca7a5982c74eb01bd973109b2f8fd7938 SHA512 ccec1426e6ac86fa63f82763d123162fca5be25fb37bbb44a5de651a7764f5325ef21cbe2cf698cb315f0de4719a6bac8eb0ceeffe2111de7c9f4b59e019aaaa

@ -9,7 +9,7 @@
<email>speedjack95@gmail.com</email>
<name>Niccolò Scatena</name>
</maintainer>
<longdescription>
<longdescription lang="en">
Pluggable, composable, unopinionated modules for building a Wayland
compositor.

@ -1,96 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/swaywm/wlroots.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/wlroots/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND=">=dev-libs/libinput-1.7.0:0=
>=dev-libs/wayland-1.16.0
>=dev-libs/wayland-protocols-1.15
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
x11-libs/libxkbcommon
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0=[xkb] )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
)"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-util/meson-0.48
virtual/pkgconfig"
FILECAPS=( cap_sys_admin usr/bin/rootston )
src_configure() {
# xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
local emesonargs=(
"-Dxcb-errors=disabled"
-Dlibcap=$(usex filecaps enabled disabled)
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxcb-xkb=$(usex x11-backend enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
-Drootston=$(usex rootston true false)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd ; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind ; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}
src_install() {
if use rootston ; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
meson_src_install
}
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston ; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind ; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"
fcaps_pkg_postinst
fi
fi
}

@ -1,29 +1,29 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/swaywm/wlroots.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/wlroots/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND=">=dev-libs/libinput-1.7.0:0=
DEPEND="
>=dev-libs/libinput-1.7.0:0=
>=dev-libs/wayland-1.16.0
>=dev-libs/wayland-protocols-1.15
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
@ -36,10 +36,16 @@ RDEPEND=">=dev-libs/libinput-1.7.0:0=
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
)"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-util/meson-0.48
virtual/pkgconfig"
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.15
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
@ -51,13 +57,13 @@ src_configure() {
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
-Drootston=$(usex rootston true false)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd ; then
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind ; then
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
@ -67,7 +73,7 @@ src_configure() {
}
src_install() {
if use rootston ; then
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
@ -78,13 +84,13 @@ src_install() {
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston ; then
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind ; then
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"

@ -3,27 +3,27 @@
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/swaywm/wlroots.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/wlroots/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND=">=dev-libs/libinput-1.7.0:0=
DEPEND="
>=dev-libs/libinput-1.7.0:0=
>=dev-libs/wayland-1.16.0
>=dev-libs/wayland-protocols-1.15
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
@ -32,14 +32,20 @@ RDEPEND=">=dev-libs/libinput-1.7.0:0=
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0=[xkb] )
x11-backend? ( x11-libs/libxcb:0= )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
)"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-util/meson-0.48
virtual/pkgconfig"
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.16
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
@ -51,13 +57,13 @@ src_configure() {
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
-Drootston=$(usex rootston true false)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd ; then
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind ; then
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
@ -67,7 +73,7 @@ src_configure() {
}
src_install() {
if use rootston ; then
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
@ -78,13 +84,13 @@ src_install() {
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston ; then
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind ; then
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"

@ -1,29 +1,29 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/swaywm/wlroots.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/wlroots/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND=">=dev-libs/libinput-1.7.0:0=
DEPEND="
>=dev-libs/libinput-1.7.0:0=
>=dev-libs/wayland-1.16.0
>=dev-libs/wayland-protocols-1.15
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
@ -36,10 +36,16 @@ RDEPEND=">=dev-libs/libinput-1.7.0:0=
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
)"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-util/meson-0.48
virtual/pkgconfig"
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.16
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
@ -51,13 +57,13 @@ src_configure() {
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
-Drootston=$(usex rootston true false)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd ; then
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind ; then
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
@ -67,7 +73,7 @@ src_configure() {
}
src_install() {
if use rootston ; then
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
@ -78,13 +84,13 @@ src_install() {
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston ; then
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind ; then
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"

@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]] ; then
inherit subversion
else
SRC_URI="mirror://apache/xerces/c/3/sources/${P}.tar.gz"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
fi
LICENSE="Apache-2.0"

Binary file not shown.

@ -1 +1,2 @@
DIST lua-cjson-2.1.0.6.tar.gz 76820 BLAKE2B 1056fefc8d9c802e068e1e7801cc1eb3a0279371ab72e4e8517e22ad68224dd4892f4e4cbfe0a407af71f1008affded41d7bcc05d89c4ddb0c437d93d67708a7 SHA512 71d25f4ec82641d56e33e13c0ecd8c60186b3c4faf3d30de81706d1305d4e61691a1e84210462942674e50ca2ff19e126cb04025d9645d5d26ef3b3b0e46f64b
DIST lua-cjson-2.1.0.tar.gz 86024 BLAKE2B 21dbf84cda2c973088dc9ba165351f3af35d4f604ef465abd91f37807a6c037f612f36c87b9458abef9afa06e1738e933fcce7be9edd2f9a5e301985f413a1db SHA512 4343513b942f2ed98dc1ea6d7e852303bc1263f8acc5c70c8d674aec7adfc8279c5af7d5173a417b6f9a74543b8f6c8f98742d002f4f75832bbf23bb5a30ad2f

@ -0,0 +1,47 @@
From 75678e4b0d1b25fc15f0399f1496db6e0287b72f Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <gyakovlev@gentoo.org>
Date: Tue, 12 Feb 2019 13:32:38 -0800
Subject: [PATCH] Fix Encode sparse array as object test
Port of this commit from upstream
https://github.com/mpx/lua-cjson/commit/98eb1d01e952fc60a36f47846f905b86c92a4f58
---
tests/test.lua | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/tests/test.lua b/tests/test.lua
index d1bf7e4..be5e19c 100755
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -10,6 +10,17 @@ local json = require "cjson"
local json_safe = require "cjson.safe"
local util = require "cjson.util"
+local function json_encode_output_type(value)
+ local text = json.encode(value)
+ if string.match(text, "{.*}") then
+ return "object"
+ elseif string.match(text, "%[.*%]") then
+ return "array"
+ else
+ return "scalar"
+ end
+end
+
local function gen_raw_octets()
local chars = {}
for i = 0, 255 do chars[i + 1] = string.char(i) end
@@ -292,8 +303,8 @@ local cjson_tests = {
json.encode, { { [1] = "one", [4] = "sparse test" } },
true, { '["one",null,null,"sparse test"]' } },
{ "Encode sparse array as object",
- json.encode, { { [1] = "one", [5] = "sparse test" } },
- true, { '{"5":"sparse test","1":"one"}' } },
+ json_encode_output_type, { { [1] = "one", [5] = "sparse test" } },
+ true, { 'object' } },
{ "Encode table with numeric string key as object",
json.encode, { { ["2"] = "numeric string key test" } },
true, { '{"2":"numeric string key test"}' } },
--
2.20.1

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

Loading…
Cancel
Save