Sync with portage [Sat Aug 14 19:58:14 MSK 2021].

akrasnyh
root 3 years ago
parent 40c06639b1
commit c314fd5246

Binary file not shown.

Binary file not shown.

@ -3,4 +3,5 @@ DIST awscli-1.20.15.tar.gz 2048948 BLAKE2B e7d378c9cb1752f4b7e014578d07fdc5f7bd9
DIST awscli-1.20.18.tar.gz 2054961 BLAKE2B 0045a45638a6d4b24b876c3fa984ab8cb33eaa18bf1b8f3ceb8eb4faaffcdf3daacd141cfb4b96c56ab406c00742d823d2b772978d4a2f79b2f06a90c45411b3 SHA512 24292e57fdc4b95bd79c31fe153ba8dc1869bda842fe9e9d4b66d2bd8e0354e279d95f0dc4d656a359f58fef3a7e76c17ec80398c1f516339af2d27ac88c9b38
DIST awscli-1.20.19.tar.gz 2055440 BLAKE2B 1f56bcc70a6c479a4a939f3eb8ab24bdc6b5b6d5220c35a4f8be04d97dc0d181716398fe6733ed1364ed700f53096195163f85f3ffb467f9edbfe37530efabcd SHA512 7f65593fe89c66cc20c5fa27f8301e5ad6db40b519ed054b052dd2023a32bfe0409c5d309480a7e4b82e70dcc200bac253414d19c4b5e54adaaf02204bfaf7b4
DIST awscli-1.20.20.tar.gz 2055487 BLAKE2B 4478c2f5c4db5a1bcc78ee8a3a38ff8c6bfdfda80ada0dd3014739ea0132eca6027f8950fc1da52774a333d6423a186ee15932971569025ec04051470f461acc SHA512 b0c92801b8d95c59579559336cc96c6c75b74023e7e9ebb0d0fe65ccb6db2a9a97afd28d6ffb5992dc293841a345cfba474f19b5292cb70a7f6929596713d598
DIST awscli-1.20.21.tar.gz 2055227 BLAKE2B 6448527363ca25f039fa9e461bf5f6451e2ecb308a29b3b62c2303d756476c45f60b5356bf32894d780deb8d9e459d83e2520ce09f5ea5f3b1e9435f8180d4ce SHA512 58b9323b8bdb07bd48814cf11fc03f9c4ffda01d1d0c85d4a77425ca37848a2cb3a6222b12c31e5897b348ef265cc94d842d9fd6b4a66bb3cfc8b37b038361cf
DIST awscli-1.20.7.tar.gz 2045304 BLAKE2B d8f086d8d2eb36645e77fa3d9ae7c196ed3a3fddcc2a0218696f92bd69e10b453be1340b965a8d8e6697bbd3c45013d72de3ed0d31b5823515a5a0092a812858 SHA512 a41bd3ebc34a65add66ef95d5194ba07907a08f7368b0fcd6551af2070c46c4a509af47d30aeadabddce19d1a61200a58faf40a7e2f759e64915cfb2826666ab

@ -0,0 +1,58 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{8..10} )
inherit bash-completion-r1 distutils-r1
DESCRIPTION="Universal Command Line Environment for AWS"
HOMEPAGE="https://pypi.org/project/awscli/"
#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/aws-cli-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
# botocore is x.(y+1).z
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)"
RDEPEND="
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
dev-python/colorama[${PYTHON_USEDEP}]
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/rsa[${PYTHON_USEDEP}]
>=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/mock[${PYTHON_USEDEP}]
)
"
distutils_enable_tests --install nose
PATCHES=(
"${FILESDIR}"/awscli-1.19.47-py39.patch
)
python_test() {
distutils_install_for_testing
# integration tests require AWS credentials and Internet access
nosetests -v tests/{functional,unit} ||
die "Tests failed for ${EPYTHON}"
}
python_install_all() {
newbashcomp bin/aws_bash_completer aws
insinto /usr/share/zsh/site-functions
newins bin/aws_zsh_completer.sh _aws
distutils-r1_python_install_all
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
}

Binary file not shown.

@ -1,14 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>arthurzam+gentoo@gmail.com</email>
<maintainer type="person">
<email>arthurzam@gentoo.org</email>
<name>Arthur Zamarin</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<remote-id type="sourceforge">cdw</remote-id>
</upstream>

Binary file not shown.

@ -1 +0,0 @@
DIST cardpeek-0.8.4.tar.gz 1520613 BLAKE2B f31a0298ab8423b384b0ad62abb0599da75fd968385e9e6c9a5982e6fbaf7bec8a6098e3e7a5c30ce6634c65e05db084772f4a33c7ef5d6fdcdee0022cc56b86 SHA512 f6eebc7a17f270dd56529ee36815fee72b2f9d62b24d6cc90060f20c7604b9b99ab76858d9c04c60aaec838b02b8db76476a91ee22a4e10f01f852cd1f536efb

@ -1,26 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
LUA_COMPAT=( lua5-2 )
inherit lua-single xdg
DESCRIPTION="Tool to read the contents of smartcards"
HOMEPAGE="http://pannetrat.com/Cardpeek"
SRC_URI="http://downloads.pannetrat.com/install/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
REQUIRED_USE="${LUA_REQUIRED_USE}"
RDEPEND="${LUA_DEPS}
sys-apps/pcsc-lite
x11-libs/gtk+:3
net-misc/curl
dev-libs/openssl:0="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>

@ -1,4 +1,5 @@
DIST gnupg-2.2.16-scdaemon_shared-access.patch 2586 BLAKE2B 42fd5482c4e86751ce62836125997c2295c44bc5db0671a06460fd306b2ed93f290fb898fc1b1e463a863eddf9ab5f99ea3c90a55499ef45ca1ed6edf2854663 SHA512 38abaa4200114ae6b6f220fabc0a84a056761949c97bd0564557f4411a299b9a1939893555c27e26da2d8e8da4bc97a298fa7e68f1e80fe99c3f88cc329eaa84
DIST gnupg-2.2.27.tar.bz2 7191555 BLAKE2B d652aad382cf07cc458b29ff82718edd47457d8236dcbeee51f22d88503be141f009e9ea45b6dafe614115d9558fe371509579e58ce17a5f04540a31aa406ea3 SHA512 cf336962116c9c08ac80b1299654b94948033ef51d6d5e7f54c2f07bbf7d92c7b0bddb606ceee2cdd837063f519b8d59af5a82816b840a0fc47d90c07b0e95ab
DIST gnupg-2.2.28.tar.bz2 7218833 BLAKE2B 61e90a39f4572f41da687c6a6983a897eec1784d60b6ff6579f895c07214d273ad2a25a1a5cb4c26210028afee32c58a8fb0752683a0ab9a5f8a73438492b80b SHA512 d79594fac93773639fc5b95cdfad1003829879e1bc9c415261bccfc64bd56cbeec5d8571d1468e4e3fd982c546e3b9cfc2161412d544717f48eabe3a360caae8
DIST gnupg-2.2.29.tar.bz2 7215986 BLAKE2B 04b777730b8fcbe8d93dfc8985aadd6bc7385ac2ac9684e6248cb3ae6d008daae5aa976ffa3bae27fe9e89bc2c4c1d4ae81dcaa259fb08d13f894f00f12072e9 SHA512 12645e230fc6aa4811420ef33def6baa590e847ecdf7e5f8b96eb49122e6406cbdba4595d0b52fa26700d5d5def67acb4ed7dfe7f778e496d4d21ccbef3c476b
DIST gnupg-2.3.1.tar.bz2 7570431 BLAKE2B f7c7d3246b0807798917ecd711c74ea7c52dd24530106765a1f4a6e9af098c9a99c5d0f44fc2c253d013b11f862fccf0b1630593d07b2e1950a91b3473c671c1 SHA512 d2cc82c1b47bbd79acd6ef787c01684fb084b1c5507bbca6cf7ca8834ed978ae7a44c01d652cc3afbd70e2906583c8701aebc8d9fd3fc5e0401769ad4cd46af1

@ -0,0 +1,152 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic systemd toolchain-funcs
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb user-socket wks-server"
# Existence of executables is checked during configuration.
DEPEND=">=dev-libs/libassuan-2.5.0
>=dev-libs/libgcrypt-1.8.0
>=dev-libs/libgpg-error-1.29
>=dev-libs/libksba-1.3.4
>=dev-libs/npth-1.2
>=net-misc/curl-7.10
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap )
readline? ( sys-libs/readline:0= )
smartcard? ( usb? ( virtual/libusb:1 ) )
ssl? ( >=net-libs/gnutls-3.0:0= )
sys-libs/zlib
tofu? ( >=dev-db/sqlite-3.7 )"
RDEPEND="${DEPEND}
app-crypt/pinentry
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )"
BDEPEND="virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )"
S="${WORKDIR}/${MY_P}"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
)
src_prepare() {
default
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i doc/examples/systemd-user/gpg-agent-ssh.socket || die
}
src_configure() {
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable tofu)
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-all-tests
--enable-gpg
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config"
LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config"
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config"
NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0"
fi
#bug 663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
[[ ${CC} == *clang ]] && \
export gl_cv_absolute_stdint_h=/usr/include/stdint.h
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
econf "${myconf[@]}"
}
src_compile() {
default
use doc && emake -C doc html
}
src_test() {
#Bug: 638574
use tofu && export TESTFLAGS=--parallel
default
}
src_install() {
default
use tools &&
dobin \
tools/{convert-from-106,gpg-check-pattern} \
tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
tools/make-dns-cert
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/* doc/*.png
systemd_douserunit doc/examples/systemd-user/*.{service,socket}
}

Binary file not shown.

@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/${PN%-*}/${MY_P}.tar.gz"
LICENSE="ipadic"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 sparc x86"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="unicode"
DEPEND="app-text/mecab[unicode=]"

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge.jp/${PN#*-}/53500/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="~amd64 ~riscv ~x86"
IUSE="unicode"
DEPEND="app-text/mecab[unicode=]"

Binary file not shown.

@ -1,7 +1,6 @@
# -*-eselect-*- vim: ft=eselect
# Copyright 2005-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
# $Id: luajit.eselect mva $
inherit config multilib

Binary file not shown.

@ -0,0 +1 @@
DIST rogauracore-1.4.tar.gz 10305 BLAKE2B 27e94af50d318a3ce87f87236367aea72ee8daa2b0db896daeaa19bb75b6266faca2aca127d6444b759e6b7029c9f2eee1076ca4a197d70c4dfc2c611f5419ed SHA512 5179bfdfa8eeca5d7ac3ec87e4226429fa8d7987dc2d824a73a8a99142ceaf6fbda16f9844a62ecc8c629c44e334f940dff318bb3e2a3057c0bd1620d0f92c36

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>fordfrog@gentoo.org</email>
<description>Miroslav Šulc</description>
</maintainer>
<upstream>
<remote-id type="github">wroberts/rogauracore</remote-id>
<bugs-to>https://github.com/wroberts/rogauracore/issues</bugs-to>
</upstream>
</pkgmetadata>

@ -0,0 +1,35 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
if [[ ${PV} = "9999" ]]; then
EGIT_REPO_URI="https://github.com/wroberts/rogauracore.git"
inherit git-r3
else
SRC_URI="https://github.com/wroberts/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
DESCRIPTION="RGB keyboard control for Asus ROG laptops"
HOMEPAGE="https://github.com/wroberts/rogauracore"
LICENSE="MIT"
SLOT="0"
DEPEND="virtual/libusb:="
RDEPEND="${DEPEND}"
src_prepare() {
default
eautoreconf
}
src_configure() {
econf
}
src_compile() {
emake
}

@ -0,0 +1,35 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
if [[ ${PV} = "9999" ]]; then
EGIT_REPO_URI="https://github.com/wroberts/rogauracore.git"
inherit git-r3
else
SRC_URI="https://github.com/wroberts/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
DESCRIPTION="RGB keyboard control for Asus ROG laptops"
HOMEPAGE="https://github.com/wroberts/rogauracore"
LICENSE="MIT"
SLOT="0"
DEPEND="virtual/libusb:="
RDEPEND="${DEPEND}"
src_prepare() {
default
eautoreconf
}
src_configure() {
econf
}
src_compile() {
emake
}

Binary file not shown.

@ -21,6 +21,7 @@ DEPEND="
>=gnome-extra/evolution-data-server-3.33.2:=
>=gui-libs/libhandy-1.0.0:1=
dev-libs/libxml2:2
net-misc/curl
sys-apps/util-linux
>=net-libs/webkit-gtk-2.26:4
"
@ -38,7 +39,7 @@ BDEPEND="
src_configure() {
local emesonargs=(
-Dupdate_mimedb=false
-Dprivate_store=false # private store is mainly meant for flatpak builds
-Dprivate_store=false # private store gets automatically enabled with tracker3
)
meson_src_configure
}

@ -0,0 +1,17 @@
Remove linting test that is broken upstream.
Bug: https://bugs.gentoo.org/807205
--- piper-0.5.1/meson.build
+++ piper-0.5.1/meson.build
@@ -119,11 +119,3 @@
configuration: config_piper_devel)
meson.add_install_script('meson_install.sh')
-
-flake8 = find_program('flake8', required: false)
-if flake8.found()
- test('flake8', flake8,
- args: ['--ignore=E501,W504',
- join_paths(meson.source_root(), 'piper'),
- join_paths(meson.source_root(), 'piper.in')])
-endif

@ -40,6 +40,10 @@ DEPEND="
virtual/libudev
"
PATCHES=(
"${FILESDIR}"/${P}-disable-flake8-linting.patch
)
src_configure() {
python_setup
meson_src_configure

@ -1,2 +1,3 @@
DIST tracker-2.3.5.tar.xz 1604004 BLAKE2B ad79682cb703056fd927649021a5f37fddb2e978ecc710d020c23ef5dd076f88c7e0c2cd9d4385343e9d6c2c2ac7473af7508d86793c505e2361a8021bf27d50 SHA512 74cd3b2671b811f3267a516e6f6047594fffa7c8a4a23fa5be4f7d71f581c417a88f12f614757418a848077a9231c0c876617d4486f3bb5b103382b871913d34
DIST tracker-2.3.6.tar.xz 1606716 BLAKE2B ea39df4438e4502bc0229a5cc3b42a2fe6e13a643ac8e4034004b1291da49ff3ad1a177227035a4a02fd8f3723a735d37371c898bb03a6fc10573606a1c29d70 SHA512 1b8ae06b6c64a0cbe7d4c987bafe392fb38014215fc698f919273ba1f422dd0bc24344d3fd73164b00bfea315e527e2886ba90f1f1b86d5fceff24455b36d67e
DIST tracker-3.1.2.tar.xz 1429356 BLAKE2B 2401ee4d73aef29a40ff9c9f917fdf4709884bc26b7e8c5ae52b0e009bfd1934a122a78adea2fe6950480f4ccacb89d11388b4553bd4c0c68f5738118d34d3a1 SHA512 3c5feb658d7d3e35bcc61ef216e59b069df661d6f13de6f26e71da35bd0ca78878099d1ae507da82860d955954f971ab68d5a3b86a3132781c3f03a12dec1f0c

@ -0,0 +1,45 @@
From 29a6650f698bbd449e11fc0481269cd8f0593f27 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 10 Dec 2020 03:55:08 +0100
Subject: [PATCH] libtracker-data: Avoid deletion of empty rows in FTS table
Starting with SQLite 3.34.0, this turns into a consistency error. Ensure
rows being deleted have actually some content before proceeding to deletion,
and ensure we don't process individual properties one by one in the course
of a whole rdfs:Resource deletion.
Fixes: https://bugs.archlinux.org/task/68903
---
src/libtracker-data/tracker-data-update.c | 1 +
src/libtracker-data/tracker-db-interface-sqlite.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index e2f46685e..19cae25f9 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2244,6 +2244,7 @@ cache_delete_resource_type_full (TrackerData *data,
g_hash_table_size (data->resource_buffer->tables) == 0) {
#if HAVE_TRACKER_FTS
tracker_db_interface_sqlite_fts_delete_id (iface, data->resource_buffer->id);
+ data->resource_buffer->fts_updated = TRUE;
#endif
/* skip subclass query when deleting whole resource
to improve performance */
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c
index da88080ed..cdeb960e7 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -1770,7 +1770,8 @@ tracker_db_interface_sqlite_fts_create_delete_all_query (TrackerDBInterface *db_
g_string_append_printf (insert_str,
"INSERT INTO fts5 (fts5, rowid %s) "
"SELECT 'delete', rowid %s FROM fts_view "
- "WHERE rowid = ?",
+ "WHERE rowid = ? AND COALESCE(NULL %s) IS NOT NULL",
+ db_interface->fts_properties,
db_interface->fts_properties,
db_interface->fts_properties);
return g_string_free (insert_str, FALSE);
--
2.32.0

@ -0,0 +1,107 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
VALA_MIN_API_VERSION="0.40"
inherit bash-completion-r1 gnome.org gnome2-utils linux-info meson python-any-r1 systemd vala xdg
DESCRIPTION="A tagging metadata database, search tool and indexer"
HOMEPAGE="https://wiki.gnome.org/Projects/Tracker"
LICENSE="GPL-2+ LGPL-2.1+"
SLOT="0/2.0"
IUSE="gtk-doc +miners networkmanager stemmer"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
#RESTRICT="!test? ( test )"
PV_SERIES=$(ver_cut 1-2)
# In 2.2.0 util-linux should only be necessary if glib is older than 2.52 at compile-time
# But build still needs it - https://gitlab.gnome.org/GNOME/tracker/issues/131
RDEPEND="
>=dev-libs/glib-2.46:2
>=sys-apps/dbus-1.3.2
>=dev-libs/gobject-introspection-1.54:=
>=dev-libs/icu-4.8.1.2:=
>=dev-libs/json-glib-1.0
>=net-libs/libsoup-2.40.1:2.4
>=dev-libs/libxml2-2.7
>=dev-db/sqlite-3.20.0
networkmanager? ( >=net-misc/networkmanager-0.8 )
stemmer? ( dev-libs/snowball-stemmer )
sys-apps/util-linux
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-util/glib-utils
$(vala_depend)
gtk-doc? ( >=dev-util/gtk-doc-1.8
app-text/docbook-xml-dtd:4.1.2
app-text/docbook-xml-dtd:4.5 )
>=sys-devel/gettext-0.19.8
virtual/pkgconfig
${PYTHON_DEPS}
"
PDEPEND="miners? ( >=app-misc/tracker-miners-${PV_SERIES} )"
PATCHES=(
"${FILESDIR}"/${PV}-sqlite-3.34-compat.patch # From upstream tracker-2.3 branch
)
function inotify_enabled() {
if linux_config_exists; then
if ! linux_chkconfig_present INOTIFY_USER; then
ewarn "You should enable the INOTIFY support in your kernel."
ewarn "Check the 'Inotify support for userland' under the 'File systems'"
ewarn "option. It is marked as CONFIG_INOTIFY_USER in the config"
die 'missing CONFIG_INOTIFY'
fi
else
einfo "Could not check for INOTIFY support in your kernel."
fi
}
pkg_setup() {
linux-info_pkg_setup
inotify_enabled
python-any-r1_pkg_setup
}
src_prepare() {
xdg_src_prepare
vala_src_prepare
}
src_configure() {
local emesonargs=(
$(meson_use gtk-doc docs)
-Dfts=true
-Dfunctional_tests=false # many fail in 2.2; retry with 2.3
#$(meson_use test functional_tests)
-Dman=true
$(meson_feature networkmanager network_manager)
$(meson_feature stemmer)
-Dunicode_support=icu
-Dbash_completion="$(get_bashcompdir)"
-Dsystemd_user_services="$(systemd_get_userunitdir)"
)
meson_src_configure
}
src_test() {
dbus-run-session meson test -C "${BUILD_DIR}" || die 'tests failed'
}
pkg_postinst() {
xdg_pkg_postinst
gnome2_schemas_update
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_schemas_update
}

Binary file not shown.

@ -18,7 +18,7 @@ IUSE="video"
DEPEND="
app-text/hunspell:=
app-text/poppler[qt5]
app-text/poppler:=[qt5]
>=dev-libs/quazip-0.7.3-r1:0=
dev-qt/designer:5
dev-qt/qtcore:5

@ -18,7 +18,7 @@ IUSE="video"
DEPEND="
app-text/hunspell:=
app-text/poppler[qt5]
app-text/poppler:=[qt5]
>=dev-libs/quazip-0.7.3-r1:0=
dev-qt/designer:5
dev-qt/qtcore:5

@ -17,7 +17,7 @@ IUSE="video"
DEPEND="
app-text/hunspell:=
app-text/poppler[qt5]
app-text/poppler:=[qt5]
>=dev-libs/quazip-1.0:0=
dev-qt/designer:5
dev-qt/qtcore:5

Binary file not shown.

@ -18,7 +18,7 @@ else
https://github.com/gentoo/portage/compare/285d3ae987a079f32b909c6e6eddde9bc45a4a25...b09b4071151d8e3a81f3576843d00f88eb407799.patch -> ${P}-unit-test-bug-779055.patch
https://github.com/gentoo/portage/commit/e29177fcd2950199afa4f83673c0771afb261123.patch -> ${P}-version-bug-779508.patch
https://github.com/gentoo/portage/commit/2eb3ca092a528e0722e0ca32f616836ed8039936.patch -> ${P}-unit-test-bug-779967.patch"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="Repoman is a Quality Assurance tool for Gentoo ebuilds"

Binary file not shown.

@ -1 +1,2 @@
DIST coolreader-3.2.57.tar.gz 13281238 BLAKE2B 8a6739f38d72b13af7b79160dee8cfc08bd9e54d3698fd44c7f6ad8bd575b1f389c2c349c1e2ef71a55fb0068e9d64b5baa4a0a8b945cdb873e833178d81cbbe SHA512 d5bf46f7dbf19177a54742d5c300002c8b7a504052bd003d2e1a7380ac3460dbe648d7f923d26e6390e9296ce6b090c947204725ab2a30c78f26893868a61161
DIST coolreader-3.2.58.tar.gz 13454079 BLAKE2B e3b85ffbb3e4023a8c0567879a4a67d21141c1025b58f7d2c5017cab773e989e797229529440167a8c83db810f599566a77aaaab06b34081472f0e4b20293ec9 SHA512 d1d3e60bf5b73c20617937850912d7c452863bd5c91f0154be320ad256f774f368039896ad5e8acfc3cafa7361e8c11ca526accf0a14dabb79f059255989bac6

@ -0,0 +1,67 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
WX_GTK_VER="3.0-gtk3"
PLOCALES="bg cs de es hu pl ru uk"
inherit cmake plocale wxwidgets xdg
CR_PV=$(ver_rs 3 '-')
SRC_URI="https://github.com/buggins/${PN}/archive/cr${CR_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-cr${CR_PV}"
DESCRIPTION="CoolReader - reader of eBook files (fb2,epub,htm,rtf,txt)"
HOMEPAGE="https://github.com/buggins/coolreader/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="wxwidgets"
CDEPEND="sys-libs/zlib
media-libs/libpng:0
virtual/jpeg:0
media-libs/freetype
dev-libs/fribidi
media-libs/fontconfig
media-libs/harfbuzz
dev-libs/libunibreak
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
!wxwidgets? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 )"
BDEPEND="${CDEPEND}
!wxwidgets? ( dev-qt/linguist-tools:5 )"
RDEPEND="${CDEPEND}
wxwidgets? ( || ( media-fonts/liberation-fonts media-fonts/corefonts ) )"
src_prepare() {
cmake_src_prepare
xdg_src_prepare
# locales
plocale_find_changes "${S}"/cr3qt/src/i18n 'cr3_' '.ts'
sed -e "s|SET(LANGUAGES .*)|SET(LANGUAGES $(plocale_get_locales))|" \
-i "${S}"/cr3qt/CMakeLists.txt \
|| die "sed CMakeLists.txt failed"
}
src_configure() {
CMAKE_USE_DIR="${S}"
CMAKE_BUILD_TYPE="Release"
if use wxwidgets; then
setup-wxwidgets
local mycmakeargs=(-D GUI=WX)
else
local mycmakeargs=(-D GUI=QT5)
fi
cmake_src_configure
}
src_install() {
cmake_src_install
if ! use wxwidgets; then
mv "${D}"/usr/share/doc/cr3/changelog.gz "${D}"/usr/share/doc/${PF}/ || die "mv changelog.gz failed"
rmdir "${D}"/usr/share/doc/cr3 || die "rmdir doc/cr3 failed"
gunzip "${D}"/usr/share/doc/${PF}/changelog.gz || die "gunzip changelog.gz failed"
gunzip "${D}"/usr/share/man/man1/cr3.1.gz || die "gunzip cr3.1.gz failed"
fi
}

@ -28,7 +28,7 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc source"
DEPEND=">=dev-libs/kpathsea-6.2.1"
DEPEND=">=dev-libs/kpathsea-6.2.1:="
BDEPEND="virtual/pkgconfig"

@ -1,10 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1

@ -9,6 +9,7 @@
<email>titanofold@gentoo.org</email>
<name>Aaron W. Swenson</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">htmlmin</remote-id>
<remote-id type="github">mankyd/htmlmin</remote-id>

@ -0,0 +1,200 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
USE_RUBY="ruby25 ruby26 ruby27 ruby30"
RUBY_OPTIONAL="yes"
inherit autotools java-pkg-opt-2 perl-functions ruby-ng
DESCRIPTION="a full-text search system for communities"
HOMEPAGE="https://fallabs.com/hyperestraier/"
SRC_URI="https://fallabs.com/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
SLOT="0"
IUSE="bzip2 debug java lzo mecab perl ruby static-libs +zlib"
RDEPEND="dev-db/qdbm
bzip2? ( app-arch/bzip2 )
java? ( >=virtual/jre-1.8:* )
lzo? ( dev-libs/lzo )
mecab? ( app-text/mecab )
perl? ( dev-lang/perl )
ruby? ( $(ruby_implementations_depend) )
zlib? ( sys-libs/zlib )"
DEPEND="${RDEPEND}
java? ( >=virtual/jdk-1.8:* )"
BDEPEND="virtual/pkgconfig"
S="${WORKDIR}/all/${P}"
PATCHES=(
"${FILESDIR}"/${PN}-configure.patch
"${FILESDIR}"/${PN}-perl.patch
"${FILESDIR}"/${PN}-ruby19.patch
)
HTML_DOCS=( doc/. )
AT_NOELIBTOOLIZE="yes"
pkg_setup() {
java-pkg-opt-2_pkg_setup
use ruby && ruby-ng_pkg_setup
}
he_foreach_api() {
local u d
for u in java perl ruby; do
if ! use "${u}"; then
continue
fi
if [[ "${u}" != "ruby" ]]; then
for d in ${u}native ${u}pure; do
if [[ ! -d "${d}" ]]; then
continue
fi
einfo "${EBUILD_PHASE} ${d}"
cd "${d}"
case "${EBUILD_PHASE}" in
prepare)
mv configure.{in,ac}
eautoreconf
;;
configure)
econf
;;
compile)
emake
;;
test)
if [[ "${d}" == "${u}native" ]]; then
emake check
fi
;;
install)
if [[ "${u}" != "java" ]]; then
emake DESTDIR="${D}" install
else
java-pkg_dojar *.jar
if [[ "${d}" == "${u}native" ]]; then
dolib.so lib*.so*
fi
fi
;;
esac
cd - >/dev/null
done
else
PATCHES= ruby-ng_src_${EBUILD_PHASE}
fi
done
}
he_foreach_ruby_api() {
local d
for d in rubynative rubypure; do
cd "${d}"
case "${EBUILD_PHASE}" in
prepare)
sed -i \
-e "/RUBY=/cRUBY=\"${RUBY}\"" \
-e "/=\`.*ruby/s|ruby|${RUBY}|" \
configure.in
mv configure.{in,ac}
eautoreconf
;;
configure)
econf
;;
compile)
emake
;;
test)
if [[ "${d}" == "${u}native" ]]; then
emake check
fi
;;
install)
emake DESTDIR="${D}" install
;;
esac
cd - >/dev/null
done
}
src_prepare() {
default
java-pkg-opt-2_src_prepare
sed -i \
-e "/^CFLAGS/s|$| ${CFLAGS}|" \
-e "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" \
-e '/^LDENV/d' \
-e 's/make\( \|$\)/$(MAKE)\1/g' \
Makefile.in {java,perl,ruby}*/Makefile.in
mv configure.{in,ac}
eautoreconf
he_foreach_api # prepare
}
all_ruby_prepare() {
sed -i "/^RUNENV /s|\.\.|${WORKDIR}/all/${P}|" ruby*/Makefile.in
sed -i "s|\.\./\.\.|${WORKDIR}/all/${P}|" rubynative/src/extconf.rb
}
each_ruby_prepare() {
he_foreach_ruby_api
}
src_configure() {
econf \
$(use_enable bzip2 bzip) \
$(use_enable debug) \
$(use_enable lzo) \
$(use_enable mecab) \
$(use_enable zlib)
he_foreach_api
}
each_ruby_configure() {
he_foreach_ruby_api
}
src_compile() {
default
he_foreach_api
}
each_ruby_compile() {
he_foreach_ruby_api
}
src_test() {
default
he_foreach_api
}
each_ruby_test() {
he_foreach_ruby_api
}
src_install() {
emake DESTDIR="${D}" MYDOCS= install
einstalldocs
he_foreach_api
use static-libs || find "${ED}" -name '*.a' -delete || die
if use perl; then
perl_delete_module_manpages
perl_fix_packlist
fi
rm -f "${D}"/usr/bin/*test
}
each_ruby_install() {
he_foreach_ruby_api
}

@ -24,9 +24,9 @@ RDEPEND="dev-db/qdbm
perl? ( dev-lang/perl )
ruby? ( $(ruby_implementations_depend) )
zlib? ( sys-libs/zlib )"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig
DEPEND="${RDEPEND}
java? ( >=virtual/jdk-1.4:* )"
BDEPEND="virtual/pkgconfig"
S="${WORKDIR}/all/${P}"
PATCHES=(

@ -14,7 +14,7 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="+kpathsea"
RDEPEND="kpathsea? ( virtual/tex-base dev-libs/kpathsea )"
RDEPEND="kpathsea? ( virtual/tex-base dev-libs/kpathsea:= )"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"

@ -10,7 +10,7 @@ HOMEPAGE="https://taku910.github.io/mecab/"
SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${P}.tar.gz"
LICENSE="|| ( BSD LGPL-2.1 GPL-2 )"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 sparc x86"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
SLOT="0"
IUSE="static-libs unicode"

@ -11,7 +11,7 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
DEPEND=">=dev-libs/kpathsea-6.2.1"
DEPEND=">=dev-libs/kpathsea-6.2.1:="
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"

@ -3,7 +3,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{8..10} )
inherit flag-o-matic python-any-r1 toolchain-funcs
@ -11,7 +11,7 @@ DESCRIPTION="Convert files between various character sets"
HOMEPAGE="https://github.com/rrthomas/recode"
SRC_URI="https://github.com/rrthomas/recode/releases/download/v${PV}/${P}.tar.gz"
LICENSE="GPL-2"
LICENSE="GPL-3+"
# librecode soname version
SLOT="0/3"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"

@ -1,14 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>arthurzam+gentoo@gmail.com</email>
<maintainer type="person">
<email>arthurzam@gentoo.org</email>
<name>Arthur Zamarin</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="plugins">Installed needed Python packages for using Sigil plugins</flag>
<flag name="system-mathjax">Use the system-wide <pkg>dev-libs/mathjax</pkg> instead of bundled</flag>

@ -89,7 +89,7 @@ COMMON_DEPEND="${MODULAR_X_DEPEND}
!app-text/epspdf
!app-text/pdfjam
sys-libs/zlib
>=media-libs/harfbuzz-1.4.5[icu,graphite]
>=media-libs/harfbuzz-1.4.5:=[icu,graphite]
>=media-libs/libpng-1.2.43-r2:0=
media-libs/gd[png]
media-gfx/graphite2
@ -107,7 +107,7 @@ COMMON_DEPEND="${MODULAR_X_DEPEND}
xindy? ( dev-lisp/clisp:= )
media-libs/freetype:2
>=dev-libs/icu-50:=
>=dev-libs/kpathsea-6.3.2"
>=dev-libs/kpathsea-6.3.2:="
BDEPEND="sys-apps/ed
sys-devel/flex

@ -29,7 +29,7 @@ CDEPEND=">=media-libs/freetype-2.9.1-r2:2
!Xaw3d? ( x11-libs/libXaw )
)
)
dev-libs/kpathsea"
dev-libs/kpathsea:="
DEPEND="sys-devel/flex
virtual/yacc
virtual/pkgconfig

Binary file not shown.

@ -1,2 +1,3 @@
DIST benchmark-1.5.3.tar.gz 163465 BLAKE2B cea8929c5595be55e74e6232eb147a00c656cc5afe6f5b9d3d788de002c51c40c46012461a7c6840aff9e590ed4304f24a31249402bbbeae28ec443a433a2e53 SHA512 11f726686ad8b36870fc2a3542fad4c52a58df2eb580564dcfdfb154fe6ac00dbbf69c514395148d7ab11a45e40e869549cf971462c384f59cbae5fa60160e3b
DIST benchmark-1.5.5.tar.gz 176710 BLAKE2B 394f8b34873ccd45100e3b1f58dd7819d443733d9224ff003a9410ca30d8bacc6c7736b74dd50623144767e840dbc3cd9ff819a60de6e22a00b1edaf802f0992 SHA512 91a2cdf0245625c657b9bb8d76c7d616a99eaed333e42b34ceff4e996b8fa6027b1c7313a815e7b441d2f6e2e1244c139a0911d585bf0d2e767ac3cea23a67d1
DIST benchmark-1.5.6.tar.gz 177911 BLAKE2B ea4e98cb98471b2b8e2371109b96017bc483459dc924deaa1d9770b065de946ea2d69ca36098c27283f15370699f2475448af1e205cfca3d9c64408f08c202a9 SHA512 b3c1fd4407d660456ae51abd7c427460a2c7b029ab6344e21bb61d3ec84e3b60638b7a719655aa04fb9ca639b6371e553e9de18539aca8dd38c361b4c6522538

@ -0,0 +1,36 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
DESCRIPTION="A microbenchmark support library"
HOMEPAGE="https://github.com/google/benchmark"
SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~hppa ~ppc64 ~riscv ~x86"
IUSE="debug test"
RESTRICT="!test? ( test )"
# Version not in the tree yet
#BDEPEND="test? ( >=dev-cpp/gtest-1.11.0 )"
PATCHES=(
"${FILESDIR}"/${PN}-1.5.6-system_testdeps.patch
)
src_configure() {
local mycmakeargs=(
-DBENCHMARK_ENABLE_TESTING=$(usex test)
-DBENCHMARK_ENABLE_GTEST_TESTS=OFF
-DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF
)
use debug || append-cppflags -DNDEBUG
cmake_src_configure
}

@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -307,7 +307,7 @@
if (BENCHMARK_ENABLE_GTEST_TESTS AND
NOT (TARGET gtest AND TARGET gtest_main AND
TARGET gmock AND TARGET gmock_main))
- include(GoogleTest)
+ find_package(GTest 1.11 REQUIRED)
endif()
add_subdirectory(test)
endif()

@ -11,7 +11,7 @@ SRC_URI="https://github.com/jupp0r/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="~amd64 ~riscv ~x86"
IUSE="test zlib"
RESTRICT="!test? ( test )"

Binary file not shown.

@ -36,7 +36,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
router? ( server )
tcmalloc? ( server )"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-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

@ -41,7 +41,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
router? ( server )
tcmalloc? ( server )"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 -riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-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

@ -1,7 +1,12 @@
DIST postgresql-10.17.tar.bz2 19153278 BLAKE2B 0f043a9e95a76b5b96572548b82ae35c0b9fb517214ea392e6ba278f78071811ea8942fd50c14508dc3380c797a2196b5c5cfadff299d6a379ee581db18e3489 SHA512 4989abe56cf631b367252c62f15c9f4a22a864a75d607fa29c2116c95e29f95bc3855df6b2fc88dbedcfc7b238d6732d13629fc967f09bbd3ea4d5c328cb925f
DIST postgresql-10.18.tar.bz2 19197042 BLAKE2B 3754df1820d7ffb9b1d82960f2107b2b5a9fede66467254129a478e85f684ce7c2b51a87fa0f048b064a86c8b1eb766fabd5e2029ff1b53f25baef8b7edb3fd2 SHA512 8a564256b0a5f6375a817cc5db14e56f7f7ee831881a2dc78759e7f2cf708d95fb61ad75a01f13fb05517ab165c991794d837bbb93f60d54f4fb33ca0ac45729
DIST postgresql-11.12.tar.bz2 20075485 BLAKE2B 0986a31662a307f76c230d7945495b42c70417835c8d7c7b6781d0ff4317607c736d9278a4b8bb95582799b771011efca256d9507d5bb9db423f3ad43eb220fb SHA512 668914424e1dbe09a66d5272e5b0a17fa24c90d3d099f8161f1420eaa76675ea1c622e4d149bdfcb31f07af19602a500913cb97c49d717df23e374de09dc0274
DIST postgresql-11.13.tar.bz2 20123787 BLAKE2B 5adededa826c2fac32e76eb097998309bf2f65705b3780433059318dbc65ca1b037049dfc5cd9bd874c27073429ced5cd5aa2178929a8ee59395c6dded0a4166 SHA512 1b2061d505a7460e0aaae53818e77fc99fa7b73eea119033a98a3d7dd3d70d00403998654990b03bbf6eb2df383e2f44791137c8922ea4015715f8bf49c5837f
DIST postgresql-12.7.tar.bz2 20819005 BLAKE2B 4939cb314253bb9ca2b14639f730967ce7ad5c5eb135d529b112290e6b351f7b507d6428cc48b4e24f34f664b5f4938029ceb9cc6161c9aff5f60ba0b3f848c7 SHA512 47ca347df63a441e52e52442074e85d0ebd3a89f7eb037022c4690cbe88b21a6a959092a812b79bb30db47b5975a5d7908318c73b2685683d48b4789d4ae6a44
DIST postgresql-12.8.tar.bz2 20849478 BLAKE2B 20ad970f03665b9c1f24c646096476398c1791c49eb4f34bb6c3b1c7cf3955bb79ef81e178e5d72ffb91625a9ec1cff409fa95d390caa02862fec2599e6d8a9b SHA512 970fe1041e427ac1c8a786c93e2079b0a9c8b3fcaf9d38877894eb02e8a9afc7cd73d7ac28078c455845a922a1b7d9c1e22cb7990d8d523dd6496af9442fba01
DIST postgresql-13.3.tar.bz2 21119109 BLAKE2B 395a3dc5cde8f579a3c35ea70346bdc630a8e8f2f86f310a5e4f4a1f6177dab7e78ba6e41c384ba650eb86813fcd428fea8aa22481f9a494cd80aa94bd7b52dd SHA512 1560cc766982a9ea9d33c77835b20e33e11b03acb77fc75d905c565883935a7dbcd27b9b2ab6a0ecdb815261f7c259865cb3dac85c10a3181c3fcaeb4d28bf60
DIST postgresql-14beta2.tar.bz2 22555641 BLAKE2B 50d928c26d679789cda82b074150b78707adb8204fcc02392a027d8b71a61a2dc80042d9f9b68eee9a36f7991178e5e24f72ba1a931d16fc5d8e81097e2874f2 SHA512 fdda7b4ea178a1c0990952da2caf07186deb2047b292c49549881e34d2e7ebb09014f914632ef3342ab7184614d47320d280cceb6bd85a93f79dfcfa68137eff
DIST postgresql-13.4.tar.bz2 21157443 BLAKE2B e16684ef59f213d23366e8d18c4bf6f81d6e2eac8e940449fee1ef6b150e7ff7d3dce8831b318d1fd3f72d642110576ebc7bd981185a39f19fea6357c58be170 SHA512 f1faf676ffdcee3e7f2c3b78f4badf44770d6be58090036d119d8fb0688e2b9f9159dd44fe850c179b8e23f256942c05edb8fcc385f0e852d16b37eace785b5a
DIST postgresql-14beta3.tar.bz2 22584314 BLAKE2B f89e5395a2a1f704baea1e864ee1576b6646dabf30d90e5da2c082f6a1d977c9dd7ac2683690e1071f84e062be19b4906895a165b0a4a6c57f57367a21821adb SHA512 a84c81095945d71f9720a2d4e3f0a93887ef06b6d6b2b5bf5c90a4cee9df7990ed081cd90de22ea660bab2e79eb05dfe5da849d175b75037874f069dc28a9cfd
DIST postgresql-9.5.25.tar.bz2 17923796 BLAKE2B 432e035e78dacddddfd46fd4d04775b61e2e4db9e61945fa5f7e1c3c5ea3516a5e327489b4e57313b0d6ba4f2e20f52a164f96db01aa22b755ff625039f262eb SHA512 621b36d767d2c7eb2e942cb7b26ca7491450fcfd9606114849f7336b4d8a0bc0196badb44da4918e748145d21b6f72ccf1255a1309dff2427da8b39b63fca427
DIST postgresql-9.6.22.tar.bz2 19003741 BLAKE2B adff6e81ec4b289bd5c51fa44adb38d7cc3936e2e5545ff23fccb0f3f1fe1c881ed70f9a0a5d366319f876eb01a9f675b66c9374b8b41615220f45a70450ad6d SHA512 371f85f2d02a8a3b888396440149e9b432f91e106a7feb8a163b275a0586843683124281a0965abf3c1215cb68e2002976913f88c75e35e52ac5f78d4145fd7b
DIST postgresql-9.6.23.tar.bz2 19013235 BLAKE2B a7bd7a0678c2c58efd71f320f838ee66fa3d75fb37d95e1c070e59ece69d4b66850e676054807848dbccedca7e9a4cc0b244c3cf0f0ff039b88c4f9b221e8819 SHA512 205b47cf1c22519092f840a9b3bf6bdf95f455e5ba02a7e1bc1495f85bb25f8ccfe9f60c83dc2801f1366b88fc35e64c23eb9bdc89a4bb5d233243af4606d59c

@ -0,0 +1,26 @@
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -315,12 +315,12 @@
#endif /* __ia64__ || __ia64 */
/*
- * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available.
+ * On ARM, ARM64 and RISC-V, we use __sync_lock_test_and_set(int *, int) if available.
*
* We use the int-width variant of the builtin because it works on more chips
* than other widths.
*/
-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64)
+#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv)
#ifdef HAVE_GCC__SYNC_INT32_TAS
#define HAS_TEST_AND_SET
@@ -337,7 +337,7 @@
#define S_UNLOCK(lock) __sync_lock_release(lock)
#endif /* HAVE_GCC__SYNC_INT32_TAS */
-#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */
+#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
/* S/390 and S/390x Linux (32- and 64-bit zSeries) */

@ -0,0 +1,458 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris"
SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="https://ftp.postgresql.org/pub/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 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
acct-group/postgres
acct-user/postgres
sys-apps/less
virtual/libcrypt:=
virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
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-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
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
# https://bugs.gentoo.org/753257
# https://bugs.gentoo.org/766225
eapply "${FILESDIR}"/postgresql-10.0-icu68.patch
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}" \
--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)
}
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
newtmpfiles "${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 && tmpfiles_process ${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
}

@ -0,0 +1,455 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="https://ftp.postgresql.org/pub/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 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
acct-group/postgres
acct-user/postgres
sys-apps/less
virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
llvm? (
sys-devel/llvm:=
sys-devel/clang:=
)
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
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-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
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}" \
--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)
}
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
newtmpfiles "${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 && tmpfiles_process ${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 "$(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,455 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="https://ftp.postgresql.org/pub/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 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
acct-group/postgres
acct-user/postgres
sys-apps/less
virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
llvm? (
sys-devel/llvm:=
sys-devel/clang:=
)
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
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-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
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}-12.1-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}" \
--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)
}
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
newtmpfiles "${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 && tmpfiles_process ${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 "$(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
}

@ -91,6 +91,8 @@ pkg_setup() {
}
src_prepare() {
eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
@ -159,7 +161,7 @@ src_configure() {
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls)"
if use alpha || use riscv; then
if use alpha; then
myconf+=" --disable-spinlocks"
else
# Should be the default but just in case

@ -0,0 +1,467 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="https://ftp.postgresql.org/pub/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 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
acct-group/postgres
acct-user/postgres
sys-apps/less
virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
llvm? (
sys-devel/llvm:=
sys-devel/clang:=
)
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
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-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
use python && python-single-r1_pkg_setup
}
src_prepare() {
eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch
# 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}-13_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
local myconf="\
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--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 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)"
if use alpha; then
myconf+=" --disable-spinlocks"
else
# Should be the default but just in case
myconf+=" --enable-spinlocks"
fi
econf ${myconf}
}
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
newtmpfiles "${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 && tmpfiles_process ${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 "$(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
# Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
# LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
local old_ctype=${LC_CTYPE}
export LC_CTYPE=${LC_COLLATE}
emake check
export LC_CTYPE=${old_ctype}
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
}

@ -92,6 +92,8 @@ pkg_setup() {
}
src_prepare() {
eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
@ -161,7 +163,7 @@ src_configure() {
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls)"
if use alpha || use riscv; then
if use alpha; then
myconf+=" --disable-spinlocks"
else
# Should be the default but just in case

@ -0,0 +1,479 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1-2)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="https://ftp.postgresql.org/pub/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 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
acct-group/postgres
acct-user/postgres
sys-apps/less
virtual/libcrypt:=
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
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-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
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}" \
--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)
}
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
newtmpfiles "${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 && tmpfiles_process ${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
}

@ -110,6 +110,9 @@ pkg_setup() {
}
src_prepare() {
# still needed as of 2021-08-13
eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
@ -177,7 +180,7 @@ src_configure() {
$(use_with zlib) \
$(use_with systemd) \
${uuid_config}"
if use alpha || use riscv; then
if use alpha; then
myconf+=" --disable-spinlocks"
else
# Should be the default but just in case

@ -1,8 +1,6 @@
diff --git a/Makefile.in b/Makefile.in
index 2fec03a..2a1c3a3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -52,18 +52,18 @@ DESTDIR =
@@ -52,18 +52,18 @@
# Building binaries
CC = @CC@
CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(MYHEADDIR) \

@ -32,7 +32,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-perl.patch
"${FILESDIR}"/${PN}-ruby19.patch
"${FILESDIR}"/${PN}-runpath.patch
"${FILESDIR}"/${PN}-1.8.78-darwin.patch
"${FILESDIR}"/${PN}-darwin.patch
)
HTML_DOCS=( doc/. )
@ -169,19 +169,19 @@ src_install() {
qdbm_foreach_api
use static-libs || find "${ED}" -name '*.a' -delete || die
rm -rf "${ED}"/usr/share/${PN} || die
rm -rf "${ED}"/usr/share/${PN}
if use java; then
java-pkg_dojar "${ED}"/usr/$(get_libdir)/*.jar
rm -f "${ED}"/usr/$(get_libdir)/*.jar || die
rm -f "${ED}"/usr/$(get_libdir)/*.jar
fi
if use perl; then
perl_delete_module_manpages
perl_fix_packlist
fi
rm -f "${ED}"/usr/bin/*test || die
rm -f "${ED}"/usr/share/man/man1/*test.1* || die
rm -f "${ED}"/usr/bin/*test
rm -f "${ED}"/usr/share/man/man1/*test.1*
}
each_ruby_install() {

@ -0,0 +1,196 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
USE_RUBY="ruby25 ruby26 ruby27 ruby30"
RUBY_OPTIONAL="yes"
inherit autotools flag-o-matic java-pkg-opt-2 perl-functions ruby-ng
DESCRIPTION="Quick Database Manager"
HOMEPAGE="https://fallabs.com/qdbm/"
SRC_URI="https://fallabs.com/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="bzip2 cxx debug java lzo perl ruby static-libs zlib"
RDEPEND="bzip2? ( app-arch/bzip2 )
java? ( >=virtual/jre-1.8:* )
lzo? ( dev-libs/lzo )
perl? ( dev-lang/perl )
ruby? ( $(ruby_implementations_depend) )
zlib? ( sys-libs/zlib )"
DEPEND="${RDEPEND}
java? ( >=virtual/jdk-1.8:* )"
S="${WORKDIR}/all/${P}"
RUBY_S="${P}/ruby"
PATCHES=(
"${FILESDIR}"/${PN}-configure.patch
"${FILESDIR}"/${PN}-perl.patch
"${FILESDIR}"/${PN}-ruby19.patch
"${FILESDIR}"/${PN}-runpath.patch
"${FILESDIR}"/${PN}-darwin.patch
)
HTML_DOCS=( doc/. )
AT_NOELIBTOOLIZE="yes"
pkg_setup() {
java-pkg-opt-2_pkg_setup
use ruby && ruby-ng_pkg_setup
}
qdbm_foreach_api() {
local u
for u in cxx java perl ruby; do
if ! use "${u}"; then
continue
fi
einfo "${EBUILD_PHASE} ${u}"
if [[ "${u}" == "cxx" ]]; then
u="plus"
fi
if [[ "${u}" != "ruby" ]]; then
cd "${u}"
case "${EBUILD_PHASE}" in
prepare)
mv configure.{in,ac}
eautoreconf
;;
configure)
case "${u}" in
cgi|java|plus)
econf $(use_enable debug)
;;
*)
econf
;;
esac
;;
compile)
emake
;;
test)
emake check
;;
install)
emake DESTDIR="${D}" MYDATADIR=/usr/share/doc/${P}/html install
esac
cd - >/dev/null
else
PATCHES= ruby-ng_src_${EBUILD_PHASE}
fi
done
}
src_prepare() {
default
java-pkg-opt-2_src_prepare
# fix build with >=sys-devel/gcc-7, bug #638878
append-cflags $(test-flags-CC -fno-tree-vrp)
sed -i \
-e "/^CFLAGS/s|$| ${CFLAGS}|" \
-e "/^OPTIMIZE/s|$| ${CFLAGS}|" \
-e "/^CXXFLAGS/s|$| ${CXXFLAGS}|" \
-e "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" \
-e 's/make\( \|$\)/$(MAKE)\1/g' \
-e '/^debug/,/^$/s/LDFLAGS="[^"]*" //' \
Makefile.in {cgi,java,perl,plus,ruby}/Makefile.in || die
find -name "*~" -delete || die
mv configure.{in,ac} || die
eautoreconf
qdbm_foreach_api
}
each_ruby_prepare() {
sed -i \
-e "s|ruby |${RUBY} |" \
-e "s|\.\./\.\.|${WORKDIR}/all/${P}|" \
{Makefile,configure}.in {curia,depot,villa}/extconf.rb || die
mv configure.{in,ac} || die
eautoreconf
}
src_configure() {
econf \
$(use_enable bzip2 bzip) \
$(use_enable debug) \
$(use_enable lzo) \
$(use_enable zlib) \
--enable-iconv \
--enable-pthread
qdbm_foreach_api
}
each_ruby_configure() {
econf
}
src_compile() {
if [[ ${CHOST} == *darwin* ]] ; then
emake mac
else
default
qdbm_foreach_api
fi
}
each_ruby_compile() {
emake
}
src_test() {
if [[ ${CHOST} == *darwin* ]] ; then
emake check-mac
else
default
qdbm_foreach_api
fi
}
each_ruby_test() {
emake check
}
src_install() {
if [[ ${CHOST} == *darwin* ]] ; then
emake install-mac
else
default
fi
qdbm_foreach_api
use static-libs || find "${ED}" -name '*.a' -delete || die
rm -rf "${ED}"/usr/share/${PN}
if use java; then
java-pkg_dojar "${ED}"/usr/$(get_libdir)/*.jar
rm -f "${ED}"/usr/$(get_libdir)/*.jar
fi
if use perl; then
perl_delete_module_manpages
perl_fix_packlist
fi
rm -f "${ED}"/usr/bin/*test
rm -f "${ED}"/usr/share/man/man1/*test.1*
}
each_ruby_install() {
local m
for m in curia depot villa; do
emake -C "${m}" DESTDIR="${D}" install
done
}
all_ruby_install() {
dodoc -r rb*.html rbapidoc
}

Binary file not shown.

@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -8,13 +8,13 @@ inherit edos2unix
MY_PN="irrlicht"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Irrlicht 3D engine headers"
HOMEPAGE="http://irrlicht.sourceforge.net/"
HOMEPAGE="https://irrlicht.sourceforge.io/"
SRC_URI="mirror://sourceforge/irrlicht/${MY_P}.zip
https://dev.gentoo.org/~mgorny/dist/${MY_P}-patchset.tar.bz2"
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="amd64 ~riscv x86"
RDEPEND="!<dev-games/irrlicht-1.8.4-r1"
BDEPEND="app-arch/unzip"

@ -5,13 +5,13 @@ EAPI=7
inherit toolchain-funcs
DESCRIPTION="open source high performance realtime 3D engine written in C++"
HOMEPAGE="http://irrlicht.sourceforge.net/"
HOMEPAGE="https://irrlicht.sourceforge.io/"
SRC_URI="mirror://sourceforge/irrlicht/${P}.zip
https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2"
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="amd64 ~riscv x86"
IUSE="debug doc static-libs"
RDEPEND="app-arch/bzip2

@ -1,3 +1,3 @@
DIST tiled-1.4.3.tar.gz 17806808 BLAKE2B 81b5a32cc1e6f5f3b4af5520752d34572f0e78aad90df435d075b53ac18b39961aa22d23cff614cd83f0883fd2fd2bca69026160cb8b1b727fddaeff5764babe SHA512 1e75e323733e05563bf542364778d95f2f22484ec0d85b4a9e7fac782c117934b37b049724979be5c83de86a3900c7ca2e9f3c5a660c530d2ecd0f023eb22c2e
DIST tiled-1.5.0.tar.gz 16694406 BLAKE2B ccab3ec9f5ac807126ddf5d26e4eaa06357e67ffbd63550bdad93e814ff02350f9138f62114a56b5e64bc6c7fd3f6664ab7da836cab7e478ea7075111fa1cae7 SHA512 eb25affdab481db29ab2bbaeb4abafd453b2b43ae47e4b8f9f2fd1ed0d8ed55fdb45ec1bdc0b484ba9a2d63afad5a0c9ba6376304ed4b1eab3918c36a0af29c9
DIST tiled-1.7.1.tar.gz 16741752 BLAKE2B 2f9d2d43aa3aa52a2999a6e9e56bfe3846e095ac41236921e9ab42df40b93d0c3373d2f5f13a5f7c9a945ea0c03c4fe6b123ea6a8b3bc71ddc9863c714fccc17 SHA512 ed6ba20015434d9de6ae02aecb165a7fb7569a3d74471a7baec5d0f1b78b7905dd12cd565e1f9d1e41ff47e225cdfb81915ae09e3672efc21f16cefb39e03998
DIST tiled-1.7.2.tar.gz 16743422 BLAKE2B 0d8ae95b2fc68326d0a4989b26535cd72900ddf9674ad892c287f9d7df2f551fc46c9fa9c8991315f55ae90663a9a5b9c4239fd2ed61c240a36a60102b2710b3 SHA512 6d766adbfcb642279eb0ba27410858c54a29ed8e697445b6fb96ce210d0b1433b1ed4715e1d78af3aea8ec71a87b24eea52216bf6236159e0c8fdf87a2339a59

@ -3,7 +3,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{7,8} )
PYTHON_COMPAT=( python3_{7,8,9} )
inherit python-single-r1 qmake-utils xdg-utils
DESCRIPTION="A general purpose tile map editor"
@ -20,6 +20,7 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
app-arch/zstd:=
>=dev-qt/qtcore-5.15:5
>=dev-qt/qtdbus-5.15:5
>=dev-qt/qtdeclarative-5.15:5
>=dev-qt/qtgui-5.15:5
>=dev-qt/qtnetwork-5.15:5

Binary file not shown.

@ -1,6 +1,4 @@
DIST lua-5.1.5.tar.gz 221213 BLAKE2B 915eb8e8c9d7e460eacf1d7a59309c60dfc0f5d9d3d76fbc9764e7cae85920b95096db1c27b69ac53378a145c29efde403e88166a1332a67150d9d3a897aba02 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9
DIST lua-5.2.2-tests.tar.gz 76629 BLAKE2B 323eaae02ee61cfde2535d606ed704d964461c32627cb3ad4097afdc95a16a0921b9b05677c5b9b26cbff0d7d8270045e7df32a2cea0fd99a82e6aa613a0bdae SHA512 699d5703dd1d03312f1e947ca4c68d8808bb226ae01337202c2bfb3d854a9b7d9ef9746630afd1f67e9ffe2868907ce3d600a6f5324a2c798540c5373a24aac8
DIST lua-5.2.4.tar.gz 252651 BLAKE2B 6f20308d8413438f8446040e8de16274837cb55e626b98a0ae8cfe279dc8610fa2e032a2ce53ef3acda4b96a7198123cbc18eff16775f952e6dc0355fdf331b0 SHA512 cd77148aba4b707b6c159758b5e8444e04f968092eb98f6b4c405b2fb647e709370d5a8dcf604176101d3407e196a7433b5dcdce4fe9605c76191d3649d61a8c
DIST lua-5.3.4-tests.tar.gz 103438 BLAKE2B ac82708022e7729039111c3df4fe24302c8d0efb224afb4828871ac085a3d64c41d674a6f9369035de01ed1f7f75a3d2ce16917f37e774e923216aac0be03e09 SHA512 79575d100a2efabc8243f55b55d912443e09ef7e8b0219cb93541d85c2ba802fb9538015e1228703f09ca57bdb28a640a8f1fa0735716ba1e4bca2179c712dfb
DIST lua-5.3.6.tar.gz 303770 BLAKE2B 07c37c56f43095a4f6ca8eb8b3adf19afd53107c02b62b2bcb3619565cb2100d5f823493eef93092d5e312b30fc28885a6d9e8f0ba5a23b5bed86dc4515a5d61 SHA512 ccc380d5e114d54504de0bfb0321ca25ec325d6ff1bfee44b11870b660762d1a9bf120490c027a0088128b58bb6b5271bbc648400cab84d2dc22b512c4841681
DIST lua-5.4.2-tests.tar.gz 128901 BLAKE2B 10e4f0e8760f9cbd4761fa26665008ae7412539f79a6a7687029808f08f0ae4a24721e787e2e87e5080c16e9dcce8577a7a39ddc6d3e483a3cfe11756139594e SHA512 1516c59deca211c38444bbf97b18e988e939209b03915d3691d756eeed31b52e8d3a1f05b71ac0b561965274c7b6f3afc4244cd2e9069995696e737e2d9dd40b

@ -1,49 +0,0 @@
--- lua-5.2.0.orig/src/ldblib.c 2007/12/28 15:32:23 2.25.1.3
+++ lua-5.2.0/src/ldblib.c 2009/06/15 14:07:34
@@ -253,14 +253,15 @@
}
-#define gethooktable(L) luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY);
+#define gethooktable(L) luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY)
static void hookf (lua_State *L, lua_Debug *ar) {
static const char *const hooknames[] =
{"call", "return", "line", "count", "tail call"};
gethooktable(L);
- lua_rawgetp(L, -1, L);
+ lua_pushthread(L);
+ lua_rawget(L, -2);
if (lua_isfunction(L, -1)) {
lua_pushstring(L, hooknames[(int)ar->event]);
if (ar->currentline >= 0)
@@ -306,10 +307,15 @@
count = luaL_optint(L, arg+3, 0);
func = hookf; mask = makemask(smask, count);
}
- gethooktable(L);
+ if (gethooktable(L) == 0) { /* creating hook table? */
+ lua_pushstring(L, "k");
+ lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */
+ lua_pushvalue(L, -1);
+ lua_setmetatable(L, -2); /* setmetatable(hooktable) = hooktable */
+ }
+ lua_pushthread(L1); lua_xmove(L1, L, 1);
lua_pushvalue(L, arg+1);
- lua_rawsetp(L, -2, L1); /* set new hook */
- lua_pop(L, 1); /* remove hook table */
+ lua_rawset(L, -3); /* set new hook */
lua_sethook(L1, func, mask, count); /* set hooks */
return 0;
}
@@ -325,7 +331,8 @@
lua_pushliteral(L, "external hook");
else {
gethooktable(L);
- lua_rawgetp(L, -1, L1); /* get hook */
+ lua_pushthread(L1); lua_xmove(L1, L, 1);
+ lua_rawget(L, -2); /* get hook */
lua_remove(L, -2); /* remove hook table */
}
lua_pushstring(L, unmakemask(mask, buff));

@ -1,26 +0,0 @@
--- lua-5.2.0.orig/src/llex.c 2007/12/28 15:32:23 2.25.1.3
+++ lua-5.2.0/src/llex.c 2009/06/15 14:07:34
@@ -223,12 +223,19 @@
/* LUA_NUMBER */
static void read_numeral (LexState *ls, SemInfo *seminfo) {
+ const char *expo = "Ee";
+ int first = ls->current;
lua_assert(lisdigit(ls->current));
- do {
- save_and_next(ls);
- if (check_next(ls, "EePp")) /* exponent part? */
+ save_and_next(ls);
+ if (first == '0' && check_next(ls, "Xx")) /* hexadecimal? */
+ expo = "Pp";
+ for (;;) {
+ if (check_next(ls, expo)) /* exponent part? */
check_next(ls, "+-"); /* optional exponent sign */
- } while (lislalnum(ls->current) || ls->current == '.');
+ if (lisxdigit(ls->current) || ls->current == '.')
+ save_and_next(ls);
+ else break;
+ }
save(ls, '\0');
buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */
if (!buff2d(ls->buff, &seminfo->r)) /* format error? */

@ -1,75 +0,0 @@
--- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200
+++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100
@@ -11,7 +11,7 @@
# so take care if INSTALL_TOP is not an absolute path.
INSTALL_TOP= /usr/local
INSTALL_BIN= $(INSTALL_TOP)/bin
-INSTALL_INC= $(INSTALL_TOP)/include
+INSTALL_INC= $(INSTALL_TOP)/include/lua$V
INSTALL_LIB= $(INSTALL_TOP)/lib
INSTALL_MAN= $(INSTALL_TOP)/man/man1
#
@@ -127,3 +127,18 @@
.PHONY: all $(PLATS) clean install local none dummy echo pecho lecho newer
# (end of Makefile)
+
+# Use libtool for binary installs, etc.
+
+export V
+export LIBTOOL = libtool --quiet --tag=CC
+# See libtool manual about how to set this
+
+gentoo_clean:
+ cd src; $(MAKE) $@
+
+gentoo_install:
+ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
+ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V $(INSTALL_BIN)
+ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
+ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la $(INSTALL_LIB)
--- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100
+++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100
@@ -39,1 +39,1 @@
-LUA_T= lua
+LUA_T= lua$V
@@ -42,1 +42,1 @@
-LUAC_T= luac
+LUAC_T= luac$V
@@ -54,1 +54,1 @@
-$(LUA_T): $(LUA_O) $(LUA_A)
+origin$(LUA_T): $(LUA_O) $(LUA_A)
@@ -57,1 +57,1 @@
-$(LUAC_T): $(LUAC_O) $(LUA_A)
+origin$(LUAC_T): $(LUAC_O) $(LUA_A)
@@ -185,3 +185,30 @@
lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
lzio.h
+
+export LIBTOOL = libtool --quiet --tag=CC
+export LIB_VERSION = 6:1:1
+
+# The following rules use libtool for compiling and linking in order to
+# provide shared library support.
+
+LIB_NAME = liblua$V.la
+LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
+
+%.lo %.o: %.c
+ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+$(LIB_NAME): $(LIB_OBJS)
+ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \
+ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
+
+$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
+ $(LIBTOOL) --mode=link $(CC) -static -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
+
+$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
+ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
+
+gentoo_clean:
+ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V
+
+gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)

@ -1,200 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"
TEST_PV="5.2.2" # no 5.2.3-specific release yet
TEST_P="${PN}-${TEST_PV}-tests"
SRC_URI="
https://www.lua.org/ftp/${P}.tar.gz
test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
LICENSE="MIT"
SLOT="5.2"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 -riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+deprecated readline test test-complete"
COMMON_DEPEND="
>=app-eselect/eselect-lua-3
readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
BDEPEND="sys-devel/libtool"
RESTRICT="!test? ( test )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
)
PATCHES=(
"${FILESDIR}/lua-5.2.4-make.patch"
)
src_prepare() {
default
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
Makefile src/Makefile || die
fi
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
if ! use readline ; then
sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
fi
# Using dynamic linked lua is not recommended for performance
# reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
# Mainly, this is of concern if your arch is poor with GPRs, like x86
# Note that this only affects the interpreter binary (named lua), not the lua
# compiler (built statically) nor the lua libraries.
# upstream does not use libtool, but we do (see bug #336167)
cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
eautoreconf
# custom Makefiles
multilib_copy_sources
}
multilib_src_configure() {
sed -i \
-e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
-e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
src/luaconf.h \
|| die "failed patching luaconf.h"
econf
}
multilib_src_compile() {
tc-export CC
# what to link to liblua
liblibs="-lm"
liblibs="${liblibs} $(dlopen_lib)"
# what to link to the executables
mylibs=
use readline && mylibs="-lreadline"
cd src
local myCFLAGS=""
use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
case "${CHOST}" in
*-mingw*) : ;;
*) myCFLAGS+=" -DLUA_USE_LINUX" ;;
esac
emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
SYSLDFLAGS="${LDFLAGS}" \
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
V=$(ver_cut 1-2) \
gentoo_all
}
multilib_src_install() {
emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
V=${SLOT} gentoo_install
case $SLOT in
0)
LIBNAME="lua"
INCLUDEDIR_SUFFIX=''
;;
*) LIBNAME="lua${SLOT}"
INCLUDEDIR_SUFFIX="/lua${SLOT}"
;;
esac
# We want packages to find our things...
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
local PATCH_PV=$(ver_cut 1-2)
cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
-e "s:^prefix= :prefix= ${EPREFIX}:" \
-e "s:^V=.*:V= ${PATCH_PV}:" \
-e "s:^R=.*:R= ${PV}:" \
-e "s:/,lib,:/$(get_libdir):g" \
-e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
-e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
"${WORKDIR}/lua.pc" || die
insinto "/usr/$(get_libdir)/pkgconfig"
newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
# Copy Debian's symlink support:
# https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
# FreeBSD calls the pkgconfig 'lua-5.3.pc'
# Older systems called it 'lua53.pc'
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
}
multilib_src_install_all() {
DOCS="README"
HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
find "${ED}" -name '*.la' -delete || die
find "${ED}" -name 'liblua*.a' -delete || die
}
# Makefile contains a dummy target that doesn't do tests
# but causes issues with slotted lua (bug #510360)
src_test() {
debug-print-function ${FUNCNAME} "$@"
cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
# https://www.lua.org/tests/
# There are two sets:
# basic
# complete.
#
# The basic subset is selected by passing -e'_U=true'
# The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
# attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
TEST_OPTS="$(usex test-complete '' '-e_U=true')"
TEST_MARKER="${T}/test.failed"
rm -f "${TEST_MARKER}"
# If we are failing, set the marker file, and only check it after done all ABIs
abi_src_test() {
debug-print-function ${FUNCNAME} "$@"
TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
return 0
}
multilib_foreach_abi abi_src_test
if [ -e "${TEST_MARKER}" ]; then
cat "${TEST_MARKER}"
die "Tests failed"
fi
}
pkg_postinst() {
eselect lua set --if-unset "${PN}${SLOT}"
if has_version "app-editor/emacs"; then
if ! has_version "app-emacs/lua-mode"; then
einfo "Install app-emacs/lua-mode for lua support for emacs"
fi
fi
}

@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person" proxied="yes">
<email>matt@offtopica.uk</email>
<name>Matt Smith</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<longdescription>
The Netwide Assembler, NASM, is an 80x86 assembler designed for portability
and modularity. It supports a range of object file formats, including Linux
@ -11,7 +18,7 @@ and easy to understand, similar to Intel's but less complex. It supports
Pentium, P6, MMX, 3DNow!, SSE and SSE2 opcodes, and has macro capability.
</longdescription>
<upstream>
<remote-id type="sourceforge">nasm</remote-id>
<remote-id type="github">netwide-assembler/nasm</remote-id>
<bugs-to>https://bugzilla.nasm.us/</bugs-to>
</upstream>
</pkgmetadata>

@ -1,21 +1,18 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic
DESCRIPTION="groovy little assembler"
HOMEPAGE="https://www.nasm.us/"
SRC_URI="https://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
S="${WORKDIR}"/${P/_}
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 ~ia64 ~ppc64 x86 ~amd64-linux ~x86-linux"
IUSE="doc"
RDEPEND=""
DEPEND=""
# [fonts note] doc/psfonts.ph defines ordered list of font preference.
# Currently 'media-fonts/source-pro' is most preferred and is able to
# satisfy all 6 font flavours: tilt, chapter, head, etc.
@ -30,8 +27,6 @@ BDEPEND="
)
"
S=${WORKDIR}/${P/_}
PATCHES=(
"${FILESDIR}"/${PN}-2.15-bsd-cp-doc.patch
)
@ -43,5 +38,5 @@ src_compile() {
src_install() {
default
emake DESTDIR="${D}" install_rdf $(usex doc install_doc '')
emake DESTDIR="${ED}" install_rdf $(usex doc install_doc '')
}

@ -1,5 +1,7 @@
DIST vala-0.44.11.tar.xz 3370248 BLAKE2B c111b6175e6339148e30bedc77f62a9ef3ec912ad0621c9303fc5dba31694173b49ccc433d3681303d64a1e442ed9b7b064f27931369cb13fa028bfc25ffa3c9 SHA512 6111699039ed37084426d7603b82dfa9bd497c66ba7353ee22e8541bf15a2cbb634d315593c093f18c20bac877ae34884e5b570cd25237ce12aa73e941c4c540
DIST vala-0.46.13.tar.xz 3434196 BLAKE2B 49b7e0b776e185653c1b8c00747a150ceb42cf89006fd55d37e3efd0824dace379d2c72cdb45d481b0545d0b4b37299bc6161b2d083d3221d2d8d8ca7c10d6dc SHA512 6d8d1acebf4706346d5dc986f5c900cfda929ca59ca3f3907cff56892a496bf524b1f74032ac6c8587b236a473124e15c6f83f949636e28141a55c8abeddf004
DIST vala-0.48.12.tar.xz 3492200 BLAKE2B 0a401ac4349dc1c628fa608b5a89504583d6d2bb05ca74eb507e766cca418121e14adfe6e8cfeb8f42212c717280b9b91426309df415d869896654be626c46c5 SHA512 da7becf8b92985a07b139651c14bd41ec86aed3e2b610029d2b376f70335c98607f39de4a1fa4efe9d51e6088edd4c13d22431cada389679d55f684ad548f4d1
DIST vala-0.48.18.tar.xz 3519484 BLAKE2B 26581cd4b2ead9272fc032d085a4c49d47bc65d4f71c161b22f2efd6382d5a7b5204e6b7de8aac0a1d311b2c2fb7e3edd5894e7e14f34378bb69532c206832eb SHA512 fcafc44e62d6d8e724a8190a5c8bebf74c561eb355a2074ab6e29ff3abb73a6a553096991e8f3ad9c7656193b9ea9033d7cbe44fefaedfef4e2f70021155122d
DIST vala-0.50.7.tar.xz 3540048 BLAKE2B 4f3abdfe7f0448846f22a4d822b803484afd1a2371604d63cd7092e2854dbfdb15169ac74226404ca572bc8ac29d5262c6e39346271704003138b9881bd99b30 SHA512 50c4c257e0be020f45270b07fef3646712dc1556dd43ae9d54f164b97056b26779b3559deab9fe96afa11e2e97a13aa2cce348a34cf5d72ea6a3be4a8d7efc94
DIST vala-0.50.9.tar.xz 3543420 BLAKE2B 57b8021746aa554fe78f7e033b7c134a0d840e46ad7666f9abc3f019326282958cf90ddbebffe36fa15f80dff407a46b3a2e1298bfdfee749838d3a730bad5a5 SHA512 f138629fa0840941942796b33fe8cf61391f14e186f2bd70519cafc19bcc453fd16bcfaf7a44713a00531fe181bb9b0c4aafb955fae0a29fd9eaa12b48ed169a
DIST vala-0.52.4.tar.xz 3577796 BLAKE2B 20f541f5429ef52cdcb4b0c5559dc312f62276ac6d91b3ca97f5bce4b954f7d0407637131e16db5a9f059f5ee3e7d44a414cc06311d49c294f22789db821ec79 SHA512 3c7daae4d26e6940b0735cee84f1a25f2aab12c93d2a8a9e9edec45c0c9dc9184cc790acbae19aba0fb31dfd7115afddcf8b9f09b0423b5b6950900641f4c527

@ -0,0 +1,52 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit gnome2
DESCRIPTION="Compiler for the GObject type system"
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1+"
SLOT="0.48"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
IUSE="test valadoc"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-libs/glib-2.48.0:2
>=dev-libs/vala-common-${PV}
valadoc? ( >=media-gfx/graphviz-2.16 )
!<net-libs/libsoup-2.66.2[vala]
" # Older libsoup generates a libsoup-2.4.vapi that isn't fine for vala:0.46 anymore
# We block here, so libsoup[vala] consumers wouldn't have to >= it, which would be bad
# as the newer is not required with older vala when those are picked instead of 0.46.
# vala-0.45.91 ships a broken libsoup-2.4.vapi copy too, but that'll be fixed by 0.45.92
DEPEND="${RDEPEND}
test? (
dev-libs/dbus-glib
>=dev-libs/glib-2.26:2
dev-libs/gobject-introspection
)
"
BDEPEND="
dev-libs/libxslt
sys-devel/flex
virtual/pkgconfig
virtual/yacc
"
src_configure() {
# weasyprint enables generation of PDF from HTML
gnome2_src_configure \
--disable-unversioned \
$(use_enable valadoc) \
VALAC=: \
WEASYPRINT=:
}
src_install() {
default
find "${D}" -name "*.la" -delete || die
}

@ -0,0 +1,52 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit gnome2
DESCRIPTION="Compiler for the GObject type system"
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1+"
SLOT="0.50"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
IUSE="test valadoc"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-libs/glib-2.48.0:2
>=dev-libs/vala-common-${PV}
valadoc? ( >=media-gfx/graphviz-2.16 )
!<net-libs/libsoup-2.66.2[vala]
" # Older libsoup generates a libsoup-2.4.vapi that isn't fine for vala:0.46 anymore
# We block here, so libsoup[vala] consumers wouldn't have to >= it, which would be bad
# as the newer is not required with older vala when those are picked instead of 0.46.
# vala-0.45.91 ships a broken libsoup-2.4.vapi copy too, but that'll be fixed by 0.45.92
DEPEND="${RDEPEND}
test? (
dev-libs/dbus-glib
>=dev-libs/glib-2.26:2
dev-libs/gobject-introspection
)
"
BDEPEND="
dev-libs/libxslt
sys-devel/flex
virtual/pkgconfig
virtual/yacc
"
src_configure() {
# weasyprint enables generation of PDF from HTML
gnome2_src_configure \
--disable-unversioned \
$(use_enable valadoc) \
VALAC=: \
WEASYPRINT=:
}
src_install() {
default
find "${D}" -name "*.la" -delete || die
}

Binary file not shown.

@ -1 +1,2 @@
DIST boost_1_76_0.tar.bz2 110073117 BLAKE2B 45445e6a9725cb99131e0b831b2fac0840d083692c13887b41adeac5cb8b3732026db3641d6be20591a676b78a87fcf363eb9b1508f87ed26039bba6a1ced533 SHA512 5d68bed98c57e03b4cb2420d9b856e5f0669561a6142a4b0c9c8a58dc5b6b28e16ccbb16ac559c3a3198c45769a246bf996b96cb7b6a019dd15f05c2270e9429
DIST boost_1_77_0.tar.bz2 110361537 BLAKE2B 106aeb09ec7705b595f2ca966a76c53c649eac6fac50d88c156862e0991c33c89a2f3a09edcbcb453fa44bf71cdde030b35d0a0889ad97b65f3a868cb877a532 SHA512 39b45c9b60bc5a2a4c669a4463d1272c1e093376b2fb374d7f20a84ea10a3e23bb04b335a735a83a04575731f874d9bff77e89acd947524b3fbbae1b26ae1f2f

@ -0,0 +1,336 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
inherit flag-o-matic multiprocessing python-r1 toolchain-funcs multilib-minimal
MY_PV="$(ver_rs 1- _)"
MAJOR_V="$(ver_cut 1-2)"
DESCRIPTION="Boost Libraries for C++"
HOMEPAGE="https://www.boost.org/"
SRC_URI="https://boostorg.jfrog.io/artifactory/main/release/${PV}/source/boost_${MY_PV}.tar.bz2"
S="${WORKDIR}/${PN}_${MY_PV}"
LICENSE="Boost-1.0"
SLOT="0/${PV}" # ${PV} instead ${MAJOR_V} due to bug 486122
# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="bzip2 context debug doc icu lzma +nls mpi numpy python tools zlib zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
# the tests will never fail because these are not intended as sanity
# tests at all. They are more a way for upstream to check their own code
# on new compilers. Since they would either be completely unreliable
# (failing for no good reason) or completely useless (never failing)
# there is no point in having them in the ebuild to begin with.
RESTRICT="test"
RDEPEND="
!app-admin/eselect-boost
!dev-libs/boost-numpy
!<dev-libs/leatherman-1.12.0-r1
bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )
icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] )
!icu? ( virtual/libiconv[${MULTILIB_USEDEP}] )
lzma? ( app-arch/xz-utils:=[${MULTILIB_USEDEP}] )
mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP},cxx,threads] )
python? (
${PYTHON_DEPS}
numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
)
zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] )
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-util/boost-build-${MAJOR_V}-r2"
PATCHES=(
"${FILESDIR}"/${PN}-1.71.0-disable_icu_rpath.patch
"${FILESDIR}"/${PN}-1.71.0-context-x32.patch
"${FILESDIR}"/${PN}-1.71.0-build-auto_index-tool.patch
# Boost.MPI's __init__.py doesn't work on Py3
"${FILESDIR}"/${PN}-1.73-boost-mpi-python-PEP-328.patch
"${FILESDIR}"/${PN}-1.74-CVE-2012-2677.patch
"${FILESDIR}"/${PN}-1.76-sparc-define.patch
)
python_bindings_needed() {
multilib_is_native_abi && use python
}
tools_needed() {
multilib_is_native_abi && use tools
}
create_user-config.jam() {
local user_config_jam="${BUILD_DIR}"/user-config.jam
if [[ -s ${user_config_jam} ]]; then
einfo "${user_config_jam} already exists, skipping configuration"
return
else
einfo "Creating configuration in ${user_config_jam}"
fi
local compiler compiler_version compiler_executable="$(tc-getCXX)"
if [[ ${CHOST} == *-darwin* ]]; then
compiler="darwin"
compiler_version="$(gcc-fullversion)"
else
compiler="gcc"
compiler_version="$(gcc-version)"
fi
if use mpi; then
local mpi_configuration="using mpi ;"
fi
cat > "${user_config_jam}" <<- __EOF__ || die
using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
${mpi_configuration}
__EOF__
if python_bindings_needed; then
append_to_user_config() {
local py_config
if tc-is-cross-compiler; then
py_config="using python : ${EPYTHON#python} : : ${ESYSROOT}/usr/include/${EPYTHON} : ${ESYSROOT}/usr/$(get_libdir) ;"
else
py_config="using python : ${EPYTHON#python} : ${PYTHON} : $(python_get_includedir) ;"
fi
echo "${py_config}" >> "${user_config_jam}" || die
}
python_foreach_impl append_to_user_config
fi
if python_bindings_needed && use numpy; then
einfo "Enabling support for NumPy extensions in Boost.Python"
else
einfo "Disabling support for NumPy extensions in Boost.Python"
# Boost.Build does not allow for disabling of numpy
# extensions, thereby leading to automagic numpy
# https://github.com/boostorg/python/issues/111#issuecomment-280447482
sed \
-e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' \
-i "${BUILD_DIR}"/libs/python/build/Jamfile || die
fi
}
pkg_setup() {
# Bail out on unsupported build configuration, bug #456792
if [[ -f "${EROOT}"/etc/site-config.jam ]]; then
if ! grep -q 'gentoo\(debug\|release\)' "${EROOT}"/etc/site-config.jam; then
eerror "You are using custom ${EROOT}/etc/site-config.jam without defined gentoorelease/gentoodebug targets."
eerror "Boost can not be built in such configuration."
eerror "Please, either remove this file or add targets from ${EROOT}/usr/share/boost-build/site-config.jam to it."
die "Unsupported target in ${EROOT}/etc/site-config.jam"
fi
fi
}
src_prepare() {
default
multilib_copy_sources
}
ejam() {
create_user-config.jam
local b2_opts=( "--user-config=${BUILD_DIR}/user-config.jam" )
if python_bindings_needed; then
append_to_b2_opts() {
b2_opts+=( python="${EPYTHON#python}" )
}
python_foreach_impl append_to_b2_opts
else
b2_opts+=( --without-python )
fi
b2_opts+=( "$@" )
echo b2 "${b2_opts[@]}" >&2
b2 "${b2_opts[@]}"
}
src_configure() {
# Workaround for too many parallel processes requested, bug #506064
[[ "$(makeopts_jobs)" -gt 64 ]] && MAKEOPTS="${MAKEOPTS} -j64"
OPTIONS=(
$(usex debug gentoodebug gentoorelease)
"-j$(makeopts_jobs)"
-q
-d+2
pch=off
$(usex icu "-sICU_PATH=${ESYSROOT}/usr" '--disable-icu boost.locale.icu=off')
$(usev !mpi --without-mpi)
$(usev !nls --without-locale)
$(usev !context '--without-context --without-coroutine --without-fiber')
--without-stacktrace
--boost-build="${BROOT}"/usr/share/boost-build/src
--layout=system
# building with threading=single is currently not possible
# https://svn.boost.org/trac/boost/ticket/7105
threading=multi
link=shared
# this seems to be the only way to disable compression algorithms
# https://www.boost.org/doc/libs/1_70_0/libs/iostreams/doc/installation.html#boost-build
-sNO_BZIP2=$(usex bzip2 0 1)
-sNO_LZMA=$(usex lzma 0 1)
-sNO_ZLIB=$(usex zlib 0 1)
-sNO_ZSTD=$(usex zstd 0 1)
)
if [[ ${CHOST} == *-darwin* ]]; then
# We need to add the prefix, and in two cases this exceeds, so prepare
# for the largest possible space allocation.
append-ldflags -Wl,-headerpad_max_install_names
fi
# Use C++14 globally as of 1.62
append-cxxflags -std=c++14
}
multilib_src_compile() {
ejam \
--prefix="${EPREFIX}"/usr \
"${OPTIONS[@]}" || die
if tools_needed; then
pushd tools >/dev/null || die
ejam \
--prefix="${EPREFIX}"/usr \
"${OPTIONS[@]}" \
|| die "Building of Boost tools failed"
popd >/dev/null || die
fi
}
multilib_src_install() {
ejam \
--prefix="${ED}"/usr \
--includedir="${ED}"/usr/include \
--libdir="${ED}"/usr/$(get_libdir) \
"${OPTIONS[@]}" install || die "Installation of Boost libraries failed"
if tools_needed; then
dobin dist/bin/*
insinto /usr/share
doins -r dist/share/boostbook
fi
# boost's build system truely sucks for not having a destdir. Because for
# this reason we are forced to build with a prefix that includes the
# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
# DESTROOT instread of the actual EPREFIX. There is no way out of here
# but to do it the dirty way of manually setting the right install_names.
if [[ ${CHOST} == *-darwin* ]]; then
einfo "Working around completely broken build-system(tm)"
local d
for d in "${ED}"/usr/lib/*.dylib; do
if [[ -f ${d} ]]; then
# fix the "soname"
ebegin " correcting install_name of ${d#${ED}}"
install_name_tool -id "/${d#${D}}" "${d}"
eend $?
# fix references to other libs
refs=$(otool -XL "${d}" | \
sed -e '1d' -e 's/^\t//' | \
grep "^libboost_" | \
cut -f1 -d' ')
local r
for r in ${refs}; do
ebegin " correcting reference to ${r}"
install_name_tool -change \
"${r}" \
"${EPREFIX}/usr/lib/${r}" \
"${d}"
eend $?
done
fi
done
fi
}
multilib_src_install_all() {
if ! use numpy; then
rm -r "${ED}"/usr/include/boost/python/numpy* || die
fi
if use python; then
if use mpi; then
move_mpi_py_into_sitedir() {
python_moduleinto boost
python_domodule "${S}"/libs/mpi/build/__init__.py
python_domodule "${ED}"/usr/$(get_libdir)/boost-${EPYTHON}/mpi.so
rm -r "${ED}"/usr/$(get_libdir)/boost-${EPYTHON} || die
python_optimize
}
python_foreach_impl move_mpi_py_into_sitedir
else
rm -r "${ED}"/usr/include/boost/mpi/python* || die
fi
else
rm -r "${ED}"/usr/include/boost/{python*,mpi/python*,parameter/aux_/python,parameter/python*} || die
fi
if ! use nls; then
rm -r "${ED}"/usr/include/boost/locale || die
fi
if ! use context; then
rm -r "${ED}"/usr/include/boost/context || die
rm -r "${ED}"/usr/include/boost/coroutine{,2} || die
rm "${ED}"/usr/include/boost/asio/spawn.hpp || die
fi
if use doc; then
# find extraneous files that shouldn't be installed
# as part of the documentation and remove them.
find libs/*/* \( -iname 'test' -o -iname 'src' \) -exec rm -rf '{}' + || die
find doc \( -name 'Jamfile.v2' -o -name 'build' -o -name '*.manifest' \) -exec rm -rf '{}' + || die
find tools \( -name 'Jamfile.v2' -o -name 'src' -o -name '*.cpp' -o -name '*.hpp' \) -exec rm -rf '{}' + || die
docinto html
dodoc *.{htm,html,png,css}
dodoc -r doc libs more tools
# To avoid broken links
dodoc LICENSE_1_0.txt
dosym ../../../../include/boost /usr/share/doc/${PF}/html/boost
fi
}
pkg_preinst() {
# Yay for having symlinks that are nigh-impossible to remove without
# resorting to dirty hacks like these. Removes lingering symlinks
# from the slotted versions.
local symlink
for symlink in "${EROOT}"/usr/include/boost "${EROOT}"/usr/share/boostbook; do
if [[ -L ${symlink} ]]; then
rm -f "${symlink}" || die
fi
done
# some ancient installs still have boost cruft lying around
# for unknown reasons, causing havoc for reverse dependencies
# Bug: 607734
rm -rf "${EROOT}"/usr/include/boost-1_[3-5]? || die
}
pkg_postinst() {
elog "Boost.Regex is *extremely* ABI sensitive. If you get errors such as"
elog
elog " undefined reference to \`boost::re_detail_$(ver_cut 1)0$(ver_cut 2)00::cpp_regex_traits_implementation"
elog " <char>::transform_primary[abi:cxx11](char const*, char const*) const'"
elog
elog "Then you need to recompile Boost and all its reverse dependencies"
elog "using the same toolchain. In general, *every* change of the C++ toolchain"
elog "requires a complete rebuild of the Boost-dependent ecosystem."
elog
elog "See for instance https://bugs.gentoo.org/638138"
}

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -11,7 +11,7 @@ SRC_URI="https://github.com/google/crc32c/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="amd64 ~riscv x86"
IUSE=""
DOCS=( README.md )

@ -13,7 +13,7 @@ LICENSE="Apache-2.0"
IUSE="debug static-libs test"
#RESTRICT="!test? ( test )"
RESTRICT="test" # restricted til we don't need the shared_nowide patch
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="amd64 ~arm ~hppa ppc ppc64 sparc x86"
SLOT="0/${PV}"
RDEPEND="net-misc/curl"

@ -1 +1,2 @@
DIST leveldb-1.20.tar.gz 223141 BLAKE2B 57ab5cb191679b8fbfaa28fa0a61ee1dcd757bb9c70215dd325daebfd93b30aa9bbe3c993a1758aa9804a7cd6f2c31df7cf98bdf98320cd1aebc14f5eb77d9a5 SHA512 c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2
DIST leveldb-1.23.tar.gz 242925 BLAKE2B ef9ac853cdc2f376b9b4299c1017db8c262cb318ad771f40fe81c9fb71ea06ee56ac533b3e8af4e6fdd28577a2f87cfd103ecb49098187d099ccd6019b8ca1d2 SHA512 ac15eac29387b9f702a901b6567d47a9f8c17cf5c7d8700a77ec771da25158c83b04959c33f3d4de7a3f033ef08f545d14ba823a8d527e21889c4b78065b0f84

@ -0,0 +1,25 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -296,20 +296,12 @@
set(build_gmock ON)
# This project is tested using GoogleTest.
- add_subdirectory("third_party/googletest")
+ find_package(GTest REQUIRED)
# This project uses Google benchmark for benchmarking.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
- add_subdirectory("third_party/benchmark")
-
- # GoogleTest triggers a missing field initializers warning.
- if(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
- set_property(TARGET gtest
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- set_property(TARGET gmock
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- endif(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ find_package(benchmark REQUIRED)
function(leveldb_test test_file)
get_filename_component(test_target_name "${test_file}" NAME_WE)

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -12,7 +12,7 @@ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
# https://github.com/google/leveldb/issues/536
SLOT="0/1"
KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux"
IUSE="+snappy static-libs kernel_FreeBSD +tcmalloc test"
RESTRICT="!test? ( test )"

@ -0,0 +1,39 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
DESCRIPTION="A fast key-value storage library written at Google"
HOMEPAGE="https://github.com/google/leveldb"
SRC_URI="https://github.com/google/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/1"
KEYWORDS="~amd64 ~riscv ~x86 ~amd64-linux ~x86-linux"
IUSE="+crc32c +snappy +tcmalloc test"
RESTRICT="!test? ( test )"
DEPEND="crc32c? ( dev-libs/crc32c )
snappy? ( app-arch/snappy )
tcmalloc? ( dev-util/google-perftools )"
RDEPEND="${DEPEND}"
BDEPEND="test? (
dev-cpp/benchmark
dev-cpp/gtest
)"
PATCHES=(
"${FILESDIR}"/${PN}-1.23-system-testdeps.patch
)
src_configure() {
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DLEVELDB_BUILD_BENCHMARKS=OFF
-DLEVELDB_BUILD_TESTS=$(usex test)
)
cmake_src_configure
}

@ -6,4 +6,7 @@
<remote-id type="github">google/leveldb</remote-id>
<bugs-to>https://github.com/google/leveldb/issues</bugs-to>
</upstream>
<use>
<flag name="crc32c">Link against <pkg>dev-libs/crc32c</pkg> for accelerated CRC32C calculation</flag>
</use>
</pkgmetadata>

@ -12,7 +12,7 @@ S="${WORKDIR}/${PN}-${P}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos ~x86-solaris"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~x86 ~amd64-linux ~x64-macos ~x86-solaris"
IUSE="doc"
BDEPEND="doc? ( app-doc/doxygen )"

@ -16,7 +16,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x
IUSE="iconv"
DEPEND="
dev-libs/kpathsea
dev-libs/kpathsea:=
iconv? ( virtual/libiconv )"
RDEPEND="${DEPEND}"

Binary file not shown.

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

Loading…
Cancel
Save