Sync with portage [Fri Jun 21 13:08:30 MSK 2019].

mhiretskiy
root 5 years ago
parent 6638e05276
commit 6f2201f641

Binary file not shown.

Binary file not shown.

@ -9,7 +9,7 @@ if [[ ${PV} = 9999* ]]; then
S=${WORKDIR}/diamond-${PV}
else
SRC_URI="https://github.com/python-diamond/Diamond/archive/v${PV}.tar.gz -> python-diamond-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="amd64 ~arm ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
S=${WORKDIR}/Diamond-${PV}
fi

@ -16,7 +16,7 @@ if [[ ${PV} == "9999" ]]; then
inherit git-r3
else
KEYWORDS="~amd64 ~arm ~arm64 hppa x86"
KEYWORDS="amd64 ~arm ~arm64 hppa x86"
SRC_URI="
https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz

Binary file not shown.

@ -11,7 +11,7 @@ SRC_URI="https://salsa.debian.org/jak/${PN}/-/archive/${PV}/${P}.tar.bz2"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ppc ppc64 x86"
KEYWORDS="amd64 ~arm ppc ppc64 x86"
RDEPEND="
dev-libs/libpcre

Binary file not shown.

@ -2,3 +2,4 @@ DIST krb5-1.16.1.tar.gz 9477480 BLAKE2B 16bdd7d6d03ddbd4b070663c3a7a3d2331d54e85
DIST krb5-1.16.2.tar.gz 9652415 BLAKE2B 21c4d56e43476a9b87a4ca9a8b7d0dd5739d3d70731fb4727de5ae248d8638e2016581cd2462f5e2ec7950d9e216aa165199505e581fa10db81ce26062fc097e SHA512 738c071a90e0f38680bb17bdcf950310bc4549f3cb851e1d34de11239ae88178e6ee1a5e5d48c6d3efef544339b07d22dba5347dd763a4266d8d4df7cf47afc9
DIST krb5-1.16.3.tar.gz 9656985 BLAKE2B 92e6d2b5f27e80f495d7bb3fb64acfb03530156fb8e1a07dbc8d045616fd2ac4be8047d844580e3aa01d5e8b733ceea9024290dcc53b691696201f02a31e3034 SHA512 77da5f8bb19108e158c3df5a17b9141b7cbbae7d01f9f0dca5c504dc4b468953d67a1f4566bed5a062d8ff8e0d80796094dea12d2e45bdda810a1633bb08318d
DIST krb5-1.16.tar.gz 9474479 BLAKE2B 0c5caa0a0d2308a447d47ab94d7b8dc92a67ad78b3bac1678c3f3ece3905f27feda5a23d28b3c13ebd64d1760726888c759fb19da82ad960c6f84a433b753873 SHA512 7e162467b95dad2b6aaa11686d08a00f1cc4eb08247fca8f0e5a8bcaa5f9f7b42cdf00db69c5c6111bdf9eb8063d53cef3bb207ce5d6a287615ca10b710153f9
DIST krb5-1.17.tar.gz 8761763 BLAKE2B 76f636836c67e9eefca91c9417118efdcf4437c1220691f43f3d246daf3eabd53b40a30956f0e57703c3fde5d7193b1d86b68becf3ae1c0c803d2462e79d3014 SHA512 7462a578b936bd17f155a362dbb5d388e157a80a096549028be6c55400b11361c7f8a28e424fd5674801873651df4e694d536cae66728b7ae5e840e532358c52

@ -0,0 +1,101 @@
From 58263cbf3106f4c9c9a2252794093014a2f9c01f Mon Sep 17 00:00:00 2001
From: Stefan Strogin <stefan.strogin@gmail.com>
Date: Thu, 25 Apr 2019 03:48:10 +0300
Subject: [PATCH] Fix build for LibreSSL 2.9.x
asn1_mac.h is removed from LibreSSL 2.9.0, but static_ASN1_*() methods
are not defined. Define them.
Upstream-Status: Pending
[Needs to be amended if
https://github.com/libressl-portable/openbsd/pull/109 is accepted]
Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
---
.../preauth/pkinit/pkinit_crypto_openssl.c | 13 ++++++++----
.../preauth/pkinit/pkinit_crypto_openssl.h | 20 ++++++++++++++++++-
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
index 2064eb7bd..81d5d3cf2 100644
--- a/plugins/preauth/pkinit/pkinit_crypto_openssl.c
+++ b/plugins/preauth/pkinit/pkinit_crypto_openssl.c
@@ -188,14 +188,16 @@ pkinit_pkcs11_code_to_text(int err);
(*_x509_pp) = PKCS7_cert_from_signer_info(_p7,_si)
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-/* 1.1 standardizes constructor and destructor names, renaming
- * EVP_MD_CTX_{create,destroy} and deprecating ASN1_STRING_data. */
+/* 1.1 (and LibreSSL 2.7) standardizes constructor and destructor names,
+ * renaming EVP_MD_CTX_{create,destroy} and deprecating ASN1_STRING_data. */
+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
#define EVP_MD_CTX_new EVP_MD_CTX_create
#define EVP_MD_CTX_free EVP_MD_CTX_destroy
#define ASN1_STRING_get0_data ASN1_STRING_data
+#endif
/* 1.1 makes many handle types opaque and adds accessors. Add compatibility
* versions of the new accessors we use for pre-1.1. */
@@ -203,6 +205,7 @@ pkinit_pkcs11_code_to_text(int err);
#define OBJ_get0_data(o) ((o)->data)
#define OBJ_length(o) ((o)->length)
+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
#define DH_set0_pqg compat_dh_set0_pqg
static int compat_dh_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
{
@@ -235,6 +238,7 @@ static void compat_dh_get0_key(const DH *dh, const BIGNUM **pub,
if (priv != NULL)
*priv = dh->priv_key;
}
+#endif /* LIBRESSL_VERSION_NUMBER */
/* Return true if the cert c includes a key usage which doesn't include u.
* Define using direct member access for pre-1.1. */
@@ -3040,7 +3044,8 @@ cleanup:
return retval;
}
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) || \
+ LIBRESSL_VERSION_NUMBER >= 0x2090000fL
/*
* We need to decode DomainParameters from RFC 3279 section 2.3.3. We would
diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.h b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.h
index 7411348fa..ac91408c4 100644
--- a/plugins/preauth/pkinit/pkinit_crypto_openssl.h
+++ b/plugins/preauth/pkinit/pkinit_crypto_openssl.h
@@ -46,7 +46,25 @@
#include <openssl/asn1.h>
#include <openssl/pem.h>
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) || \
+ LIBRESSL_VERSION_NUMBER >= 0x2090000fL
+
+#ifndef static_ASN1_SEQUENCE_END_name
+#define static_ASN1_ITEM_start(itname) \
+ static const ASN1_ITEM itname##_it = {
+#define static_ASN1_SEQUENCE_END_name(stname, tname) \
+ ;\
+ static_ASN1_ITEM_start(tname) \
+ ASN1_ITYPE_SEQUENCE,\
+ V_ASN1_SEQUENCE,\
+ tname##_seq_tt,\
+ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
+ NULL,\
+ sizeof(stname),\
+ #stname \
+ ASN1_ITEM_end(tname)
+#endif /* !defined(static_ASN1_SEQUENCE_END_name) */
+
#include <openssl/asn1t.h>
#else
#include <openssl/asn1_mac.h>
--
2.21.0

@ -0,0 +1,12 @@
Bug #448778
--- a/build-tools/krb5-config.in 2012-12-18 02:47:04.000000000 +0000
+++ b/build-tools/krb5-config.in 2012-12-28 07:13:16.582693363 +0000
@@ -217,7 +217,7 @@
-e 's#\$(PROG_RPATH)#'$libdir'#' \
-e 's#\$(PROG_LIBPATH)#'$libdirarg'#' \
-e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
- -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \
+ -e 's#\$(LDFLAGS)##' \
-e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
-e 's#\$(CFLAGS)##'`

@ -10,11 +10,12 @@
<flag name="doc">
Creates and installs the API and implementation
documentation. This is only useful if you want to develop software
which depends on kerberos.
which depends on kerberos
</flag>
<flag name="keyutils">Enable for the keyring ccache using keyutils.</flag>
<flag name="pkinit">Enable pkinit support for the initial ticket.</flag>
<flag name="openldap">Enable support for ldap as a database backend.</flag>
<flag name="keyutils">Enable for the keyring ccache using keyutils</flag>
<flag name="lmdb">Add support for using dev-db/lmdb for lookup tables</flag>
<flag name="pkinit">Enable pkinit support for the initial ticket</flag>
<flag name="openldap">Enable support for ldap as a database backend</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:mit:kerberos</remote-id>

@ -0,0 +1,165 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{5,6,7} )
inherit autotools flag-o-matic multilib-minimal python-any-r1 systemd
MY_P="${P/mit-}"
P_DIR=$(ver_cut 1-2)
DESCRIPTION="MIT Kerberos V"
HOMEPAGE="https://web.mit.edu/kerberos/www/"
SRC_URI="https://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz"
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="cpu_flags_x86_aes doc +keyutils libressl lmdb nls openldap +pkinit selinux +threads test xinetd"
# Test suite requires network access
RESTRICT="test"
CDEPEND="
!!app-crypt/heimdal
>=sys-libs/e2fsprogs-libs-1.42.9[${MULTILIB_USEDEP}]
|| (
>=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}]
>=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}]
>=dev-libs/libverto-0.2.5[tevent,${MULTILIB_USEDEP}]
)
keyutils? ( >=sys-apps/keyutils-1.5.8[${MULTILIB_USEDEP}] )
lmdb? ( dev-db/lmdb )
nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
pkinit? (
!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
)
xinetd? ( sys-apps/xinetd )
"
DEPEND="${CDEPEND}
${PYTHON_DEPS}
virtual/yacc
cpu_flags_x86_aes? (
amd64? ( dev-lang/yasm )
x86? ( dev-lang/yasm )
)
doc? ( virtual/latex-base )
test? (
${PYTHON_DEPS}
dev-lang/tcl:0
dev-util/dejagnu
dev-util/cmocka
)"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-kerberos )"
S=${WORKDIR}/${MY_P}/src
PATCHES=(
"${FILESDIR}/${PN}-1.12_warn_cflags.patch"
"${FILESDIR}/${PN}-config_LDFLAGS-r1.patch"
"${FILESDIR}/${PN}-1.16.3-libressl-r1.patch"
)
MULTILIB_CHOST_TOOLS=(
/usr/bin/krb5-config
)
src_prepare() {
default
# Make sure we always use the system copies.
rm -rf util/{et,ss,verto}
sed -i 's:^[[:space:]]*util/verto$::' configure.in || die
eautoreconf
}
src_configure() {
# QA
append-flags -fno-strict-aliasing
append-flags -fno-strict-overflow
multilib-minimal_src_configure
}
multilib_src_configure() {
use keyutils || export ac_cv_header_keyutils_h=no
ECONF_SOURCE=${S} \
WARN_CFLAGS="set" \
econf \
$(use_with openldap ldap) \
"$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \
$(use_enable nls) \
$(use_enable pkinit) \
$(use_enable threads thread-support) \
$(use_with lmdb) \
--without-hesiod \
--enable-shared \
--with-system-et \
--with-system-ss \
--enable-dns-for-realm \
--enable-kdc-lookaside-cache \
--with-system-verto \
--disable-rpath
}
multilib_src_compile() {
emake -j1
}
multilib_src_test() {
multilib_is_native_abi && emake -j1 check
}
multilib_src_install() {
emake \
DESTDIR="${D}" \
EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \
install
}
multilib_src_install_all() {
# default database dir
keepdir /var/lib/krb5kdc
rmdir "${ED}"/var/lib/{run/krb5kdc,run}
cd ..
dodoc README
if use doc; then
dodoc -r doc/html
docinto pdf
dodoc doc/pdf/*.pdf
fi
newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r2 mit-krb5kadmind
newinitd "${FILESDIR}"/mit-krb5kdc.initd-r2 mit-krb5kdc
newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r2 mit-krb5kpropd
newconfd "${FILESDIR}"/mit-krb5kadmind.confd mit-krb5kadmind
newconfd "${FILESDIR}"/mit-krb5kdc.confd mit-krb5kdc
newconfd "${FILESDIR}"/mit-krb5kpropd.confd mit-krb5kpropd
systemd_newunit "${FILESDIR}"/mit-krb5kadmind.service mit-krb5kadmind.service
systemd_newunit "${FILESDIR}"/mit-krb5kdc.service mit-krb5kdc.service
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.service mit-krb5kpropd.service
systemd_newunit "${FILESDIR}"/mit-krb5kpropd_at.service "mit-krb5kpropd@.service"
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.socket mit-krb5kpropd.socket
insinto /etc
newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example
insinto /var/lib/krb5kdc
newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example
if use openldap ; then
insinto /etc/openldap/schema
doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema"
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}/kpropd.xinetd" kpropd
fi
}

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@ -14,7 +14,7 @@ SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/${PN}.git/snapshot
LICENSE="GPL-3 LGPL-3 LGPL-2.1 CC0-1.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
KEYWORDS="amd64 ~arm64 ~x86"
IUSE=""
RDEPEND="

Binary file not shown.

@ -10,7 +10,7 @@ if [[ ${PV} == "9999" ]] ; then
else
MY_P="${PN}-${PV/_}"
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~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 ~riscv s390 ~sh sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"

Binary file not shown.

@ -3,7 +3,7 @@
EAPI=6
PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru si sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW"
PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru si sk sl sr_RS@cyrillic sr_RS@latin sv ta te th tr uk wa zh_CN zh_TW"
PLOCALE_BACKUP="en"
inherit autotools eapi7-ver estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx xdg-utils
@ -21,7 +21,7 @@ else
MAJOR_V=$(ver_cut 1)
MINOR_V=$(ver_cut 2)
SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.${MINOR_V}/${MY_P}.tar.xz"
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
KEYWORDS="-* amd64 ~x86 ~x86-fbsd"
fi
S="${WORKDIR}/${MY_P}"

@ -33,7 +33,7 @@ DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest
HOMEPAGE="https://www.xenproject.org"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 ~x86"
IUSE="custom-cflags"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
KEYWORDS="amd64 ~arm ~arm64 ~x86"
UPSTREAM_VER=2
SECURITY_VER=
# xen-tools's gentoo patches tarball

@ -15,7 +15,7 @@ if [[ $PV == *9999 ]]; then
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="~amd64 ~arm -x86"
KEYWORDS="amd64 ~arm -x86"
UPSTREAM_VER=2
SECURITY_VER=
GENTOO_VER=

Binary file not shown.

@ -1,2 +1,3 @@
DIST anki-2.1.0_beta25.tgz 4117303 BLAKE2B 0f7021c4da4efa918c285fa6bf85242e52999d0f340d4a882651cf1e2857ac015f6f99967d4a7fee6df92a2b3c4849eb838707b08abd04d534f4d21ce28eb749 SHA512 9ddf984c575df00fe9b7974f24166a0f18d63e904b3d9bd4370de506828a251efed0fb319f06dc23c6852aae46e552994c6633880603a6e746d4d242b9e627f8
DIST anki-2.1.0_beta27.tgz 4127906 BLAKE2B b4f83cc30dc3e89f3ca17c03ba8dcfc9a487de43d8ac564d5dc83488e286c302816c8a8140aa764b596404194c5f3727218deec303ef201ccaef38b945d8b32d SHA512 50b4ece1361ecafdfe08dad04e9b622b1e8ba2224bfef7e4660c95f81cb8f525d892170548d741ff53bc19ff4c13863f488a71c31c8328511fea3203d2c345f1
DIST anki-2.1.13.tgz 4248906 BLAKE2B 82a2a9a556cbf3596af22a73a2865815561cdd408b249443fc7e144734fdc2b62317120db71475afd7b0d4027f19e53c47437132028ef78b158ec3624f54a33f SHA512 921ef48b16c0c8c83b85523aa0a5b828210b210cd51fa471f57e9aa6777a1aced30c7e24084ef0c2f14c9d846a19091923d13faaff7ed9075860fc23f8ba1cd3

@ -0,0 +1,85 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_6 )
PYTHON_REQ_USE="sqlite"
inherit eutils python-single-r1 xdg
DESCRIPTION="A spaced-repetition memory training program (flash cards)"
HOMEPAGE="https://apps.ankiweb.net"
SRC_URI="https://apps.ankiweb.net/downloads/current/${P}-source.tgz -> ${P}.tgz"
S="${WORKDIR}/${P}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="latex +recording +sound test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
dev-python/PyQt5[gui,svg,webengine,widgets,${PYTHON_USEDEP}]
>=dev-python/httplib2-0.7.4[${PYTHON_USEDEP}]
dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
dev-python/decorator[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/send2trash[${PYTHON_USEDEP}]
recording? ( media-sound/lame )
sound? ( media-video/mpv )
latex? (
app-text/texlive
app-text/dvipng
)
"
DEPEND="${RDEPEND}
test? ( dev-python/nose[${PYTHON_USEDEP}] )
"
PATCHES=( "${FILESDIR}"/${PN}-2.1.0_beta25-web-folder.patch )
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
default
sed -i -e "s/updates=True/updates=False/" \
aqt/profiles.py || die
}
src_compile() {
:;
}
src_test() {
sed -e "s:nose=nosetests$:nose=\"${EPYTHON} ${EROOT}usr/bin/nosetests\":" \
-i tools/tests.sh || die
sed -e "s:nose=nosetests3$:nose=\"${EPYTHON} ${EROOT}usr/bin/nosetests3\":" \
-i tools/tests.sh || die
sed -e "s:which nosetests3:which ${EROOT}usr/bin/nosetests3:" \
-i tools/tests.sh || die
./tools/tests.sh || die
}
src_install() {
doicon ${PN}.png
domenu ${PN}.desktop
doman ${PN}.1
dodoc README.md README.development
python_domodule aqt anki
python_newscript runanki anki
# Localization files go into the anki directory:
python_moduleinto anki
python_domodule locale
# not sure if this is correct, but
# site-packages/aqt/mediasrv.py wants the directory
insinto /usr/share/anki
doins -r web
}

Binary file not shown.

@ -49,7 +49,7 @@ COMMON_DEPEND="
$(add_qt_dep qtnetwork)
$(add_qt_dep qtprintsupport)
$(add_qt_dep qtscript)
$(add_qt_dep qtsql)
$(add_qt_dep qtsql '' '' '5=')
$(add_qt_dep qtsvg)
$(add_qt_dep qtwidgets)
$(add_qt_dep qtxml)

Binary file not shown.

@ -1,3 +1,3 @@
DIST portage-utils-0.62.tar.xz 527216 BLAKE2B ac8331b74998ddb86db55a937992447bccf60611cc259ceb5fe79918c1a43b6dc4633e4ad64462e2df5c39e8d8aa193bd57ab24dcd714e088357eb3cb177e972 SHA512 71b2888cef1bf7549c3829cc7d4bbe2e99a711434bae4fb78c55b9c37815b61623518f19ab87db30f533d771398933c085640dc7c8ffcedf87a70ac702a52fa1
DIST portage-utils-0.74.tar.xz 1587792 BLAKE2B 7c4588e3d44266a5260df42cc685aa03c584248e9970956033e4191a7a842a4b2162110ac99c2bb18645aaafc6ae6ee960e9b26ba0a8863497911eef1e943f64 SHA512 cd3f44c135b3d44e15a95eed41281fce62f225a9d05d5d5bb1be230b2d59cdb87755f011b313a9ec32e4cafdf3b3979c4ef423365edd7dcc472ca2e38c09c83e
DIST portage-utils-0.80_pre20190613.tar.xz 1760016 BLAKE2B c36240f6fff40a3acb9c0f485d73d37dab4d9b4acc280eaabfbb11e17112c11330068a2e0bbb316bbab8a4ed9da1f9bd843b42f062c0cfbd80160709824b0825 SHA512 1b2f9e5eb8adb0f7da8c122374660e4e8f1b7a5af2ea5f4f16d7dcfb7b7c140f424b6980f664a2c5d987710ad046301e95eb72311158bb3187f471fe78e190b1
DIST portage-utils-0.80_pre20190620.tar.xz 1761544 BLAKE2B fe39bebe6ed7afb525b7a3dbcfb2668b29195d7da7128fffb42be313e79b3d68792203bdc7711fa1961b9a1520b72e01b154e3d948aed2861feb44f130995d75 SHA512 2fc877e04213af57ba4050e9830004a0552fea5ac052d625a5635c4383b492e2ae5dcf45b01c63711b6ca6c2574b65ec44b41acd33cd03886bfa5fcc27c7d043

@ -12,7 +12,7 @@ SRC_URI="https://github.com/mgorny/unsymlink-lib/archive/v${PV}.tar.gz -> ${P}.t
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"
KEYWORDS="amd64"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

Binary file not shown.

@ -1,2 +1 @@
DIST kbibtex-0.8.2.tar.xz 4065904 BLAKE2B 5b862ef48dc3e0fb2895aa2ad0c1fa8e712c5f63d0a279b33f9d41fca0262bbde1bd00423657e2714dfbacb28657e067760192adfa033f70ac5771a7188ad4cb SHA512 f15e2d1969f79f354881ccb1e41c5d6f1628c4850b3bd177cba0b74b1aab9aa61935f65ef280d242d0ef2ac816ce45b8a2e8a4ff51720a2400ec52bd555f594e
DIST kbibtex-0.9.tar.xz 4184288 BLAKE2B 90baf7c4960540566c59b198de307703d0f34ff6f4284933c187625b2e4065739fb16b004408fec5929d4923e7f651091915841c94ef09797419daa737ae39eb SHA512 bdd849094f66feb1bd6d02131580cb5d2e1f8d172a4e36141a48d3fc38375b5f4512078d13d6310f326b5cb7b15364616308eaac6c2c10ef897f8f752e1f6682

@ -1,80 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
KDE_HANDBOOK="optional"
KDE_TEST="true"
VIRTUALX_REQUIRED="test"
inherit kde5
DESCRIPTION="BibTeX editor to edit bibliographies used with LaTeX"
HOMEPAGE="https://userbase.kde.org/KBibTeX"
if [[ ${KDE_BUILD_TYPE} != live ]]; then
SRC_URI="mirror://kde/stable/KBibTeX/${PV}/${P}.tar.xz"
KEYWORDS="amd64 x86"
fi
LICENSE="GPL-2"
IUSE="webengine webkit zotero"
REQUIRED_USE="?? ( webengine webkit )"
DEPEND="
$(add_frameworks_dep kcompletion)
$(add_frameworks_dep kconfig)
$(add_frameworks_dep kconfigwidgets)
$(add_frameworks_dep kcoreaddons)
$(add_frameworks_dep kcrash)
$(add_frameworks_dep ki18n)
$(add_frameworks_dep kiconthemes)
$(add_frameworks_dep kio)
$(add_frameworks_dep kitemviews)
$(add_frameworks_dep kjobwidgets)
$(add_frameworks_dep kparts)
$(add_frameworks_dep kservice)
$(add_frameworks_dep ktextwidgets)
$(add_frameworks_dep kwallet)
$(add_frameworks_dep kwidgetsaddons)
$(add_frameworks_dep kxmlgui)
$(add_qt_dep qtdbus)
$(add_qt_dep qtgui)
$(add_qt_dep qtnetwork)
$(add_qt_dep qtwidgets)
$(add_qt_dep qtxml)
$(add_qt_dep qtxmlpatterns)
app-text/poppler[qt5]
dev-libs/icu:=
virtual/tex-base
webengine? ( $(add_qt_dep qtwebengine 'widgets') )
webkit? ( $(add_qt_dep qtwebkit) )
zotero? (
app-crypt/qca[qt5(+)]
dev-libs/qoauth:5
)
"
RDEPEND="${DEPEND}
!app-text/kbibtex:4
dev-tex/bibtex2html
x11-misc/shared-mime-info
"
RESTRICT+=" test"
src_configure() {
local mycmakeargs=(
$(cmake-utils_use_find_package webengine Qt5WebEngineWidgets)
$(cmake-utils_use_find_package webkit Qt5WebKitWidgets)
$(cmake-utils_use_find_package zotero Qca-qt5)
)
kde5_src_configure
}
pkg_postinst() {
kde5_pkg_postinst
if ! has_version "kde-apps/okular:${SLOT}" ; then
elog "For PDF or PostScript document preview support, please install kde-apps/okular:${SLOT}"
fi
}

@ -11,7 +11,7 @@ DESCRIPTION="BibTeX editor to edit bibliographies used with LaTeX"
HOMEPAGE="https://userbase.kde.org/KBibTeX"
if [[ ${KDE_BUILD_TYPE} != live ]]; then
SRC_URI="mirror://kde/stable/KBibTeX/${PV}/${P}.tar.xz"
KEYWORDS="~amd64 x86"
KEYWORDS="amd64 x86"
fi
LICENSE="GPL-2"

@ -7,7 +7,6 @@
</maintainer>
<use>
<flag name="webengine">Use <pkg>dev-qt/qtwebengine</pkg> for HTML previews</flag>
<flag name="webkit">Use <pkg>dev-qt/qtwebkit</pkg> for HTML previews</flag>
<flag name="zotero">Enable support for synchronisation with zotero.org web service</flag>
</use>
</pkgmetadata>

@ -1,2 +1 @@
DIST libmwaw-0.3.14.tar.xz 1276240 BLAKE2B 34a5b118064dcac37834c83b2b5a61303f3e2eb70e41322845ff7661a5494c0b85db0bb07c6bf1f357c2027cab1c515eade58bb6b4fdf845a81d4d079a414b98 SHA512 6893a7a8a72765a66973a94bc7de8b3b6061aa85fd9cca5e73cb2a4024cbe81f0c030df0b6383f24835643259c361efda5527813bb84a1b08d0089d509215888
DIST libmwaw-0.3.15.tar.xz 1289744 BLAKE2B 9aed923542e795904761e4969299785906aa65c735541788d91eb41e80420ac6c6df4df5e0cfa156c71d4e100c601e5e984de10c6a5f66eebe6ffb5f0374cc1d SHA512 0b2443fc6bc9da9247f7585743424df440f89317af989018d8b972864bf91e3c5cd78c39094a45d9de8114906b2b2a93f68ddb967af8565e4b499f643d86e682

@ -1,49 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EGIT_REPO_URI="git://git.code.sf.net/p/libmwaw/libmwaw"
[[ ${PV} == 9999 ]] && inherit autotools git-r3
DESCRIPTION="Library parsing many pre-OSX MAC text formats"
HOMEPAGE="https://sourceforge.net/p/libmwaw/wiki/Home/"
[[ ${PV} == 9999 ]] || SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
LICENSE="LGPL-2.1"
SLOT="0"
[[ ${PV} == 9999 ]] || \
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
IUSE="doc static-libs tools"
RDEPEND="
dev-libs/librevenge
sys-libs/zlib
"
DEPEND="${RDEPEND}
sys-devel/libtool
virtual/pkgconfig
doc? ( app-doc/doxygen )
"
src_prepare() {
default
[[ ${PV} == 9999 ]] && eautoreconf
}
src_configure() {
# zip is hard enabled as the zlib is dep on the rdeps anyway
econf \
--enable-zip \
--disable-werror \
$(use_with doc docs) \
$(use_enable static-libs static) \
$(use_enable tools)
}
src_install() {
default
find "${D}" -name '*.la' -delete || die
}

@ -369,9 +369,4 @@ pkg_postinst() {
ewarn "Please make sure you have read:"
ewarn "https://wiki.gentoo.org/wiki/Project:TeX/Tex_Live_Migration_Guide"
ewarn "in order to avoid possible problems"
elog
elog "TeXLive has been split in various ebuilds. If you are missing a"
elog "package to process your TeX documents, you can install"
elog "dev-tex/texmfind to easily search for them."
elog
}

@ -344,9 +344,4 @@ pkg_postinst() {
ewarn "Please make sure you have read:"
ewarn "https://wiki.gentoo.org/wiki/Project:TeX/Tex_Live_Migration_Guide"
ewarn "in order to avoid possible problems"
elog
elog "TeXLive has been split in various ebuilds. If you are missing a"
elog "package to process your TeX documents, you can install"
elog "dev-tex/texmfind to easily search for them."
elog
}

@ -1,2 +1 @@
DIST writerperfect-0.9.5.tar.xz 302176 BLAKE2B 4ef8fd72f01e3c208a59c520440975f38dcf1edc353134721b7f06d042752adad9c825503f5756a74bede2307f7317c28e054dbcb6c5c1000a606822e97d2c8b SHA512 7467a798da362883101780b598e9a673c10f86f29c01ece1438ea524a0413a00928274f87895f3a8ae26f6784cdcc34e0e84039ca591dc3f75b2e25c53744ccc
DIST writerperfect-0.9.6.tar.xz 330360 BLAKE2B da566fb8e1aae3708646b49b695cf26c5b64aeda1ca1df08ced2549ca8718840744ab011cb7567d1e371ac8e7ee6cfef6a67ee9837cf38b570a3794dc4682f81 SHA512 4a86a23ae2caa133066279994255d8ca7ee16f40ad646bd8ff434c7e4e1a29cf23db7e811b8eca1823dcf9e2456b2e8dbacf03bd5bc0377638fc52fc7d4495a5

@ -1,65 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit flag-o-matic
DESCRIPTION="Various formats to Open document format converter"
HOMEPAGE="http://libwpd.sf.net"
SRC_URI="mirror://sourceforge/libwpd/${P}.tar.xz"
LICENSE="|| ( LGPL-2.1 MPL-2.0 )"
SLOT="0"
KEYWORDS="amd64 x86 ~x86-linux ~x86-solaris"
IUSE="abiword +cdr debug ebook freehand gsf keynote +mspub +mwaw pagemaker +visio +wpd +wpg +wps"
# FIXME: libepubgen, librvngabw
RDEPEND="
=app-text/libodfgen-0.1*
>=dev-libs/librevenge-0.0.1
media-libs/libeot
abiword? ( =app-text/libabw-0.1* )
cdr? ( =media-libs/libcdr-0.1* )
ebook? ( =app-text/libebook-0.1* )
freehand? ( =media-libs/libfreehand-0.1* )
gsf? ( gnome-extra/libgsf )
keynote? ( =app-text/libetonyek-0.1* )
mspub? ( =app-text/libmspub-0.1* )
mwaw? ( =app-text/libmwaw-0.3* )
pagemaker? ( media-libs/libpagemaker )
visio? ( =media-libs/libvisio-0.1* )
wpd? ( app-text/libwpd:0.10 )
wpg? ( =app-text/libwpg-0.3* )
wps? ( =app-text/libwps-0.4* )
"
DEPEND="${RDEPEND}
virtual/pkgconfig
"
REQUIRED_USE="
|| ( abiword cdr ebook freehand keynote mspub mwaw pagemaker visio wpd wpg wps )
"
# configure fails if no import library is selected...
src_configure() {
# bug 651620
append-cxxflags -std=c++11
econf \
--disable-werror \
$(use_enable debug) \
$(use_with abiword libabw) \
$(use_with cdr libcdr) \
$(use_with ebook libebook) \
$(use_with freehand libfreehand) \
$(use_with gsf libgsf) \
$(use_with keynote libetonyek) \
$(use_with mspub libmspub) \
$(use_with mwaw libmwaw) \
$(use_with pagemaker libpagemaker) \
$(use_with visio libvisio) \
$(use_with wpd libwpd) \
$(use_with wpg libwpg) \
$(use_with wps libwps)
}

Binary file not shown.

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

@ -1 +1,2 @@
DIST libadalang-tools-2019-20190517-195C4-src.tar.gz 625775 BLAKE2B 2ec69e307576c505d20a43d229b13404966f4442778e5390da327ae71cc065873de4fff03a720949fa6bfb5ce66f405e7d45f7f0c21032a639efcff208323aed SHA512 b7368606847244cbb08ff2111fabfbfc8a9aa7f58e953febc70838006d94711dba1fd75bfb69ed2081a37a2dfaaad46097127870696c882d7cc54de5d7b051a1
DIST libadalang-tools-gpl-2018-src.tar.gz 19938182 BLAKE2B 34104f3bc43c165a9b74ba8c0c03ee2f34686bcd06b5ced730f70f654d8b808e129a85566e081830b4f20304c793eefe0af81b56984cf06190302ad2f6a419be SHA512 a1176575944cd88b9da5f4e9f03caa1a4d09358df71e6a91300d0b35c2a843d0ea1a77fbd93e7b7f16cef1b978022ee20991f5c2ff74f7d05878c3de1220f2b5

@ -0,0 +1,37 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit multiprocessing
MYP=${P}-20190517-195C4
DESCRIPTION="Libadalang-based tools: gnatpp, gnatmetric and gnatstub"
HOMEPAGE="https://www.adacore.com/community"
SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8f4e31e87a8f1d42509f ->
${MYP}-src.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gnat_2016 gnat_2017 gnat_2018 +gnat_2019"
RDEPEND=""
DEPEND="${RDEPEND}
dev-ada/libadalang[gnat_2016(-)?,gnat_2017(-)?,gnat_2018(-)?,gnat_2019(-)?,static-libs]
dev-ada/gprbuild[gnat_2016(-)?,gnat_2017(-)?,gnat_2018(-)?,gnat_2019(-)?]"
S="${WORKDIR}"/${MYP}-src
src_compile() {
gprbuild -v -k -XLIBRARY_TYPE=static -XXMLADA_BUILD=static \
-XGNATCOLL_GMP_BUILD=static \
-P src/build.gpr -p -j$(makeopts_jobs) || die
}
src_install() {
dobin bin/gnatpp
newbin bin/gnatmetric gnatmetric-tool
newbin bin/gnatstub gnatstub-tool
einstalldocs
}

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>
<flag name="gnat_2017">Compile with dev-lang/gnat-gpl-2017</flag>
<flag name="gnat_2018">Compile with dev-lang/gnat-gpl-2018</flag>
<flag name="gnat_2019">Compile with dev-lang/gnat-gpl-2018</flag>
</use>
<longdescription lang="en">
Libadalang-based tools: gnatpp, gnatmetric and gnatstub

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
<maintainer type="project">
<email>ada@gentoo.org</email>
</maintainer>
<use>
<flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>

Binary file not shown.

@ -1,2 +1 @@
DIST gstreamermm-0.10.11.tar.xz 5840552 BLAKE2B 99e9e934b2885ae02256acb5b5f2ba0b63d99b81c41fa2f7fe47b0a3a60a8178f0727c0c0b1609dc10c53d9b00052e3f16b92ffa4b55c820606bf9f37ab667ff SHA512 2ad370f6902dcb4663ea801bdbbf744a98de9e24fc04f27b5044a4a95337168e2bb195761a07ac9c1011f9ed4936287fcc5f4c2b984f0a362b429d05be7d3909
DIST gstreamermm-1.10.0.tar.xz 3529640 BLAKE2B 29b99928cd1b21fd295683b4a1ad0a1b0f8ae959237fcbfef7d5a9296a70a140a04fa390fbbcb8d3151d28239f281e72feb30a0466478e38dfb4e172beaf21f1 SHA512 34eeb9eec5958c96acf7c7791eef80138e5d55fea6ddf1bf9ace6b1ec7f052da2abf04d87089e4c9ead51c631ef7afceaf9fceb946ec3d105da522187c69e429

@ -1,38 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
GNOME2_LA_PUNT="yes"
inherit flag-o-matic gnome2
DESCRIPTION="C++ interface for GStreamer"
HOMEPAGE="https://gstreamer.freedesktop.org/bindings/cplusplus.html"
LICENSE="LGPL-2.1"
SLOT="0.10"
KEYWORDS="amd64 ~ppc x86"
IUSE="test"
RDEPEND="
>=media-libs/gstreamer-0.10.36:0.10
>=media-libs/gst-plugins-base-0.10.36:0.10
>=dev-cpp/glibmm-2.33.4:2
>=dev-cpp/libxmlpp-2.14:2.6
>=dev-libs/libsigc++-2:2
"
DEPEND="${RDEPEND}
virtual/pkgconfig
test? (
media-libs/gst-plugins-good:0.10
media-plugins/gst-plugins-vorbis:0.10
media-plugins/gst-plugins-x:0.10 )
"
# Installs reference docs into /usr/share/doc/gstreamermm-0.10/
# but that's okay, because the rest of dev-cpp/*mm stuff does the same
src_prepare() {
gnome2_src_prepare
append-cxxflags -std=c++11 #568254
}

@ -9,7 +9,7 @@ HOMEPAGE="https://www.gtkmm.org"
LICENSE="LGPL-2.1+"
SLOT="3.0"
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
IUSE="aqua doc test wayland X"
REQUIRED_USE="|| ( aqua wayland X )"

Binary file not shown.

@ -6,8 +6,10 @@ DIST mariadb-10.2.22.tar.gz 71907765 BLAKE2B e7781a9e1bb0becca543ebb0b9e03912fba
DIST mariadb-10.2.24.tar.gz 71965656 BLAKE2B 2e78d7fc98fe6221126b7700c821ec4294af9d474f440857530b41d5633821b9995b732bbcdcba14c6a01f5decc56f506c99def4dc1a9a4dd52253d3045a88c6 SHA512 bd0e8c506e94f063b6cfbb1e7e872b4fdbe9ab704e07ff3af1e1efabb89daa39fec3b06ec5294d9a19fdc680da082d095cd3c5f9e4c4ee6f9ee5ae0514d6bb6f
DIST mariadb-10.3.13.tar.gz 70745600 BLAKE2B f62b6de0566910cd0995954e3b84528bca4d8b99dab79ce1e8b5d4076a223890fc0bb7b43ac3d81c81c0b907cabbc3b042eab936b845ef18d259793759b05d51 SHA512 3cbd93291aa43b235e5b81d953ea69fb32df54fb518f922f69b5485952f01fae693c77b0efac37f414ed7ff132d3b58f899812bdb7be8a5b344c3640e2c3a0dd
DIST mariadb-10.3.15.tar.gz 70824529 BLAKE2B 6a84430e280db287859bd82cc2b6bb63bddd9188e599165d6ccb3e0fa75cb9de083d3d8d267b7de9de70be692a45b72570c8943d949c43673b3c1387623bb0b0 SHA512 35332ac32cba27fef1b4ddd2209236853f4309756fd121fbdbd2b6be0651e817cedc80e276b89ccfa4bc76760811434fab45a4d380d0ebd500c7d9bd7377fe93
DIST mariadb-10.4.6.tar.gz 76710358 BLAKE2B 7fcaced6cbcc027ad2a1f1e681af30d0f4ec45f432bad4c6c7d9625a8d20978e4c49cbec3016be873ecda16cb113a8f3b6a8ec8995772255c23e908cc5d11178 SHA512 b04c47f72de2473d7b5edd04b4785a1d7179bb1f429f30ba53ae6cfbbb413200d9803eff1072949b2e81fd7d2164ea34c68620d621d4181b913daa2293ae140c
DIST mariadb-5.5.63.tar.gz 45946425 BLAKE2B bddfd67d8393ec22c4bc8d7dab2838825394636bd690c04574bdc4da84fbf6c779fcae7f6be5d596458baa732cb5278475f308f03df083cdfcecffc486950d81 SHA512 4699d8af2210e12d0eea659a4d3fd4bfa68ce11a38cffaf939a96cb7a1fe64dd0827d39c3a0a36fa7cc1981a804a9af7a6d5cfaf23a8cfc8440e54c0163c2acb
DIST mariadb-5.5.64.tar.gz 45953561 BLAKE2B d6efe53e520b829ec337a00efadd7d813afd5e3ee6ac5a298773c7cd1b724d01856979317fe2bcf814af3bdabdbd7c6c3d2e27a60b4cdf6032b1dfd64e54d84d SHA512 3e93044eb30d2ce50fefce503f16f4b542fd647ff4367675147ebe1b1f576b4fbad5c0bb25670136d0758d2b8b0c571119244c87d66565bb9b3471811f5dc6b8
DIST mysql-extras-20180809-1700Z.tar.bz2 322999 BLAKE2B 8b5feb32085dc35b2f68dae985b2d266c4eaa0e956b490050a2df04bbff99bf8623b67e75af9326d84e3ad625c4d86b0d21d23c9a96df5a0c9cd5ed730958970 SHA512 fbd7af9284bbf09d55f128361e7cc52d94f24ac491aac800cd6d61f2e444aeca66a4d5e6ae94c2fb4044e00cec9b232bae9a76a229f87f19d90b7aecf70792ec
DIST mysql-extras-20181104-2252Z.tar.bz2 328613 BLAKE2B c869dbdd8eb8ab6706b52815fae88e0789b955b9d3e89eac305e6de6e1bc9e78ea10ac58efeac0d6478c7f83587910834e9b4c44e3621224f006daae44dc2bf3 SHA512 e0dff23aa6420a9cfcf2f60464381d4b08194759dcd96910cdf94075fa71e90b74fa3dae700f279f421fee68315af37e47054c9422adeb6cc757fa968a1b65bf
DIST mysql-extras-20190305-2052Z.tar.bz2 331304 BLAKE2B 1d2c35a961159fa5ce9ee6699fce943f5a5b5cf60b11c9bb4bcccee4943f4508a9eb6d01050c642353ac592ce1a6b421abf2a1bebc706c44c4c8a36aa698ec43 SHA512 ae63403320e010acbb92f8aec6da8ed4f267cef0bad37147d594076fd94571de7f98bfc2afbe94af5d716f58d57696fd958b1e13e20e87052f252ed4a188cd3c
DIST mysql-extras-20190521-1824Z.tar.bz2 331441 BLAKE2B d45fd1be113d3dc7f10a3ff89cfda3d59974d88366a143b473a68493c93e244d45a836b4e13dc9e88bbd8b734507858d6b4b1251325c464f48572fe158d7edf7 SHA512 8b91f534acbd07e3a2f66e28b1301f960ed9192c2bc1edbc07741b6200ad0767fdc004faebce2a60fa67a8f3aee186c98ee2f56278d4e8773e5df77f609ef837

@ -0,0 +1,995 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
MY_EXTRAS_VER="20190521-1824Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
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 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.4.5-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
)
# 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=
"
BDEPEND="virtual/yacc
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
"
DEPEND="static? ( sys-libs/ncurses[static-libs] )
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-26*
sst-rsync? ( sys-process/lsof )
sst-mariabackup? ( 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
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
server? ( ~virtual/mysql-5.6[static=] )"
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
local GCC_MAJOR_SET=$(gcc-major-version)
local GCC_MINOR_SET=$(gcc-minor-version)
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
# non x86{,_64} arches
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
fi
java-pkg-opt-2_pkg_setup
if has test ${FEATURES} && \
use server && ! has userpriv ${FEATURES} ; then
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
# This should come after all of the die statements
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
pkg_preinst() {
java-pkg-opt-2_pkg_preinst
# Here we need to see if the implementation switched client libraries
# We check if this is a new instance of the package and a client library already exists
local SHOW_ABI_MESSAGE libpath
if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
elog "Due to ABI changes when switching between different client libraries,"
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
elog "Please run: revdep-rebuild --library ${libpath}"
ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
fi
}
pkg_postinst() {
# Make sure the vars are correctly initialized
mysql_init_vars
# Create log directory securely if it does not exist
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
if use server ; then
if use pam; then
einfo
elog "This install includes the PAM authentication plugin."
elog "To activate and configure the PAM plugin, please read:"
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
einfo
fi
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
einfo
elog "You might want to run:"
elog "\"emerge --config =${CATEGORY}/${PF}\""
elog "if this is a new install."
elog
elog "If you are switching server implentations, you should run the"
elog "mysql_upgrade tool."
einfo
else
einfo
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
fi
if use galera ; then
einfo
elog "Be sure to edit the my.cnf file to activate your cluster settings."
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
elog "The first time the cluster is activated, you should add"
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
elog "This option should then be removed for subsequent starts."
einfo
if [[ -n "${REPLACING_VERSIONS}" ]] ; then
local rver
for rver in ${REPLACING_VERSIONS} ; do
if ver_test "${rver}" -lt "10.4.0" ; then
ewarn "Upgrading galera from a previous version requires admin restart of the entire cluster."
ewarn "Please refer to https://mariadb.com/kb/en/library/changes-improvements-in-mariadb-104/#galera"
ewarn "for more information"
fi
done
fi
fi
fi
# Note about configuration change
einfo
elog "This version of mariadb reorganizes the configuration from a single my.cnf"
elog "to several files in /etc/mysql/${PN}.d."
elog "Please backup any changes you made to /etc/mysql/my.cnf"
elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
elog "You may have as many files as needed and they are read alphabetically."
elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
einfo
}
src_unpack() {
unpack ${A}
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
mv -f "${WORKDIR}/${P/_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 jemalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt"
elif 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
-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_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
# Remove broken SST scripts that are incompatible
local scriptremove
for scriptremove in wsrep_sst_xtrabackup wsrep_sst_xtrabackup-v2 ; do
if [[ -e "${ED}/usr/bin/${scriptremove}" ]] ; then
rm "${ED}/usr/bin/${scriptremove}" || die
fi
done
}
# 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"
_disable_test compat/oracle.plugin "Needs example plugin which Gentoo disables"
# 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 | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then
einfo "Please provide a password for the mysql 'root'@'localhost' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
einfo "Not entering a password defaults to UNIX authentication"
read -rsp " >" pwd1 ; echo
if [[ -n "${pwd1}" ]] ; then
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
fi
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"
if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then
einfo "Done"
exit 0
fi
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
[[ -S "${socket}" ]] ||
die "Completely failed to start up mysqld with: ${mysqld}"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
unset sql
eend $?
fi
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
}

@ -13,7 +13,7 @@ HOMEPAGE="https://www.pgadmin.org/"
SRC_URI="mirror://postgresql/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
LICENSE="POSTGRESQL"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 ~x86"
SLOT="0"
IUSE="doc"

@ -1 +1,2 @@
DIST pgbadger-10.0.tar.gz 775322 BLAKE2B 072a3b4c2d2d109734fdbf68ff466e34065a852948ae7961e8ba6a40a6881a98653258ee7b483c2a3c9d2d8238370fd842c9b525a0dd11baf1fbf98a0d322406 SHA512 dd1633f1186069a9d59d271cbf0913cf80bcfa88af8236a194f7580c96c84a3513ca0658628069b38ef43a9c9ca7c5573afb2b35e2b1b6d3526f240c2c673bff
DIST pgbadger-10.3.tar.gz 1645573 BLAKE2B 583ad35f416b6d989996ae48500dcee5734bc4867095abe1eb49be971c6190cf68dd4e127a47163c8ee49400cdf2fcee14645c98f4853b6f66c2bef0db0b83e4 SHA512 f8aac47d92ddb92292c572c47d6d32f1aa673b972b2488eede7fbe0b55feddc6ce0cb1b58994e83b93a5f84fcb5b871c7c080863d17554810cc1c1b8c1e1609a

@ -0,0 +1,24 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit perl-module
DESCRIPTION="pgBadger is a PostgreSQL log analyzer."
HOMEPAGE="https://pgbadger.darold.net/"
SRC_URI="https://github.com/darold/pgbadger/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
dev-perl/JSON-XS
dev-perl/Text-CSV_XS
"
RDEPEND="${DEPEND}"
src_test() {
prove || die
}

@ -1,6 +1,11 @@
DIST postgresql-10.8.tar.bz2 18958913 BLAKE2B d2e1664a53c5b2f24b412f497769ffd33e2f48977fa0f4503cb588497b61955a97497c87950ae60d498d75c7385fc63dd832b518174614f695d8882628a4ebb8 SHA512 c9cd0298f553e13e32d4315e17e9e61c1fd011391c5203282d9040f26fd08c85f749e6f2cea3bcc42d1ca153a1272bcd773196ef3bf2bdfb74cd12c5f523b7ca
DIST postgresql-10.9.tar.bz2 18981395 BLAKE2B ef2ac003b393ea7cbf24c45fac6b3dc69df2a8694a9e891d5a68f7310d63fb816649d16a7351d03b63a4eb2256703efcab616a0146324478335267c39f3b9829 SHA512 4e2f30a0fd262f2e3ce5fc836425be635326600cd6cd4e117c57f59ea7ab2e9ea463a8d357fe7adb8c0dd0094e43d08efc2a137f8f9975715a5908e35920f98e
DIST postgresql-11.3.tar.bz2 19718775 BLAKE2B f56686bff4e70c2b6333554a620a5c2d5c226654a1d61de43b4493c44a14e2bcd9c102dba420994878d328af52d933885e4948cd002f14b693aef1416697a0ea SHA512 03269bb88f44f3a81d5e3a8ca2fe59f63f784436840f08870b2e539755629cbde8ac288e0bb4472ee93294a88b37b814ddff48444254c1a3f7a10b4bb64f7133
DIST postgresql-12beta1.tar.bz2 20589423 BLAKE2B 622f936524bca74c20e27967b4cfcec31ba4ffc3132af516fc6dbb89843d688df41b72b7febe7060d2eb6716d64228124b4bc9831e9b11601be0fd95b7727710 SHA512 f46017659aa88141b056fc1852280c92ffbc3ba52d1cda2e3e302d3ec6ba478cc2a8ab04c87f10774b0401e8284fc46bb387a3e0e594a26a30ef7a4cf79b1de3
DIST postgresql-11.4.tar.bz2 19759635 BLAKE2B a3f35df40d31dce52073eeacf4e16bc7ccb487dc0a6e15b84d087f04fd130b66b1168ece3edc63927c377ca1044b54ccb3db5fb9b4a5c86a5b0e179a6678c73c SHA512 159fb84134e05ddc58e40a879ca52ed4d58ced7bcd1e7310d59bda84f9055339a31a92cfaab2c063a88685f7417b9a828534394bf9a2477fc33d1fb6cd26186b
DIST postgresql-12beta2.tar.bz2 20605047 BLAKE2B 133c453b180c800bf7e8dc15d26453db6e2b86011a1dd175157d46e5dec26199e42ac37f494b9a154352d144c93c4e8dc8410469d52ca31c1bdfef69a25190e2 SHA512 64b3ffd7e61ece5572ca72b3168618150214f89d21b113c6f630687372f6f7212bdfa086fa5b22e466a529a0e929c76d34e5b3ed5c04c94299589822fbff4935
DIST postgresql-9.4.22.tar.bz2 16848787 BLAKE2B 5c2aaef13ef0cf33c421e6839877a8e4e1fc5dbe41d9cabefddd369925869f92f6c6b8a124b5778f9b25359103f0a7ada1eddcaf4bac498709f563928f25e7e3 SHA512 f11623a89b2320616fd53eda52da544bdfcb63bff08cb78fccde134ef628eee7ee90b3de6952f4e08c10297d356624faabf0e5b181b0105f51797796cd04efef
DIST postgresql-9.4.23.tar.bz2 16848808 BLAKE2B fd747fb3f6f540190ecbd53116ef7b8b812d05f5968e32c9d09c5902239eaf073281262dba9836514344303a3c894f48c617e050ce713be7c09f53ee49c7b3cd SHA512 b1eb392b939ac8369c76e4ecc142c78f380afc498b60ec0ea97acb16c21ffa5c11a24c2c46463032865955b7c531492c08feb6ef1efc46a549369f026594ea61
DIST postgresql-9.5.17.tar.bz2 17563469 BLAKE2B d40b7f95d03db594144b4882f36bbe22f348faab0b8d67eda3f946448bb0e09188eccdeb4d1c92742fb29a920b30ede55e536a863b22d2009283eab66679122d SHA512 bb468528b1f18166cda0be136f31a632859ffe6e6800233b1cb0e91ce11d2d00d3dc108a74580b5552a4d30b9f1b6849c91576cd497beac788c429815c66eac5
DIST postgresql-9.5.18.tar.bz2 17570161 BLAKE2B aee7e4570f2571e507fd972e86d3a6a9243d8fd33c356305998a8dce461bc9b06b45e1ff4267a9eb47f58a793c0b70bce0babfc0dce939cb34b1436a55a5d9fd SHA512 0487ac2891c800de045135d4b153659ec10c28750a09e0b87343f8e7145a11f1783ed0b6ca60829776faae1430c8050cc7661c780f171f1b2621f1673a32e6d1
DIST postgresql-9.6.13.tar.bz2 18767279 BLAKE2B c1ec780a7f938f878425cbd6556145e60a613135129daaacc52e9a699cc448a22481b01fac20d0c09373ea6a026f39bc58234aae4f1126333b94f621981a8135 SHA512 65cc70410ad4a1a738b92855b92eecdbb9efbbca0eb9a45a138d47b696c8f9c9cd19073fbfdf5c80eea7633d0be29b4ed8acbadd38724acf8f18c90bb30f9b26
DIST postgresql-9.6.14.tar.bz2 18787744 BLAKE2B be5a0d90fe1cd5ea682d8446e512271175f705bc49514215535d7aa4b631669846c0bd6167f985028c07dc5d6d394a1ea809028c5a5e15a5f010e85c2bede8cf SHA512 dccc183a6992ef4ece4ef5c638339708ab484e571ecd66ed993c9071cd55f250b4277fd3367f9a5ee545aa83e29dc5f7a239200e200e3314d5acc847f35e790c

@ -0,0 +1,466 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="debug doc icu kerberos kernel_linux ldap libressl nls pam perl
python +readline selinux +server systemd ssl static-libs tcl
threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable debug) \
$(use_enable threads thread-safety) \
$(use_with icu) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
serverman=(
initdb
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
pg_{test_{fsync,timing},upgrade,waldump}
post{gres,master}
)
for m in ${serverman[@]} ; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
# Don't delete libpg{port,common}.a (Bug #571046). They're always
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
# Make slot specific links to programs
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.6-r1" | \
systemd_newunit - ${PN}-${SLOT}.service
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
if [[ -n ${REPLACING_VERSIONS} ]] ; then
ewarn "If your system is using 'pg_stat_statements' and you are running a"
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
ewarn "the following command after upgrading:"
ewarn
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
fi
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
if ! use systemd; then
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
fi
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
elif use systemd; then
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
einfo "instead of 'pg_ctl'."
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -184,7 +184,7 @@ src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we

@ -0,0 +1,468 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="mirror://postgresql/source/v${SLOT}/postgresql-${MY_PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="http://www.postgresql.org/"
IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam
perl python +readline selinux +server systemd ssl static-libs tcl
threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
llvm? (
sys-devel/llvm:=
sys-devel/clang:=
)
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
if use pam ; then
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable debug) \
$(use_enable threads thread-safety) \
$(use_with icu) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with llvm) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
serverman=(
initdb
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
pg_{test_{fsync,timing},upgrade,waldump}
post{gres,master}
)
for m in ${serverman[@]} ; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
# Don't delete libpg{port,common}.a (Bug #571046). They're always
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
# Make slot specific links to programs
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.6-r1" | \
systemd_newunit - ${PN}-${SLOT}.service
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
if [[ -n ${REPLACING_VERSIONS} ]] ; then
ewarn "If your system is using 'pg_stat_statements' and you are running a"
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
ewarn "the following command after upgrading:"
ewarn
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
fi
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
if ! use systemd; then
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
fi
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
elif use systemd; then
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
einfo "instead of 'pg_ctl'."
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -0,0 +1,480 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT=$(ver_cut 1-2)
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl
-pg_legacytimestamp python +readline selinux +server systemd ssl
static-libs tcl threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !pg_legacytimestamp integer-datetimes) \
$(use_enable debug) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
# Don't delete libpg{port,common}.a (Bug #571046). They're always
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}tmp"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
docinto sgml
dodoc doc/src/sgml/*.{sgml,dsl}
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.2" | \
systemd_newunit - ${PN}-${SLOT}.service
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_preinst() {
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
# /usr/bin/psql96). They may have been created by the
# postgresql.eselect module, but they're handled within this ebuild
# now. It's alright if we momentarily delete /usr/bin/psql as it
# will be recreated by the eselect module in pkg_ppostinst(). This
# is only necessary for 9.7 and earlier. 10 and later were never
# handled in this manner.
local canonicalise
if type -p realpath > /dev/null; then
canonicalise=realpath
elif type -p readlink > /dev/null; then
canonicalise='readlink -f'
else
# can't die, subshell
die "No readlink nor realpath found, cannot canonicalise"
fi
local l
# First remove any symlinks in /usr/bin that may have been created
# by the old eselect
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
rm "${l}" || ewarn "Couldn't remove ${l}"
fi
done
# Then move the symlinks created by the ebuild to their proper place.
for l in "${ED}"/usr/bin/*tmp ; do
mv "${l}" "${l%tmp}" \
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
done
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -0,0 +1,486 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT=$(ver_cut 1-2)
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl
-pg_legacytimestamp python +readline selinux +server systemd ssl
static-libs tcl threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable !pg_legacytimestamp integer-datetimes) \
$(use_enable debug) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
# Don't delete libpg{port,common}.a (Bug #571046). They're always
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}tmp"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
docinto sgml
dodoc doc/src/sgml/*.{sgml,dsl}
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.2" | \
systemd_newunit - ${PN}-${SLOT}.service
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_preinst() {
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
# /usr/bin/psql96). They may have been created by the
# postgresql.eselect module, but they're handled within this ebuild
# now. It's alright if we momentarily delete /usr/bin/psql as it
# will be recreated by the eselect module in pkg_ppostinst(). This
# is only necessary for 9.7 and earlier. 10 and later were never
# handled in this manner.
local canonicalise
if type -p realpath > /dev/null; then
canonicalise=realpath
elif type -p readlink > /dev/null; then
canonicalise='readlink -f'
else
# can't die, subshell
die "No readlink nor realpath found, cannot canonicalise"
fi
local l
# First remove any symlinks in /usr/bin that may have been created
# by the old eselect
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
rm "${l}" || ewarn "Couldn't remove ${l}"
fi
done
# Then move the symlinks created by the ebuild to their proper place.
for l in "${ED}"/usr/bin/*tmp ; do
mv "${l}" "${l%tmp}" \
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
done
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
if use alpha && use server ; then
ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
ewarn "As a result, performance will be extremely degraded."
fi
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -0,0 +1,491 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1-2)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl
-pg_legacytimestamp python +readline selinux +server systemd ssl
static-libs tcl threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
server? ( systemd? ( sys-apps/systemd ) )
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable !pg_legacytimestamp integer-datetimes) \
$(use_enable debug) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
# Don't delete libpg{port,common}.a (Bug #571046). They're always
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}tmp"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
docinto sgml
dodoc doc/src/sgml/*.{sgml,dsl}
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.6-r1" | \
systemd_newunit - ${PN}-${SLOT}.service
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_preinst() {
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
# /usr/bin/psql96). They may have been created by the
# postgresql.eselect module, but they're handled within this ebuild
# now. It's alright if we momentarily delete /usr/bin/psql as it
# will be recreated by the eselect module in pkg_ppostinst(). This
# is only necessary for 9.7 and earlier. 10 and later were never
# handled in this manner.
local canonicalise
if type -p realpath > /dev/null; then
canonicalise=realpath
elif type -p readlink > /dev/null; then
canonicalise='readlink -f'
else
# can't die, subshell
die "No readlink nor realpath found, cannot canonicalise"
fi
local l
# First remove any symlinks in /usr/bin that may have been created
# by the old eselect
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
rm "${l}" || ewarn "Couldn't remove ${l}"
fi
done
# Then move the symlinks created by the ebuild to their proper place.
for l in "${ED}"/usr/bin/*tmp ; do
mv "${l}" "${l%tmp}" \
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
done
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
if ! use systemd; then
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
fi
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
elif use systemd; then
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
einfo "instead of 'pg_ctl'."
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

Binary file not shown.

@ -5,7 +5,7 @@ EAPI=6
# Don't block arm. See bug #600134.
#MULTILIB_COMPAT=( abi_ppc_64 abi_x86_{32,64} )
KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86"
KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 ~x86"
inherit java-vm-2 multilib-build toolchain-funcs

Binary file not shown.

@ -7,3 +7,4 @@ DIST hy-0.13.0.tar.gz 383197 BLAKE2B 5ec7826ebe8b4809c1a49d5dac333fd9e60b5a1a5ae
DIST hy-0.13.1.tar.gz 383213 BLAKE2B e002218811cadf8db558284e7124114891c76df334ac3cda7b02c57bcdc37c0e65fb202f07f694d6948159051b88631ec9cb22f22207bf23b39c75125bcfcad3 SHA512 40ec426152ef20ff3d4e23043d9ab178a924a2dca3586fd2dfddf5477612246024222b50e62e6f356649c0d035fd202da89e974acf345db6e5c807883dbb86c5
DIST hy-0.14.0.tar.gz 403692 BLAKE2B 4d20574151c443e002e365bceecc11b2bdcd7aa294073c58cba4ec8a958534c9f1256848ef57e4d5dd3ec345decaa53db43768a78af542ba8a59ff50489486b1 SHA512 a04da48592058b8ad3e7d2a787149622bfcf61c01a341ccc166c2e25e18ed7616b6567b529cf4f6d80a9cecf44aac175577ebf185c77e941a11a258f8563da9e
DIST hy-0.15.0.tar.gz 411900 BLAKE2B 88a7500ecebacd7995aba1efbabead22ce656b1d6e275c5c726ce9b27746729344adfd35f2dfb4247c6d41101317eecfd98e0379e84f88ffea85bfaef2101797 SHA512 d4a08c7df494c5f9ae9a48e51b642cf8c30850209765fb80304132b57fb1133a839c82945662550d1417f4cae4e15f25da388be180143ed7b28fe8d5129844cc
DIST hy-0.16.0.tar.gz 434727 BLAKE2B 05c490049355b496901aea70449e9c30a414bcdd7a5d4a430a672d424eeaa20845d58fd6967433058d4ab6b2969d5744bfdf5dd9cfe976888aeeb35d36a98f91 SHA512 ee9555a58a52bd894904fb0c4892a5c3f0a02b5ab45107ce6ed028840251cc8bd0b1c6264f0f1a345a63352c662861cf3b94049fd58f374dd2ca706ee89c2a4c

@ -0,0 +1,45 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
RESTRICT="test" # needs some pointy sticks. Seriously.
PYTHON_COMPAT=(python{2_7,3_5,3_6})
inherit distutils-r1 eutils
DESCRIPTION="A LISP dialect running in python"
HOMEPAGE="http://hylang.org/"
SRC_URI="https://github.com/hylang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test doc"
RDEPEND=">=dev-python/astor-0.7.1[${PYTHON_USEDEP}]
>=dev-python/clint-0.4[${PYTHON_USEDEP}]
dev-python/flake8[${PYTHON_USEDEP}]
>=dev-python/funcparserlib-0.3.6[${PYTHON_USEDEP}]
>=dev-python/rply-0.7.6[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
test? (
dev-python/nose[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
)"
PATCHES=( "${FILESDIR}"/${PN}-0.15.0-do-not-install-get_version.py.patch )
src_prepare() {
default
use doc && HTML_DOCS=( docs/_build/html/. )
}
python_compile_all() {
use doc && emake docs
}
python_test() {
nosetests -vv || die "Tests failed under ${EPYTHON}"
}

@ -5,4 +5,8 @@
<email>tamiko@gentoo.org</email>
<name>Matthias Maier</name>
</maintainer>
<maintainer type="person">
<email>slyfox@gentoo.org</email>
<name>Sergei Trofimovich</name>
</maintainer>
</pkgmetadata>

@ -17,7 +17,7 @@ SRC_URI="https://dev.gentoo.org/~axs/distfiles/${MY_P}.tar.bz2
LICENSE="NPL-1.1"
SLOT="60"
KEYWORDS="alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
KEYWORDS="alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
IUSE="debug +jit minimal +system-icu test"
RESTRICT="ia64? ( test )"

Binary file not shown.

@ -1,115 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_5,3_6} )
CMAKE_BUILD_TYPE="Release"
inherit python-any-r1 cmake-multilib flag-o-matic llvm toolchain-funcs
DESCRIPTION="OpenCL implementation for Intel GPUs"
HOMEPAGE="https://01.org/beignet https://gitlab.freedesktop.org/beignet/beignet"
LICENSE="LGPL-2.1+"
SLOT="0"
IUSE="ocl-icd ocl20"
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.freedesktop.org/beignet/beignet.git"
KEYWORDS=""
else
KEYWORDS="~amd64"
SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
S=${WORKDIR}/Beignet-${PV}-Source
fi
COMMON="app-eselect/eselect-opencl
media-libs/mesa[${MULTILIB_USEDEP}]
<sys-devel/clang-6.0.9999:=[${MULTILIB_USEDEP}]
>=x11-libs/libdrm-2.4.70[video_cards_intel,${MULTILIB_USEDEP}]
x11-libs/libXext[${MULTILIB_USEDEP}]
x11-libs/libXfixes[${MULTILIB_USEDEP}]
ocl-icd? ( dev-libs/ocl-icd )"
RDEPEND="${COMMON}"
DEPEND="${COMMON}
${PYTHON_DEPS}
virtual/pkgconfig"
LLVM_MAX_SLOT=6
PATCHES=(
"${FILESDIR}"/no-debian-multiarch.patch
"${FILESDIR}"/${PN}-1.3.2_disable-doNegAddOptimization.patch
"${FILESDIR}"/${PN}-1.3.2_cmake-llvm-config-multilib.patch
"${FILESDIR}"/${PN}-1.3.2_llvm6.patch
"${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
"${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
"${FILESDIR}"/llvm-terminfo.patch
)
DOCS=(
docs/.
)
pkg_pretend() {
if [[ ${MERGE_TYPE} != "binary" ]]; then
if tc-is-gcc; then
if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
eerror "Compilation with gcc older than 4.6 is not supported"
die "Too old gcc found."
fi
fi
fi
}
pkg_setup() {
llvm_pkg_setup
python_setup
}
src_prepare() {
# See Bug #593968
append-flags -fPIC
cmake-utils_src_prepare
# We cannot run tests because they require permissions to access
# the hardware, and building them is very time-consuming.
cmake_comment_add_subdirectory utests
}
multilib_src_configure() {
VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX="${EPREFIX}${VENDOR_DIR}"
-DOCLICD_COMPAT=$(usex ocl-icd)
$(usex ocl20 "" "-DENABLE_OPENCL_20=OFF")
)
cmake-utils_src_configure
}
multilib_src_install() {
VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
cmake-utils_src_install
insinto /etc/OpenCL/vendors/
echo "${EPREFIX}${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
doins "${PN}-${ABI}.icd"
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
}
pkg_postinst() {
if use ocl-icd; then
"${ROOT}"/usr/bin/eselect opencl set --use-old ocl-icd
else
"${ROOT}"/usr/bin/eselect opencl set --use-old beignet
fi
}

@ -14,7 +14,7 @@ SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64"
KEYWORDS="amd64"
IUSE="ocl-icd ocl20"
BDEPEND="${PYTHON_DEPS}

@ -1,105 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_5,3_6} )
CMAKE_BUILD_TYPE="Release"
inherit python-any-r1 cmake-multilib flag-o-matic llvm toolchain-funcs
DESCRIPTION="OpenCL implementation for Intel GPUs"
HOMEPAGE="https://01.org/beignet https://gitlab.freedesktop.org/beignet/beignet"
LICENSE="LGPL-2.1+"
SLOT="0"
IUSE="ocl-icd ocl20"
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.freedesktop.org/beignet/beignet.git"
KEYWORDS="amd64"
else
KEYWORDS="amd64"
SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
S=${WORKDIR}/Beignet-${PV}-Source
fi
COMMON="media-libs/mesa[${MULTILIB_USEDEP}]
<sys-devel/clang-6.0.0:=[${MULTILIB_USEDEP}]
>=x11-libs/libdrm-2.4.70[video_cards_intel,${MULTILIB_USEDEP}]
x11-libs/libXext[${MULTILIB_USEDEP}]
x11-libs/libXfixes[${MULTILIB_USEDEP}]"
RDEPEND="${COMMON}
app-eselect/eselect-opencl"
DEPEND="${COMMON}
${PYTHON_DEPS}
ocl-icd? ( dev-libs/ocl-icd )
virtual/pkgconfig"
LLVM_MAX_SLOT=5
PATCHES=(
"${FILESDIR}"/no-debian-multiarch.patch
"${FILESDIR}"/${PN}-1.3.2_cmake-llvm-config-multilib.patch
"${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
"${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
"${FILESDIR}"/llvm-terminfo.patch
)
DOCS=(
docs/.
)
pkg_pretend() {
if [[ ${MERGE_TYPE} != "binary" ]]; then
if tc-is-gcc; then
if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
eerror "Compilation with gcc older than 4.6 is not supported"
die "Too old gcc found."
fi
fi
fi
}
pkg_setup() {
llvm_pkg_setup
python_setup
}
src_prepare() {
# See Bug #593968
append-flags -fPIC
cmake-utils_src_prepare
# We cannot run tests because they require permissions to access
# the hardware, and building them is very time-consuming.
cmake_comment_add_subdirectory utests
}
multilib_src_configure() {
VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX="${VENDOR_DIR}"
-DOCLICD_COMPAT=$(usex ocl-icd)
$(usex ocl20 "" "-DENABLE_OPENCL_20=OFF")
)
cmake-utils_src_configure
}
multilib_src_install() {
VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
cmake-utils_src_install
insinto /etc/OpenCL/vendors/
echo "${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
doins "${PN}-${ABI}.icd"
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
}

@ -11,7 +11,7 @@ SRC_URI="https://untroubled.org/bglibs/archive/${P}.tar.gz"
LICENSE="LGPL-2.1+"
SLOT="0/2"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~hppa ~mips ppc ~ppc64 ~sparc ~x86"
IUSE="doc"
RDEPEND=""

@ -1 +1,2 @@
DIST expat-2.2.6.tar.bz2 513322 BLAKE2B 386736da1f2204fa8f15ee4d1b3d11f01ed691efe6951b9f24f2bd30ab5494e75da6a97ceb1ffe4a0a8ecdc80f96f51d21c54f35a2cbc352a9fe9425545bf15b SHA512 dbfb635a5fe7b190722664263a0dd437b512fdf519bc53bd4905567f4bfb4b1e89a021562da63df8cacd48b706d1dea60ccde47f279e57400ad3c846b6e9c4e6
DIST expat-2.2.7.tar.xz 424264 BLAKE2B acf2fa5cf374a671603f4a12b81239ba3b1634bab66d736e87fb516ce52d599711b3014218bef822640781b8852c7238b6f071b5bd439a13838fcbc7767d06a7 SHA512 bf3af5b5a8e1a1b76658a41f67dbe7b10104e3b724e1882f529fecc509b07c75dde02d8f8b89b1522e05484e8dc417d47651c5f8d4aac1749676ba5c4752c107

@ -0,0 +1,96 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools eutils libtool multilib toolchain-funcs multilib-minimal
DESCRIPTION="Stream-oriented XML parser library"
HOMEPAGE="https://libexpat.github.io/"
SRC_URI="https://github.com/libexpat/libexpat/releases/download/R_${PV//\./_}/expat-${PV}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~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 ~x86-winnt"
IUSE="elibc_FreeBSD examples static-libs unicode"
DEPEND="unicode? ( ${AUTOTOOLS_DEPEND} )"
RDEPEND=""
DOCS=( README.md )
src_prepare() {
default
# fix interpreter to be a recent/good shell
sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
if use unicode; then
cp -R "${S}" "${S}"w || die
pushd "${S}"w >/dev/null
find -name Makefile.am \
-exec sed \
-e 's,libexpat\.la,libexpatw.la,' \
-e 's,libexpat_la,libexpatw_la,' \
-i {} + || die
eautoreconf
popd >/dev/null
fi
}
multilib_src_configure() {
local myconf="$(use_enable static-libs static) --without-docbook"
mkdir -p "${BUILD_DIR}"w || die
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}"w econf ${myconf}
popd >/dev/null
fi
ECONF_SOURCE="${S}" econf ${myconf}
}
multilib_src_compile() {
emake
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
emake -C lib
popd >/dev/null
fi
}
multilib_src_install() {
emake install DESTDIR="${D}"
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
emake -C lib install DESTDIR="${D}"
popd >/dev/null
pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
cp expat.pc expatw.pc
sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
popd >/dev/null
fi
if multilib_is_native_abi ; then
# libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
# we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
use elibc_FreeBSD && gen_usr_ldscript -a expat
fi
}
multilib_src_install_all() {
einstalldocs
# Note: Use of HTML_DOCS would add unwanted "doc" subfolder
docinto html
dodoc doc/*.{css,html,png}
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins examples/*.c
fi
find "${D}" -name '*.la' -type f -delete || die
}

@ -1,2 +1,3 @@
DIST libfilezilla-0.15.1.tar.bz2 404746 BLAKE2B 644f4b8949670d5b07f9e7b861d388ce70eae6612e34bf938cb628b65724a527e33c1f039087fd8381c06a15c12cc2b4fc6f616cc5949bf325e2eebf41abdf2d SHA512 d557f7636bfc3958b8558fab3384b0ea84caea594566d39c051f20f02dfd71213369c50df282a3f7d2dd757038bd26e9722214839dab965cb7cde9733d59883a
DIST libfilezilla-0.16.0.tar.bz2 413535 BLAKE2B ea6ce80e272efea3fcef2fbd1f0ecca1248c314eea49631b4a98d257cfe1ebe505de011c021874ab0158883077d0af61929689ffb2b92528ef50502d84c933a7 SHA512 ea3302ae0c51582d6715fa3dd06d330a2ac820c3229b4dcab4a3470021dba667b6aea1a5b13168d720d7218cc8513e40c97990ed6573d0ea46d76e6ef50c2e6e
DIST libfilezilla-0.17.0.tar.bz2 516570 BLAKE2B 133c40f40f0439f3b9610549cb83966621e81beeb699731d35a145792689c453e21c110f39e4257c536f34f770f01a89ecc510079f470a36405ba390153d606c SHA512 4bd61a7eacfaf38f6cf0ecf099629febe8a31d7db3fccd3779b73eb9d13823d929b3db09b83e03410867f8bd3e1adf94683ad51c8b4a52fda63e0433d04c6f9f

@ -0,0 +1,29 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic
DESCRIPTION="C++ library offering some basic functionality for platform-independent programs"
HOMEPAGE="https://lib.filezilla-project.org/"
SRC_URI="https://download.filezilla-project.org/${PN}/${P}.tar.bz2"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~x86"
IUSE="test"
RDEPEND="dev-libs/nettle:0="
DEPEND="${RDEPEND}
test? ( dev-util/cppunit )"
pkg_pretend() {
if [[ ${MERGE_TYPE} != binary ]]; then
if ! test-flag-CXX -std=c++14; then
eerror "${P} requires C++14-capable C++ compiler. Your current compiler"
eerror "does not seem to support -std=c++14 option. Please upgrade your compiler"
eerror "to gcc-4.9 or an equivalent version supporting C++14."
die "Currently active compiler does not support -std=c++14"
fi
fi
}

@ -14,7 +14,7 @@ if [[ ${PV} == "9999" ]]; then
inherit git-r3
else
SRC_URI="https://github.com/edenhill/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 hppa ~ppc x86"
KEYWORDS="amd64 ~arm ~arm64 hppa ~ppc x86"
fi
LICENSE="BSD-2"

@ -15,7 +15,7 @@ LICENSE="GPL-3+ doc? ( FDL-1.3 )"
# subslot = soname version
SLOT="0/0.5.0"
KEYWORDS="~amd64 ~arm ~arm64 hppa ~sparc x86"
KEYWORDS="amd64 ~arm ~arm64 hppa ~sparc x86"
IUSE="debug doc +ssl +gnutls libressl openssl static-libs test"
REQUIRED_USE="ssl? ( ^^ ( gnutls openssl ) )"

@ -13,7 +13,7 @@ SRC_URI="https://github.com/kkos/${PN}/releases/download/v${PV}/${MY_P}.tar.gz"
LICENSE="BSD-2"
SLOT="0/5"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
IUSE="crnl-as-line-terminator static-libs"
S="${WORKDIR}/${MY_P}"

@ -24,7 +24,7 @@ fi
LICENSE="BSD"
SLOT="0/18"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"

Binary file not shown.

@ -1,2 +1,3 @@
DIST aiorpcX-0.10.2.tar.gz 23312 BLAKE2B 62d04099ae272369f29dea3a34a13b4b5cd6052764f2efee1f4a461b8ab52616e0cf69dde47a6f48c60827b3580d35bc39c87371d581a4a95147f5a5691e5111 SHA512 ebdc312c1c8d27382ca02ba6de5a316332b09bfba19399f9a4c3ef603a5d96becdfbed5c360d73aa64b41ecc5b0c3638822b0a5e49fd54c339b601c20add44ea
DIST aiorpcX-0.17.0.tar.gz 26346 BLAKE2B 0e60b66dec1ebcabca62e95688761b022a0f2a1062a3bb63c69def67687eb5bfb95d8c671b18ac4990248d7de17b049a7135398e80d23dc9154aaa4c7b17c2d1 SHA512 80731b683e16ad65da71981f81a606647cf3159429db2c37b27b6dc21c2f659fc92d0d0352109e377c2f381a373b9b20eeb0dda0bafe6be482dcf5c10d3bfcb6
DIST aiorpcX-0.18.3.tar.gz 27464 BLAKE2B 38a59a6352a4c9bc561f75ecdfb0adc87fe82ad8e05622e67903d6e6e3c225647e75cb7a516005840d008f193288a5dea09042e2091a576be108b735fbbe1446 SHA512 982258fb35c1a4b09def64e2729ac5bab528185963ca0f73571d4a36be2aebadd69e607161462b9c5e07ff3b09fa071949432405a32832d438e07103fa1a8636

@ -0,0 +1,26 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python{3_6,3_7} )
inherit distutils-r1
DESCRIPTION="Generic async RPC implementation, including JSON-RPC"
HOMEPAGE="https://pypi.org/project/aiorpcX/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="
>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
"
DOCS=( README.rst )

@ -1,2 +1 @@
DIST gst-python-0.10.22.tar.bz2 632651 BLAKE2B 17c139c2b5514a7a5e4c2351109418a2ed1bcda149e83c0e940dd09619225fa0930bba5f5d42d3c03f5f8567f3c90454b47a51513d609a36887efedcae8ab482 SHA512 bbbd6b661778cca990da0e216294d86da31a6e472049905989a3311459dd1227bf8f2ae3699a3cdbb66a16288569764352f1e1b93e696d3db4b0728bc38e5b12
DIST gst-python-1.14.1.tar.xz 405312 BLAKE2B 29be6f79b20a27e0d21f27cbf29b1881216e412c3c4ea016f3ee6bd921ec7b73139f74a20528f7f704526786347b065d246940f152d61a64e4eb926dbb44bb87 SHA512 32537e6556b69d00cb0b467239c148c0b9c282b76786be395e053a30554b84aea7c22e7fe6fc6faf77b35fca82fb799df4f52c114b282d0a6ea660f67dc40c53

@ -1,21 +0,0 @@
diff -ur gst-python-0.10.9.orig/configure.ac gst-python-0.10.9/configure.ac
--- gst-python-0.10.9.orig/configure.ac 2007-11-28 11:33:05.000000000 +0200
+++ gst-python-0.10.9/configure.ac 2007-11-28 18:09:48.000000000 +0200
@@ -363,6 +363,17 @@
AG_GST_VALGRIND_CHECK
+AC_MSG_CHECKING([whether $LD accepts -z,lazy])
+case `$LD -z,lazy -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ LDFLAGS="$LDFLAGS -Wl,-z,lazy"
+ AC_MSG_RESULT([yes])
+ ;;
+*)
+ AC_MSG_RESULT([no])
+ ;;
+esac
+
AC_OUTPUT([
Makefile
codegen/Makefile

@ -1,88 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
PYTHON_COMPAT=( python2_7 )
inherit autotools eutils python-r1 virtualx
DESCRIPTION="A Python Interface to GStreamer"
HOMEPAGE="https://gstreamer.freedesktop.org/"
SRC_URI="https://gstreamer.freedesktop.org/src/${PN}/${P}.tar.bz2"
LICENSE="LGPL-2"
SLOT="0.10"
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
IUSE="examples test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
dev-libs/libxml2
>=dev-python/pygobject-2.28:2[${PYTHON_USEDEP}]
>=media-libs/gstreamer-0.10.32:0.10
>=media-libs/gst-plugins-base-0.10.32:0.10
"
DEPEND="${RDEPEND}
virtual/pkgconfig
test? (
media-plugins/gst-plugins-ogg:0.10
!!media-plugins/gst-plugins-ivorbis:0.10
media-plugins/gst-plugins-vorbis:0.10
)" # tests a "audiotestsrc ! vorbisenc ! oggmux ! fakesink" pipeline
# XXX: it looks like tests cannot be bothered with two vorbisdec implementations
src_prepare() {
# FIXME: this comments out the only failing test, report to upstream
sed -e '171,176 s/^\(.*\)$/#\1/' \
-i testsuite/test_bin.py || die
# Leave examples alone
sed -e 's/\(SUBDIRS = .*\)examples/\1/' \
-i Makefile.am Makefile.in || die
sed \
-e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' \
-i configure.ac || die
epatch "${FILESDIR}"/${PN}-0.10.9-lazy.patch
AT_M4DIR="common/m4" eautoreconf
prepare_gst() {
mkdir -p "${BUILD_DIR}" || die
}
python_foreach_impl prepare_gst
}
src_configure() {
configure_gst() {
ECONF_SOURCE="${S}" econf
}
python_foreach_impl run_in_build_dir configure_gst
}
src_compile() {
python_foreach_impl run_in_build_dir default
}
src_test() {
LC_ALL="C" GST_REGISTRY="${T}/registry.cache.xml" python_foreach_impl run_in_build_dir Xemake check
}
src_install() {
python_foreach_impl run_in_build_dir default
prune_libtool_files --modules
dodoc AUTHORS ChangeLog NEWS README TODO
if use examples; then
docinto examples
dodoc examples/*
fi
}
run_in_build_dir() {
pushd "${BUILD_DIR}" > /dev/null || die
"$@"
popd > /dev/null
}

@ -1,3 +1 @@
DIST M2Crypto-0.24.0.tar.gz 184457 BLAKE2B 15a11dc1b13359041875e8321d0159a1a393b7f85dfbd38d650721d8a2eaed2cc2199859c3e1e3c890033711e0b137f4c78b90f04681ff44a3356558b9f55aea SHA512 c23ae0f8ac790d4ef108a217a44e994341f6bbe4e12a7fef2518d8def82331246a145e19a2504b82b790a3ad4b467d2facc8a73bb7f1190b56441d8482c66aca
DIST M2Crypto-0.27.0.tar.gz 1119288 BLAKE2B 90e227aef9a5b4c7f5ab9bd62fbe506ea0931a6c338c530adbeb1a8303a31cc7755d13003532fe0ee4005f1997db23bed2d03cd54224dc7d89a6f23882197800 SHA512 df0f6b16f7d00a19fafbb5da5a3ececff6b4627accd00ca65e0d6f9e752a97f41016d0072c8e681475fe1d87c89b7474067068c0bfce6c68a30baddeb31bfac2
DIST M2Crypto-0.31.0.tar.gz 1292016 BLAKE2B 3f1e0e8f686719ff87fa3a51cdc287be989fa1554866582deb1968fd04605270e14cbfd280f64211c043c5d8cb77a09e6a8cec6824ab15416ab94366aa73d2a3 SHA512 9f3e2afda4b8ac14aa64a1534e446eb6895ec7182ce5b7ded8008178e01139d383561a87f8c9fb5fe4b9c257ba5c6b93339955eb9e2f7417cd3f4832c35c4598

@ -1,154 +0,0 @@
--- a/SWIG/_bio.i
+++ b/SWIG/_bio.i
@@ -63,14 +63,14 @@ extern BIO *BIO_pop(BIO *);
static PyObject *_bio_err;
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
void pyfd_init(void);
#endif
void bio_init(PyObject *bio_err) {
Py_INCREF(bio_err);
_bio_err = bio_err;
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
pyfd_init();
#endif
}
@@ -299,7 +299,7 @@ int bio_should_write(BIO* a) {
return BIO_should_write(a);
}
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
/* implment custom BIO_s_pyfd */
#ifdef WIN32
--- a/SWIG/_evp.i
+++ b/SWIG/_evp.i
@@ -19,7 +19,7 @@ Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved.
#include <openssl/rsa.h>
#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
HMAC_CTX *HMAC_CTX_new(void) {
HMAC_CTX *ret = PyMem_Malloc(sizeof(HMAC_CTX));
--- a/SWIG/_lib.i
+++ b/SWIG/_lib.i
@@ -18,7 +18,7 @@
%{
/* OpenSSL 1.0.2 copmatbility shim */
-#if OPENSSL_VERSION_NUMBER < 0x10002000L
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
typedef void (*OPENSSL_sk_freefunc)(void *);
typedef void *(*OPENSSL_sk_copyfunc)(const void *);
typedef struct stack_st OPENSSL_STACK;
@@ -501,7 +501,7 @@ int passphrase_callback(char *buf, int num, int v, void *arg) {
%inline %{
void lib_init() {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
SSLeay_add_all_algorithms();
ERR_load_ERR_strings();
#endif
--- a/SWIG/_lib11_compat.i
+++ b/SWIG/_lib11_compat.i
@@ -8,7 +8,7 @@
*/
%{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#include <string.h>
#include <openssl/engine.h>
--- a/SWIG/_ssl.i
+++ b/SWIG/_ssl.i
@@ -268,7 +268,7 @@ void ssl_init(PyObject *ssl_err, PyObject *ssl_timeout_err) {
#ifndef OPENSSL_NO_SSL3
const SSL_METHOD *sslv3_method(void) {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
PyErr_WarnEx(PyExc_DeprecationWarning,
"Function SSLv3_method has been deprecated.", 1);
#endif
@@ -277,7 +277,7 @@ const SSL_METHOD *sslv3_method(void) {
#endif
const SSL_METHOD *tlsv1_method(void) {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
PyErr_WarnEx(PyExc_DeprecationWarning,
"Function TLSv1_method has been deprecated.", 1);
#endif
--- a/SWIG/_threads.i
+++ b/SWIG/_threads.i
@@ -5,7 +5,7 @@
#include <pythread.h>
#include <openssl/crypto.h>
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define CRYPTO_num_locks() (CRYPTO_NUM_LOCKS)
static PyThread_type_lock lock_cs[CRYPTO_num_locks()];
static long lock_count[CRYPTO_num_locks()];
@@ -13,7 +13,7 @@ static int thread_mode = 0;
#endif
void threading_locking_callback(int mode, int type, const char *file, int line) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
if (mode & CRYPTO_LOCK) {
PyThread_acquire_lock(lock_cs[type], WAIT_LOCK);
lock_count[type]++;
@@ -25,7 +25,7 @@ void threading_locking_callback(int mode, int type, const char *file, int line)
}
unsigned long threading_id_callback(void) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
return (unsigned long)PyThread_get_thread_ident();
#else
return (unsigned long)0;
@@ -35,7 +35,7 @@ unsigned long threading_id_callback(void) {
%inline %{
void threading_init(void) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
int i;
if (!thread_mode) {
for (i=0; i<CRYPTO_num_locks(); i++) {
@@ -50,7 +50,7 @@ void threading_init(void) {
}
void threading_cleanup(void) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
int i;
if (thread_mode) {
CRYPTO_set_locking_callback(NULL);
--- a/SWIG/libcrypto-compat.h
+++ b/SWIG/libcrypto-compat.h
@@ -1,7 +1,7 @@
#ifndef LIBCRYPTO_COMPAT_H
#define LIBCRYPTO_COMPAT_H
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#include <openssl/rsa.h>
#include <openssl/dsa.h>

@ -1,38 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
MY_PN="M2Crypto"
DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit"
HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="libressl"
RDEPEND="
!libressl? ( >=dev-libs/openssl-0.9.8:0= )
libressl? ( dev-libs/libressl:= )
"
DEPEND="${RDEPEND}
>=dev-lang/swig-1.3.28:0
dev-python/setuptools[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"
# Tests access network, and fail randomly. Bug #431458.
RESTRICT=test
python_test() {
esetup.py test
}

@ -1,56 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
MY_PN="M2Crypto"
DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit"
HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="libressl"
RDEPEND="
!libressl? ( >=dev-libs/openssl-0.9.8:0=[-bindist(-)] )
libressl? ( dev-libs/libressl:0= )
virtual/python-typing[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
>=dev-lang/swig-1.3.28:0
dev-python/setuptools[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"
# Tests access network, and fail randomly. Bug #431458.
RESTRICT=test
PATCHES=(
"${FILESDIR}/${PN}-libressl-version-check.patch"
)
python_compile() {
# setup.py looks at platform.machine() to determine swig options.
# For exotic ABIs, we need to give swig a hint.
# https://bugs.gentoo.org/617946
# TODO: Fix cross-compiles
local -x SWIG_FEATURES=
case ${ABI} in
x32) SWIG_FEATURES="-D__ILP32__" ;;
esac
distutils-r1_python_compile --openssl="${EPREFIX}"/usr
}
python_test() {
esetup.py test
}

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

Loading…
Cancel
Save