Sync with portage [Thu Aug 8 19:58:55 MSK 2024].
This commit is contained in:
parent
47b51fd2ed
commit
7ae8979333
1169 changed files with 16459 additions and 6774 deletions
Binary file not shown.
Binary file not shown.
|
@ -3,3 +3,4 @@ DIST aws-cli-1.33.31.gh.tar.gz 2765982 BLAKE2B 424422520aada1a5ab21843e61d502793
|
|||
DIST aws-cli-1.33.35.gh.tar.gz 2768498 BLAKE2B d925c1a63a73bda27711d2f930d0832ea17e012d62d634330cef16f1962cbcbeb9149a5ef14765af04bfbc4b49c6160a319e02a3eab475473a2fe46ab27da305 SHA512 5804947acc002cd9f53b94865542d4f4708116a3a31dafd6a217e84d2222ff973b6c6af0237272d52d9d15e0eaf7f243ef577c1a1b3c2f18e845857886d9f2c1
|
||||
DIST aws-cli-1.33.36.gh.tar.gz 2768813 BLAKE2B dbeaf0049d855da5b20c6ce24201dca4347ce72ca9546b1a6479d864f650fb39b0e557cf1f3a35a3165c118700fd0e06417c2ae594053992a8d16c3a95376e43 SHA512 6de8542a11bfa6e076bb7d99f6573d04b16bcae65c07a33b518d5dc3ea20dacf899f6929c8892731c98e77381ce5986d82e508b2f2c72854d3cd4c647979d41a
|
||||
DIST aws-cli-1.33.37.gh.tar.gz 2769229 BLAKE2B 39ef0d26e555f197cb4b4b588dc1fc9cad1562ba15926e349cae6e409bced94443403c6975ce08c69431accc45557e5659c6a23b686c7d046a7a338b4968a6a1 SHA512 d50150e04695ac651d27c7bdd23e79b5031f9e54fe2f00e6c1b78b5d2a22afac34a242e6473de52c813d85c219274fca472abb9dc70318c203a7638d2f869e42
|
||||
DIST aws-cli-1.33.38.gh.tar.gz 2769355 BLAKE2B fd943a5d41a2426ad022156f48f972915d019e0e20ab9b64d498426402c0fa5d1ab45ffd1927fcc5a49d62266c3b02a81c3875f396e3fc919fcaae1e9b8d5f1e SHA512 27759a759eabe66d2b3058e1c8acb747debf34f5b737f5096937886771d754f3a926a7da82d4fc4e68cd118338a86945f6f4ecc3d23f297af32f12aa1a8f1323
|
||||
|
|
90
app-admin/awscli/awscli-1.33.38.ebuild
Normal file
90
app-admin/awscli/awscli-1.33.38.ebuild
Normal file
|
@ -0,0 +1,90 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
MY_P=aws-cli-${PV}
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="
|
||||
https://github.com/aws/aws-cli/
|
||||
https://pypi.org/project/awscli/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/aws/aws-cli/archive/${PV}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
|
||||
# botocore is x.(y+1).(z+118), sigh
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1 )).$(( $(ver_cut 3-) + 118 ))"
|
||||
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.10.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
!app-admin/awscli-bin
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-forked[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# do not rely on bundled deps in botocore (sic!)
|
||||
find -name '*.py' -exec sed -i \
|
||||
-e 's:from botocore[.]vendored import:import:' \
|
||||
-e 's:from botocore[.]vendored[.]:from :' \
|
||||
{} + || die
|
||||
# strip overzealous upper bounds on requirements
|
||||
sed -i -e 's:,<[0-9.]*::' -e 's:==:>=:' setup.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local serial_tests=(
|
||||
tests/functional/ecs/test_execute_command.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_{fails,success}
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_with_new_version_plugin_success
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking_windows
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestNuGetLogin::test_login_nuget_sources_listed_with_backtracking
|
||||
tests/unit/customizations/ecs/test_executecommand_startsession.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/unit/customizations/test_sessionmanager.py
|
||||
tests/unit/test_compat.py::TestIgnoreUserSignals
|
||||
tests/unit/test_help.py
|
||||
tests/unit/test_utils.py::TestIgnoreCtrlC::test_ctrl_c_is_ignored
|
||||
)
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
EPYTEST_XDIST= epytest "${serial_tests[@]}"
|
||||
|
||||
local EPYTEST_DESELECT=( "${serial_tests[@]}" )
|
||||
# integration tests require AWS credentials and Internet access
|
||||
epytest tests/{functional,unit}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI="7"
|
||||
|
||||
USE_RUBY="ruby31"
|
||||
USE_RUBY="ruby31 ruby32"
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
RUBY_FAKEGEM_TASK_DOC="doc:all"
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="locales"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI="7"
|
||||
|
||||
USE_RUBY="ruby31"
|
||||
USE_RUBY="ruby31 ruby32"
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
RUBY_FAKEGEM_TASK_DOC="doc:all"
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="locales"
|
||||
|
|
Binary file not shown.
|
@ -1 +1,2 @@
|
|||
DIST borgbackup-1.2.8.tar.gz 4369117 BLAKE2B f230274189716e6ecb8f73d10caa13e683e63c9d9f50c5b6235fc666a0f64f3048421e76e5b57626144c37d37d28c4371b368f780f5e32055f62d5ff10954c19 SHA512 9a62e5eec894ebffe928a08c9a0cceebde084f16524d363a3c3be01d908a7eceaea8fa11eac422acc0fdb2534d79d1ee5ec5d9167e1086f334af6a28887616d5
|
||||
DIST borgbackup-1.4.0.tar.gz 3798511 BLAKE2B 06d4d67e211a3ab1bc6d7155cbce8205fb7408a1149e44c77b500af02c25e62a569e3eaf50c11916a2ff9adea47c5791febfb7d0c657d0b195e5c5bbbd33a7d7 SHA512 f5866ece2d153d1e43127a04fd288a09403a9ea2ae4c981cb9ff855bd303b53c133c006f0b1a77541edc4f64940431e9c4d49ec45a3646784a29fe3b8828237a
|
||||
|
|
|
@ -41,7 +41,7 @@ BDEPEND="
|
|||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
# some tests randomly fail with xdist, bug #936524
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
|
@ -57,9 +57,6 @@ python_test() {
|
|||
archiver.py::ArchiverTestCase::test_create_paths_from_command_with_failed_command
|
||||
archiver.py::RemoteArchiverTestCase::test_create_content_from_command_with_failed_command
|
||||
archiver.py::RemoteArchiverTestCase::test_create_paths_from_command_with_failed_command
|
||||
# similar issues since py3.13
|
||||
archiver.py::RemoteArchiverTestCase::test_recreate_rechunkify
|
||||
archiver.py::RemoteArchiverTestCase::test_recreate_skips_nothing_to_do
|
||||
)
|
||||
|
||||
# This disables fuse releated tests
|
||||
|
|
69
app-backup/borgbackup/borgbackup-1.4.0.ebuild
Normal file
69
app-backup/borgbackup/borgbackup-1.4.0.ebuild
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Deduplicating backup program with compression and authenticated encryption"
|
||||
HOMEPAGE="https://borgbackup.readthedocs.io/"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
|
||||
DEPEND="
|
||||
app-arch/lz4
|
||||
app-arch/zstd
|
||||
dev-libs/openssl:0=
|
||||
>=dev-libs/xxhash-0.8.1
|
||||
virtual/acl
|
||||
"
|
||||
# borgbackup is *very* picky about which msgpack it work with,
|
||||
# check setup.py on bumps.
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
<=dev-python/msgpack-1.1.0[${PYTHON_USEDEP}]
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
dev-python/pyfuse3[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
dev-python/pkgconfig[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools-scm[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/python-dateutil[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
# some tests randomly fail with xdist, bug #936524
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# Needs pytest-benchmark fixture
|
||||
benchmark.py::test_
|
||||
)
|
||||
|
||||
# This disables fuse releated tests
|
||||
local -x BORG_FUSE_IMPL="none"
|
||||
epytest --pyargs borg.testsuite
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install
|
||||
doman docs/man/*
|
||||
|
||||
dobashcomp scripts/shell_completions/bash/borg
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins scripts/shell_completions/zsh/_borg
|
||||
|
||||
insinto /usr/share/fish/vendor_completions.d
|
||||
doins scripts/shell_completions/fish/borg.fish
|
||||
}
|
Binary file not shown.
|
@ -1 +1,2 @@
|
|||
DIST sublime_text_build_4169_x64.tar.xz 16572760 BLAKE2B 1760e6a763b58e24c7360bb0068704b820b0ba91169c1e80b9b46ca728eaedd04bd2bca75d602b24034fff895c093131d30209c48c3e7b1c56941da7cf1d3296 SHA512 6764363f8f92f65532d64ba014023e28b18f40dc62a1b114239b59360257d445494f9a2f57580174b5f4994c8fa06cd8f562c9419cfda92324c9ebf25d15e576
|
||||
DIST sublime_text_build_4180_x64.tar.xz 15767020 BLAKE2B 44850b6fffd959361f80f43508b7c9767a5f87a52c9d124cd68dd6eb975c362ca56815c6264f96ca02d836f6184038972539462c6dd8f314430042420dae5b99 SHA512 a115a352311a964268a1460710c562a7843b52c14c452745edb8706ac726e97b867931659b1a3286d44cb19b880f42f00af5bffe88aaa7916181a690e8324e1a
|
||||
|
|
68
app-editors/sublime-text/sublime-text-4_p4180.ebuild
Normal file
68
app-editors/sublime-text/sublime-text-4_p4180.ebuild
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop wrapper xdg
|
||||
|
||||
# get the major version from PV
|
||||
MY_PV=$(ver_cut 3)
|
||||
MY_PN=${PN/-/_}
|
||||
|
||||
DESCRIPTION="Sophisticated text editor for code, markup and prose"
|
||||
HOMEPAGE="https://www.sublimetext.com"
|
||||
SRC_URI="
|
||||
amd64? ( https://download.sublimetext.com/sublime_text_build_${MY_PV}_x64.tar.xz )"
|
||||
S="${WORKDIR}/${MY_PN}"
|
||||
|
||||
LICENSE="Sublime"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="dbus"
|
||||
RESTRICT="bindist mirror strip"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib:2
|
||||
sys-libs/glibc
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libX11
|
||||
dbus? ( sys-apps/dbus )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch
|
||||
"${FILESDIR}"/${PN}-4_p4107-set-explicit-startupwmclass-in-launcher.patch
|
||||
)
|
||||
|
||||
QA_PREBUILT="*"
|
||||
|
||||
# Sublime bundles the kitchen sink, which includes python and other assorted
|
||||
# modules. Do not try to unbundle these because you are guaranteed to fail.
|
||||
|
||||
src_install() {
|
||||
insinto /opt/${MY_PN}
|
||||
doins -r Packages Lib Icon # /Icon is used at runtime by the application
|
||||
doins changelog.txt libcrypto.so.1.1 libssl.so.1.1 libsqlite3.so sublime_text.desktop
|
||||
|
||||
# sublime_merge looks for /opt/sublime_text/sublime_text
|
||||
exeinto /opt/${MY_PN}
|
||||
doexe crash_handler plugin_host-3.3 plugin_host-3.8 sublime_text
|
||||
|
||||
# sublime-text sets its WM_CLASS based on its argv[0]. A wrapper script is
|
||||
# used instead of a symlink to preserve a consistent WM_CLASS regardless of
|
||||
# how the application is launched. This causes the WM_CLASS to be
|
||||
# "sublime_text" which matches the .desktop entry.
|
||||
make_wrapper subl "/opt/${MY_PN}/sublime_text --fwdargv0 \"\$0\""
|
||||
domenu sublime_text.desktop
|
||||
|
||||
local size
|
||||
for size in 16 32 48 128 256; do
|
||||
doicon --size ${size} Icon/${size}x${size}/${PN}.png
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
elog 'Sublime Text 4'"'"'s window class changes from WM_CLASS="subl" to'
|
||||
elog 'WM_CLASS="sublime_text" matching other distributions.'
|
||||
}
|
Binary file not shown.
25
app-misc/ranger/files/ranger-1.9.3-color-crash-fix.patch
Normal file
25
app-misc/ranger/files/ranger-1.9.3-color-crash-fix.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
Backport of crash fix when previewing some files with colors.
|
||||
https://forums.gentoo.org/viewtopic-t-1170286.html
|
||||
https://github.com/ranger/ranger/commit/82eef55b1664
|
||||
https://github.com/ranger/ranger/commit/642d594b8328 (also needed)
|
||||
--- a/ranger/gui/color.py
|
||||
+++ b/ranger/gui/color.py
|
||||
@@ -20,5 +20,6 @@
|
||||
DEFAULT_FOREGROUND = curses.COLOR_WHITE
|
||||
DEFAULT_BACKGROUND = curses.COLOR_BLACK
|
||||
-COLOR_PAIRS = {10: 0}
|
||||
+# Color pair 0 is wired to white on black and cannot be changed
|
||||
+COLOR_PAIRS = {(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND): 0}
|
||||
|
||||
|
||||
@@ -31,4 +32,10 @@
|
||||
try:
|
||||
curses.init_pair(size, fg, bg)
|
||||
+ except ValueError:
|
||||
+ # We're trying to add more pairs than the terminal can store,
|
||||
+ # approximating to the closest color pair that's already stored
|
||||
+ # would be cool but the easier solution is to just fall back to the
|
||||
+ # default fore and background colors, pair 0
|
||||
+ COLOR_PAIRS[key] = 0
|
||||
except curses.error:
|
||||
# If curses.use_default_colors() failed during the initialization
|
|
@ -25,6 +25,10 @@ SLOT="0"
|
|||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-color-crash-fix.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
distutils-r1_src_prepare
|
||||
|
Binary file not shown.
37
app-text/qpdf/files/qpdf-11.9.1-include-cstdint.patch
Normal file
37
app-text/qpdf/files/qpdf-11.9.1-include-cstdint.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
https://github.com/qpdf/qpdf/commit/6918f0b7eb0160059d712ee19ba0ce2d65b9f89c
|
||||
|
||||
From: Christopher Fore <csfore@posteo.net>
|
||||
Date: Mon, 5 Aug 2024 09:41:50 -0400
|
||||
Subject: [PATCH] libtests: include cstdint for GCC 15
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GCC 15 starts to no longer include this by default, requiring it to be
|
||||
explicitly included.
|
||||
|
||||
Error message:
|
||||
libtests/cxx11.cc:75:16: error: ‘uint8_t’ was not declared in this scope
|
||||
75 | check_size<uint8_t>(1, false);
|
||||
| ^~~~~~~
|
||||
libtests/cxx11.cc:10:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
|
||||
9 | #include <regex>
|
||||
+++ |+#include <cstdint>
|
||||
10 | #include <type_traits>
|
||||
|
||||
Signed-off-by: Christopher Fore <csfore@posteo.net>
|
||||
---
|
||||
libtests/cxx11.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libtests/cxx11.cc b/libtests/cxx11.cc
|
||||
index 59c74fa86..953ad00f9 100644
|
||||
--- a/libtests/cxx11.cc
|
||||
+++ b/libtests/cxx11.cc
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <qpdf/assert_test.h>
|
||||
|
||||
+#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <functional>
|
|
@ -54,6 +54,10 @@ QA_CONFIG_IMPL_DECL_SKIP=(
|
|||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jberkenbilt.asc
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-11.9.1-include-cstdint.patch" #937571
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig ; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
|
||||
|
|
Binary file not shown.
68
dev-cpp/abseil-cpp/abseil-cpp-20230125.3-r5.ebuild
Normal file
68
dev-cpp/abseil-cpp/abseil-cpp-20230125.3-r5.ebuild
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Copyright 2020-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit cmake-multilib python-any-r1
|
||||
|
||||
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
|
||||
HOMEPAGE="https://abseil.io/"
|
||||
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0/${PV%%.*}.0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
test? (
|
||||
sys-libs/timezone-data
|
||||
)
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218
|
||||
"${FILESDIR}"/${PN}-random-tests.patch #935417
|
||||
"${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337
|
||||
"${FILESDIR}/${PN}-include-cstdint.patch" #937307
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
# un-hardcode abseil compiler flags
|
||||
sed -i \
|
||||
-e '/"-maes",/d' \
|
||||
-e '/"-msse4.1",/d' \
|
||||
-e '/"-mfpu=neon"/d' \
|
||||
-e '/"-march=armv8-a+crypto"/d' \
|
||||
absl/copts/copts.py || die
|
||||
|
||||
# now generate cmake files
|
||||
python_fix_shebang absl/copts/generate_copts.py
|
||||
absl/copts/generate_copts.py || die
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
# We use -std=c++14 here so that abseil-cpp's string_view is used
|
||||
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
|
||||
-DCMAKE_CXX_STANDARD=14
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||
-DABSL_BUILD_TEST_HELPERS=ON
|
||||
-DABSL_BUILD_TESTING=$(usex test ON OFF)
|
||||
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
68
dev-cpp/abseil-cpp/abseil-cpp-20230802.0-r4.ebuild
Normal file
68
dev-cpp/abseil-cpp/abseil-cpp-20230802.0-r4.ebuild
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Copyright 2020-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit cmake-multilib python-any-r1
|
||||
|
||||
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
|
||||
HOMEPAGE="https://abseil.io/"
|
||||
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0/${PV%%.*}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
test? (
|
||||
sys-libs/timezone-data
|
||||
)
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-20230802.0-sdata-tests.patch"
|
||||
"${FILESDIR}/${PN}-random-tests.patch" #935417
|
||||
"${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337
|
||||
"${FILESDIR}/${PN}-include-cstdint.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
# un-hardcode abseil compiler flags
|
||||
sed -i \
|
||||
-e '/"-maes",/d' \
|
||||
-e '/"-msse4.1",/d' \
|
||||
-e '/"-mfpu=neon"/d' \
|
||||
-e '/"-march=armv8-a+crypto"/d' \
|
||||
absl/copts/copts.py || die
|
||||
|
||||
# now generate cmake files
|
||||
python_fix_shebang absl/copts/generate_copts.py
|
||||
absl/copts/generate_copts.py || die
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
# We use -std=c++14 here so that abseil-cpp's string_view is used
|
||||
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
|
||||
-DCMAKE_CXX_STANDARD=14
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||
-DABSL_BUILD_TEST_HELPERS=ON
|
||||
-DABSL_BUILD_TESTING=$(usex test ON OFF)
|
||||
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
68
dev-cpp/abseil-cpp/abseil-cpp-20240116.2-r4.ebuild
Normal file
68
dev-cpp/abseil-cpp/abseil-cpp-20240116.2-r4.ebuild
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Copyright 2020-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit cmake-multilib python-any-r1
|
||||
|
||||
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
|
||||
HOMEPAGE="https://abseil.io/"
|
||||
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0/${PV%%.*}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
test? (
|
||||
sys-libs/timezone-data
|
||||
)
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-20230802.0-sdata-tests.patch"
|
||||
"${FILESDIR}/${PN}-random-tests.patch" #935417
|
||||
"${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337
|
||||
"${FILESDIR}/${PN}-include-cstdint.patch" #937307
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
# un-hardcode abseil compiler flags
|
||||
sed -i \
|
||||
-e '/"-maes",/d' \
|
||||
-e '/"-msse4.1",/d' \
|
||||
-e '/"-mfpu=neon"/d' \
|
||||
-e '/"-march=armv8-a+crypto"/d' \
|
||||
absl/copts/copts.py || die
|
||||
|
||||
# now generate cmake files
|
||||
python_fix_shebang absl/copts/generate_copts.py
|
||||
absl/copts/generate_copts.py || die
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
# We use -std=c++14 here so that abseil-cpp's string_view is used
|
||||
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
|
||||
-DCMAKE_CXX_STANDARD=14
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||
-DABSL_BUILD_TEST_HELPERS=ON
|
||||
-DABSL_BUILD_TESTING=$(usex test ON OFF)
|
||||
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
33
dev-cpp/abseil-cpp/files/abseil-cpp-include-cstdint.patch
Normal file
33
dev-cpp/abseil-cpp/files/abseil-cpp-include-cstdint.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
https://github.com/abseil/abseil-cpp/commit/809e5de7b92950849289236a5a09e9cb4f32c7b9
|
||||
|
||||
From: Christopher Fore <csfore@posteo.net>
|
||||
Date: Mon, 5 Aug 2024 10:48:19 -0400
|
||||
Subject: [PATCH] container/internal: Explicitly include <cstdint>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GCC 15 will no longer include <cstdint> by default, resulting in build
|
||||
failures in projects that do not explicitly include it.
|
||||
|
||||
Error:
|
||||
absl/container/internal/container_memory.h:66:27: error: ‘uintptr_t’ does not name a type
|
||||
66 | assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
|
||||
| ^~~~~~~~~
|
||||
absl/container/internal/container_memory.h:31:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
|
||||
30 | #include "absl/utility/utility.h"
|
||||
+++ |+#include <cstdint>
|
||||
31 |
|
||||
|
||||
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
|
||||
Signed-off-by: Christopher Fore <csfore@posteo.net>
|
||||
--- a/absl/container/internal/container_memory.h
|
||||
+++ b/absl/container/internal/container_memory.h
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
+#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <new>
|
Binary file not shown.
|
@ -1,6 +1,11 @@
|
|||
DIST postgresql-12.19.tar.bz2 21218699 BLAKE2B d858108017ad9fd1c9813080c18f21cf2574f2b21a9881ae35e0291f3710664890983e71a2cd1c45f10b4c1ff8ab19d9d2383e35217b55e8e67b72b2673bec29 SHA512 c08cb8f902728ea5ab5872fa2e37f8646f6beb4df39425a5a42db30ce86fa499a2059fa57b4eac3089bfba875a85a55144eba5ce6c525c642ba33c82f264b1b5
|
||||
DIST postgresql-12.20.tar.bz2 21256573 BLAKE2B f2611fa2d930b49d7f2bef9b1b77c41c7aa14eccd5e6a487daf4423589f6dd24ad1e17c30b2b926050dcd976e9d8e711b2792aba4409c4015ceb9fd5e18ef9e4 SHA512 720da6cb37209be90f8492d996d9fac90586943273a58691fde6e7855bf36bc5003a4b8be88cdcd32fa9eca3c5cb877af9573cac5e641cf7a4346c1acf935741
|
||||
DIST postgresql-13.15.tar.bz2 21597871 BLAKE2B 63631ea73e42fb846a9a78473d5929a2c9bf91016ef0808578d6ff6ce1e3d862ae1f8524f26f074f2adb30e55fd941ef6ce9b27c5eaa83f41d165f45958e0445 SHA512 6614b3ccf3ab41f34fc36e75f501853b13e0b9900728b8f8bbf8e3ac22783d18b0f05183beab778eb84ca71665574063fac6e1153bcd86bac252a8a9bbff0d8b
|
||||
DIST postgresql-13.16.tar.bz2 21639411 BLAKE2B 546efa5deb024150941973426b0d62e9aa87795eab58139aa569919033e4728c0f4b2d5710ca4c0c77b15dc918caada66a8dab8744e5d00cc7a1f146ca1e40d5 SHA512 e874c77e2d1d27d724f45c576c9d815da55f36712d67e3ec0a1f14ce4ac535fb39b6f23cdcd818cff05788e2c1e12f79572d90f8c145d7478aa35157b0b40679
|
||||
DIST postgresql-14.12.tar.bz2 22390865 BLAKE2B 09848b504c2c970d4b3a5ee3b7eec951f8966c3fcfdd77cea9a001b305ffa8ad55ea08eee2219abb6eb2e6478dddfcd29889308ee8f72eadb39d777e55f5f848 SHA512 cb6729d0fba8aa705c92beecdc5cd1131e64337db6de038da6f5b75c7d9e65381f93f6ebfac601d5622399b9485e8ec558be53e6a7dcc59350a9b053f8836bf9
|
||||
DIST postgresql-14.13.tar.bz2 22414381 BLAKE2B 7b3cb0ea33a8517f9c3627dac8abba4e5f3ba97ecde21a0a605eb31174363baae73f94b9841360001ab01c402b7a3b65bf067c4dbe1689782ab7f44c553d4d12 SHA512 816e15b619a965b32a3afddebbf9cf5aabacc2440e88b11b0743767a353fe6966503c0e2a08c19d2de9705895f7aedadcf105732d0d3494c61402d379770c6d7
|
||||
DIST postgresql-15.7.tar.bz2 23112318 BLAKE2B 6a31ca8b833caf9400ce176211005c2b522e3f431717ad6b73c0df842121d3898dcfddce4626f961539a80b09960fb7659703e6f82d5eadff7217789893b9279 SHA512 8a03e2d7a267f0d11c27d90a2fb605725accb41cfebba2b56c735d4af45bb5f977d4ba051a02ac8d31f93253372df3d3b5efdd159e258d6fcc506b73e3ad6e27
|
||||
DIST postgresql-15.8.tar.bz2 23119460 BLAKE2B 15103c54464217fe2a327cc2e2fe242cfd41ea21365398670883f76cb82a12bb40d60f087676bb1ea294ed688a15a0a147ef121a9136aca79486db7910d12717 SHA512 da610d878819179fcafe8adf6cbe72e188537dbaff82457c67013f9089ae8cbb1f6d8c4d5ea62e4ef54c3e2a90060bd1f36b71b8531354279181e574d903940c
|
||||
DIST postgresql-16.3.tar.bz2 24737644 BLAKE2B 3390c781631645e9f51f31885d20cfeabf64992af9d56addaf847233e0c652aac8751dcf3a7c041962972de084722aee6070437c0517f729b200baf9e4bda2a3 SHA512 dc1c8d4fbc8e53e9be91dcf1b644b3969bd634f11bf5a1c4fe16619fd386f3349a5509788d43e6a57d099ad75233026d4dd4e0bb180ffc747fd3c1a575c51a5f
|
||||
DIST postgresql-17beta2.tar.bz2 21308699 BLAKE2B 4502b9608dbf9bc8d955a7e5f427eec7ea92786999288ad26ee2d8ef4f91443458af0b4dfdc9056589d685ffbdd6bd0b718db7e64672cba61b6bbfd90a026620 SHA512 c942f0fe4241698d359ffbab7dd564c252569792e7472acdb0ad1f7a2029e59d2a64dea6d3880243629769d5f253ff0550666508e476169d718a86803ee44ad0
|
||||
DIST postgresql-16.4.tar.bz2 24765786 BLAKE2B 5ea2661b8ee86fe26e095377e3eede77dc94f40f352db4f0c12038f23b71fea6453f08ba43a62e17dd51ce4eb89e9a82cd06a31f122c1547fd187c58f9fec080 SHA512 f2070299f0857a270317ac984f8393374cf00d4f32a082fe3c5481e36c560595ea711fed95e40d1bc90c5089edf8f165649d443d8b9c68614e1c83fc91268e96
|
||||
DIST postgresql-17beta3.tar.bz2 21464737 BLAKE2B b96a9b46c92e92a41c618c8896286fa1286762ae39e0b4188422792c09175476012fdf6d62aefc7e8c6dd899fb6e28fdbe267cb805176e14cfb7ad944996e473 SHA512 f74f9b3951e75e1d8953f81b12809ab7389271f7d8e5004938540079ecc45fb1666a0d962e556f0460fac8abe85ec90c4c81ec029283217dbda38a7902c46a1d
|
||||
|
|
445
dev-db/postgresql/postgresql-12.20.ebuild
Normal file
445
dev-db/postgresql/postgresql-12.20.ebuild
Normal file
|
@ -0,0 +1,445 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12,13} )
|
||||
LLVM_COMPAT=( {15..18} )
|
||||
LLVM_OPTIONAL=1
|
||||
|
||||
inherit flag-o-matic linux-info llvm-r1 pam 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 ~x64-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 ldap llvm nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl 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? ( $(llvm_gen_dep '
|
||||
sys-devel/clang:${LLVM_SLOT}
|
||||
sys-devel/llvm:${LLVM_SLOT}
|
||||
') )
|
||||
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,musl} )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/bison
|
||||
app-alternatives/lex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm-r1_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
|
||||
[[ -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_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
|
||||
|
||||
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
|
||||
}
|
457
dev-db/postgresql/postgresql-13.16.ebuild
Normal file
457
dev-db/postgresql/postgresql-13.16.ebuild
Normal file
|
@ -0,0 +1,457 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12,13} )
|
||||
LLVM_COMPAT=( {15..18} )
|
||||
LLVM_OPTIONAL=1
|
||||
|
||||
inherit flag-o-matic linux-info llvm-r1 pam 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 ~x64-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 ldap llvm nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl 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? ( $(llvm_gen_dep '
|
||||
sys-devel/clang:${LLVM_SLOT}
|
||||
sys-devel/llvm:${LLVM_SLOT}
|
||||
') )
|
||||
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,musl} )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/bison
|
||||
app-alternatives/lex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm-r1_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.8-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
|
||||
[[ -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_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
|
||||
|
||||
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
|
||||
}
|
457
dev-db/postgresql/postgresql-14.13.ebuild
Normal file
457
dev-db/postgresql/postgresql-14.13.ebuild
Normal file
|
@ -0,0 +1,457 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12,13} )
|
||||
LLVM_COMPAT=( {15..18} )
|
||||
LLVM_OPTIONAL=1
|
||||
|
||||
inherit flag-o-matic linux-info llvm-r1 pam 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 ~x64-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 ldap llvm +lz4 nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl 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? ( $(llvm_gen_dep '
|
||||
sys-devel/clang:${LLVM_SLOT}
|
||||
sys-devel/llvm:${LLVM_SLOT}
|
||||
') )
|
||||
lz4? ( app-arch/lz4 )
|
||||
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,musl} )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/bison
|
||||
app-alternatives/lex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm-r1_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}-14.5-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
|
||||
[[ -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_with icu) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with llvm) \
|
||||
$(use_with lz4) \
|
||||
$(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
|
||||
|
||||
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
|
||||
}
|
459
dev-db/postgresql/postgresql-15.8.ebuild
Normal file
459
dev-db/postgresql/postgresql-15.8.ebuild
Normal file
|
@ -0,0 +1,459 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12,13} )
|
||||
LLVM_COMPAT=( {15..18} )
|
||||
LLVM_OPTIONAL=1
|
||||
|
||||
inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-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 ldap llvm +lz4 nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
|
||||
|
||||
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? ( $(llvm_gen_dep '
|
||||
sys-devel/clang:${LLVM_SLOT}
|
||||
sys-devel/llvm:${LLVM_SLOT}
|
||||
') )
|
||||
lz4? ( app-arch/lz4 )
|
||||
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 )
|
||||
zstd? ( app-arch/zstd )
|
||||
"
|
||||
|
||||
# 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,musl} )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/bison
|
||||
app-alternatives/lex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm-r1_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}-15_beta3-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
|
||||
[[ -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_with icu) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with llvm) \
|
||||
$(use_with lz4) \
|
||||
$(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_with zstd) \
|
||||
$(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
|
||||
|
||||
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
|
||||
}
|
460
dev-db/postgresql/postgresql-16.4.ebuild
Normal file
460
dev-db/postgresql/postgresql-16.4.ebuild
Normal file
|
@ -0,0 +1,460 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12,13} )
|
||||
LLVM_COMPAT=( {15..18} )
|
||||
LLVM_OPTIONAL=1
|
||||
|
||||
inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-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 ldap llvm +lz4 nls pam perl python
|
||||
+readline selinux +server systemd ssl static-libs tcl uuid xml
|
||||
zlib +zstd"
|
||||
|
||||
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? ( app-crypt/mit-krb5 )
|
||||
ldap? ( net-nds/openldap:= )
|
||||
llvm? ( $(llvm_gen_dep '
|
||||
sys-devel/clang:${LLVM_SLOT}
|
||||
sys-devel/llvm:${LLVM_SLOT}
|
||||
') )
|
||||
lz4? ( app-arch/lz4 )
|
||||
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 )
|
||||
zstd? ( app-arch/zstd )
|
||||
"
|
||||
|
||||
# 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,musl} )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/bison
|
||||
app-alternatives/lex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm-r1_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}-15_beta3-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
|
||||
[[ -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_with icu) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with llvm) \
|
||||
$(use_with lz4) \
|
||||
$(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_with zstd) \
|
||||
$(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
|
||||
|
||||
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
|
||||
}
|
|
@ -1,3 +1,2 @@
|
|||
DIST timescaledb-2.14.2.tar.gz 7319288 BLAKE2B aa6d56939a4647f9276743cabece77c33760e7f9d451b90aaa03c9391fcfad94afcd315b65c0c589c7188073884bf7ab65f9c796e35f634b8704f334ffa4ac34 SHA512 5a7ab4df5d89b83d423be5d6770098ab0303b22e29166afd3ab91ac2199571df20e33ec9f40bfa90ddf44829571fe696f311d81d27b46d569f2d75e75970e4f9
|
||||
DIST timescaledb-2.15.2.tar.gz 7440309 BLAKE2B eedec0a989ed216704d14b840ed2113e335dd5594a74f4c20e3aa369dade97f0566d777484758bb7e270720155b2b20a029e6922fb3a141a1346f7d68df2777c SHA512 956f828a282638945037a5c7a8eaf39a1698de5e40ab89b8a60af5a4e5585fdf17eeeafc34e90f03df4a13bbe95466245babb09845a2020f65c77183fccce78e
|
||||
DIST timescaledb-2.15.3.tar.gz 7441097 BLAKE2B 35d6edb31be79045ab8b8b409e4fcd28acac261f96be946dfa079bc544890391a6fe1f4695b0c88c8d56aca674563b4f347bb1f5519923b38aeb992e4a527f1c SHA512 c259bea088a03286a392812b23eda05ba7e5c714f9b52cd25b39ea9a280c5147e43d13a71027c43a5029df03e021a0022feb1ae311baae577ec3c56f1d7dfcae
|
||||
DIST timescaledb-2.16.1.tar.gz 7449327 BLAKE2B 4eac0f41596db1b7669850cbb576a2d710998f7207f566fb9b4965804e6810f1571d18058a126acdae7862bf77424db44f27720f3600d1191ae1a3c3cf8680ae SHA512 4972ccc385a3c7bda8fab8736c63f75c5b290a3a0206add84718326fcd07c24a52dbbae2114e857fb78246bf5a4b5ec3310cc2219a163af4d5f30f1766e37fae
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
POSTGRES_COMPAT=( 13 14 15 16 )
|
||||
POSTGRES_USEDEP="ssl"
|
||||
|
||||
inherit postgres-multi cmake
|
||||
|
||||
DESCRIPTION="Open-source time-series SQL database"
|
||||
HOMEPAGE="https://www.timescale.com/"
|
||||
SRC_URI="https://github.com/timescale/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
IUSE="proprietary-extensions"
|
||||
LICENSE="POSTGRESQL Apache-2.0 proprietary-extensions? ( timescale )"
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
SLOT=0
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="${POSTGRES_DEP}"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
CMAKE_IN_SOURCE_BUILD=yes
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
BUILD_DIR=${WORKDIR}/${P}
|
||||
|
||||
src_prepare() {
|
||||
postgres-multi_src_prepare
|
||||
postgres-multi_foreach cmake_src_prepare
|
||||
}
|
||||
|
||||
timescale_configure() {
|
||||
local CMAKE_USE_DIR=$BUILD_DIR
|
||||
local mycmakeargs=( "-DPG_CONFIG=/usr/bin/pg_config${MULTIBUILD_VARIANT}" "-DREGRESS_CHECKS=OFF" )
|
||||
|
||||
# licensing is tied to features, this useflag disables the non-apache2 licensed bits
|
||||
if ! use proprietary-extensions ; then
|
||||
mycmakeargs+=("-DAPACHE_ONLY=ON")
|
||||
fi
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
postgres-multi_foreach timescale_configure
|
||||
}
|
||||
|
||||
timescale_src_compile() {
|
||||
local CMAKE_USE_DIR=$BUILD_DIR
|
||||
cmake_src_compile
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
postgres-multi_foreach timescale_src_compile
|
||||
}
|
||||
|
||||
timescale_src_install() {
|
||||
local CMAKE_USE_DIR=$BUILD_DIR
|
||||
cmake_src_install
|
||||
}
|
||||
|
||||
src_install() {
|
||||
postgres-multi_foreach timescale_src_install
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI=8
|
||||
|
||||
POSTGRES_COMPAT=( 13 14 15 16 )
|
||||
POSTGRES_COMPAT=( 14 15 16 )
|
||||
POSTGRES_USEDEP="ssl"
|
||||
|
||||
inherit postgres-multi cmake
|
Binary file not shown.
|
@ -4,3 +4,5 @@ DIST golangci-lint-1.55.2-deps.tar.xz 43815104 BLAKE2B a352c9cad3e5e2f5544320fc0
|
|||
DIST golangci-lint-1.55.2.tar.gz 1687534 BLAKE2B 14bfbeabd5e08c871e368b8dd94a5e2cc4f1673e5b221d1d5d44b0fed076ea68a80b563d562803fcb384c655bb1689f891e255990059e9720804373d1d51d43c SHA512 286749a6aaa89ae7400894b04fa64490543cbc4703c0d5a9252cfe01fba331e1323828b57d5051bf13dc041b5266a979ed31facba610d0814fce0462f5571718
|
||||
DIST golangci-lint-1.56.2-deps.tar.xz 140638164 BLAKE2B 669e2ef488f1bf00c9d4d8f5a0cca708f223bedc894c9ca4affa6a03e6c8c9b77ad1ff37f5c1eb1054203aaf86285410cbf805f9eb529f8788b1d390d3c58c81 SHA512 50c0e83c353d83dce468e2fefce6ec351ac486b9e94e8999232769d201636fde0c9aa73f1e1306ee33be3720b554bc04866e3d86eb836517fbcfbb36a1e2b91a
|
||||
DIST golangci-lint-1.56.2.tar.gz 1695476 BLAKE2B 8e27301bab34cd0adf80943effac342653901adb148a7b232bde6f6fad8fdcfbece10cdd7f6b91a6eeecb2106bc765156392ec62befdb5309b947fe9098b64f8 SHA512 ab768d58f0888cbda2728c90ac9063f4f15b4fd0e13eefc23a0af4994801860ce9ed9585903678f0e917381f56d8db3941af59c32b287b5e0e58177bff29f4d1
|
||||
DIST golangci-lint-1.59.1-deps.tar.xz 22945248 BLAKE2B 7fa2ebe069bdb160ac699fc9dfaed43bd64be0c95e5534e4f1f252e46762f462581ce207e4a10b14892f14e98fb86e3c92e205b03f2cf30ee4608443a26c3981 SHA512 a0657ae96e9e4ef100768f9d6e035d0eae3c70c331be912a76f49250eb5c1da681abfc8e397e594a00a73d2db7a47d2ca822b86a1b5afc650d8dd15c1c4796b6
|
||||
DIST golangci-lint-1.59.1.tar.gz 1713897 BLAKE2B be46b4f1352e08e83abe1bed2f7955c231a8abd493ce57e659fb8c582336149785383b01a0a1db7a669f2075a14ecd741e5e4471d59c5ff06b1cefdedb9e7bc3 SHA512 630a14dd1c3889a0cdb4d085a122a038ed677bc685cc34827aed5f9702e96c82d73695fe63353bc39f261dd29e0b10eb9e17bc279cc4b9aab5efd008f0f1db73
|
||||
|
|
29
dev-go/golangci-lint/golangci-lint-1.59.1.ebuild
Normal file
29
dev-go/golangci-lint/golangci-lint-1.59.1.ebuild
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module
|
||||
DESCRIPTION="Fast linters runner for Go"
|
||||
HOMEPAGE="https://github.com/golangci/golangci-lint"
|
||||
SRC_URI="https://github.com/golangci/golangci-lint/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
src_compile() {
|
||||
emake build
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin golangci-lint
|
||||
einstalldocs
|
||||
dodoc CHANGELOG.md
|
||||
}
|
Binary file not shown.
|
@ -48,7 +48,6 @@ RDEPEND="
|
|||
${CP_DEPEND}
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
TARBALL_S="${S}/${MY_PN}3-${PV}"
|
||||
|
||||
JAVA_SRC_DIR="org"
|
||||
|
|
|
@ -23,6 +23,7 @@ SRC_URI="
|
|||
https://github.com/antlr/antlr4/archive/${PV}.tar.gz -> ${MY_P}.tar.gz
|
||||
https://repo1.maven.org/maven2/org/antlr/antlr4/${PV}/antlr4-${PV}-sources.jar -> ${P}-sources.jar
|
||||
"
|
||||
S="${WORKDIR}/${MY_PN}4-${PV}"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="4"
|
||||
|
@ -51,8 +52,6 @@ RDEPEND="
|
|||
${CP_DEPEND}
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}4-${PV}"
|
||||
|
||||
JAVA_SRC_DIR=(
|
||||
tool/src
|
||||
../src/org # For UnicodeData.java
|
||||
|
@ -103,7 +102,7 @@ src_test() {
|
|||
)
|
||||
local CP="${S}/${JAVA_JAR_FILENAME}"
|
||||
for test_dep in "${test_deps[@]}"; do
|
||||
CP+=":$(java-pkg_getjars --with-dependencies "${test_dep}")"
|
||||
CP+=":$(java-pkg_getjars --build-only --with-dependencies "${test_dep}")"
|
||||
done
|
||||
for res_dir in "${JAVA_TEST_RESOURCE_DIRS[@]}"; do
|
||||
CP+=":${res_dir}"
|
64
dev-java/fec/fec-1.0.4-r5.ebuild
Normal file
64
dev-java/fec/fec-1.0.4-r5.ebuild
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit flag-o-matic toolchain-funcs java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Forward Error Correction library in Java"
|
||||
HOMEPAGE="https://github.com/hyphanet/contrib/blob/master/README"
|
||||
SRC_URI="https://dev.gentoo.org/~monsieurp/packages/${P}.tar.gz"
|
||||
S="${WORKDIR}/${P}"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
|
||||
CP_DEPEND="dev-java/log4j-12-api:2"
|
||||
|
||||
RDEPEND="${CP_DEPEND}
|
||||
>=virtual/jre-1.8:*"
|
||||
|
||||
DEPEND="${CP_DEPEND}
|
||||
>=virtual/jdk-1.8:*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/"${P}-libfec8path.patch"
|
||||
"${FILESDIR}"/"${P}-build.patch"
|
||||
"${FILESDIR}"/"${P}-soname.patch"
|
||||
"${FILESDIR}"/"${P}-remove-concurrent-util-imports.patch"
|
||||
)
|
||||
|
||||
JAVA_RESOURCE_DIRS="bin"
|
||||
JAVA_SRC_DIR="src"
|
||||
|
||||
src_prepare() {
|
||||
default #780585
|
||||
java-pkg-2_src_prepare
|
||||
java-pkg_clean
|
||||
|
||||
# tests have never been enabled on this package. anyway, keeping this
|
||||
# package with sources hosted in dev-space is only a workaround until
|
||||
# we have a solution for bug #936539. the time for bothering with tests
|
||||
# should be saved for that part.
|
||||
#
|
||||
# for the time being we keep removing the tests like before.
|
||||
rm -rf tests || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
java-pkg-simple_src_compile
|
||||
einfo "Sucessfully compiled Java classes!"
|
||||
|
||||
cd "${S}"/src/csrc || die
|
||||
append-flags -fPIC
|
||||
emake CC=$(tc-getCC) CFLAGS="${CFLAGS} $(java-pkg_get-jni-cflags)"
|
||||
einfo "Sucessfully compiled C files!"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg-simple_src_install
|
||||
dolib.so src/csrc/libfec{8,16}.so
|
||||
}
|
56
dev-java/javahelp/javahelp-2.0.05_p20170719-r4.ebuild
Normal file
56
dev-java/javahelp/javahelp-2.0.05_p20170719-r4.ebuild
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
JAVA_PKG_IUSE="doc examples source"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="The JavaHelp system online help system"
|
||||
HOMEPAGE="https://javaee.github.io/javahelp/"
|
||||
COMMIT="3ca862d8626096770598a3a256886d205246f4a4"
|
||||
SRC_URI="https://github.com/javaee/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${COMMIT}"
|
||||
|
||||
LICENSE="GPL-2-with-linking-exception"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
CP_DEPEND="
|
||||
dev-java/javax-jsp-api:2.0
|
||||
dev-java/javax-servlet-api:2.5
|
||||
"
|
||||
|
||||
DEPEND="${CP_DEPEND}
|
||||
virtual/jdk:1.8"
|
||||
|
||||
RDEPEND="${CP_DEPEND}
|
||||
>=virtual/jre-1.8:*"
|
||||
|
||||
JAVA_JAR_FILENAME="jhall.jar"
|
||||
JAVA_GENTOO_CLASSPATH_EXTRA="javahelp_nbproject/lib/jdic-stub.jar"
|
||||
JAVA_RESOURCE_DIRS="res"
|
||||
JAVA_SRC_DIR=(
|
||||
jhMaster/JavaHelp/src/{new,impl}
|
||||
jhMaster/JSearch/{client,indexer}
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
java-pkg-2_src_prepare
|
||||
mkdir res || die
|
||||
pushd jhMaster/JavaHelp/src/new >> /dev/null || die
|
||||
find -type f ! -name '*.java' | xargs cp --parents -t ../../../../res || die
|
||||
popd >> /dev/null || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg-simple_src_install
|
||||
|
||||
java-pkg_dolauncher jhsearch \
|
||||
--main com.sun.java.help.search.QueryEngine
|
||||
java-pkg_dolauncher jhindexer \
|
||||
--main com.sun.java.help.search.Indexer
|
||||
|
||||
use examples && java-pkg_doexamples jhMaster/JavaHelp/demos
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
DIST protobuf-23.0.tar.gz 5039837 BLAKE2B 63e02590b03fd9206cdfc4a26edeb2fa55dac902f5365c33c9e9340a722f552e4a5c82d1a0b25b84fcb675d5d06b768fd92cf472743d2361295129ae9faa02f3 SHA512 46c263fab189fdc310c7310d1a3d9e76472e5d96f16228bc4b946d4211afc64188d563ec70250c11a3dd05d18158b72ccf173567bd59aa45310eff62cd5f194d
|
||||
DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1f8ea1b2249fb3e9f6fcf63312c6e10e9da65b80629fb08d5fb08d05a19bb9c752c25b892c1e3fd6f18b9279eb3 SHA512 646af367dbc61b42e322cf0b335f360e428b272e2b1f5361b2f17c18d3dc9dddd615e1279436028b1a42275a0beadda37c2c934fc27d6c892131cc8d526d8b3b
|
||||
DIST protobuf-23.4.tar.gz 5043507 BLAKE2B bf6a50771eb977ef92b779a32fd909693faae6394254c73e3c9b2729bce643f8cbfb5a1bd18b30abf3003b9fbfd24c074cea4085a6ccf14fdb6a3aeac9efcb89 SHA512 b93a4e0339ecbe085796de5b6c61feae35229d40db9019c043090bcaa483a1cce78a99487c5638482c68832fcede5579a0e5ec731221a88359b80db9bb6dc566
|
||||
DIST protobuf-25.3.tar.gz 5878962 BLAKE2B 9268f9bd993a1cfd6d3937a2ad56ba4cfe3d84923756513841cbf13039d4a07acb260468745cb1294f30334cb34b45c6fde272f5c40d9de63ac6a4ce5c263077 SHA512 1f73e237c919082e5423ae9e2ea8813dccf672c059051d1531fe89ffaa45872d3cf3052b8c3af26f674296ec17d7dc861c67b8f0834ed80261ce4a6a14ed7115
|
||||
DIST protobuf-26.1.tar.gz 5957903 BLAKE2B 1a7faab2f56aa0995801a80f73a812c7fc38a00af0bf25bdd5eecf7aec27a86a575ea2fb8484787d19c9ac6e46007c9864e79464f529c446f31af732981feed1 SHA512 0363ac09f92d8e040491425d444c8dca0b9b430e02d2dff6e2b28a0c2b2bea0d33a47f50bc9e2e2d4e8e22b65a02009a20c0066fb89c75df93a7b703dda42ed4
|
||||
DIST protobuf-27.2.tar.gz 6282174 BLAKE2B 86d12e9f87e8e1c2961ad517115c8689a8dd984722513816d8d626e59a76f5e7a698a90cbf6007daacf66c6053c9ff28108ff113579a442ce61cd221178bda44 SHA512 664c66b62cf1ed0c65d9b910d8e67d4d5d471113697f1b8edf1573cd5c0fc8e850ac53ce984e48e6c6b9cbbefa12f8530058384e7388e65a59c1e46d03772397
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2008-2023 Gentoo Authors
|
||||
# Copyright 2008-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
@ -21,7 +21,6 @@ S="${WORKDIR}/protobuf-${PV#3.}"
|
|||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~arm64 ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="system-protoc"
|
||||
|
||||
DEPEND="
|
||||
>=virtual/jdk-1.8:*
|
||||
|
@ -31,10 +30,9 @@ DEPEND="
|
|||
)
|
||||
"
|
||||
RDEPEND=">=virtual/jre-1.8:*"
|
||||
|
||||
BDEPEND="
|
||||
system-protoc? ( ~dev-libs/protobuf-${PV#3.}:0 )
|
||||
!system-protoc? ( >=dev-cpp/abseil-cpp-20230125.2 )
|
||||
>=dev-cpp/abseil-cpp-20230125.2
|
||||
<dev-cpp/abseil-cpp-20240116.2
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
|
@ -50,20 +48,11 @@ JAVA_TEST_GENTOO_CLASSPATH="guava,junit-4,mockito-4"
|
|||
JAVA_TEST_SRC_DIR="java/core/src/test/java"
|
||||
|
||||
run-protoc() {
|
||||
if use system-protoc; then
|
||||
protoc $1
|
||||
else
|
||||
"${BUILD_DIR}"/protoc $1
|
||||
fi
|
||||
"${BUILD_DIR}"/protoc $1
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# If the corrsponding version of system-protoc is not available we build protoc locally
|
||||
if use system-protoc; then
|
||||
:
|
||||
else
|
||||
cmake_src_prepare
|
||||
fi
|
||||
cmake_src_prepare
|
||||
java-pkg-2_src_prepare
|
||||
|
||||
mkdir "${JAVA_RESOURCE_DIRS}" || die
|
||||
|
@ -104,19 +93,11 @@ src_configure() {
|
|||
-Dprotobuf_BUILD_TESTS=OFF
|
||||
-Dprotobuf_ABSL_PROVIDER=package
|
||||
)
|
||||
if use system-protoc; then
|
||||
:
|
||||
else
|
||||
cmake_src_configure
|
||||
fi
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use system-protoc; then
|
||||
:
|
||||
else
|
||||
cmake_src_compile
|
||||
fi
|
||||
cmake_src_compile
|
||||
|
||||
einfo "Run protoc to generate sources"
|
||||
run-protoc \
|
167
dev-java/protobuf-java/protobuf-java-3.23.4.ebuild
Normal file
167
dev-java/protobuf-java/protobuf-java-3.23.4.ebuild
Normal file
|
@ -0,0 +1,167 @@
|
|||
# Copyright 2008-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
JAVA_PKG_IUSE="doc source test"
|
||||
MAVEN_ID="com.google.protobuf:protobuf-java:3.23.3"
|
||||
JAVA_TESTING_FRAMEWORKS="junit-4"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple cmake
|
||||
|
||||
DESCRIPTION="Core Protocol Buffers library"
|
||||
HOMEPAGE="https://protobuf.dev"
|
||||
# Currently we bundle the binary version of truth.jar used only for tests, we don't install it.
|
||||
# And we build artifact 3.23.4 from the 23.4 tarball in order to allow sharing the tarball with
|
||||
# dev-libs/protobuf.
|
||||
SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV#3.}.tar.gz -> protobuf-${PV#3.}.tar.gz
|
||||
test? ( https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar )"
|
||||
S="${WORKDIR}/protobuf-${PV#3.}"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="system-protoc"
|
||||
|
||||
BDEPEND="
|
||||
system-protoc? ( ~dev-libs/protobuf-${PV#3.}:0 )
|
||||
!system-protoc? (
|
||||
>=dev-cpp/abseil-cpp-20230125.3
|
||||
<dev-cpp/abseil-cpp-20240116.2
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=virtual/jdk-1.8:*
|
||||
test? (
|
||||
dev-java/guava:0
|
||||
dev-java/mockito:4
|
||||
)
|
||||
"
|
||||
RDEPEND=">=virtual/jre-1.8:*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/protobuf-java-3.23.0-unittest_retention.proto.patch"
|
||||
)
|
||||
|
||||
JAVA_AUTOMATIC_MODULE_NAME="com.google.protobuf"
|
||||
JAVA_JAR_FILENAME="protobuf.jar"
|
||||
JAVA_RESOURCE_DIRS="java/core/src/main/resources"
|
||||
JAVA_SRC_DIR="java/core/src/main/java"
|
||||
|
||||
JAVA_TEST_GENTOO_CLASSPATH="guava,junit-4,mockito-4"
|
||||
JAVA_TEST_SRC_DIR="java/core/src/test/java"
|
||||
|
||||
run-protoc() {
|
||||
if use system-protoc; then
|
||||
protoc $1
|
||||
else
|
||||
"${BUILD_DIR}"/protoc $1
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# If the corrsponding version of system-protoc is not available we build protoc locally
|
||||
if use system-protoc; then
|
||||
default # apply patches
|
||||
else
|
||||
cmake_src_prepare
|
||||
fi
|
||||
java-pkg-2_src_prepare
|
||||
|
||||
mkdir "${JAVA_RESOURCE_DIRS}" || die
|
||||
# https://github.com/protocolbuffers/protobuf/blob/v23.4/java/core/pom.xml#L43-L62
|
||||
PROTOS=( $(sed \
|
||||
-n '/google\/protobuf.*\.proto/s:.*<include>\(.*\)</include>:\1:p' \
|
||||
"${S}/java/core/pom.xml") ) || die
|
||||
pushd src > /dev/null || die
|
||||
cp --parents -v "${PROTOS[@]}" ../"${JAVA_RESOURCE_DIRS}" || die
|
||||
popd > /dev/null || die
|
||||
|
||||
# https://github.com/protocolbuffers/protobuf/blob/v23.4/java/core/generate-sources-build.xml
|
||||
einfo "Replace variables in generate-sources-build.xml"
|
||||
sed \
|
||||
-e 's:${generated.sources.dir}:java/core/src/main/java:' \
|
||||
-e 's:${protobuf.source.dir}:src:' \
|
||||
-e 's:^.*value="::' -e 's:\"/>::' \
|
||||
-e '/project\|echo\|mkdir\|exec/d' \
|
||||
-i java/core/generate-sources-build.xml || die "sed to sources failed"
|
||||
|
||||
# https://github.com/protocolbuffers/protobuf/blob/v23.4/java/core/generate-test-sources-build.xml
|
||||
einfo "Replace variables in generate-test-sources-build.xml"
|
||||
sed \
|
||||
-e 's:${generated.testsources.dir}:java/core/src/test/java:' \
|
||||
-e 's:${protobuf.source.dir}:src:' \
|
||||
-e 's:${test.proto.dir}:java/core/src/test/proto:' \
|
||||
-e 's:^.*value="::' -e 's:\"/>::' \
|
||||
-e '/project\|mkdir\|exec\|Also generate/d' \
|
||||
-i java/core/generate-test-sources-build.xml || die "sed to test sources failed"
|
||||
|
||||
# Split the file in two parts, one for each run-protoc call
|
||||
awk '/--java_out/{x="test-sources-build-"++i;}{print > x;}' \
|
||||
java/core/generate-test-sources-build.xml || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-Dprotobuf_BUILD_TESTS=OFF
|
||||
-Dprotobuf_ABSL_PROVIDER=package
|
||||
)
|
||||
if use system-protoc; then
|
||||
:
|
||||
else
|
||||
cmake_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use system-protoc; then
|
||||
:
|
||||
else
|
||||
cmake_src_compile
|
||||
fi
|
||||
|
||||
einfo "Run protoc to generate sources"
|
||||
run-protoc \
|
||||
@java/core/generate-sources-build.xml \
|
||||
|| die "protoc sources failed"
|
||||
|
||||
java-pkg-simple_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# https://github.com/protocolbuffers/protobuf/blob/v23.4/java/core/pom.xml#L63-L71
|
||||
jar cvf testdata.jar \
|
||||
-C src google/protobuf/testdata/golden_message_oneof_implemented \
|
||||
-C src google/protobuf/testdata/golden_packed_fields_message || die
|
||||
|
||||
JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/truth-1.1.3.jar:testdata.jar"
|
||||
|
||||
einfo "Running protoc on first part of generate-test-sources-build.xml"
|
||||
run-protoc @test-sources-build-1 \
|
||||
|| die "run-protoc test-sources-build-1 failed"
|
||||
|
||||
einfo "Running protoc on second part of generate-test-sources-build.xml"
|
||||
run-protoc @test-sources-build-2 \
|
||||
|| die "run-protoc test-sources-build-2 failed"
|
||||
|
||||
einfo "Running tests"
|
||||
# Invalid test class 'map_test.MapInitializationOrderTest':
|
||||
# 1. Test class should have exactly one public constructor
|
||||
# Invalid test class 'protobuf_unittest.CachedFieldSizeTest':
|
||||
# 1. Test class should have exactly one public constructor
|
||||
pushd "${JAVA_TEST_SRC_DIR}" || die
|
||||
local JAVA_TEST_RUN_ONLY=$(find * \
|
||||
-path "**/*Test.java" \
|
||||
! -path "**/Abstract*Test.java" \
|
||||
! -name "MapInitializationOrderTest.java" \
|
||||
! -path '*protobuf_unittest/CachedFieldSizeTest.java'
|
||||
)
|
||||
popd
|
||||
JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
|
||||
JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
|
||||
java-pkg-simple_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg-simple_src_install
|
||||
}
|
Binary file not shown.
|
@ -1,2 +1,2 @@
|
|||
DIST kotlin-compiler-1.9.24.zip 91056044 BLAKE2B b872635e83b334cf4b8ee6f2aad5f4d1cf44594848c02a027fd3f7adcffb6d05232e66658ed8e6e234c2ea0996728338f6fdd46628ccfeddeeb5f3b330307340 SHA512 cc6f3cd141faed849f0c8b11b4473f30211d242001292eecc1a0927151034afd892840289457cef6fc8a201dacf157fdb5782cf0a96d27bfa2b3693fac118a84
|
||||
DIST kotlin-compiler-2.0.0.zip 83767523 BLAKE2B 4627ec2ccf0751baee141a980f14bace98a96b4f826b72f001dc2e27afe1fa60b3967e533e775f7dd81a5e682670cd38c02378884a2d543caca050aee519e765 SHA512 ca723146188a60a995089d4b06bb23c83bfb2dbaabbbad632921601babbccddf4e3f0519692018480b7a0a7a1d0ce3002dcb6f4a445dc2dfa2a2b8f4e39364c7
|
||||
DIST kotlin-compiler-2.0.10.zip 83745882 BLAKE2B acd359e348fdb8fbb339a2fcd5fedb165990cc366f0c717644360267aa161e96b8813e0569a0ebc8f2d5de65f25c780c733b6b50c14e8b943344c31a492f0534 SHA512 ba0eac447eb62726604fe9f0d563b1fa8d23001f3ed6053954269e3f342886533a1fa2a8fc4d8f1e7aaae7b94db96a72f195f2b886eb7a50d1e6c25ac80ba106
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
DIST nim-2.0.4.tar.xz 7620508 BLAKE2B cf7c737d734c5a468ac9229fb021bcd252c5c4f20ab091ec0ce27eb36ba44be8b438536aa39aa8c583483a7ce15dfbb91b1deb1c19794b3d77506d23096a4460 SHA512 1918b3d4a4fc02714677b2ca5051dc69e1d1daead2cf4dcc9b997076540d07d58ee4fe3049de86a37faa3143de1d3b95bedfa31f31d8463987bb267107459793
|
||||
DIST nim-2.0.6.tar.xz 7668088 BLAKE2B 1cc2b3be355b236b467fa6629747de55b60b6d2f3e9d8bc584fa4f30ba842d68a0db984aff234df1299b0a782af1d464382bb37fa62c0c7a952e667bf0d3c3be SHA512 9668b34decb55fd27f0edb8c6dcdd2d8dbed00f71e8ce5c177422aedbcc359f4b943b29a38875f4715c1903a32b8388e2a4662d5ceb301349b23eb2277dbde1e
|
||||
DIST nim-2.0.8.tar.xz 7617556 BLAKE2B 96ab3e92c7c9d3dcb54de6528f2ae788f3ff4a927d693f2ca4917231441d85d12c8bda44c41c8f363979dbd0d8db54098648512caf7780bdc40e393c4f7803ec SHA512 e64abc379c046a9432515d1c8074a7e10ff72a1076663a5b7bdd39ae92852c98ba2cab96aa5e968fc31ca393e778e70b2392d6ab56bca7ac956d0176b4b69a83
|
||||
DIST nim-atlas-0.8.0.tar.gz 59097 BLAKE2B 231b238ac3b15cc2c2d9ad927f80ae72d8ae4c649277515f32df6cc04275ccd38db5307d627572af547501e6522c06c86dc279dc3e13b5385f14e24032f6fe69 SHA512 747c13e2c5bd45a1dc6c1426f8c7637f638ada9dd4c9aa3edf4ef8367060e73226dc4bcde6380fac25ed47ebf4097fd223c72fadc3cceba8c71dd0f0571e47eb
|
||||
|
|
|
@ -18,7 +18,7 @@ SRC_URI="
|
|||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~x86"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="test-js test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
|
@ -77,6 +77,9 @@ src_configure() {
|
|||
EOF
|
||||
|
||||
cp -r "${WORKDIR}/atlas-${ATLAS_V}" "${S}/dist/atlas" || die
|
||||
|
||||
mkdir -p "${S}/dist/atlas/dist" || die
|
||||
cp -r "${S}/dist/nimble/dist/sat" "${S}/dist/atlas/dist/sat" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
|
@ -100,14 +103,14 @@ src_compile() {
|
|||
|
||||
src_test() {
|
||||
local -x PATH="${S}/bin:${PATH}"
|
||||
local -a -r nimflags=(
|
||||
local -a nimflags=(
|
||||
# Leave only the safe hints enabled.
|
||||
--hint:all:off
|
||||
--hint:User:on
|
||||
--hint:UserRaw:on
|
||||
)
|
||||
local -a testament_args=(
|
||||
--skipFrom:"${FILESDIR}/${PN}-2.0.4-testament-skipfile.txt"
|
||||
--skipFrom:"${FILESDIR}/${PN}-2.0.6-testament-skipfile.txt"
|
||||
--nim:"bin/nim"
|
||||
--targets:"$(usex test-js 'c js' 'c')"
|
||||
)
|
|
@ -8,6 +8,8 @@ DIST Python-3.12.3.tar.xz 20625068 BLAKE2B fc4f57ae50183db4c8cb37d94c37a7e58da5d
|
|||
DIST Python-3.12.3.tar.xz.asc 963 BLAKE2B f9668dde210793f8da0e0bb026b8ec3e0b4bc3abc58e72732f8faf356b19ca88a59b9d89b4b10f77b3602d9a967f0f2f44a0f091d698bc28ba9bad8049e5e006 SHA512 c291ec5b5e4f8deba867cc517624dd9a174745f04061ef737e58f3d52b9b30318264aec350e339fe88ccb493809ca1a90a378e86d86b8ec4a4f578b1a5843624
|
||||
DIST Python-3.12.4.tar.xz 20659356 BLAKE2B 4255171ef8ee1777bab829be7bbaf28a9d5073985b3b1309a41694dda5f6b4ad599df4534a1ce83ec65b357d42416cc18722ca94b4227a45ebd90e2c1df90945 SHA512 750132ee6369196096130a924f4ddb78b9a55804133e5d136a70b9280928822974d1aa559d844486df02e89155fb0d8117871e1ac532abc18174309ca4b08369
|
||||
DIST Python-3.12.4.tar.xz.asc 963 BLAKE2B d4f62dca1de5f4e4b2581fc49ca55b1d87abe7c4ceb2c9087efe4b92d9e9b3bdd25949bbf82fd771b4b60bc3690be982c2f25b810d87592665f0728fbe08be9d SHA512 1102b17f395e0ec5de5368d04a4dceb8cc98dd408b68b53998071cf129eb9a6c259316a416128f1dfa37a739f86e599507502a98430348da2272442ce1b7059e
|
||||
DIST Python-3.12.5.tar.xz 20422396 BLAKE2B f127d1e12d12be84d5837282757787be8a0cf702adce29b93622f91f45ba2d8cc0f5db2e8277c86b098623951b302015febd28bdabaff66b30cb06a5ef2b4a24 SHA512 7a1c30d798434fe24697bc253f6010d75145e7650f66803328425c8525331b9fa6b63d12a652687582db205f8d4c8279c8f73c338168592481517b063351c921
|
||||
DIST Python-3.12.5.tar.xz.asc 963 BLAKE2B 238167f6b4012136bc4274eee0dd4d958c4ee02d2505f9f64e5bcad15e84a9e9e12a9fc907651083543f1fce93579b752d4ccdf60c8cc421cb43e9034877bf1c SHA512 65ce92272a38cc6bf8bf56fa2a99a830cf5b33b811b1788508e7b6f8b5d3e93e0b143412f829271be40cbb4e7c154f84499239b3e8ab63b2ccf0a5a22d2f84ee
|
||||
DIST Python-3.13.0b1.tar.xz 21054240 BLAKE2B fba108b2971fe188a05340753a48379c9a829ce680f13dc50d95d889ef5ee833b82be157d1b011ba841c149d633e8eb64b07098bf03a2adcf711b3f688465050 SHA512 81cc1d8691bfcc8f8bb232ea15c18039d0df036f5cbc1667fec3b6c34cdf198bed97418ec775c037778c250b7bc4f35bd5fb938dd478cc17fc48c74b8a2b2d19
|
||||
DIST Python-3.13.0b1.tar.xz.asc 963 BLAKE2B 1b038d2b73fdbe11a1ada18ceab4a174ae52aab68ae9c3a9952ee60a16ce3e08e54c13e0c47264442415f70bd39a06c2b0f97c3cef31330f51102dad6d4a837b SHA512 c10832b5016ad9a9588b7efd29a35272c1c07b444df116c397fed82d66f30150687d68a6853637094be2fe1d8ed0928a9cd151617c91d9eb9938ba1385bd7143
|
||||
DIST Python-3.13.0b2.tar.xz 21089692 BLAKE2B 3cc77e9b7abcd8c9797a40b2a1f5ff6562a1841dd44c4785a57941b1eb4d70d20a3dc5bcf8cbfe3d1b2c7f846d7da7fd89758e113542820945da996d2c6a68af SHA512 3a37c8137958a6ebaf06f5a03b28c7817f359f346d820a9989932b1a716478647e8d1b94c1a08197bcabf68cd90443a08ab9454af9151eace52401d8b60d0c35
|
||||
|
@ -31,6 +33,7 @@ DIST python-gentoo-patches-3.12.3.tar.xz 6028 BLAKE2B 7953a48a1d95a6a33bd88060fb
|
|||
DIST python-gentoo-patches-3.12.4_p1.tar.xz 7088 BLAKE2B 450b95539aaf7c8c052ca1bbcab3b1a8f1c33e8007b6c66cc290c33d88cac8bad346e13cf96508834599a59ccb6548e6dd8cbfb1e24d84539f502101b04299d0 SHA512 df874cb1d8d0f5df60fca82daa2a59cbcfeba6be72b021101a753306a09bb19ee268681b3fdb39659be923d868c727bf7aabbe8173cfd48a329c66f4727353c7
|
||||
DIST python-gentoo-patches-3.12.4_p2.tar.xz 11124 BLAKE2B 8e49af60b1e514de9b77c562a8df5ae7d6caf0045e631fcf85a8f91335cf18f1df2ac611ea73d26e5b70c2537beb423a9303dcce41c2c2e2b049ee9f1e537b53 SHA512 df1d49e60d23f5f09144c57034c86f81f8d185f65c3a93bbb2b386977638bd525b45fe1dff8c7202d60ca3a5fdf96b94a492b076072713565e7449b679fde7b5
|
||||
DIST python-gentoo-patches-3.12.4_p3.tar.xz 14796 BLAKE2B 68f5235ef434f9db16e7bc635ff51b6607cfb9be713fdc3c0ef624ec0f513345f6e02e27b8ebc2b3c8a5fcd4f4f5161024407ae364bdffd3b22a7a9d3a509b30 SHA512 8e337a7234b8ad64dd82435dcda0ef4e90c21214bd7b13a83fe9ba700d5b07ce11fb33b7d34d808132120b4a077fde26278b87116bb02ccef50470c046a66d2b
|
||||
DIST python-gentoo-patches-3.12.5.tar.xz 6056 BLAKE2B d9b85d98a75f6365c63ddabb8f25db3be11e7e4de22ec9426bb24160efcca25c75e3e19beec9fc2f8f8fe273c145f825c6f27ece2fca83d44cf2dbdfacae918d SHA512 72949ae8a1c796cb57e8b43d259037a723482b5a3849823c1cdc58acc012177a0ec836a4dd6ad656fe57ee1d84491c03ed9109667a953aa52bf5df7640de969f
|
||||
DIST python-gentoo-patches-3.13.0b1_p3.tar.xz 11056 BLAKE2B ef932bac59d2316ee8fe638a3d34ce247ff587915546038627674cd4c03179998a58336f8ebae45f1fcc94c8059d61ff6f22693f25ace1462bce275f50bfb48f SHA512 956e3da7376d60d7a593af50fff9842016a3b193180e93ab8298756c9eedfb2aaf8c1287bb75111e6340b5bac20a12dcb00ef51ecf0e12ef9ae5c98202fb071b
|
||||
DIST python-gentoo-patches-3.13.0b2_p9.tar.xz 11288 BLAKE2B e46bac845ce54e32446316b8a5e055905f023e88ad7fb9cfed101f0fccf6c0fef2fb9fd5b7dc4b15ec1e6c075ceaa9f07777c3cfede0f88412871beac0a54e47 SHA512 4148342d649acd98cce1f3d3c7bdbf4adad069ba555624882ddb69f00ee0e64641014086b5e60d97eac809ccb1e3e782a112eb58d7bb83bcfa3222811cbb8682
|
||||
DIST python-gentoo-patches-3.13.0b3.tar.xz 5704 BLAKE2B 665f60d0a440c63ca6bbc1615333e01e0b9d3c5cd8c871157866dd70146a9afb71aecdb6f72f75de2fd8c163d011c8df538c8b278ad6a91079f3300bd05fead3 SHA512 959826aaf467235c8a144a2b94137113b273f79febd30fee0556b718132bb89b5ba97bc01a3718771cade099777f131b322682f336dfaabe18cd5838a75318fa
|
||||
|
|
558
dev-lang/python/python-3.12.5.ebuild
Normal file
558
dev-lang/python/python-3.12.5.ebuild
Normal file
|
@ -0,0 +1,558 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
|
||||
inherit python-utils-r1 toolchain-funcs verify-sig
|
||||
|
||||
MY_PV=${PV/_rc/rc}
|
||||
MY_P="Python-${MY_PV%_p*}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="
|
||||
https://www.python.org/
|
||||
https://github.com/python/cpython/
|
||||
"
|
||||
SRC_URI="
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||
verify-sig? (
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="
|
||||
bluetooth build debug +ensurepip examples gdbm libedit
|
||||
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
app-crypt/libb2
|
||||
>=dev-libs/expat-2.1:=
|
||||
dev-libs/libffi:=
|
||||
dev-libs/mpdecimal:=
|
||||
dev-python/gentoo-common
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
ensurepip? ( dev-python/ensurepip-pip )
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
kernel_linux? ( sys-apps/util-linux:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? (
|
||||
!libedit? ( >=sys-libs/readline-4.1:= )
|
||||
libedit? ( dev-libs/libedit:= )
|
||||
)
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? (
|
||||
app-arch/xz-utils
|
||||
dev-python/ensurepip-pip
|
||||
dev-python/ensurepip-setuptools
|
||||
dev-python/ensurepip-wheel
|
||||
)
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
dev-build/autoconf-archive
|
||||
app-alternatives/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
|
||||
"
|
||||
RDEPEND+="
|
||||
!build? ( app-misc/mime-types )
|
||||
"
|
||||
if [[ ${PV} != *_alpha* ]]; then
|
||||
RDEPEND+="
|
||||
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
|
||||
"
|
||||
fi
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||
|
||||
# large file tests involve a 2.5G file being copied (duplicated)
|
||||
CHECKREQS_DISK_BUILD=5500M
|
||||
|
||||
QA_PKGCONFIG_VERSION=${PYVER}
|
||||
# false positives -- functions specific to *BSD
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
||||
|
||||
pkg_pretend() {
|
||||
use test && check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat and libffi are not used.
|
||||
# TODO: Makefile has annoying deps on expat headers
|
||||
#rm -r Modules/expat || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
# force the correct number of jobs
|
||||
# https://bugs.gentoo.org/737660
|
||||
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
|
||||
|
||||
# breaks tests when using --with-wheel-pkg-dir
|
||||
rm -r Lib/test/wheeldata || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
build_cbuild_python() {
|
||||
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
|
||||
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
#
|
||||
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
|
||||
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
|
||||
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
|
||||
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
|
||||
|
||||
# We need to build our own Python on CBUILD first, and feed it in.
|
||||
# bug #847910
|
||||
local myeconfargs_cbuild=(
|
||||
"${myeconfargs[@]}"
|
||||
|
||||
--prefix="${BROOT}"/usr
|
||||
--libdir="${cbuild_libdir:2}"
|
||||
|
||||
# Avoid needing to load the right libpython.so.
|
||||
--disable-shared
|
||||
|
||||
# As minimal as possible for the mini CBUILD Python
|
||||
# we build just for cross to satisfy --with-build-python.
|
||||
--without-lto
|
||||
--without-readline
|
||||
--disable-optimizations
|
||||
)
|
||||
|
||||
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
|
||||
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
|
||||
|
||||
# Avoid as many dependencies as possible for the cross build.
|
||||
mkdir Modules || die
|
||||
cat > Modules/Setup.local <<-EOF || die
|
||||
*disabled*
|
||||
nis
|
||||
_dbm _gdbm
|
||||
_sqlite3
|
||||
_hashlib _ssl
|
||||
_curses _curses_panel
|
||||
readline
|
||||
_tkinter
|
||||
pyexpat
|
||||
zlib
|
||||
# We disabled these for CBUILD because Python's setup.py can't handle locating
|
||||
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
|
||||
# and uncommented if needed.
|
||||
#_ctypes _crypt
|
||||
EOF
|
||||
|
||||
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
|
||||
|
||||
# Unfortunately, we do have to build this immediately, and
|
||||
# not in src_compile, because CHOST configure for Python
|
||||
# will check the existence of the --with-build-python value
|
||||
# immediately.
|
||||
emake
|
||||
popd &> /dev/null || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# disable automagic bluetooth headers detection
|
||||
if ! use bluetooth; then
|
||||
local -x ac_cv_header_bluetooth_bluetooth_h=no
|
||||
fi
|
||||
|
||||
append-flags -fwrapv
|
||||
filter-flags -malign-double
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
# PKG_CONFIG needed for cross.
|
||||
tc-export CXX PKG_CONFIG
|
||||
|
||||
local dbmliborder=
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
if use pgo; then
|
||||
local profile_task_flags=(
|
||||
-m test
|
||||
"-j$(makeopts_jobs)"
|
||||
--pgo-extended
|
||||
-u-network
|
||||
|
||||
# We use a timeout because of how often we've had hang issues
|
||||
# here. It also matches the default upstream PROFILE_TASK.
|
||||
--timeout 1200
|
||||
|
||||
-x test_gdb
|
||||
-x test_dtrace
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
-x test_asyncio
|
||||
-x test_concurrent_futures
|
||||
-x test_httpservers
|
||||
-x test_logging
|
||||
-x test_multiprocessing_fork
|
||||
-x test_socket
|
||||
-x test_xmlrpc
|
||||
|
||||
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
|
||||
# bug #900429
|
||||
-x test_tools
|
||||
)
|
||||
|
||||
# musl-specific skips
|
||||
use elibc_musl && profile_task_flags+=(
|
||||
# various musl locale deficiencies
|
||||
-x test__locale
|
||||
-x test_c_locale_coercion
|
||||
-x test_locale
|
||||
-x test_re
|
||||
|
||||
# known issues with find_library on musl
|
||||
# https://bugs.python.org/issue21622
|
||||
-x test_ctypes
|
||||
|
||||
# fpathconf, ttyname errno values
|
||||
-x test_os
|
||||
)
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
profile_task_flags+=(
|
||||
-x test_distutils
|
||||
)
|
||||
fi
|
||||
local -x PROFILE_TASK="${profile_task_flags[*]}"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
--without-static-libpython
|
||||
--enable-ipv6
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--without-lto
|
||||
--with-system-expat
|
||||
--with-system-libmpdec
|
||||
--with-platlibdir=lib
|
||||
--with-pkg-config=yes
|
||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
||||
|
||||
$(use_with debug assertions)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with readline readline "$(usex libedit editline readline)")
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if tc-is-lto; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
myeconfargs+=(
|
||||
--with-lto
|
||||
)
|
||||
fi
|
||||
|
||||
# Force-disable modules we don't want built.
|
||||
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
|
||||
cat > Modules/Setup.local <<-EOF || die
|
||||
*disabled*
|
||||
nis
|
||||
$(usev !gdbm '_gdbm _dbm')
|
||||
$(usev !sqlite '_sqlite3')
|
||||
$(usev !ssl '_hashlib _ssl')
|
||||
$(usev !ncurses '_curses _curses_panel')
|
||||
$(usev !readline 'readline')
|
||||
$(usev !tk '_tkinter')
|
||||
EOF
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
build_cbuild_python
|
||||
myeconfargs+=(
|
||||
# Point the imminent CHOST build to the Python we just
|
||||
# built for CBUILD.
|
||||
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
|
||||
)
|
||||
fi
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
if use ncurses; then
|
||||
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
|
||||
# install epython.py as part of stdlib
|
||||
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
export PYTHONSTRICTEXTENSIONBUILD=1
|
||||
|
||||
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
|
||||
# end up writing bytecode & violating sandbox.
|
||||
# bug #831897
|
||||
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict "/usr/lib/python${PYVER}/site-packages"
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Restore saved value from above.
|
||||
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
# this just happens to skip test_support.test_freeze that is broken
|
||||
# without bundled expat
|
||||
# TODO: get a proper skip for it upstream
|
||||
local -x LOGNAME=buildbot
|
||||
|
||||
local test_opts=(
|
||||
-u-network
|
||||
-j "$(makeopts_jobs)"
|
||||
|
||||
# fails
|
||||
-x test_concurrent_futures
|
||||
-x test_gdb
|
||||
)
|
||||
|
||||
if use sparc ; then
|
||||
# bug #788022
|
||||
test_opts+=(
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
)
|
||||
fi
|
||||
|
||||
# musl-specific skips
|
||||
use elibc_musl && test_opts+=(
|
||||
# various musl locale deficiencies
|
||||
-x test__locale
|
||||
-x test_c_locale_coercion
|
||||
-x test_locale
|
||||
-x test_re
|
||||
|
||||
# known issues with find_library on musl
|
||||
# https://bugs.python.org/issue21622
|
||||
-x test_ctypes
|
||||
|
||||
# fpathconf, ttyname errno values
|
||||
-x test_os
|
||||
)
|
||||
|
||||
# workaround docutils breaking tests
|
||||
cat > Lib/docutils.py <<-EOF || die
|
||||
raise ImportError("Thou shalt not import!")
|
||||
EOF
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
# workaround https://bugs.gentoo.org/775416
|
||||
addwrite "/usr/lib/python${PYVER}/site-packages"
|
||||
|
||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local ret=${?}
|
||||
|
||||
rm Lib/docutils.py || die
|
||||
|
||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
# the Makefile rules are broken
|
||||
# https://github.com/python/cpython/issues/100221
|
||||
mkdir -p "${libdir}"/lib-dynload || die
|
||||
|
||||
# -j1 hack for now for bug #843458
|
||||
emake -j1 DESTDIR="${D}" altinstall
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
rm -r "${libdir}"/ensurepip/_bundled || die
|
||||
if ! use ensurepip; then
|
||||
rm -r "${libdir}"/ensurepip || die
|
||||
fi
|
||||
if ! use sqlite; then
|
||||
rm -r "${libdir}/"sqlite3 || die
|
||||
fi
|
||||
if ! use tk; then
|
||||
rm -r "${ED}/usr/bin/idle${PYVER}" || die
|
||||
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
fi
|
||||
|
||||
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(
|
||||
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
|
||||
emake --no-print-directory -s -f - 2>/dev/null
|
||||
)
|
||||
newins Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local EPYTHON=python${PYVER}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
DIST firefox-102.15.0esr.source.tar.xz 486592324 BLAKE2B b70727fa91d0d270673374bebb4745b87f6194191c1c9415547d772811a4a85f79a97e8985877eb5c9beef43fe15bef574172da35935e7024a947919ec11d883 SHA512 87db6e32fda215253f9b3bd233ef7fa91a64349310064b8482e5c634f34cbe99a2a111d74d2b9f2a99a0b3b510dbf9039ebe4ccfc176c2554d65bc9cfb508bf9
|
||||
DIST firefox-102esr-patches-13.tar.xz 22212 BLAKE2B 02e9edd071a99abbac02faa11ffce061d5d12d8baa9ce54b51d6bfdbf8160022a1565902d65ca30fe51b5670e509fa921b11a460989933cbb797fcd59d635125 SHA512 8b8b0f3789978447a1293fd9acb5c2db3d7e9f724357a0d762b54f7e34d28f11655997ffeafccfe8001a01dd595848d257f90cb983462c405d434cc794216520
|
||||
DIST firefox-115.13.0esr.source.tar.xz 510571488 BLAKE2B e2b00965a92cd11da6c81daa8b6c652dfccc9f0f7d066bc17ae5fa3ac3aaaa021c4489a9f653127f5516e3d77cd7174de328343e22c4edab438e3fcb9a859178 SHA512 799cdf2d0494003a5addd0da703f53deb9c9d6bb6f6c95d40026363382803e2d086039c7798940a1f35f4cba111f2e8e21bde8ac2eac29fd9bd6876dd8d3a85f
|
||||
DIST firefox-115.14.0esr.source.tar.xz 507310580 BLAKE2B ffca6b7dce6ae6a470c9d5506b4236077b2151732bff811aa0bf0367be80aec5ea4918ee5dcd611b0e19a025156def3e9524a4f5d741343e9fda5a2e693e15fa SHA512 dd40c1fd3cf454dbf33a85d38e47bb0e736ed89b829643653e239f43232441f4e9f3c7876f058ff2e6f19daf2b50a8f2d13274e9a107d8a258a6067d1fc43f54
|
||||
DIST firefox-115esr-patches-10.tar.xz 17256 BLAKE2B 0f6265d6e12f55e9b5128f2f261ba3785b80563e049d2441fde09dedf419c6086c9d994d2b44d1aab35af64cde375bdc254206da9ef148fc20fa90da0417606d SHA512 a1f0012420593a1c1b38dba1785ee9092e0923f56458c38f003cca4ebaac30a73fe3d1f5806a5795c76b2b8d729f8184372e63681daa450c3bb8e5afbe9e2e4f
|
||||
DIST firefox-115esr-patches-12.tar.xz 50732 BLAKE2B 821ea063bd14085458967e33570bb28a1457672d2c210368507532024db25dfbb7d30d37084a2cc60a4cc34dde453669ad9046c664e7e8459a8c7fab33485068 SHA512 e80b0eb9a4efa8e6a872a875a31e384a5d3ac2f7000a3d12b03cbe2dff43baf8e3e544b7b7baadcb46ae714e3709ecbc53742b9562fcb1b1caf85b037b5ad501
|
||||
DIST spidermonkey-102-patches-05j.tar.xz 4596 BLAKE2B 215b770bbdf17973d7b3fd1df6cee9647459d2b02b0be5bdb289d457e5dbdb06ceac7a3082fc2f5836e991a4ac4486d73330b0276a466b5c528dab226a27829c SHA512 d2b8e32dac87d60a00fd93479dc34d8adab4feec24a38591cebeb4cf271aa2fd964f4dc26e67ebfb127a47bc8f684d50b32b2cff18ed5286701a04a289058185
|
||||
DIST spidermonkey-115-patches-01.tar.xz 3992 BLAKE2B e97d0cb3edfb885119226f54f22485ed4e8220cd904d3356b87ccc013403f976a042171cf9ca7250bcf3fe3d90996dd80b4104e7d614f95d7bcfcb0e710a8a78 SHA512 cece96f172a09dd0e29f7c2fdbf650cde405b276bc4083956365289f1da4b1d078ccbde760da6553888ddb3c53cf9aded52051db556a2c4ec492fed01dcb03a1
|
||||
|
|
|
@ -12,6 +12,7 @@ non262/Intl/DisplayNames/language-dialect.js
|
|||
non262/Intl/ListFormat/conjunction-type.js
|
||||
non262/Intl/Locale/likely-subtags-generated.js
|
||||
non262/Intl/Locale/likely-subtags.js
|
||||
non262/Intl/NumberFormat/currency-narrow-symbol.js
|
||||
non262/Intl/available-locales-resolved.js
|
||||
non262/Intl/available-locales-supported.js
|
||||
non262/Intl/supportedValuesOf-timeZones-canonical.js
|
||||
|
|
509
dev-lang/spidermonkey/spidermonkey-115.14.0.ebuild
Normal file
509
dev-lang/spidermonkey/spidermonkey-115.14.0.ebuild
Normal file
|
@ -0,0 +1,509 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
|
||||
# Patch version
|
||||
FIREFOX_PATCHSET="firefox-115esr-patches-12.tar.xz"
|
||||
SPIDERMONKEY_PATCHSET="spidermonkey-115-patches-01.tar.xz"
|
||||
|
||||
LLVM_MAX_SLOT=18
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="ncurses,ssl,xml(+)"
|
||||
|
||||
WANT_AUTOCONF="2.1"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix python-any-r1 toolchain-funcs
|
||||
|
||||
MY_PN="mozjs"
|
||||
MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
|
||||
|
||||
MY_MAJOR=$(ver_cut 1)
|
||||
|
||||
MOZ_ESR=yes
|
||||
|
||||
MOZ_PV=${PV}
|
||||
MOZ_PV_SUFFIX=
|
||||
if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
|
||||
MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
|
||||
|
||||
# Convert the ebuild version to the upstream Mozilla version
|
||||
MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
|
||||
MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
|
||||
MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
|
||||
fi
|
||||
|
||||
if [[ -n ${MOZ_ESR} ]] ; then
|
||||
# ESR releases have slightly different version numbers
|
||||
MOZ_PV="${MOZ_PV}esr"
|
||||
fi
|
||||
|
||||
MOZ_PN="firefox"
|
||||
MOZ_P="${MOZ_PN}-${MOZ_PV}"
|
||||
MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
|
||||
MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
|
||||
|
||||
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}"
|
||||
|
||||
if [[ ${PV} == *_rc* ]] ; then
|
||||
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
|
||||
fi
|
||||
|
||||
PATCH_URIS=(
|
||||
https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
|
||||
https://dev.gentoo.org/~juippis/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
|
||||
)
|
||||
|
||||
SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz
|
||||
${PATCH_URIS[@]}"
|
||||
|
||||
DESCRIPTION="SpiderMonkey is Mozilla's JavaScript engine written in C and C++"
|
||||
HOMEPAGE="https://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html "
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
|
||||
SLOT="$(ver_cut 1)"
|
||||
LICENSE="MPL-2.0"
|
||||
IUSE="clang cpu_flags_arm_neon debug +jit lto test"
|
||||
|
||||
#RESTRICT="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="${PYTHON_DEPS}
|
||||
virtual/pkgconfig
|
||||
|| (
|
||||
(
|
||||
sys-devel/llvm:18
|
||||
clang? (
|
||||
sys-devel/lld:18
|
||||
sys-devel/clang:18
|
||||
virtual/rust:0/llvm-18
|
||||
)
|
||||
)
|
||||
(
|
||||
sys-devel/llvm:17
|
||||
clang? (
|
||||
sys-devel/lld:17
|
||||
sys-devel/clang:17
|
||||
virtual/rust:0/llvm-17
|
||||
)
|
||||
)
|
||||
(
|
||||
sys-devel/llvm:16
|
||||
clang? (
|
||||
sys-devel/lld:16
|
||||
sys-devel/clang:16
|
||||
virtual/rust:0/llvm-16
|
||||
)
|
||||
)
|
||||
(
|
||||
sys-devel/llvm:15
|
||||
clang? (
|
||||
sys-devel/lld:15
|
||||
sys-devel/clang:15
|
||||
virtual/rust:0/llvm-15
|
||||
)
|
||||
)
|
||||
)
|
||||
!clang? ( virtual/rust )
|
||||
!elibc_glibc? (
|
||||
|| (
|
||||
dev-lang/rust
|
||||
<dev-lang/rust-bin-1.73
|
||||
)
|
||||
)
|
||||
test? (
|
||||
$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
|
||||
)"
|
||||
DEPEND=">=dev-libs/icu-73.1:=
|
||||
dev-libs/nspr
|
||||
sys-libs/readline:0=
|
||||
sys-libs/zlib"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/firefox-${MY_PV}/js/src"
|
||||
|
||||
llvm_check_deps() {
|
||||
if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
|
||||
einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if use clang ; then
|
||||
if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
|
||||
einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
|
||||
einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! tc-ld-is-mold ; then
|
||||
if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
|
||||
einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
if use test ; then
|
||||
python_has_version "dev-python/six[${PYTHON_USEDEP}]"
|
||||
fi
|
||||
}
|
||||
|
||||
# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily
|
||||
# placed here until toolchain-funcs.eclass gets an official support for mold linker.
|
||||
# Please see:
|
||||
# https://github.com/gentoo/gentoo/pull/28366 ||
|
||||
# https://github.com/gentoo/gentoo/pull/28355
|
||||
tc-ld-is-mold() {
|
||||
local out
|
||||
|
||||
# Ensure ld output is in English.
|
||||
local -x LC_ALL=C
|
||||
|
||||
# First check the linker directly.
|
||||
out=$($(tc-getLD "$@") --version 2>&1)
|
||||
if [[ ${out} == *"mold"* ]] ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Then see if they're selecting mold via compiler flags.
|
||||
# Note: We're assuming they're using LDFLAGS to hold the
|
||||
# options and not CFLAGS/CXXFLAGS.
|
||||
local base="${T}/test-tc-linker"
|
||||
cat <<-EOF > "${base}.c"
|
||||
int main() { return 0; }
|
||||
EOF
|
||||
out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
|
||||
rm -f "${base}"*
|
||||
if [[ ${out} == *"mold"* ]] ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# No mold here!
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
if use test ; then
|
||||
CHECKREQS_DISK_BUILD="4000M"
|
||||
else
|
||||
CHECKREQS_DISK_BUILD="3600M"
|
||||
fi
|
||||
|
||||
check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
if use test ; then
|
||||
CHECKREQS_DISK_BUILD="4000M"
|
||||
else
|
||||
CHECKREQS_DISK_BUILD="3600M"
|
||||
fi
|
||||
|
||||
check-reqs_pkg_setup
|
||||
|
||||
llvm_pkg_setup
|
||||
|
||||
if use clang && use lto && tc-ld-is-lld ; then
|
||||
local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
|
||||
[[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
|
||||
[[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
|
||||
|
||||
local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
|
||||
[[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
|
||||
[[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
|
||||
|
||||
if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
|
||||
eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
|
||||
eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
|
||||
eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
|
||||
eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
|
||||
eerror " - Build ${CATEGORY}/${PN} without USE=lto"
|
||||
eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole "
|
||||
eerror " llvm/clang/lld/rust chain depending on your @world updates)"
|
||||
die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
|
||||
fi
|
||||
fi
|
||||
|
||||
python-any-r1_pkg_setup
|
||||
|
||||
# Build system is using /proc/self/oom_score_adj, bug #604394
|
||||
addpredict /proc/self/oom_score_adj
|
||||
|
||||
if ! mountpoint -q /dev/shm ; then
|
||||
# If /dev/shm is not available, configure is known to fail with
|
||||
# a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py
|
||||
ewarn "/dev/shm is not mounted -- expect build failures!"
|
||||
fi
|
||||
|
||||
# Ensure we use C locale when building, bug #746215
|
||||
export LC_ALL=C
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
pushd ../.. &>/dev/null || die
|
||||
|
||||
use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
|
||||
|
||||
if ! use ppc64; then
|
||||
rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die
|
||||
fi
|
||||
|
||||
# Workaround for bgo #915651,915651,929013 on musl
|
||||
if use elibc_glibc ; then
|
||||
rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die
|
||||
fi
|
||||
|
||||
eapply "${WORKDIR}"/firefox-patches
|
||||
eapply "${WORKDIR}"/spidermonkey-patches
|
||||
|
||||
default
|
||||
|
||||
# Make cargo respect MAKEOPTS
|
||||
export CARGO_BUILD_JOBS="$(makeopts_jobs)"
|
||||
|
||||
# Workaround for bgo #915651,915651,929013 on musl
|
||||
if ! use elibc_glibc ; then
|
||||
if use amd64 ; then
|
||||
export RUST_TARGET="x86_64-unknown-linux-musl"
|
||||
elif use x86 ; then
|
||||
export RUST_TARGET="i686-unknown-linux-musl"
|
||||
else
|
||||
die "Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651"
|
||||
fi
|
||||
fi
|
||||
|
||||
# sed-in toolchain prefix
|
||||
sed -i \
|
||||
-e "s/objdump/${CHOST}-objdump/" \
|
||||
python/mozbuild/mozbuild/configure/check_debug_ranges.py \
|
||||
|| die "sed failed to set toolchain prefix"
|
||||
|
||||
# use prefix shell in wrapper linker scripts, bug #789660
|
||||
hprefixify "${S}"/../../build/cargo-{,host-}linker
|
||||
|
||||
einfo "Removing pre-built binaries ..."
|
||||
find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
|
||||
|
||||
MOZJS_BUILDDIR="${WORKDIR}/build"
|
||||
mkdir "${MOZJS_BUILDDIR}" || die
|
||||
|
||||
popd &>/dev/null || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Show flags set at the beginning
|
||||
einfo "Current CFLAGS: ${CFLAGS}"
|
||||
einfo "Current CXXFLAGS: ${CXXFLAGS}"
|
||||
einfo "Current LDFLAGS: ${LDFLAGS}"
|
||||
einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
|
||||
|
||||
local have_switched_compiler=
|
||||
if use clang; then
|
||||
# Force clang
|
||||
einfo "Enforcing the use of clang due to USE=clang ..."
|
||||
|
||||
local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
|
||||
[[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
|
||||
[[ -z ${version_clang} ]] && die "Failed to read clang version!"
|
||||
|
||||
if tc-is-gcc; then
|
||||
have_switched_compiler=yes
|
||||
fi
|
||||
AR=llvm-ar
|
||||
CC=${CHOST}-clang-${version_clang}
|
||||
CXX=${CHOST}-clang++-${version_clang}
|
||||
NM=llvm-nm
|
||||
RANLIB=llvm-ranlib
|
||||
|
||||
elif ! use clang && ! tc-is-gcc ; then
|
||||
# Force gcc
|
||||
have_switched_compiler=yes
|
||||
einfo "Enforcing the use of gcc due to USE=-clang ..."
|
||||
AR=gcc-ar
|
||||
CC=${CHOST}-gcc
|
||||
CXX=${CHOST}-g++
|
||||
NM=gcc-nm
|
||||
RANLIB=gcc-ranlib
|
||||
fi
|
||||
|
||||
if [[ -n "${have_switched_compiler}" ]] ; then
|
||||
# Because we switched active compiler we have to ensure
|
||||
# that no unsupported flags are set
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
# Ensure we use correct toolchain,
|
||||
# AS is used in a non-standard way by upstream, #bmo1654031
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
export HOST_CXX="$(tc-getBUILD_CXX)"
|
||||
export AS="$(tc-getCC) -c"
|
||||
tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
|
||||
|
||||
cd "${MOZJS_BUILDDIR}" || die
|
||||
|
||||
# ../python/mach/mach/mixin/process.py fails to detect SHELL
|
||||
export SHELL="${EPREFIX}/bin/bash"
|
||||
|
||||
local -a myeconfargs=(
|
||||
--host="${CBUILD:-${CHOST}}"
|
||||
--target="${CHOST}"
|
||||
|
||||
--disable-ctype
|
||||
--disable-jemalloc
|
||||
--disable-smoosh
|
||||
--disable-strip
|
||||
|
||||
--enable-project=js
|
||||
--enable-readline
|
||||
--enable-release
|
||||
--enable-shared-js
|
||||
|
||||
--with-intl-api
|
||||
--with-system-icu
|
||||
--with-system-nspr
|
||||
--with-system-zlib
|
||||
--with-toolchain-prefix="${CHOST}-"
|
||||
|
||||
$(use_enable debug)
|
||||
$(use_enable jit)
|
||||
$(use_enable test tests)
|
||||
)
|
||||
|
||||
if use debug; then
|
||||
myeconfargs+=( --disable-optimize )
|
||||
myeconfargs+=( --enable-debug-symbols )
|
||||
myeconfargs+=( --enable-real-time-tracing )
|
||||
else
|
||||
myeconfargs+=( --enable-optimize )
|
||||
myeconfargs+=( --disable-debug-symbols )
|
||||
myeconfargs+=( --disable-real-time-tracing )
|
||||
fi
|
||||
|
||||
# We always end up disabling this at some point due to newer rust versions. bgo#933372
|
||||
myeconfargs+=( --disable-rust-simd )
|
||||
|
||||
# Modifications to better support ARM, bug 717344
|
||||
if use cpu_flags_arm_neon ; then
|
||||
myeconfargs+=( --with-fpu=neon )
|
||||
|
||||
if ! tc-is-clang ; then
|
||||
# thumb options aren't supported when using clang, bug 666966
|
||||
myeconfargs+=( --with-thumb=yes )
|
||||
myeconfargs+=( --with-thumb-interwork=no )
|
||||
fi
|
||||
fi
|
||||
|
||||
# Tell build system that we want to use LTO
|
||||
if use lto ; then
|
||||
if use clang ; then
|
||||
if tc-ld-is-mold ; then
|
||||
myeconfargs+=( --enable-linker=mold )
|
||||
else
|
||||
myeconfargs+=( --enable-linker=lld )
|
||||
fi
|
||||
myeconfargs+=( --enable-lto=cross )
|
||||
|
||||
else
|
||||
myeconfargs+=( --enable-linker=bfd )
|
||||
myeconfargs+=( --enable-lto=full )
|
||||
fi
|
||||
fi
|
||||
|
||||
# LTO flag was handled via configure
|
||||
filter-lto
|
||||
|
||||
# Use system's Python environment
|
||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
|
||||
export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
|
||||
|
||||
# Show flags we will use
|
||||
einfo "Build CFLAGS: ${CFLAGS}"
|
||||
einfo "Build CXXFLAGS: ${CXXFLAGS}"
|
||||
einfo "Build LDFLAGS: ${LDFLAGS}"
|
||||
einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
|
||||
|
||||
# Forcing system-icu allows us to skip patching bundled ICU for PPC
|
||||
# and other minor arches
|
||||
ECONF_SOURCE="${S}" \
|
||||
econf \
|
||||
${myeconfargs[@]} \
|
||||
XARGS="${EPREFIX}/usr/bin/xargs"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${MOZJS_BUILDDIR}" || die
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if "${MOZJS_BUILDDIR}/js/src/js" -e 'print("Hello world!")'; then
|
||||
einfo "Smoke-test successful, continuing with full test suite"
|
||||
else
|
||||
die "Smoke-test failed: did interpreter initialization fail?"
|
||||
fi
|
||||
|
||||
cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
|
||||
|
||||
if use sparc ; then
|
||||
echo "non262/Array/regress-157652.js" >> "${T}"/known_failures.list
|
||||
echo "non262/regress/regress-422348.js" >> "${T}"/known_failures.list
|
||||
echo "test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js" >> "${T}"/known_failures.list
|
||||
fi
|
||||
|
||||
if use x86 ; then
|
||||
echo "non262/Date/timeclip.js" >> "${T}"/known_failures.list
|
||||
echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
|
||||
echo "test262/language/types/number/S8.5_A2.1.js" >> "${T}"/known_failures.list
|
||||
echo "test262/language/types/number/S8.5_A2.2.js" >> "${T}"/known_failures.list
|
||||
fi
|
||||
|
||||
${EPYTHON} \
|
||||
"${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
|
||||
--exclude-file="${T}"/known_failures.list \
|
||||
"${MOZJS_BUILDDIR}"/js/src/js \
|
||||
|| die
|
||||
|
||||
if use jit ; then
|
||||
${EPYTHON} \
|
||||
"${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
|
||||
--exclude-file="${T}"/known_failures.list \
|
||||
"${MOZJS_BUILDDIR}"/js/src/js basic \
|
||||
|| die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${MOZJS_BUILDDIR}" || die
|
||||
default
|
||||
|
||||
# fix soname links
|
||||
pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
|
||||
mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die
|
||||
ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die
|
||||
ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die
|
||||
popd &>/dev/null || die
|
||||
|
||||
# remove unneeded files
|
||||
rm \
|
||||
"${ED}"/usr/bin/js${MY_MAJOR}-config \
|
||||
"${ED}"/usr/$(get_libdir)/libjs_static.ajs \
|
||||
|| die
|
||||
|
||||
# fix permissions
|
||||
chmod -x \
|
||||
"${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \
|
||||
"${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h \
|
||||
|| die
|
||||
}
|
Binary file not shown.
|
@ -22,7 +22,7 @@ if [[ ${PV} == 9999 ]] ; then
|
|||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
S="${WORKDIR}/${LIBNL_P}"
|
||||
fi
|
||||
|
|
|
@ -25,7 +25,7 @@ else
|
|||
"
|
||||
|
||||
if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then
|
||||
KEYWORDS="~amd64 ~arm ~m68k ~mips ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Binary file not shown.
|
@ -17,7 +17,7 @@ HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/"
|
|||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv"
|
||||
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv"
|
||||
# defaults match what is provided with qtbase by default (except testlib),
|
||||
# reduces the need to set flags but does increase build time a fair amount
|
||||
IUSE="
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DIST aiohappyeyeballs-2.3.2.gh.tar.gz 46204 BLAKE2B 85a050910181e7acd6520ae8126e6e1656b5d5e7d869bca481af5fe65b52bf1d4dc0502d2e0cce702c60dc9420757fc892a91a600a73925adce6990fc224bb1a SHA512 5638dabb06c9d0182e21371470d612ec78a1a8981a0720318b0f4fc0569b7c556adfba6297b5bec75726e106f5a6335acfb19bd5322e43e5ebc4f71d4457424c
|
||||
DIST aiohappyeyeballs-2.3.4.gh.tar.gz 54416 BLAKE2B ca3f34af2d20528c229b6beba0896a7a2e6dc86a83310c36163c2213232d3222e8ba9eafc23461c5d79fae7af6a06127691ddfb582e12c3d402ee452c42803a0 SHA512 75adf8164e287113fb176f5f814f929dac57834941ba83eeec4c2e9aa28585c4659bc18fe7d7b010e9f53ee81d3a5b3727175ed981d4ec846e6209428a2516eb
|
||||
DIST aiohappyeyeballs-2.3.5.gh.tar.gz 55133 BLAKE2B 09560b2616ecb6f2b496269f6d9589965b46f3be577fb8f3385a7f05d8af41c411d74320bbe6090e95bcea520167474b54866f56e16fce897062f11a58f26d03 SHA512 bd322bb62d9fe5e82e8b7380a9b769f670fb0cb2a653d31ccfd3c25e5dc58dde814291deecfc3d159ca13282fa149e654d8e4b16bc8a042d31f40318b6aadd2b
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
DIST aiohttp-3.10.0.tar.gz 7517100 BLAKE2B ce37d40e94ef836ae63a56b1b01251a34a07c469120393f8006964f54eea5f27cd4277fb0f69174cf652e52fbb0d77cda53ffe41c785922717defde2df873dd9 SHA512 69c8eaed5738c11ea994b64dcf75cbc5950b1cc4705ac40df80ad3311dceb1d25c15019527e32e9345a4677882e103a7c25dedc0dc99d874102a73771d6cfde9
|
||||
DIST aiohttp-3.10.1.tar.gz 7517572 BLAKE2B 4400cbda0997f3602ace4aae7ba153dcb515d49d8d3431fab087ebba3126d8fa82121998b1d8e36e2b86c9144a5c124ac16c12520cd47fea7956e6c04e2b4e55 SHA512 59f743ce7821b46da531eb576bbf20409407726b6ba78be9615f715ab2404cc3668120d2ec1566dcab7017ba36bf1753a3365b81097da53685c93ba013c3c94a
|
||||
DIST aiohttp-3.9.5.tar.gz 7504841 BLAKE2B f051ee88d45952219f72d542f1c6d0cc33c699c6c5fb5dbe3bc054ee4d0e03121b219c8c8524fd1236a8b878329b0997b8afe07d6c66074102d4a2052a8738ff SHA512 da11468a2f131275593395b052700a99cf79055a32d48327dca0f58547ad30add8cd0a375dbd831e2f06fe7a739183251e4ad69c16f3d141799bbed45a8a5dc4
|
||||
|
|
|
@ -40,6 +40,7 @@ BDEPEND="
|
|||
dev-python/freezegun[${PYTHON_USEDEP}]
|
||||
www-servers/gunicorn[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-mock[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
dev-python/re-assert[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
|
@ -57,6 +58,12 @@ EPYTEST_XDIST=1
|
|||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
local PATCHES=(
|
||||
# https://github.com/aio-libs/aiohttp/pull/8623
|
||||
# https://github.com/aio-libs/aiohttp/pull/8648
|
||||
"${FILESDIR}/${P}-py313.patch"
|
||||
)
|
||||
|
||||
# increase the timeout a little
|
||||
sed -e '/abs=/s/0.001/0.01/' -i tests/test_helpers.py || die
|
||||
# xfail_strict fails on py3.10
|
||||
|
@ -101,20 +108,11 @@ python_test() {
|
|||
# sigh
|
||||
local -x AIOHTTP_NO_EXTENSIONS=1
|
||||
;;
|
||||
python3.13)
|
||||
EPYTEST_DESELECT+=(
|
||||
# buggy test
|
||||
# https://github.com/aio-libs/aiohttp/issues/8551
|
||||
tests/test_web_urldispatcher.py::test_access_mock_special_resource
|
||||
# new test (so not a regression)
|
||||
# https://github.com/aio-libs/aiohttp/issues/8565
|
||||
tests/test_web_urldispatcher.py::test_access_symlink_loop
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin
|
||||
rm -rf aiohttp || die
|
||||
epytest -m "not internal and not dev_mode"
|
||||
epytest -m "not internal and not dev_mode" \
|
||||
-p rerunfailures --reruns=5
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="HTTP client/server for asyncio"
|
||||
HOMEPAGE="
|
||||
https://github.com/aio-libs/aiohttp/
|
||||
https://pypi.org/project/aiohttp/
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~riscv ~sparc ~x86"
|
||||
IUSE="test-rust"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/aiodns-3.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/aiohappyeyeballs-2.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/aiosignal-1.1.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
|
||||
dev-python/brotlicffi[${PYTHON_USEDEP}]
|
||||
>=dev-python/frozenlist-1.1.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/yarl-1.0[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
<dev-python/async-timeout-5[${PYTHON_USEDEP}]
|
||||
>=dev-python/async-timeout-4.0[${PYTHON_USEDEP}]
|
||||
' 3.10)
|
||||
"
|
||||
BDEPEND="
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/freezegun[${PYTHON_USEDEP}]
|
||||
www-servers/gunicorn[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-mock[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
dev-python/re-assert[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/time-machine[${PYTHON_USEDEP}]
|
||||
' 'python3*')
|
||||
test-rust? (
|
||||
dev-python/trustme[${PYTHON_USEDEP}]
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# increase the timeout a little
|
||||
sed -e '/abs=/s/0.001/0.01/' -i tests/test_helpers.py || die
|
||||
# xfail_strict fails on py3.10
|
||||
sed -i -e '/--cov/d' -e '/xfail_strict/d' setup.cfg || die
|
||||
sed -i -e 's:-Werror::' Makefile || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_configure_all() {
|
||||
# workaround missing files
|
||||
mkdir tools || die
|
||||
> requirements/cython.txt || die
|
||||
> tools/gen.py || die
|
||||
chmod +x tools/gen.py || die
|
||||
# force rehashing first
|
||||
emake requirements/.hash/cython.txt.hash
|
||||
> .update-pip || die
|
||||
> .install-cython || die
|
||||
emake cythonize
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_IGNORE=(
|
||||
# proxy is not packaged
|
||||
tests/test_proxy_functional.py
|
||||
# python_on_whales is not packaged
|
||||
tests/autobahn/test_autobahn.py
|
||||
)
|
||||
|
||||
local EPYTEST_DESELECT=(
|
||||
# Internet
|
||||
tests/test_client_session.py::test_client_session_timeout_zero
|
||||
# broken by irrelevant deprecation warnings
|
||||
tests/test_circular_imports.py::test_no_warnings
|
||||
)
|
||||
|
||||
case ${EPYTHON} in
|
||||
pypy3)
|
||||
# upstream unconditionally blocks building C extensions
|
||||
# on PyPy3 but the test suite needs an explicit switch,
|
||||
# sigh
|
||||
local -x AIOHTTP_NO_EXTENSIONS=1
|
||||
;;
|
||||
python3.13)
|
||||
EPYTEST_DESELECT+=(
|
||||
# buggy test
|
||||
# https://github.com/aio-libs/aiohttp/issues/8551
|
||||
tests/test_web_urldispatcher.py::test_access_mock_special_resource
|
||||
# new test (so not a regression)
|
||||
# https://github.com/aio-libs/aiohttp/issues/8565
|
||||
tests/test_web_urldispatcher.py::test_access_symlink_loop
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin
|
||||
rm -rf aiohttp || die
|
||||
epytest -m "not internal and not dev_mode"
|
||||
}
|
97
dev-python/aiohttp/files/aiohttp-3.10.1-py313.patch
Normal file
97
dev-python/aiohttp/files/aiohttp-3.10.1-py313.patch
Normal file
|
@ -0,0 +1,97 @@
|
|||
From 02961d854c8f4277219699cd66970d1e90b371d4 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Repsher <steverep@users.noreply.github.com>
|
||||
Date: Wed, 7 Aug 2024 07:51:50 -0400
|
||||
Subject: [PATCH] Fix monkey patches for pathlib changes in Python 3.13 (#8619)
|
||||
|
||||
(cherry picked from commit d1c8dfbb11ea9989446e295fcee350255d5461c0)
|
||||
---
|
||||
CHANGES/8551.contrib.rst | 1 +
|
||||
tests/test_web_urldispatcher.py | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||
create mode 100644 CHANGES/8551.contrib.rst
|
||||
|
||||
diff --git a/tests/test_web_urldispatcher.py b/tests/test_web_urldispatcher.py
|
||||
index a799f4ba146..de44ea0648c 100644
|
||||
--- a/tests/test_web_urldispatcher.py
|
||||
+++ b/tests/test_web_urldispatcher.py
|
||||
@@ -434,10 +434,10 @@ def mock_iterdir(self: pathlib.Path) -> Generator[pathlib.Path, None, None]:
|
||||
raise PermissionError()
|
||||
return real_iterdir(self)
|
||||
|
||||
- def mock_is_dir(self: pathlib.Path) -> bool:
|
||||
+ def mock_is_dir(self: pathlib.Path, **kwargs: Any) -> bool:
|
||||
if my_dir.samefile(self.parent):
|
||||
raise PermissionError()
|
||||
- return real_is_dir(self)
|
||||
+ return real_is_dir(self, **kwargs)
|
||||
|
||||
monkeypatch.setattr("pathlib.Path.iterdir", mock_iterdir)
|
||||
monkeypatch.setattr("pathlib.Path.is_dir", mock_is_dir)
|
||||
@@ -554,8 +554,8 @@ async def test_access_mock_special_resource(
|
||||
real_result = my_special.stat()
|
||||
real_stat = pathlib.Path.stat
|
||||
|
||||
- def mock_stat(self: pathlib.Path) -> os.stat_result:
|
||||
- s = real_stat(self)
|
||||
+ def mock_stat(self: pathlib.Path, **kwargs: Any) -> os.stat_result:
|
||||
+ s = real_stat(self, **kwargs)
|
||||
if os.path.samestat(s, real_result):
|
||||
mock_mode = S_IFIFO | S_IMODE(s.st_mode)
|
||||
s = os.stat_result([mock_mode] + list(s)[1:])
|
||||
From 75ff8e12d0c95af9347bb16de785d028930f7228 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Repsher <steverep@users.noreply.github.com>
|
||||
Date: Thu, 8 Aug 2024 10:55:35 -0400
|
||||
Subject: [PATCH] Fix response to circular symlinks with Python v3.13 (#8642)
|
||||
|
||||
Co-authored-by: J. Nick Koston <nick@koston.org>
|
||||
(cherry picked from commit e494277110e40fb5c1cc65a1558dfea7d8ae7ca8)
|
||||
---
|
||||
CHANGES/8565.bugfix.rst | 1 +
|
||||
aiohttp/web_fileresponse.py | 4 +++-
|
||||
aiohttp/web_urldispatcher.py | 9 +++++----
|
||||
3 files changed, 9 insertions(+), 5 deletions(-)
|
||||
create mode 100644 CHANGES/8565.bugfix.rst
|
||||
|
||||
diff --git a/aiohttp/web_fileresponse.py b/aiohttp/web_fileresponse.py
|
||||
index 7fc5b3d787f..d8bbbe08993 100644
|
||||
--- a/aiohttp/web_fileresponse.py
|
||||
+++ b/aiohttp/web_fileresponse.py
|
||||
@@ -191,7 +191,9 @@ async def prepare(self, request: "BaseRequest") -> Optional[AbstractStreamWriter
|
||||
file_path, st, file_encoding = await loop.run_in_executor(
|
||||
None, self._get_file_path_stat_encoding, accept_encoding
|
||||
)
|
||||
- except FileNotFoundError:
|
||||
+ except OSError:
|
||||
+ # Most likely to be FileNotFoundError or OSError for circular
|
||||
+ # symlinks in python >= 3.13, so respond with 404.
|
||||
self.set_status(HTTPNotFound.status_code)
|
||||
return await super().prepare(request)
|
||||
|
||||
diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py
|
||||
index 688946626fd..558fb7d0c9b 100644
|
||||
--- a/aiohttp/web_urldispatcher.py
|
||||
+++ b/aiohttp/web_urldispatcher.py
|
||||
@@ -80,9 +80,9 @@
|
||||
BaseDict = dict
|
||||
|
||||
CIRCULAR_SYMLINK_ERROR = (
|
||||
- OSError
|
||||
+ (OSError,)
|
||||
if sys.version_info < (3, 10) and sys.platform.startswith("win32")
|
||||
- else RuntimeError
|
||||
+ else (RuntimeError,) if sys.version_info < (3, 13) else ()
|
||||
)
|
||||
|
||||
YARL_VERSION: Final[Tuple[int, ...]] = tuple(map(int, yarl_version.split(".")[:2]))
|
||||
@@ -694,8 +694,9 @@ def _resolve_path_to_response(self, unresolved_path: Path) -> StreamResponse:
|
||||
else:
|
||||
file_path = unresolved_path.resolve()
|
||||
file_path.relative_to(self._directory)
|
||||
- except (ValueError, CIRCULAR_SYMLINK_ERROR) as error:
|
||||
- # ValueError for relative check; RuntimeError for circular symlink.
|
||||
+ except (ValueError, *CIRCULAR_SYMLINK_ERROR) as error:
|
||||
+ # ValueError is raised for the relative check. Circular symlinks
|
||||
+ # raise here on resolving for python < 3.13.
|
||||
raise HTTPNotFound() from error
|
||||
|
||||
# if path is a directory, return the contents if permitted. Note the
|
|
@ -1,3 +1,4 @@
|
|||
DIST astroid-3.2.3.gh.tar.gz 465447 BLAKE2B d41d206e3b362316ba71f109729fb26ff6b4f63719a0337f78545ce58fabaaa73a3ee62ff6bffa9c4a2f10e6e10718bdc17a38ecc319bce443695a60628ac315 SHA512 d9e8b85401598c0ffd3a27c37c4133bc9bba8436cdeb3dadc9a2337ebbf731c062451cdc5c9cf72a768ecf98253051ac012cfdb08084009a9c4a9043acfeabbc
|
||||
DIST astroid-3.2.4.gh.tar.gz 465788 BLAKE2B 745a860b7bacb45cb86e9b232fe3a37cdac40cb471b00832a7dd7da4c3374760749cebe8c8688748e750cc3639554515a7a9e24f5f4d2ebac10af2c906fa04a9 SHA512 e48289794f67cf53bb8a2dcf357c1e892140a0a625c2e19601cf5ad579aaa33a94f0e052915fa6e854bc0a2e626f41b2d13773aa2b2af2412efeb33d030ed2b6
|
||||
DIST astroid-3.3.0.gh.tar.gz 463962 BLAKE2B 64f80499e6a435326ef822e4e9baae3ae8cea1f0c2762e79bb6fa4a7158897b8399deb17e7416ce4cbc243dbd38701729e9083c3c92ee9577a216b5e9d7e624c SHA512 c8e494704b9cd769eb4175556f160e5596a7058fe73a020e3b6f261626d9cc7ce7fabeea517e8e172467524126a4950d4280f830a9f49c1607382f9ceb8aed84
|
||||
DIST astroid-3.3.1.gh.tar.gz 464132 BLAKE2B 011b61777ce4f3900ed1c23a664b7ae0c16e364f61cd664078d78bf6a90097f423afe03579e151439a9b02874e2fa12844f0587632e1bf1f40b428d2d99cc6da SHA512 992f80c30fdb02d283e73d1329a58ddd10a4f800e74b4697086b194a329ff6ae7ae026c907317e9604371a60cb814f243f2506d921d196214f11741f098485c1
|
||||
|
|
89
dev-python/astroid/astroid-3.3.1.ebuild
Normal file
89
dev-python/astroid/astroid-3.3.1.ebuild
Normal file
|
@ -0,0 +1,89 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..13} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Abstract Syntax Tree for logilab packages"
|
||||
HOMEPAGE="
|
||||
https://github.com/pylint-dev/astroid/
|
||||
https://pypi.org/project/astroid/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/pylint-dev/astroid/archive/v${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
# Version specified in pyproject.toml
|
||||
RDEPEND="
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/typing-extensions-4.0.0[${PYTHON_USEDEP}]
|
||||
' 3.10)
|
||||
"
|
||||
# dev-python/regex isn't available for pypy
|
||||
BDEPEND="
|
||||
dev-python/setuptools-scm[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/attrs[${PYTHON_USEDEP}]
|
||||
>=dev-python/numpy-1.17.0[${PYTHON_USEDEP}]
|
||||
dev-python/python-dateutil[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
' 'python*')
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# no clue why they're broken
|
||||
tests/test_modutils.py::GetModulePartTest::test_known_values_get_builtin_module_part
|
||||
tests/test_regrtest.py::NonRegressionTests::test_numpy_distutils
|
||||
# pydantic-2?
|
||||
tests/brain/test_dataclasses.py::test_pydantic_field
|
||||
# requires urllib3 with bundled six (skipped with urllib3>=2)
|
||||
tests/test_modutils.py::test_file_info_from_modpath__SixMetaPathImporter
|
||||
# hangs
|
||||
tests/test_nodes.py::AsStringTest::test_recursion_error_trapped
|
||||
# TODO
|
||||
tests/test_builder.py::BuilderTest::test_data_build_error_filename
|
||||
# numpy-2 (https://github.com/pylint-dev/astroid/issues/2442)
|
||||
tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray
|
||||
tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray
|
||||
tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_ndarray
|
||||
tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_datetime_astype_return
|
||||
tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_generic_types_are_subscriptables
|
||||
tests/brain/numpy/test_core_umath.py::NumpyBrainCoreUmathTest::test_numpy_core_umath_functions_return_type
|
||||
tests/brain/numpy/test_core_umath.py::NumpyBrainCoreUmathTest::test_numpy_core_umath_functions_return_type_tuple
|
||||
)
|
||||
|
||||
case ${EPYTHON} in
|
||||
pypy3)
|
||||
EPYTEST_DESELECT+=(
|
||||
tests/test_transforms.py::TestTransforms::test_transform_aborted_if_recursion_limited
|
||||
)
|
||||
;;
|
||||
python3.13)
|
||||
EPYTEST_DESELECT+=(
|
||||
# changes in py3.13.0b4
|
||||
# https://github.com/pylint-dev/astroid/issues/2478
|
||||
tests/test_nodes.py::AsStringTest::test_f_strings
|
||||
tests/test_nodes_lineno.py::TestLinenoColOffset::test_end_lineno_string
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
epytest
|
||||
}
|
|
@ -1,2 +1,3 @@
|
|||
DIST attrs-23.2.0.tar.gz 780820 BLAKE2B a06f4f17a81fc173c37661bcf518367a1cdc9a333d2783bd2cd1ac5f0a72bd20ec1afdd964e10255624bcfa027e3a152375cd21472c177428d29bd06b29984a1 SHA512 d8b178072a028b95d8424cd3ce0c8b4e6da8558fbcbcaaef91fbd03cf51e6190aa248aa0bff853e6f7c9595bbd5a8eef9d6f68ae2830cc1cc6d826ab0dda2378
|
||||
DIST attrs-24.1.0.tar.gz 792572 BLAKE2B ece012327c6fd5de771376dd70a5a739a282c22cf7fe536d943072193dc45cc5efcf492fe40c46e837bd036109ca01073dd10aec6e116efa668af0872cc51a3a SHA512 dd84da9b06f5da2724d834c1b8b3ffb5d745d49c8a168e0503ca7572561b2021562b5bbfeea133a7d097fc9423a05494f372e72a9fcc25ada2f745c34a80fdab
|
||||
DIST attrs-24.2.0.tar.gz 792678 BLAKE2B f5110f5bf4b848a929a3766985fc49ee8da346398c26d0f786a12d89e7596ec7165bdefaae4b2716003c4b3ad7fcc619ec2f5e0d184df899318a7bb02c9919a4 SHA512 fcd14ff79a09a0b2b56734c460b5c43836999b6ed27665038ff7a146f53891b31ab3da07df05f1686474507f342bfce09bc0a6a60865c241e58f7ce8423dc968
|
||||
|
|
33
dev-python/attrs/attrs-24.2.0.ebuild
Normal file
33
dev-python/attrs/attrs-24.2.0.ebuild
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=hatchling
|
||||
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Attributes without boilerplate"
|
||||
HOMEPAGE="
|
||||
https://github.com/python-attrs/attrs/
|
||||
https://attrs.readthedocs.io/
|
||||
https://pypi.org/project/attrs/
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
|
||||
BDEPEND="
|
||||
>=dev-python/hatch-fancy-pypi-readme-23.2.0[${PYTHON_USEDEP}]
|
||||
dev-python/hatch-vcs[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
$(python_gen_impl_dep sqlite)
|
||||
dev-python/cloudpickle[${PYTHON_USEDEP}]
|
||||
dev-python/hypothesis[${PYTHON_USEDEP}]
|
||||
dev-python/zope-interface[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
|
@ -3,3 +3,4 @@ DIST boto3-1.34.149.gh.tar.gz 845064 BLAKE2B 25e77483b8ac8a52e7f5586794839dcab69
|
|||
DIST boto3-1.34.153.gh.tar.gz 847038 BLAKE2B f29aec887fd57d2bc4b6be125787384438e0dba65dd01effcc91016b9301be2fdde315a2fbdc8f122350ae52f904ba1c281aee9a5dc52994ddd11b45ead3f8a3 SHA512 a8d8f75ef48ad8418aafddbdea4fb021f64b041e7beabf68a0c2f6c461c3aa0b3f2f20c33122ac87d57296fd0d14ee8834b96257085c522b556f6aa1d99ea0d1
|
||||
DIST boto3-1.34.154.gh.tar.gz 847586 BLAKE2B 6ae763f1e112f865f8711951ac52f4ff28976928470ac3d8c468278e0abde23750457b8f92a9346b1468f94da4282b5b71eba09f7b442fd448ab8c1501e79914 SHA512 22eb130dbeaf9dfc87d2e01dddd00d3bd10a2fa91c8c7994add2ad3d739769dbd56717d9d034a0edb8e02ad15b8b956a31737269b303a3ec3508d8cfc00482ed
|
||||
DIST boto3-1.34.155.gh.tar.gz 847949 BLAKE2B 922377411d5535ff98b81f96cdb15dfd98de23bda40acabb172c889b221936083ad91403f59926fb29ca480f6d0056fb0441371dcfbd2b94d05158c34503bb8c SHA512 c8d7764c10a81fa8fb32eecdd242a36032db451bf4afe1bbc1974de422e0dc387d18e9ef78dcbdb41b19a05db4da8d66131d246b074463a33ae072a61141c362
|
||||
DIST boto3-1.34.156.gh.tar.gz 848245 BLAKE2B ee690925f3e3866f0b843bebdfd48bf4bf2f63232c5207f2e3c5823f7b5142c8990b65d5cdfb14a2d14b2460c463efec6444c50733ac920b3a28188dc814adff SHA512 f42ddc6eab3cd07b80021fc3fa99c2fdeae85d70249a369d8a8d5c1e0fc7d692e78989489de8976ac66ce91327352f9df2b70574a8067bf44c1f09b4476ef0ca
|
||||
|
|
53
dev-python/boto3/boto3-1.34.156.ebuild
Normal file
53
dev-python/boto3/boto3-1.34.156.ebuild
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="The AWS SDK for Python"
|
||||
HOMEPAGE="
|
||||
https://github.com/boto/boto3/
|
||||
https://pypi.org/project/boto3/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/boto/boto3/archive/${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-${PV}[${PYTHON_USEDEP}]
|
||||
>=dev-python/jmespath-0.7.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.10.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_prepare_all() {
|
||||
# don't lock versions to narrow ranges
|
||||
sed -e '/botocore/ d' \
|
||||
-e '/jmespath/ d' \
|
||||
-e '/s3transfer/ d' \
|
||||
-i setup.py || die
|
||||
|
||||
# do not rely on bundled deps in botocore (sic!)
|
||||
find -name '*.py' -exec sed -i \
|
||||
-e 's:from botocore[.]vendored import:import:' \
|
||||
-e 's:from botocore[.]vendored[.]:from :' \
|
||||
{} + || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
epytest tests/{functional,unit}
|
||||
}
|
|
@ -3,3 +3,4 @@ DIST botocore-1.34.149.gh.tar.gz 13245965 BLAKE2B 6bc05c1d93eaa62fa9acb3c0e42acd
|
|||
DIST botocore-1.34.153.gh.tar.gz 13269606 BLAKE2B 1b2ec1af3b699c18c5761fe72b8488361f843e1b2abc5f311736e7c93a52574738a8e72708791657d0d86586d64ee3c85804514779c6dc75c6c2e37035517be1 SHA512 9a7b3359f4304bcb4d3605e2516514360e8898d7b8b1fdee8fab5dc6026a7d8197b09199da4e9aefcf1ab0b094a2e0e336ad13942ce0364f7b5ac87d86fdc4fd
|
||||
DIST botocore-1.34.154.gh.tar.gz 13272973 BLAKE2B ce1616749d9baddf6fbbf08be1dc0c5343b3b9ec3bf2b357690ca31076d52f814e7a7d4f61f2a2e2629d35c55894bd56e6fa4ada8834e1df1b072638ec6dd874 SHA512 5b5d8efb5834ddfac08216a9919f2e1d3ac92823b635530a429e45b90f16fbf426dabec7da98e965f5e540fb471eba49d3ccbf55e771d956fa200f6196612837
|
||||
DIST botocore-1.34.155.gh.tar.gz 13274262 BLAKE2B ec3602e31e2091877faa07841494e63b169624992c88a7eb9fa0315c2dcb205b7903e1eba101291caeadc89f078365e1fb605ffd1dc096cbb748e206d9bc5df1 SHA512 6582c286304cb667048325c7b2710fc040f41a822497732919e7982791d686af21e9f7851239b736e0b2f7e463f00fdb9e0e2793004d04c3fce7831d10f46e60
|
||||
DIST botocore-1.34.156.gh.tar.gz 13279124 BLAKE2B 022551a3247c467a4ec81ec257b50887ea9626b966df42b3f175a1ff3fa3daab73be9c17d0fdf8b2d0a69797f26575c84b11aac8e39ca26b624e4f3228de92e6 SHA512 ae4dbde1624b410b26c2e514582470ece7d841faad72d8288da09e980314170e60594095d86aeb3cba0878687832cf1e971277f943f935ecee2625eaefd4faab
|
||||
|
|
76
dev-python/botocore/botocore-1.34.156.ebuild
Normal file
76
dev-python/botocore/botocore-1.34.156.ebuild
Normal file
|
@ -0,0 +1,76 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Low-level, data-driven core of boto 3"
|
||||
HOMEPAGE="
|
||||
https://github.com/boto/botocore/
|
||||
https://pypi.org/project/botocore/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/boto/botocore/archive/${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
RDEPEND="
|
||||
<dev-python/jmespath-2[${PYTHON_USEDEP}]
|
||||
dev-python/python-dateutil[${PYTHON_USEDEP}]
|
||||
>=dev-python/urllib3-1.25.4[${PYTHON_USEDEP}]
|
||||
"
|
||||
# unbundled packages
|
||||
RDEPEND+="
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/jsonschema[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# unpin deps
|
||||
sed -i -e "s:>=.*':':" setup.py || die
|
||||
|
||||
# unbundle deps
|
||||
rm -r botocore/vendored || die
|
||||
find -name '*.py' -exec sed -i \
|
||||
-e 's:from botocore[.]vendored import:import:' \
|
||||
-e 's:from botocore[.]vendored[.]:from :' \
|
||||
{} + || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# rely on bundled six
|
||||
tests/functional/test_six_imports.py::test_no_bare_six_imports
|
||||
tests/functional/test_six_threading.py::test_six_thread_safety
|
||||
)
|
||||
|
||||
case ${EPYTHON} in
|
||||
python3.13)
|
||||
EPYTEST_DESELECT+=(
|
||||
# memory use tests, probably fragile
|
||||
tests/functional/leak/test_resource_leaks.py::TestDoesNotLeakMemory
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
epytest tests/{functional,unit}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
DIST cffi-1.16.0.tar.gz 512873 BLAKE2B 9e8d107b3124a072e559c4a536b54a172e90f9fe51d8184dacc2914a8ffa84f2682eee9c90401325dfb0f36f3f8ea0456afc93e2b85a4fef5f07ae4475e0a76b SHA512 fd2588115092202aa9289c9d4e0a0b3e264b5e9ec1dc192950f31aeb412fd9f9d4e5c96a3f9c6762987b58ccc1e229f2012ddda89211797104df672d8ed51152
|
||||
DIST cffi-1.17.0.tar.gz 516073 BLAKE2B e050689b58b4a34e3f605f84b3b6a59ec44359bfb042796f82e1acb6349b65ca37f9fb7a0d4ffc7fe40b85416288dcc1f3496968c4fb3f36cdd2c0042658f7b1 SHA512 8516abe177c2acfc31ede401287956cc4dc486b26ed9c4752811be71dc6bc94af3adf1f1f685a94e7242f052b74768bfbbb30ce41a3c23b9259c91449347566e
|
||||
DIST cffi-1.17.0rc1.tar.gz 516063 BLAKE2B 02f25fde28a070c314deb5870d2285a0cfd2fd10d0136b3c5459d4bb11454722d61dfe0e5f27a7268a4aca8cadb2a9df045340094bcf98f1692f54ddea6df714 SHA512 757ccaf09a745cd04a31d0b2fcc46f438269b79b88c4a89aa7dd2f0dd1bc1b64fb9f9fde2461407e1c0482c1c64e837283e21d0b46dbcb0c4ccd5e54a8319a0e
|
||||
DIST cffi-d7f750b1b1c5ea4da5aa537b9baba0e01b0ce843.gh.tar.gz 523050 BLAKE2B 498085e9bc497eb1abf2d2e26e2cdb9d7544509b2c1686b306930c2da8a39a5ef133b77302761b44d5231c5255ef30cbd22579c79921dc2dc71e723ff5624939 SHA512 a0d1eb7bf8df12331d3493d86894ba062f7a15f4e7421863d44e264d4ca40ef864c7574d42cb7a4f2ea44ab80242942d6f4c8772c64b8dd0789aeb9f1908fc89
|
||||
|
|
71
dev-python/cffi/cffi-1.17.0.ebuild
Normal file
71
dev-python/cffi/cffi-1.17.0.ebuild
Normal file
|
@ -0,0 +1,71 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
# DO NOT ADD pypy to PYTHON_COMPAT
|
||||
# pypy bundles a modified version of cffi. Use python_gen_cond_dep instead.
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1 toolchain-funcs pypi
|
||||
|
||||
DESCRIPTION="Foreign Function Interface for Python calling C code"
|
||||
HOMEPAGE="
|
||||
https://cffi.readthedocs.io/
|
||||
https://pypi.org/project/cffi/
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
|
||||
# Needs recent libffi for HPPA fixes
|
||||
DEPEND="
|
||||
>=dev-libs/libffi-3.4.4-r1:=
|
||||
"
|
||||
# setuptools as a modern distutils provider
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
dev-python/pycparser[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
test? (
|
||||
dev-python/py[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_sphinx doc/source
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/cffi-1.14.0-darwin-no-brew.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${CHOST} == *darwin* ]] ; then
|
||||
# Don't obsessively try to find libffi
|
||||
sed -i -e "s/.*\-iwithsysroot\/usr\/include\/ffi.*/\tpass/" setup.py || die
|
||||
fi
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export PKG_CONFIG
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_IGNORE=(
|
||||
# these tests call pip
|
||||
testing/cffi0/test_zintegration.py
|
||||
)
|
||||
|
||||
"${EPYTHON}" -c "import _cffi_backend as backend" || die
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
epytest src/c testing
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
DIST crc32c-2.4.1.tar.gz 38277 BLAKE2B 3d4a0eeb5811e8bc46df30b8890ab409de92dc3cfe2c5c3ab355df3394e56812c19ac26523be2cf9c33bb5825fb6e080b6f27ea77bed5c38d98fbe6c247653fb SHA512 005f95f66e97f552a83b5c94b706224f44280895d70c348fee86943bf1589a94b57eeddde5e18499fea9c77cbcbcfd5691d9d4b33ed788dc885a1333b6db476b
|
||||
DIST crc32c-2.4.tar.gz 38272 BLAKE2B 1273f62794bd646e983737d922c4e1320a4519856b1cedf2d1d1f9b1e47fc767e248b6e00ada48e8f245e47fc18619327e9a8cfa5d88a0569c467ca6147a1974 SHA512 d747dee42184ff025dd6fd7334b65e5caba4066a055943a783b951d09e09339694072ea552aa95579f03a85a7bdb2eb4a8d12dc9a17f0f83d84c0fde534b36cb
|
||||
DIST crc32c-2.5.tar.gz 41514 BLAKE2B a9424ef917f3c89f3b8b3881ccd5d59cb8a634d6177260ce9e7300e151e68e97e55b74448dd4cd545d2d66d2e2d8e70a085578719f768662542e43f06e914d20 SHA512 446f2290706eae8a625590c6b314d8422938dd9b8bffcf5e4dd6d3d260932548dbc5d9a9b6e7e5eaaaaac8dce424876f4e4acc9b0b1ea2b7cdc6ddd101228cfd
|
||||
|
|
|
@ -23,11 +23,6 @@ IUSE="cpu_flags_arm_crc32 cpu_flags_x86_sse4_2"
|
|||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=(
|
||||
# https://github.com/ICRAR/crc32c/pull/44
|
||||
"${FILESDIR}/${P}-sparc.patch"
|
||||
)
|
||||
|
||||
python_test() {
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x CRC32C_SW_MODE
|
|
@ -1,34 +0,0 @@
|
|||
From 9d94ecbfe2363c7adf49bddbf31871764faf4f41 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Sun, 30 Jun 2024 16:00:34 +0200
|
||||
Subject: [PATCH] Fix char signedness issue in _crc32c_sw_slicing_by_8()
|
||||
|
||||
Fix `_crc32c_sw_slicing_by_8()` to use `unsigned char` for `p_buf`,
|
||||
to fix incorrect results on platforms with signed `char` such as SPARC.
|
||||
The code has been casting `unsigned char *` to `char *` for no apparent
|
||||
reason, and this broke the bitshifts in the big endian blocks.
|
||||
|
||||
Particularly,
|
||||
|
||||
crc ^= *(p_buf++) << 16
|
||||
|
||||
would be XOR-ed against `0xffee0000` rather than `0x00ee0000`.
|
||||
|
||||
Fixes #43
|
||||
---
|
||||
crc32c_sw.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/crc32c_sw.c b/crc32c_sw.c
|
||||
index 8382749..67409c9 100644
|
||||
--- a/crc32c_sw.c
|
||||
+++ b/crc32c_sw.c
|
||||
@@ -490,7 +490,7 @@ const uint32_t crc_tableil8_o88[256] =
|
||||
|
||||
uint32_t _crc32c_sw_slicing_by_8(uint32_t crc, unsigned const char* data, unsigned long length)
|
||||
{
|
||||
- const char* p_buf = (const char*) data;
|
||||
+ unsigned const char* p_buf = data;
|
||||
size_t initial_bytes = (sizeof(uint32_t) - (intptr_t)p_buf) & (sizeof(uint32_t) - 1);
|
||||
size_t li;
|
||||
size_t running_length;
|
|
@ -1 +1,2 @@
|
|||
DIST dict2xml-1.7.5.tar.gz 14958 BLAKE2B 1907003e3a27a8e1c1a0e7ab1d5c72b310c46e7af7d51f6a1743ca018fb6a070b0b54b4b24afd8c78dd18f83f9f6950031c0076eae83ccc309a341a0df153708 SHA512 88a77fcdc2ec320ba1668b27da4aacfcfc817090aebabc01fce76bff51b316166a0cc1f053884e8012a28e7118449f901465703869245dc662f29cee9665157e
|
||||
DIST dict2xml-1.7.6.tar.gz 15210 BLAKE2B 86ed48b2dc857efd58294c23f0708102ac66dab50e7f50ae149185f3fb707f72ef67008921ea641ed1bd96a91b25b39a92ddc796eadb64560ff29b82cd1ef07e SHA512 54e8330a556e7576d100fbbc036e8c9627872c4c1cbebcaedf137f2b8ad8e197e49b2e699c284f9c8a3d9874fea83eac80d129f67ea426e807e5699f8811b933
|
||||
|
|
25
dev-python/dict2xml/dict2xml-1.7.6.ebuild
Normal file
25
dev-python/dict2xml/dict2xml-1.7.6.ebuild
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=hatchling
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..13} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Small utility to convert a python dictionary into an XML string"
|
||||
HOMEPAGE="
|
||||
https://github.com/delfick/python-dict2xml/
|
||||
https://pypi.org/project/dict2xml/
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
BDEPEND="
|
||||
dev-python/noseofyeti[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
|
@ -1,11 +1,8 @@
|
|||
DIST Django-4.2.14.checksum.txt 2579 BLAKE2B 9cf59d23c8fa0ad9b86f30a492d981a3084c31fd0c7e8ea212c62377385bcb45369ee3f29573c8e129f8d248ca4e94d4c1a4172048b9a9b2f66cc3291e972367 SHA512 c36efc19f8cc90db89dfe3ffaedff724f4b5a049f6def7acb194f8114a2ae519c5c07dea5452c09618629c9d585867de4b028bcef382f43d24f753f4a100c1c6
|
||||
DIST Django-4.2.14.tar.gz 10432993 BLAKE2B 0139669111f834bcb79fea5fa2bc43386d62a65790fda9d762f8ac4e2a32f2a3740629e31c863b2643fa13b893938c33b066c21f27857f391715b7cec88dfad7 SHA512 2663454c48f57a441d1620faad30ac25750d1e71bf34eddbdef3e6d8dd208913752ab657447ffea5e9d3a0676a4a4d501fa88a40a0ca0fd361df0782a6b3306b
|
||||
DIST Django-4.2.15.checksum.txt 2418 BLAKE2B 06338f990952736d1368c11bc0a14df4fcb756c7e33b0a843d692c1ca23a9bf5073c552513cf2846c16da24da475ff122f59122f90da528c2cb8875072fa7748 SHA512 b4e8eb163a889c2aa556217b2ba6280916c891b2f8af862d66e09b5ec643dee9281e58e2382fdfdee1d0e1a9a80267c93993374ae3e0f33f3ec5051bae69f145
|
||||
DIST Django-4.2.15.tar.gz 10418066 BLAKE2B 4abf7205995fbc8dd90ca43aadfdd6737c5f731fea4054f987ae851e0b6f0a5f0f799441f94ca322e31c07c2a810903a00b4432b71a7517b2a261c4844ddba90 SHA512 8f334dcaa36b3bce5184ddf1a1508bf42614be6ab486c9e0d87e9bfd212511c43081ad5fb02d2dd7b54f8236fc1f7ee9cd7b7f6f94ac8edc1cb52d1c0c698880
|
||||
DIST Django-5.0.7.checksum.txt 2569 BLAKE2B 0d4cecf064da9313058606569fcb014c5f3d5ec3c60a5a056cd8242ed9a8349b6d273c38010ba3d41fac85e5551a21748a7739772ad310f8c64224243745eac5 SHA512 9ec2e5e3ac0cb99be9349373c2cf47c6055e0bb729e5bb7e476350cd39595c4c82e7eab9a7eb286a9199834bed65d7f3d31ba59509d6e2e827b0f9c743aa9fcd
|
||||
DIST Django-5.0.7.tar.gz 10642686 BLAKE2B 559c3e3dd3971081e8572a707f59054ec84d9922493caddec9e008c5e850e8beb7bfbca291e4e7157e94d4fcd655983e3444f1c8f078342c8b66b3e8ce122ab7 SHA512 29aa4cd7bfdc5c00479c9d60d988653bab76dcfd8cd553ab446f6c274f99677ccaef0571b0afdf1579215918f500d87a0b098a98452c7526e89b1ab64f00b037
|
||||
DIST Django-5.0.8.checksum.txt 2408 BLAKE2B 18751733d7abaa4e98039bf0cfa3773a999df4351371939803ec77850c25d75392abc7e4136e8c4a79620017c224bafcd8552c2446ee0817249abebcc3b0e1bb SHA512 c05027bdec0928dd51239ba5c72b97b737ad73dbbdbdc1c4bef2b9faf8afc188cd854e1dcd3b5ffbdc9c3a30dea5a27e4b899f9d257bcee6f80fbfdfd30e7a20
|
||||
DIST Django-5.0.8.tar.gz 10630791 BLAKE2B 0a5408b46b69b701f3ff88717b41b22cd4abd776a0b46f46025febd423e4b9c5f395da50a5be9e479bc0047405330231da400f3f2324bbb69ca5ab07966bc168 SHA512 b835d01f76f0e0082f299c2b15483aa3a8aef79f873b09dac546d3b4ecfa8a6fb84d9377e06e18a858bd24bcdd2db89c4cf05811b3af133b7da6609f6c2d917c
|
||||
DIST Django-5.1rc1.tar.gz 10747906 BLAKE2B a254c19d3e1713962e42736a99f2775c79ed7ad9b337280688402e7f564bc21c4b190f4887eb8aefee8ed17ab11cc51b490eb99bad967f2ad2e1321f70de9e80 SHA512 52d07fbfa031962a12109aa79ff44e93de3cba40c410be0707b46d1c47e352f066e5b58495f3aec5e60bd0b3844c667014b959965a248c4b6d997b8ced953622
|
||||
DIST Django-5.1.checksum.txt 2551 BLAKE2B bec3fb2608b4152667420951ea7ba34cdbf416b30c0d03508917c0f41b914d6f55b69b209da308407659d93c1a23ecac33272969ad042c7bb8c1e8ac1c19527f SHA512 70f9dce04687c01b641b5c07ce8476db15231a82262015fb18a97b90b3caac11cb7d50cd7a749a80321af9a04bfce212ed9400be0fd114cb8d37f82193396161
|
||||
DIST Django-5.1.tar.gz 10681050 BLAKE2B 1cded54e573d7a75ff246523235a1e17b6900000ef428f02ddf1f17fb0146449cef28da9207cfb3a0a888def86620a755cb62dba033c15501dc9125d6164f462 SHA512 4c34df7adf2a151488d8595551fe6e8eb90fdef9d7592ce1d8c8b0663fe4d876614f5dde4df1dd648153d4df6246ae39dbb33a66b1c3d2f60bd46595e0efb396
|
||||
DIST django-4.2.8-pypy3.patch.xz 5900 BLAKE2B b7dc5c5fc162817a218ee6d025ed8a65559b80e4506e49ac393428c26e2621f9e7c5010b36f2412dea8194a9f1086ab21f97286eabd696c6a786285eb07393cf SHA512 f953b5adbd1364f1d84dde55087ccb493256b1327701275fd2fe99f3cd41751d18e002b6e21afc96892e1671428a6b8f3c2e4b88252c3c278f1a79e286bb73e3
|
||||
DIST django-5.0-pypy3.patch.xz 6124 BLAKE2B 7eba7cc70b30743cf4e186a2c5b0f27c13f49114a7a80bcaa2b25fdd7a959583c115a302c9bc6da97c32f6401cf8f3616818ba759190d317c5b033a0f0088766 SHA512 c550e2b2c1243d13cd1f4908f4b6df606355d1491e3bf72042e4b4777a4474306ff0f67b1c2eb4ab4d137cc85bde52dcdbd54bec245d2ba2e092545be8a2993b
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..12} )
|
||||
PYTHON_REQ_USE='sqlite?,threads(+)'
|
||||
|
||||
inherit bash-completion-r1 distutils-r1 multiprocessing optfeature verify-sig
|
||||
|
||||
DESCRIPTION="High-level Python web framework"
|
||||
HOMEPAGE="
|
||||
https://www.djangoproject.com/
|
||||
https://github.com/django/django/
|
||||
https://pypi.org/project/Django/
|
||||
"
|
||||
SRC_URI="
|
||||
https://media.djangoproject.com/releases/$(ver_cut 1-2)/${P^}.tar.gz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/django-4.2.8-pypy3.patch.xz
|
||||
verify-sig? ( https://media.djangoproject.com/pgp/${P^}.checksum.txt )
|
||||
"
|
||||
S="${WORKDIR}/${P^}"
|
||||
|
||||
LICENSE="BSD"
|
||||
# admin fonts: Roboto (media-fonts/roboto)
|
||||
LICENSE+=" Apache-2.0"
|
||||
# admin icons, jquery, xregexp.js
|
||||
LICENSE+=" MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
|
||||
IUSE="doc sqlite test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
<dev-python/asgiref-4[${PYTHON_USEDEP}]
|
||||
>=dev-python/asgiref-3.6.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/sqlparse-0.3.1[${PYTHON_USEDEP}]
|
||||
sys-libs/timezone-data
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
$(python_gen_impl_dep sqlite)
|
||||
${RDEPEND}
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
dev-python/pillow[webp,${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/selenium[${PYTHON_USEDEP}]
|
||||
dev-python/tblib[${PYTHON_USEDEP}]
|
||||
sys-devel/gettext
|
||||
)
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-django-20230606 )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/django-4.0-bashcomp.patch
|
||||
"${WORKDIR}"/django-4.2.8-pypy3.patch
|
||||
)
|
||||
|
||||
distutils_enable_sphinx docs --no-autodoc
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/django.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"${P^}.checksum.txt" sha256 "${P^}.tar.gz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Tests have non-standard assumptions about PYTHONPATH,
|
||||
# and don't work with ${BUILD_DIR}/lib.
|
||||
PYTHONPATH=. "${EPYTHON}" tests/runtests.py --settings=test_sqlite \
|
||||
-v2 --parallel="${EPYTEST_JOBS:-$(makeopts_jobs)}" ||
|
||||
die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp extras/django_bash_completion ${PN}-admin
|
||||
bashcomp_alias ${PN}-admin django-admin.py
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature_header "Additional Backend support can be enabled via:"
|
||||
optfeature "MySQL backend support" dev-python/mysqlclient
|
||||
optfeature "PostgreSQL backend support" dev-python/psycopg:0
|
||||
optfeature_header
|
||||
optfeature "GEO Django" "sci-libs/gdal[geos]"
|
||||
optfeature "Memcached support" dev-python/pylibmc dev-python/python-memcached
|
||||
optfeature "ImageField Support" dev-python/pillow
|
||||
optfeature "Password encryption" dev-python/bcrypt
|
||||
}
|
|
@ -28,7 +28,7 @@ LICENSE+=" Apache-2.0"
|
|||
# admin icons, jquery, xregexp.js
|
||||
LICENSE+=" MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
|
||||
KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
|
||||
IUSE="doc sqlite test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
|
@ -57,6 +57,8 @@ BDEPEND="
|
|||
PATCHES=(
|
||||
"${FILESDIR}"/django-4.0-bashcomp.patch
|
||||
"${WORKDIR}"/django-4.2.8-pypy3.patch
|
||||
# https://code.djangoproject.com/ticket/35661
|
||||
"${FILESDIR}"/django-5.1-more-pypy3.patch
|
||||
)
|
||||
|
||||
distutils_enable_sphinx docs --no-autodoc
|
||||
|
|
|
@ -28,7 +28,7 @@ LICENSE+=" Apache-2.0"
|
|||
# admin icons, jquery, xregexp.js
|
||||
LICENSE+=" MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
|
||||
IUSE="doc sqlite test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
|
@ -59,6 +59,8 @@ PATCHES=(
|
|||
"${WORKDIR}"/django-5.0-pypy3.patch
|
||||
# https://github.com/django/django/commit/3426a5c33c36266af42128ee9eca4921e68ea876
|
||||
"${FILESDIR}"/django-5.0.6-py313.patch
|
||||
# https://code.djangoproject.com/ticket/35661
|
||||
"${FILESDIR}"/django-5.1-more-pypy3.patch
|
||||
)
|
||||
|
||||
distutils_enable_sphinx docs --no-autodoc
|
||||
|
|
|
@ -28,13 +28,13 @@ LICENSE+=" Apache-2.0"
|
|||
# admin icons, jquery, xregexp.js
|
||||
LICENSE+=" MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
|
||||
IUSE="doc sqlite test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
<dev-python/asgiref-4[${PYTHON_USEDEP}]
|
||||
>=dev-python/asgiref-3.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/asgiref-3.8.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/sqlparse-0.3.1[${PYTHON_USEDEP}]
|
||||
sys-libs/timezone-data
|
||||
"
|
||||
|
@ -51,14 +51,13 @@ BDEPEND="
|
|||
>=dev-python/tblib-1.5.0[${PYTHON_USEDEP}]
|
||||
sys-devel/gettext
|
||||
)
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-django-20230606 )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-django-20240807 )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/django-4.0-bashcomp.patch
|
||||
"${WORKDIR}"/django-5.0-pypy3.patch
|
||||
# https://github.com/django/django/commit/3426a5c33c36266af42128ee9eca4921e68ea876
|
||||
"${FILESDIR}"/django-5.0.6-py313.patch
|
||||
# https://code.djangoproject.com/ticket/35661
|
||||
"${FILESDIR}"/django-5.1-more-pypy3.patch
|
||||
)
|
||||
|
||||
distutils_enable_sphinx docs --no-autodoc
|
|
@ -1,83 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
PYPI_PN=${PN^}
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..13} )
|
||||
PYTHON_REQ_USE='sqlite?,threads(+)'
|
||||
|
||||
inherit bash-completion-r1 distutils-r1 multiprocessing optfeature pypi
|
||||
|
||||
DESCRIPTION="High-level Python web framework"
|
||||
HOMEPAGE="
|
||||
https://www.djangoproject.com/
|
||||
https://github.com/django/django/
|
||||
https://pypi.org/project/Django/
|
||||
"
|
||||
|
||||
LICENSE="BSD"
|
||||
# admin fonts: Roboto (media-fonts/roboto)
|
||||
LICENSE+=" Apache-2.0"
|
||||
# admin icons, jquery, xregexp.js
|
||||
LICENSE+=" MIT"
|
||||
SLOT="0"
|
||||
IUSE="doc sqlite test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
<dev-python/asgiref-4[${PYTHON_USEDEP}]
|
||||
>=dev-python/asgiref-3.8.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/sqlparse-0.3.1[${PYTHON_USEDEP}]
|
||||
sys-libs/timezone-data
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
$(python_gen_impl_dep sqlite)
|
||||
${RDEPEND}
|
||||
>=dev-python/docutils-0.19[${PYTHON_USEDEP}]
|
||||
>=dev-python/jinja-2.11.0[${PYTHON_USEDEP}]
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
dev-python/pillow[webp,${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
>=dev-python/selenium-4.8.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/tblib-1.5.0[${PYTHON_USEDEP}]
|
||||
sys-devel/gettext
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/django-4.0-bashcomp.patch
|
||||
)
|
||||
|
||||
distutils_enable_sphinx docs --no-autodoc
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/django.asc
|
||||
|
||||
python_test() {
|
||||
# Tests have non-standard assumptions about PYTHONPATH,
|
||||
# and don't work with ${BUILD_DIR}/lib.
|
||||
PYTHONPATH=. "${EPYTHON}" tests/runtests.py --settings=test_sqlite \
|
||||
-v2 --parallel="${EPYTEST_JOBS:-$(makeopts_jobs)}" ||
|
||||
die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp extras/django_bash_completion ${PN}-admin
|
||||
bashcomp_alias ${PN}-admin django-admin.py
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature_header "Additional Backend support can be enabled via:"
|
||||
optfeature "MySQL backend support" dev-python/mysqlclient
|
||||
optfeature "PostgreSQL backend support" dev-python/psycopg:0
|
||||
optfeature_header
|
||||
optfeature "GEO Django" "sci-libs/gdal[geos]"
|
||||
optfeature "Memcached support" dev-python/pylibmc dev-python/python-memcached
|
||||
optfeature "ImageField Support" dev-python/pillow
|
||||
optfeature "Password encryption" dev-python/bcrypt
|
||||
}
|
51
dev-python/django/files/django-5.1-more-pypy3.patch
Normal file
51
dev-python/django/files/django-5.1-more-pypy3.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
From d9aeb23edb6cc861360ffbb59a45beccafe55dcb Mon Sep 17 00:00:00 2001
|
||||
From: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
||||
Date: Thu, 8 Aug 2024 08:13:29 +0200
|
||||
Subject: [PATCH] [5.1.x] Fixed #35661 -- Fixed
|
||||
test_too_many_digits_to_rander() test crash on PyPy.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Thanks Michał Górny for the report.
|
||||
|
||||
Backport of 7fb15ad5bcae05324ee8913e4b2c6c982e8f2de0 from main.
|
||||
---
|
||||
.../template_tests/filter_tests/test_floatformat.py | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/template_tests/filter_tests/test_floatformat.py b/tests/template_tests/filter_tests/test_floatformat.py
|
||||
index 3d6c34a55232..6183f6a0691d 100644
|
||||
--- a/tests/template_tests/filter_tests/test_floatformat.py
|
||||
+++ b/tests/template_tests/filter_tests/test_floatformat.py
|
||||
@@ -4,6 +4,7 @@
|
||||
from django.test import SimpleTestCase
|
||||
from django.utils import translation
|
||||
from django.utils.safestring import mark_safe
|
||||
+from django.utils.version import PYPY
|
||||
|
||||
from ..utils import setup
|
||||
|
||||
@@ -181,12 +182,21 @@ def test_too_many_digits_to_render(self):
|
||||
"-1E10000000000000000",
|
||||
"1e10000000000000000",
|
||||
"-1e10000000000000000",
|
||||
- "1" + "0" * 1_000_000,
|
||||
]
|
||||
for value in cases:
|
||||
with self.subTest(value=value):
|
||||
self.assertEqual(floatformat(value), value)
|
||||
|
||||
+ def test_too_many_digits_to_render_very_long(self):
|
||||
+ value = "1" + "0" * 1_000_000
|
||||
+ if PYPY:
|
||||
+ # PyPy casts decimal parts to int, which reaches the integer string
|
||||
+ # conversion length limit (default 4300 digits, CVE-2020-10735).
|
||||
+ with self.assertRaises(ValueError):
|
||||
+ floatformat(value)
|
||||
+ else:
|
||||
+ self.assertEqual(floatformat(value), value)
|
||||
+
|
||||
def test_float_dunder_method(self):
|
||||
class FloatWrapper:
|
||||
def __init__(self, value):
|
|
@ -1 +1,2 @@
|
|||
DIST furo-2024.7.18-py3-none-any.whl 340824 BLAKE2B 619e7183541921ec31f5a7e7ebcbc86f0507e04bf7e5c9e308a3b6a6b580cf734fe46b641b3bcaaeeaba39516ca27b49ef8faadd0d9d5864343aafc15a05037d SHA512 62c047742a0a851e5faf56013751d05a411920ca7659ef42fc06bcce6766a6605734b370a636f4b1c2805def42881c273a2b5eb6704484571d76a44145b0a346
|
||||
DIST furo-2024.8.6-py3-none-any.whl 341333 BLAKE2B e0cf87a69b35a0a48eb54eb9530ec92f5fa06882b4c4a9bf306a3b1eee7af8510e37dfd1b612fe747856e48eada1eed05ae8e5e270616bf9b5fd5a70705a9c53 SHA512 e9e32eb26659b710836c86bd881c07625d14a10000674d488da2dc71e5cbb7ba6ce4494892f731dbcf288af11bcf6870f9f97f70364425cca4a00f7edda01d48
|
||||
|
|
42
dev-python/furo/furo-2024.8.6.ebuild
Normal file
42
dev-python/furo/furo-2024.8.6.ebuild
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Copyright 2021-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# sphinx-theme-builder is completely unusable, as it requires pinning
|
||||
# to a very-specific nodejs version number, and ofc loves fetching
|
||||
# everything from the Internet
|
||||
|
||||
DISTUTILS_USE_PEP517=standalone
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..13} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Clean customisable Sphinx documentation theme"
|
||||
HOMEPAGE="
|
||||
https://pypi.org/project/furo/
|
||||
https://github.com/pradyunsg/furo/
|
||||
"
|
||||
SRC_URI="$(pypi_wheel_url)"
|
||||
S=${WORKDIR}
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx-basic-ng[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PKGBUMPING} == ${PVR} ]]; then
|
||||
unzip "${DISTDIR}/${A}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
distutils_wheel_install "${BUILD_DIR}/install" \
|
||||
"${DISTDIR}/${P}-py3-none-any.whl"
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
DIST google_api_python_client-2.137.0.tar.gz 11477114 BLAKE2B e0d7e64bfdd86bd882c8762b8d78fcd390152e569ca32df16fcbe91290508565086e4ca7e958d8d48ecaa6d5d23a0b1188b85f6a53004af54139977602c4f72c SHA512 442c08033fb12dbdcab3e45b911a9d43d93a4841369cd14344c9201a40b453d88ce602c3f45d965713ca826bec1f3e333f9425008d1cf1f59b6441283eb09807
|
||||
DIST google_api_python_client-2.138.0.tar.gz 11595036 BLAKE2B 554abf4e58264d60a5a09174b7199f31ac6cf31bd024add66ff73a71992e9da077c8046abfd8d9400d1b17fa0ccd27ca484ae62dca8b6900bbad42e2a26af9ee SHA512 f9e7501a289e96aebe8db78e32dc30771a860af34808d1bc6d6192c4511ecbbf871cbbf8cdf50daeeb865908a86236400d651e159d913b415b1f2fdf8eb045ab
|
||||
DIST google_api_python_client-2.139.0.tar.gz 11606939 BLAKE2B 9ad0cd36a913235e8c7b5afe2f4334399deb662d2d6287a64d98b02d890368839b345dba5e64aad3c852d655e99a04f8eb6902498664c4efa3a693ae2a2c6aeb SHA512 b6235f866a402ebde20fc8cfce41ad5bd0b8034311ab5b4f1b4cc88cea03f52021ee23264a32e9577ee1fa5bcbbb07af1c4e6d5e3f85bc53c0e6760654543b34
|
||||
DIST google_api_python_client-2.140.0.tar.gz 11618875 BLAKE2B 0d156fa072b302c0410f8e70681556ee146d8d8951576b1890e429b40363661d263554ad61157256feebee9a45afdf3dcdbb287b7c1dc367a6b6940ec488a645 SHA512 168e75ea734edbf0182078fad27d30f8dd56b07a8c7056973c7df99fb7faff83034901b6742aab8e03c833b73a5fd31a92455105ccc6f0f5b741fadb66715f30
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Google API Client for Python"
|
||||
HOMEPAGE="
|
||||
https://github.com/googleapis/google-api-python-client/
|
||||
https://pypi.org/project/google-api-python-client/
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/httplib2-0.15[${PYTHON_USEDEP}]
|
||||
<dev-python/httplib2-1[${PYTHON_USEDEP}]
|
||||
>=dev-python/google-api-core-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/google-auth-1.35.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/google-auth-httplib2-0.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/uritemplate-3.0.0[${PYTHON_USEDEP}]
|
||||
<dev-python/uritemplate-5[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/pandas[${PYTHON_USEDEP}]
|
||||
dev-python/parameterized[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# require Internet access (and credentials)
|
||||
tests/test_discovery.py::DiscoveryErrors::test_credentials_and_credentials_file_mutually_exclusive
|
||||
tests/test_discovery.py::DiscoveryFromDocument::test_api_endpoint_override_from_client_options_mapping_object
|
||||
tests/test_discovery.py::Universe::test_client_options_universe_configured_with_mtls
|
||||
tests/test_discovery.py::Universe::test_universe_env_var_configured_with_mtls
|
||||
)
|
||||
|
||||
epytest tests
|
||||
}
|
|
@ -1 +1,2 @@
|
|||
DIST google_auth-2.32.0.tar.gz 254614 BLAKE2B fc419f1d751cf99497fb00c4cc5b8ff25380a3341970aa31bebadc5f0a84efd8b9d806f939c9137fd872063d6b3cd06eff0629beab8194e0bf6f7323124f8f90 SHA512 d72d9c367a47b3496dcaae9deec29315c65e43ddf9b3ee2838232ed2ac8aabdf5c91978a6d66700b5e9e77a0de8820ecf12b798fb65383600e08d47b732d1981
|
||||
DIST google_auth-2.33.0.tar.gz 257157 BLAKE2B c0071ba0fe5710b9bad3c0fc256b1709478635f2e8123a2bd6cb985cde7c38604b6fa0fcab24a694884d37eef8a15b2d72a6e0f3994bb39aa1d46b1e3e279ce9 SHA512 18d05525147d0da8815213d9f2d19595abaa79daff373ddfb59373e493a6a324dd55e766afa50cc03bccb4a5daf5f93b6fa168ed628f490f0d33b1b050cdb7f7
|
||||
|
|
59
dev-python/google-auth/google-auth-2.33.0.ebuild
Normal file
59
dev-python/google-auth/google-auth-2.33.0.ebuild
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Google Authentication Library"
|
||||
HOMEPAGE="
|
||||
https://github.com/googleapis/google-auth-library-python/
|
||||
https://pypi.org/project/google-auth/
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
<dev-python/cachetools-6.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyasn1-modules-0.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||
dev-python/flask[${PYTHON_USEDEP}]
|
||||
dev-python/freezegun[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/moto[${PYTHON_USEDEP}]
|
||||
dev-python/pyopenssl[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-localserver[${PYTHON_USEDEP}]
|
||||
dev-python/pyu2f[${PYTHON_USEDEP}]
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
dev-python/responses[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_IGNORE=(
|
||||
# these are compatibility tests with oauth2client
|
||||
# disable them to unblock removal of that package
|
||||
tests/test__oauth2client.py
|
||||
)
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
epytest -p asyncio
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
distutils-r1_python_compile
|
||||
find "${BUILD_DIR}" -name '*.pth' -delete || die
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
DIST hcloud-python-2.0.1.gh.tar.gz 117015 BLAKE2B e795ea4a114c8e2c71554f84646b574e94030c6e724456786a437cc58d3dd96118c274111bc3787d8e7074b81f0c2493b3c6c5b824f6a8acb6d3a70b4dd75d29 SHA512 2507687324579240d2ff89287a6bd8e90dd33bb1290514c925e7e786330032187fdf133af196a6c0529ecb7018003356e299fc00cbf5bf2819d1f8e229702a04
|
||||
DIST hcloud-python-2.1.0.gh.tar.gz 118173 BLAKE2B f350db9a552507e4770df180f7df82cbd3943aea64d827d7c9b05eae63dee5a92e410ad2d68766920f5b65b85788b4762313190b53ebbdba07bd64c7d62a8565 SHA512 80d2aec96c1b4303ba4827e938f33191fb3c150c15e7809e4f5b99b3c0b2af40ce04c1737207568acf9b20b38f0bd47dd223fe18eb093129ccdfe84992969caf
|
||||
DIST hcloud-python-2.1.1.gh.tar.gz 118633 BLAKE2B 0072f8a6615ea917336429ef2b56840f1be8906bed9bd0793b47c4faa557e10bda368f8c3edcbc1b8ede6c39b384062038f665ae3e6beb589c747f1238a94572 SHA512 b98b62c99ffa31537baad35d0de0bee99a90dce95ecabfec8500e2172d520a3d819b870f001924cebeee7475905452ec2d5cc0bad15f763d16a423ddbe0171f8
|
||||
DIST hcloud-python-2.2.0.gh.tar.gz 119610 BLAKE2B 2b2bdc7416bc08464a7d6456cd935002f43b84d3728fb54ca3b132ac50959151a5c9c4ed75e256ca1dfa40a225cd8e4b0d54a4885497925e5222b00e5ccd5e1f SHA512 88b3ac155d7ee64ba41c1dced6546061287f2cd576c1f4bd95f46d1337c25efb4e25d0856a0c92cec1e97a133aafda8c024a79ef04df90bd29a1cd1318319166
|
||||
|
|
49
dev-python/hcloud/hcloud-2.2.0.ebuild
Normal file
49
dev-python/hcloud/hcloud-2.2.0.ebuild
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_P=hcloud-python-${PV}
|
||||
DESCRIPTION="Official Hetzner Cloud python library"
|
||||
HOMEPAGE="
|
||||
https://github.com/hetznercloud/hcloud-python/
|
||||
https://pypi.org/project/hcloud/
|
||||
"
|
||||
# sdist is missing doc assets as of 1.19.0
|
||||
# https://github.com/hetznercloud/hcloud-python/pull/183
|
||||
SRC_URI="
|
||||
https://github.com/hetznercloud/hcloud-python/archive/v${PV}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="examples"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/python-dateutil-2.7.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.20[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_sphinx docs \
|
||||
dev-python/myst-parser \
|
||||
dev-python/sphinx-rtd-theme
|
||||
distutils_enable_tests pytest
|
||||
|
||||
EPYTEST_IGNORE=(
|
||||
# Integration tests need docker:
|
||||
# https://github.com/hetznercloud/hcloud-python/blob/master/.travis.yml#L16
|
||||
tests/integration
|
||||
)
|
||||
|
||||
python_install_all() {
|
||||
use examples && dodoc -r examples
|
||||
distutils-r1_python_install_all
|
||||
}
|
|
@ -3,3 +3,5 @@ DIST hypothesis-6.108.4.gh.tar.gz 9472674 BLAKE2B 88983672fc7161ce44c88cd47cfb0f
|
|||
DIST hypothesis-6.108.5.gh.tar.gz 9473125 BLAKE2B fa72dd3958970308bbd656643343d522f0f6f2df28131c97024f79f619ecf19c0e92f09b7611b8846fff802a658bd1b018f6237ccdbfa0c9c31f7e49d2356e3f SHA512 595e95e8f790a1d8148e9a626eb388dbe0c8d17359dae6f6aa182abf833b5e7af1ba113430bd18f0d4ec43be3a32a435f0abd4ca0e1a1e02afc2e19aeebdcdd5
|
||||
DIST hypothesis-6.108.8.gh.tar.gz 9474435 BLAKE2B fd199019fdbc945c3fec0d9349f443ede307ee155cbb6f01e30f8ce888805b4f37754af9c675112b0f0ca30146d4a5dd45915be66194c677a72a7b2f71979605 SHA512 62090fc72e8f563c59a93b27a2febf0e68e30e2ef322f85ef6abca9a21d182105ea2210b47e4590a752a365d79328d758d0077d50f5857cbeb336ca6ce1e1c1b
|
||||
DIST hypothesis-6.108.9.gh.tar.gz 9474517 BLAKE2B c5f10dcc096e7c410444bc609ef8d2c05177f38b4fba79205913db014839da44f25b0ad76758bb31a4ba3c6d6fed25ebb80d66d833842044644b0638feb19afa SHA512 ae0e4963d304cf41900c3ad23f4839d49cfb74edb4d27aae7317e3a8ecd23ca965bd002766228012407b8297828e1d1304719875b4ffd04c6a21d0249cdf2fe2
|
||||
DIST hypothesis-6.109.0.gh.tar.gz 9475581 BLAKE2B 2e523b35745b7d1062c17093cf8b80da746574b985653f8f3e83880e5e2f3a3671a7b264b071c8c45394ce190154cc6f6b5f8ae508a9eb6c5911a836753497a4 SHA512 da8ff55e3661bc7f4cb9e5378ae37284af8b246d9fc5162363ba67c8ab4147f3c6d0feff7afa9d7deaeab3ab4cde6ba972c6b1d6464602eb78dcd33f67094113
|
||||
DIST hypothesis-6.110.0.gh.tar.gz 9476232 BLAKE2B 69ba7c4872608a69ae18e35fa895cec6fc4fa2dc426a0f876d41d5e85eec061962d98edeaaefeddd5244423923231316dc29ce4eba3a639e533bd61a52d6425c SHA512 45fa3bcb59e9e7f173b153b56888d69df2650f5382226c92f1f67ae9c9ad7e3fff383cb27c9862c7ea103c1b059c8de9d04c66cbaaf7a2a5b529044b3a31ed41
|
||||
|
|
103
dev-python/hypothesis/hypothesis-6.109.0.ebuild
Normal file
103
dev-python/hypothesis/hypothesis-6.109.0.ebuild
Normal file
|
@ -0,0 +1,103 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
CLI_COMPAT=( pypy3 python3_{10..13} )
|
||||
PYTHON_COMPAT=( "${CLI_COMPAT[@]}" )
|
||||
PYTHON_REQ_USE="threads(+),sqlite"
|
||||
|
||||
inherit distutils-r1 optfeature
|
||||
|
||||
TAG=hypothesis-python-${PV}
|
||||
MY_P=hypothesis-${TAG}
|
||||
DESCRIPTION="A library for property based testing"
|
||||
HOMEPAGE="
|
||||
https://github.com/HypothesisWorks/hypothesis/
|
||||
https://pypi.org/project/hypothesis/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/HypothesisWorks/hypothesis/archive/${TAG}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}/hypothesis-python"
|
||||
|
||||
LICENSE="MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="cli"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/attrs-22.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/sortedcontainers-2.1.0[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/exceptiongroup-1.0.0_rc8[${PYTHON_USEDEP}]
|
||||
' 3.9 3.10)
|
||||
cli? (
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/black[${PYTHON_USEDEP}]
|
||||
dev-python/click[${PYTHON_USEDEP}]
|
||||
' "${CLI_COMPAT[@]}")
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-8[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
!!<dev-python/requests-toolbelt-0.10.1
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
# subtests are broken by warnings from random plugins
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=xdist.plugin,_hypothesis_pytestplugin
|
||||
local -x HYPOTHESIS_NO_PLUGINS=1
|
||||
|
||||
# NB: paths need to be relative to pytest.ini,
|
||||
# i.e. start with hypothesis-python/
|
||||
local EPYTEST_DESELECT=()
|
||||
case ${EPYTHON} in
|
||||
pypy3)
|
||||
EPYTEST_DESELECT+=(
|
||||
# failing due to warnings from numpy/cython
|
||||
hypothesis-python/tests/pytest/test_fixtures.py::test_given_plus_overridden_fixture
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
epytest -o filterwarnings= tests/cover tests/pytest tests/quality
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local HAD_CLI=
|
||||
|
||||
distutils-r1_src_install
|
||||
|
||||
if [[ ! ${HAD_CLI} ]]; then
|
||||
rm -r "${ED}/usr/bin" || die
|
||||
fi
|
||||
}
|
||||
|
||||
python_install() {
|
||||
distutils-r1_python_install
|
||||
if use cli && has "${EPYTHON}" "${CLI_COMPAT[@]/_/.}"; then
|
||||
HAD_CLI=1
|
||||
else
|
||||
rm -r "${D}$(python_get_scriptdir)" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "datetime support" dev-python/pytz
|
||||
optfeature "dateutil support" dev-python/python-dateutil
|
||||
optfeature "numpy support" dev-python/numpy
|
||||
optfeature "django support" dev-python/django dev-python/pytz
|
||||
optfeature "pandas support" dev-python/pandas
|
||||
optfeature "pytest support" dev-python/pytest
|
||||
}
|
103
dev-python/hypothesis/hypothesis-6.110.0.ebuild
Normal file
103
dev-python/hypothesis/hypothesis-6.110.0.ebuild
Normal file
|
@ -0,0 +1,103 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
CLI_COMPAT=( pypy3 python3_{10..13} )
|
||||
PYTHON_COMPAT=( "${CLI_COMPAT[@]}" )
|
||||
PYTHON_REQ_USE="threads(+),sqlite"
|
||||
|
||||
inherit distutils-r1 optfeature
|
||||
|
||||
TAG=hypothesis-python-${PV}
|
||||
MY_P=hypothesis-${TAG}
|
||||
DESCRIPTION="A library for property based testing"
|
||||
HOMEPAGE="
|
||||
https://github.com/HypothesisWorks/hypothesis/
|
||||
https://pypi.org/project/hypothesis/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/HypothesisWorks/hypothesis/archive/${TAG}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}/hypothesis-python"
|
||||
|
||||
LICENSE="MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="cli"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/attrs-22.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/sortedcontainers-2.1.0[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/exceptiongroup-1.0.0_rc8[${PYTHON_USEDEP}]
|
||||
' 3.9 3.10)
|
||||
cli? (
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/black[${PYTHON_USEDEP}]
|
||||
dev-python/click[${PYTHON_USEDEP}]
|
||||
' "${CLI_COMPAT[@]}")
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-8[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
!!<dev-python/requests-toolbelt-0.10.1
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
# subtests are broken by warnings from random plugins
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=xdist.plugin,_hypothesis_pytestplugin
|
||||
local -x HYPOTHESIS_NO_PLUGINS=1
|
||||
|
||||
# NB: paths need to be relative to pytest.ini,
|
||||
# i.e. start with hypothesis-python/
|
||||
local EPYTEST_DESELECT=()
|
||||
case ${EPYTHON} in
|
||||
pypy3)
|
||||
EPYTEST_DESELECT+=(
|
||||
# failing due to warnings from numpy/cython
|
||||
hypothesis-python/tests/pytest/test_fixtures.py::test_given_plus_overridden_fixture
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
epytest -o filterwarnings= tests/cover tests/pytest tests/quality
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local HAD_CLI=
|
||||
|
||||
distutils-r1_src_install
|
||||
|
||||
if [[ ! ${HAD_CLI} ]]; then
|
||||
rm -r "${ED}/usr/bin" || die
|
||||
fi
|
||||
}
|
||||
|
||||
python_install() {
|
||||
distutils-r1_python_install
|
||||
if use cli && has "${EPYTHON}" "${CLI_COMPAT[@]/_/.}"; then
|
||||
HAD_CLI=1
|
||||
else
|
||||
rm -r "${D}$(python_get_scriptdir)" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "datetime support" dev-python/pytz
|
||||
optfeature "dateutil support" dev-python/python-dateutil
|
||||
optfeature "numpy support" dev-python/numpy
|
||||
optfeature "django support" dev-python/django dev-python/pytz
|
||||
optfeature "pandas support" dev-python/pandas
|
||||
optfeature "pytest support" dev-python/pytest
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue