parent
8937bc6c1f
commit
8b90932431
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST kontrast-23.04.3.tar.xz 205832 BLAKE2B cd85476a137c19b00fd86686d1adf76ff9942208c5b5f435d352a949f11d1d34c75dbcb7d235869bed5aa2152f19e70e801eb6ab0c8c40350118b2a4ad144407 SHA512 f4c00bcee75999008a227156f169cb642646ff7e4ca2496103502011a6637c35c42d48bdc04aa630f119d03fc4d07cbb3619670fa45e1f03f7bfa9620805c24c
|
||||
DIST kontrast-23.08.2.tar.xz 209748 BLAKE2B 625531f523b3f48ad11dcad87787724e0c2180d43111becbcd2c07bac86b19792c91680f119b66520946f5ee020e1927f74e4aba4eda6f476c90c81600911840 SHA512 8af0c0b35f5e513adf00e06807f226070310234c109a247dc840265a65462675c43f387d5dc9c6e927174f5d41af7451faac57dee91435502f080e1a49d84206
|
||||
DIST kontrast-23.08.3.tar.xz 211828 BLAKE2B 44cc6550c70d1074a45a9c0aea430cd257b69b327311474fa601f1cf79114131bf8960ddcc994c0bad46359066f0e83fd365aa732f256ac1dc308bba4ad99665 SHA512 da6d6573cab87ae46a812ae49416e94a1c07c296890024352c9225aa16858e5a5a6d2ae4b3edca4a657f9422f6c236446cab1b681421e27e6ff6027b9bd43b1d
|
||||
|
Binary file not shown.
@ -1,4 +1,6 @@
|
||||
DIST salt-3005.1.tar.gz 17914349 BLAKE2B 697c2068bf119e4a19f92a86ce880fec9375c10ba549cdcdd2182cfeaacce31c7bc4c4c91e1a609906b4c5373bb5e3120e0db47ede5b45ee20942d7b2d201e64 SHA512 391f995f0129f3d7104a0eea4fd83b18aa6ecae0fd7a2c77c1154e24b0bcd52cef4b63db12597c85737bb33ddf605e0c23370cef3bf47f9ea85af5b77d74dc50
|
||||
DIST salt-3005.3.tar.gz 17932868 BLAKE2B 18b1b3fe0708c2b425a410766df1545c093b43e69527b1213e1b043668b914016dc95b5c96c0619b1234b57fa404fdbe4fc245ac11d4f0b121edf4b0deacb3ee SHA512 4a40b21f0ee8ac31d3ca3d4d43706c3a484b9e19bd5797764475772af42fe682476b19f9097f003c838683529f15a757aab769eb0a15578cbc2fc449d8216604
|
||||
DIST salt-3005.4.tar.gz 17936876 BLAKE2B e06ec0e357fac18fe0ad823cf80e6261d80dbf22d856f0680a1c044d368133a1f94a6c9ff37b0f07ab305b835f808e96ae42a510eabedb6b2691b23959fa796e SHA512 31c699fc369c1f3c47f4f3a9a572381dd8c54323771194bdcc73128b55d983da7338b03061a6cdec6631aca62048e5829ea38687c3b0fdb1cdcbd5df9d000f05
|
||||
DIST salt-3006.2.tar.gz 20411634 BLAKE2B dff474017918ef3ee0031856a2739282077205d8c2589809a91e5f1c3741cb26d2bd2458734ea4d3533118c881851dfd853f4ba4f1c631e7db28e95bc1b6f7f8 SHA512 2626cb5beb1b30fc63f554f5804f0d9b7e36b7c569c5f9049e5f5ac5a413e9d99a98b3d91089683338e3d3890ec973dff80782b4e41acb291872e45084fd2546
|
||||
DIST salt-3006.3.tar.gz 20461738 BLAKE2B dfa4698dbc611c9c4954b4631d11b685e1efc978915918ce6d8f1890bb4a230d234b6a191166ffff9243058d44530bfc14b43386c8bc295c035c6609d6bf3fa0 SHA512 9cced766db2144de445ed53b52c1551c986ba43774c40512fd07973862d6d3a361e25f55fcfeeb0e03ba44eec1051909834e5d0a352ead5ec6f418b15c909628
|
||||
DIST salt-3006.4.tar.gz 20465324 BLAKE2B 8cf9acf8850e9eefbff32f3e347d8773ed7e28f58a0a441af9ec0a4c87a0bba49ff2b82e6f5816511de7303e16d79246df8c0024464a5c267f3ef7e370c8be98 SHA512 c48c69730ba81d3e279cbb01cb26c743dd8b4945c2fc16a7c959472ab4050316fcdaee935e009b7f472bd3b08172ac69defe64774a2d93e143a050cd559997ef
|
||||
|
@ -0,0 +1,235 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
PYTHON_COMPAT=( python3_10 )
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
inherit systemd distutils-r1
|
||||
|
||||
DESCRIPTION="Salt is a remote execution and configuration manager"
|
||||
HOMEPAGE="https://www.saltstack.com/resources/community/
|
||||
https://github.com/saltstack"
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/${PN}stack/${PN}.git"
|
||||
EGIT_BRANCH="develop"
|
||||
else
|
||||
inherit pypi
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="
|
||||
cheetah cherrypy ldap libcloud libvirt genshi gnupg keyring mako
|
||||
mongodb neutron nova openssl portage profile redis selinux test raet
|
||||
+zeromq vim-syntax
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
sys-apps/pciutils
|
||||
>=dev-python/distro-1.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/jinja-3.1.2[${PYTHON_USEDEP}]
|
||||
dev-python/jmespath[${PYTHON_USEDEP}]
|
||||
dev-python/libnacl[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-5.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycryptodome-3.9.8[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-6.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/markupsafe-2.1.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.31.0[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/tomli[${PYTHON_USEDEP}]
|
||||
dev-python/watchdog[${PYTHON_USEDEP}]
|
||||
libcloud? (
|
||||
dev-python/aiohttp[${PYTHON_USEDEP}]
|
||||
dev-python/aiosignal[${PYTHON_USEDEP}]
|
||||
>=dev-python/apache-libcloud-2.5.0[${PYTHON_USEDEP}]
|
||||
dev-python/async-timeout[${PYTHON_USEDEP}]
|
||||
)
|
||||
mako? ( dev-python/mako[${PYTHON_USEDEP}] )
|
||||
ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
|
||||
libvirt? (
|
||||
dev-python/libvirt-python[${PYTHON_USEDEP}]
|
||||
)
|
||||
openssl? (
|
||||
dev-libs/openssl:0=[-bindist(-)]
|
||||
>=dev-python/pyopenssl-23.2.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
raet? (
|
||||
>=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
|
||||
cheetah? ( >=dev-python/cheetah3-3.2.2[${PYTHON_USEDEP}] )
|
||||
genshi? ( dev-python/genshi[${PYTHON_USEDEP}] )
|
||||
mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
|
||||
portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
|
||||
keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
|
||||
redis? ( dev-python/redis[${PYTHON_USEDEP}] )
|
||||
selinux? ( sec-policy/selinux-salt )
|
||||
nova? (
|
||||
>=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
neutron? (
|
||||
>=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]
|
||||
)
|
||||
gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
|
||||
profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
|
||||
vim-syntax? ( app-vim/salt-vim )
|
||||
zeromq? ( >=dev-python/pyzmq-19.0.0[${PYTHON_USEDEP}] )
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/apache-libcloud[${PYTHON_USEDEP}]
|
||||
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/certifi-2023.07.22[${PYTHON_USEDEP}]
|
||||
dev-python/cherrypy[${PYTHON_USEDEP}]
|
||||
>=dev-python/jsonschema-3.0[${PYTHON_USEDEP}]
|
||||
dev-python/mako[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/moto-2.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyopenssl-23.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-7.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-salt-factories-1.0.0_rc17[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-tempdir[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-subtests[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-shell-utilities[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-skip-markers[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-system-statistics[${PYTHON_USEDEP}]
|
||||
dev-python/flaky[${PYTHON_USEDEP}]
|
||||
net-dns/bind-tools
|
||||
>=dev-python/virtualenv-20.3.0[${PYTHON_USEDEP}]
|
||||
dev-util/yamllint[${PYTHON_USEDEP}]
|
||||
!x86? ( >=dev-python/boto3-1.17.67[${PYTHON_USEDEP}] )
|
||||
)
|
||||
"
|
||||
|
||||
DOCS=( README.rst AUTHORS )
|
||||
|
||||
REQUIRED_USE="|| ( raet zeromq )
|
||||
test? ( cheetah genshi )"
|
||||
RESTRICT="!test? ( test ) x86? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/salt-3003-skip-tests-that-oom-machine.patch"
|
||||
"${FILESDIR}/salt-3003-gentoolkit-revdep.patch"
|
||||
"${FILESDIR}/salt-3002-tests.patch"
|
||||
"${FILESDIR}/salt-3003.1-tests.patch"
|
||||
"${FILESDIR}/salt-3005-tests.patch"
|
||||
"${FILESDIR}/salt-3005.1-no-entry-points.patch"
|
||||
"${FILESDIR}/salt-3005.1-importlib-metadata-5-r1.patch"
|
||||
"${FILESDIR}/salt-3005.1-tests.patch"
|
||||
"${FILESDIR}/salt-3005.1-modules-file-python-3.11-host.patch"
|
||||
"${FILESDIR}/salt-3006.2-tests.patch"
|
||||
)
|
||||
|
||||
python_prepare_all() {
|
||||
# remove tests with external dependencies that may not be available, and
|
||||
# tests that don't work in sandbox
|
||||
rm tests/unit/{test_{zypp_plugins,module_names},utils/test_extend}.py || die
|
||||
rm tests/unit/modules/test_boto_{vpc,secgroup,elb}.py || die
|
||||
rm tests/unit/states/test_boto_vpc.py || die
|
||||
rm tests/support/gitfs.py tests/unit/runners/test_git_pillar.py || die
|
||||
rm tests/pytests/functional/transport/server/test_req_channel.py || die
|
||||
rm tests/pytests/functional/utils/test_async_event_publisher.py || die
|
||||
rm tests/pytests/functional/runners/test_winrepo.py || die
|
||||
|
||||
# tests that require network access
|
||||
rm tests/unit/{states,modules}/test_zcbuildout.py || die
|
||||
rm -r tests/integration/cloud || die
|
||||
rm -r tests/kitchen/tests/wordpress/tests || die
|
||||
rm tests/kitchen/test_kitchen.py || die
|
||||
rm tests/unit/modules/test_network.py || die
|
||||
rm tests/pytests/functional/modules/test_pip.py || die
|
||||
rm tests/pytests/unit/client/ssh/test_ssh.py || die
|
||||
rm -r tests/pytests/{integration,functional}/netapi tests/integration/netapi || die
|
||||
|
||||
# tests require root access
|
||||
rm tests/integration/pillar/test_git_pillar.py || die
|
||||
rm tests/integration/states/test_supervisord.py || die
|
||||
|
||||
# removes contextvars, see bug: https://bugs.gentoo.org/799431
|
||||
sed -i '/^contextvars/d' requirements/base.txt || die
|
||||
|
||||
# make sure pkg_resources doesn't bomb because pycrypto isn't installed
|
||||
find "${S}" -name '*.txt' -print0 | xargs -0 sed -e '/pycrypto>/ d ; /pycryptodomex/ d' -i || die
|
||||
# pycryptodome rather than pycryptodomex
|
||||
find "${S}" -name '*.py' -print0 | xargs -0 -- sed -i -e 's:Cryptodome:Crypto:g' -- || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
local svc
|
||||
USE_SETUPTOOLS=1 distutils-r1_python_install_all
|
||||
|
||||
for svc in minion master syndic api; do
|
||||
newinitd "${FILESDIR}"/${svc}-initd-5 salt-${svc}
|
||||
newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
|
||||
systemd_dounit "${FILESDIR}"/salt-${svc}.service
|
||||
done
|
||||
|
||||
insinto /etc/${PN}
|
||||
doins -r conf/*
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -a EPYTEST_DESELECT=(
|
||||
# doesn't like the distutils warning
|
||||
tests/pytests/integration/cli/test_batch.py::test_batch_retcode
|
||||
tests/pytests/integration/cli/test_batch.py::test_multiple_modules_in_batch
|
||||
# hangs indefinitely
|
||||
tests/pytests/unit/test_minion.py::test_master_type_disable
|
||||
# needs root
|
||||
tests/pytests/unit/modules/test_cmdmod.py::test_runas_env_sudo_group
|
||||
# don't like sandbox
|
||||
tests/unit/cloud/clouds/test_joyent.py::JoyentTestCase::test_query_instance_has_ip
|
||||
tests/unit/cloud/clouds/test_joyent.py::JoyentTestCase::test_query_instance_init
|
||||
tests/unit/cloud/clouds/test_joyent.py::JoyentTestCase::test_query_instance_ready
|
||||
tests/unit/modules/test_win_ip.py::WinShadowTestCase::test_disable
|
||||
tests/unit/modules/test_win_ip.py::WinShadowTestCase::test_enable
|
||||
tests/unit/netapi/rest_tornado/test_saltnado.py::TestDisbatchLocal::test_when_is_finished_is_set_before_events_return_then_no_data_should_be_returned
|
||||
tests/unit/netapi/rest_tornado/test_saltnado.py::TestDisbatchLocal::test_when_is_finished_then_all_collected_data_should_be_returned
|
||||
tests/unit/netapi/rest_tornado/test_saltnado.py::TestDisbatchLocal::test_when_is_timed_out_is_set_before_other_events_are_completed_then_result_should_be_empty_dictionary
|
||||
tests/unit/netapi/rest_tornado/test_saltnado.py::TestDisbatchLocal::test_when_is_timed_out_then_all_collected_data_should_be_returned
|
||||
tests/unit/netapi/rest_tornado/test_saltnado.py::TestDisbatchLocal::test_when_min_wait_time_has_not_passed_then_disbatch_should_not_return_expected_data_until_time_has_passed
|
||||
tests/unit/netapi/rest_tornado/test_saltnado.py::TestDisbatchLocal::test_when_minions_all_return_then_all_collected_data_should_be_returned
|
||||
tests/unit/utils/test_vt.py::VTTestCase::test_split_multibyte_characters_shiftjis
|
||||
tests/unit/utils/test_vt.py::VTTestCase::test_split_multibyte_characters_unicode
|
||||
tests/pytests/unit/utils/test_vt.py::test_log_sanitize
|
||||
tests/pytests/unit/test_master.py::test_fileserver_duration
|
||||
tests/pytests/unit/modules/test_aptpkg.py::test_call_apt_dpkg_lock
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_anyof_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_dict_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_hostname_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_not_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_oneof_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_optional_requirements_config_validation
|
||||
)
|
||||
|
||||
# testsuite likes lots of files
|
||||
ulimit -n 4096 || die
|
||||
|
||||
# ${T} is too long a path for the tests to work
|
||||
local TMPDIR
|
||||
TMPDIR="$(mktemp --directory --tmpdir=/tmp ${PN}-XXXX)" || die
|
||||
(
|
||||
export TMPDIR
|
||||
cleanup() { rm -rf "${TMPDIR}" || die; }
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
addwrite "${TMPDIR}"
|
||||
|
||||
USE_SETUPTOOLS=1 NO_INTERNET=1 SHELL="/bin/bash" \
|
||||
epytest
|
||||
)
|
||||
}
|
@ -0,0 +1,235 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
PYTHON_COMPAT=( python3_10 )
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
inherit systemd distutils-r1
|
||||
|
||||
DESCRIPTION="Salt is a remote execution and configuration manager"
|
||||
HOMEPAGE="https://www.saltstack.com/resources/community/
|
||||
https://github.com/saltstack"
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/${PN}stack/${PN}.git"
|
||||
EGIT_BRANCH="develop"
|
||||
else
|
||||
inherit pypi
|
||||
KEYWORDS="~amd64 ~riscv ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="
|
||||
cheetah cherrypy ldap libcloud libvirt genshi gnupg keyring mako
|
||||
mongodb neutron nova openssl portage profile redis selinux test raet
|
||||
+zeromq vim-syntax
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
sys-apps/pciutils
|
||||
>=dev-python/cryptography-41.0.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/distro-1.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/jinja-3.1.2[${PYTHON_USEDEP}]
|
||||
dev-python/jmespath[${PYTHON_USEDEP}]
|
||||
dev-python/libnacl[${PYTHON_USEDEP}]
|
||||
dev-python/looseversion[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-21.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-5.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycryptodome-3.9.8[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-6.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/markupsafe-2.1.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.31.0[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/tomli[${PYTHON_USEDEP}]
|
||||
dev-python/watchdog[${PYTHON_USEDEP}]
|
||||
libcloud? (
|
||||
dev-python/aiohttp[${PYTHON_USEDEP}]
|
||||
dev-python/aiosignal[${PYTHON_USEDEP}]
|
||||
>=dev-python/apache-libcloud-2.5.0[${PYTHON_USEDEP}]
|
||||
dev-python/async-timeout[${PYTHON_USEDEP}]
|
||||
)
|
||||
mako? ( dev-python/mako[${PYTHON_USEDEP}] )
|
||||
ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
|
||||
libvirt? (
|
||||
dev-python/libvirt-python[${PYTHON_USEDEP}]
|
||||
)
|
||||
openssl? (
|
||||
dev-libs/openssl:0=[-bindist(-)]
|
||||
>=dev-python/pyopenssl-23.2.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
raet? (
|
||||
>=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
|
||||
cheetah? ( >=dev-python/cheetah3-3.2.2[${PYTHON_USEDEP}] )
|
||||
genshi? ( dev-python/genshi[${PYTHON_USEDEP}] )
|
||||
mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
|
||||
portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
|
||||
keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
|
||||
redis? ( dev-python/redis[${PYTHON_USEDEP}] )
|
||||
selinux? ( sec-policy/selinux-salt )
|
||||
nova? (
|
||||
>=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
neutron? (
|
||||
>=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]
|
||||
)
|
||||
gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
|
||||
profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
|
||||
vim-syntax? ( app-vim/salt-vim )
|
||||
zeromq? ( >=dev-python/pyzmq-19.0.0[${PYTHON_USEDEP}] )
|
||||
"
|
||||
BDEPEND="
|
||||
dev-python/build[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/apache-libcloud[${PYTHON_USEDEP}]
|
||||
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/certifi-2023.07.22[${PYTHON_USEDEP}]
|
||||
dev-python/cherrypy[${PYTHON_USEDEP}]
|
||||
>=dev-python/jsonschema-3.0[${PYTHON_USEDEP}]
|
||||
dev-python/mako[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/moto-2.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
dev-python/bcrypt[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyopenssl-23.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-7.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-salt-factories-1.0.0_rc25[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-tempdir[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-subtests[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-shell-utilities[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-skip-markers[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-system-statistics[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-custom-exit-code[${PYTHON_USEDEP}]
|
||||
dev-python/flaky[${PYTHON_USEDEP}]
|
||||
net-dns/bind-tools
|
||||
>=dev-python/virtualenv-20.3.0[${PYTHON_USEDEP}]
|
||||
dev-util/yamllint[${PYTHON_USEDEP}]
|
||||
!x86? ( >=dev-python/boto3-1.21.46[${PYTHON_USEDEP}] )
|
||||
)
|
||||
"
|
||||
|
||||
DOCS=( README.rst AUTHORS )
|
||||
|
||||
REQUIRED_USE="|| ( raet zeromq )
|
||||
test? ( cheetah genshi )"
|
||||
RESTRICT="!test? ( test ) x86? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/salt-3003-gentoolkit-revdep.patch"
|
||||
"${FILESDIR}/salt-3005.1-no-entry-points.patch"
|
||||
"${FILESDIR}/salt-3006-skip-tests-that-oom-machine.patch"
|
||||
)
|
||||
|
||||
python_prepare_all() {
|
||||
# remove tests with external dependencies that may not be available, and
|
||||
# tests that don't work in sandbox
|
||||
rm tests/unit/{test_{zypp_plugins,module_names},utils/test_extend}.py || die
|
||||
rm tests/unit/modules/test_boto_{vpc,secgroup,elb}.py || die
|
||||
rm tests/unit/states/test_boto_vpc.py || die
|
||||
|
||||
#rm tests/support/gitfs.py || die
|
||||
rm tests/pytests/functional/transport/server/test_req_channel.py || die
|
||||
rm tests/pytests/functional/utils/test_async_event_publisher.py || die
|
||||
rm tests/pytests/functional/runners/test_winrepo.py || die
|
||||
rm tests/unit/netapi/rest_tornado/test_saltnado.py || die
|
||||
|
||||
# tests that require network access
|
||||
rm tests/unit/{states,modules}/test_zcbuildout.py || die
|
||||
rm -r tests/integration/cloud || die
|
||||
rm -r tests/kitchen/tests/wordpress/tests || die
|
||||
rm tests/kitchen/test_kitchen.py || die
|
||||
rm tests/unit/modules/test_network.py || die
|
||||
rm tests/pytests/functional/modules/test_pip.py || die
|
||||
rm tests/pytests/unit/client/ssh/test_ssh.py || die
|
||||
rm -r tests/pytests/{integration,functional}/netapi tests/integration/netapi || die
|
||||
|
||||
# tests require root access
|
||||
rm tests/integration/pillar/test_git_pillar.py || die
|
||||
rm tests/integration/states/test_supervisord.py || die
|
||||
|
||||
# removes contextvars, see bug: https://bugs.gentoo.org/799431
|
||||
sed -i '/^contextvars/d' requirements/base.txt || die
|
||||
|
||||
# make sure pkg_resources doesn't bomb because pycrypto isn't installed
|
||||
find "${S}" -name '*.txt' -print0 | xargs -0 sed -e '/pycrypto>/ d ; /pycryptodomex/ d' -i || die
|
||||
# pycryptodome rather than pycryptodomex
|
||||
find "${S}" -name '*.py' -print0 | xargs -0 -- sed -i -e 's:Cryptodome:Crypto:g' -- || die
|
||||
# called_once should be assert_called_once_with
|
||||
find "${S}/tests" -name '*.py' -print0 | xargs -0 -- sed -i -e 's:[.]called_once:.assert_called_once:g' -- || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
local svc
|
||||
USE_SETUPTOOLS=1 distutils-r1_python_install_all
|
||||
|
||||
for svc in minion master syndic api; do
|
||||
newinitd "${FILESDIR}"/${svc}-initd-5 salt-${svc}
|
||||
newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
|
||||
systemd_dounit "${FILESDIR}"/salt-${svc}.service
|
||||
done
|
||||
|
||||
insinto /etc/${PN}
|
||||
doins -r conf/*
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -a EPYTEST_DESELECT=(
|
||||
# doesn't like the distutils warning
|
||||
tests/pytests/integration/cli/test_batch.py::test_batch_retcode
|
||||
tests/pytests/integration/cli/test_batch.py::test_multiple_modules_in_batch
|
||||
# hangs indefinitely
|
||||
tests/pytests/unit/test_minion.py::test_master_type_disable
|
||||
# needs root
|
||||
tests/pytests/unit/modules/test_cmdmod.py::test_runas_env_sudo_group
|
||||
# don't like sandbox
|
||||
tests/pytests/functional/cli/test_salt.py::test_versions_report
|
||||
tests/unit/utils/test_vt.py::test_split_multibyte_characters_unicode
|
||||
tests/unit/utils/test_vt.py::test_split_multibyte_characters_shiftjis
|
||||
tests/pytests/unit/utils/test_vt.py::test_log_sanitize
|
||||
tests/pytests/unit/client/ssh/test_single.py::test_run_with_pre_flight_args
|
||||
tests/pytests/unit/modules/test_aptpkg.py::test_call_apt_dpkg_lock
|
||||
tests/pytests/unit/test_master.py::test_fileserver_duration
|
||||
tests/pytests/unit/test_template.py::test_compile_template_str_mkstemp_cleanup
|
||||
tests/pytests/unit/_logging/handlers/test_deferred_stream_handler.py::test_deferred_write_on_flush
|
||||
tests/pytests/unit/_logging/handlers/test_deferred_stream_handler.py::test_sync_with_handlers
|
||||
tests/pytests/unit/modules/test_portage_config.py::test_enforce_nice_config
|
||||
tests/pytests/unit/modules/test_msteams.py::test_post_card
|
||||
tests/pytests/unit/states/test_file.py::test_file_recurse_directory_test
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_anyof_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_dict_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_hostname_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_not_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_oneof_config_validation
|
||||
tests/unit/utils/test_schema.py::ConfigTestCase::test_optional_requirements_config_validation
|
||||
)
|
||||
|
||||
# testsuite likes lots of files
|
||||
ulimit -n 4096 || die
|
||||
|
||||
# ${T} is too long a path for the tests to work
|
||||
local TMPDIR
|
||||
TMPDIR="$(mktemp --directory --tmpdir=/tmp ${PN}-XXXX)" || die
|
||||
(
|
||||
export TMPDIR
|
||||
cleanup() { rm -rf "${TMPDIR}" || die; }
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
addwrite "${TMPDIR}"
|
||||
|
||||
USE_SETUPTOOLS=1 NO_INTERNET=1 SHELL="/bin/bash" \
|
||||
epytest
|
||||
)
|
||||
}
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST dolphin-plugins-23.04.3.tar.xz 272912 BLAKE2B f0eb8bbab16d66f1e964131b436af7d3ae8febc26cf4fe394489a978c701ef2f5689bea7daf9eed8d7ef2f1f2bdba000a487cf7f0704ad30bd25e2d403ce5fae SHA512 8f487ba0bcbe561915064247ddb2327c3b7c8fa6ffc5c511d9c9ef37bd4f28a624533ce7a2da2a86b10b65f37915ca10840517872b40c2fd014cead6da5972c8
|
||||
DIST dolphin-plugins-23.08.2.tar.xz 273356 BLAKE2B 29820281a7bb703dcbd11d215e0a6d35aedc964778d443d826dd4636f87acbd4fd884745dd614981eeb9c3dd50ee2705f71883b261d600eb0a843045078d83f4 SHA512 a7f0a2109cd1793157ff5038cbda1ff219adcefa5e652a6ba0b3eeee674a460e918eaa71f4652460803ed18ef5834a1734b23939f155dd6b3e4247396dfe9b30
|
||||
DIST dolphin-plugins-23.08.3.tar.xz 273396 BLAKE2B 3a07eb2daf0a24ff5aabbc268fcf2724b116827ac17b04edb643e78abad89c5a30d1729234b718108bc4c6faa7c44ef36206b19a8573d439a0632c1ef180b666 SHA512 6ff3ddd08782b076927251afaf2e581a730c56db6b80647e6005267fd9f99ffa2bbce4a59dfe422dc6ad21fd1603245cfeb97db2fde582c83df552104f6a536d
|
||||
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST keysmith-23.04.3.tar.xz 161996 BLAKE2B a160501a3fd29f83814611b0d738d6df487af0f98ffb7f9bb2c39b5ae67a3cc7af605f9d6c894d0e8ce351bd4d740b7247e1cf7541f4a1c1079110f384ce2de0 SHA512 a7ad96c91f5b50954aa185bdec81af8feafc1190105d28a3166b84442e5d58bd8a6dddcabd9d1f907b585f4082fe2dd16991b0c922bde087e1edfcc0b28027a1
|
||||
DIST keysmith-23.08.2.tar.xz 163416 BLAKE2B 6f840fae87332d66d40fd295b159edfbe6709289fd3ae04a12ee87ca7881adef0a77888f823bdcb7253d08aee789936d435f9cf3a6917d639af9e5cd96bd43cd SHA512 4f5c4d7bd2a092b14ff69b40583ea8dc70383db8689991d2c5175c20e3a96e29fd4b45b5ebe13e86d7b42991337dbb84b08a82ce26d31f63feca86824314205e
|
||||
DIST keysmith-23.08.3.tar.xz 163456 BLAKE2B cebf12dfe695814355bf154083b2c751864983bf2f8862264f7926eb5d89f408fd9973fcfbc4182bdc1bf56b6ed22e111ae286a53e7f3c36d790c05648276a7e SHA512 321df891912e4b49d4701cf7261e6bd7b936b5bfaaf85935c12a8230d007e749153b91c2161db03bfb86beb52b6ce9c503c5e5d3b208ddf11977db4d31d9e78f
|
||||
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST ghostwriter-23.04.3.tar.xz 3074336 BLAKE2B 89314147c3222d0e83d26cedb81e6bf917e4f4e3d95650ba1d3096f06491343046dd5684d13014002a5249ec26af43cb050457c6f5d7c241b352a605b529b5af SHA512 d14e8c9928ec0638b98ca152d35ae88a7a4a582d4268e8f251252f080e4490b5c9433a814e6306acf7856c6a253f6e7aa9ed326328f90e0da8ef1214ef5a432c
|
||||
DIST ghostwriter-23.08.2.tar.xz 3624320 BLAKE2B cd2a99e08ceedcfeb810d28fe6e60fd3675df4d9667c03e0f83cb84a501a43a053b7284fb8ceca574486be4c3da7c1abdf47c69d45dc4dbf3c34610acd22d7fb SHA512 02eb94d2ca0d7878c6171d8eb80e0cd813baf27fe0e588acda72092c00f31b798a0be3639f4d8986a142eef6f88269041750eac9b7a655389d477ab24d32da4e
|
||||
DIST ghostwriter-23.08.3.tar.xz 3626304 BLAKE2B 558b63152817d90443fcc78c9a5ac609643cd7a5b9c595ddbcccdb05bcb38af4c300974b852a9bf7b002aaf67ee84df0dddc357bc3b4cf558b0dc5a55876ae66 SHA512 b8281bc286132997ae6aeba95a6382546d556d6b5c6385d08c4660b385264cc60040efd3a71865166aee55ab5c979b2b80e72423b523400141dd74c4ba256ae3
|
||||
|
@ -0,0 +1,117 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop pax-utils xdg optfeature
|
||||
|
||||
DESCRIPTION="Multiplatform Visual Studio Code from Microsoft"
|
||||
HOMEPAGE="https://code.visualstudio.com"
|
||||
SRC_URI="
|
||||
amd64? ( https://update.code.visualstudio.com/${PV}/linux-x64/stable -> ${P}-amd64.tar.gz )
|
||||
arm? ( https://update.code.visualstudio.com/${PV}/linux-armhf/stable -> ${P}-arm.tar.gz )
|
||||
arm64? ( https://update.code.visualstudio.com/${PV}/linux-arm64/stable -> ${P}-arm64.tar.gz )
|
||||
"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="
|
||||
Apache-2.0
|
||||
BSD
|
||||
BSD-1
|
||||
BSD-2
|
||||
BSD-4
|
||||
CC-BY-4.0
|
||||
ISC
|
||||
LGPL-2.1+
|
||||
Microsoft-vscode
|
||||
MIT
|
||||
MPL-2.0
|
||||
openssl
|
||||
PYTHON
|
||||
TextMate-bundle
|
||||
Unlicense
|
||||
UoI-NCSA
|
||||
W3C
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~arm ~arm64"
|
||||
IUSE="kerberos"
|
||||
RESTRICT="mirror strip bindist"
|
||||
|
||||
RDEPEND="
|
||||
>=app-accessibility/at-spi2-core-2.46.0:2
|
||||
app-crypt/libsecret[crypt]
|
||||
app-misc/ca-certificates
|
||||
dev-libs/expat
|
||||
dev-libs/glib:2
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
media-libs/alsa-lib
|
||||
media-libs/libcanberra[gtk3]
|
||||
media-libs/libglvnd
|
||||
media-libs/mesa
|
||||
net-misc/curl
|
||||
sys-apps/dbus
|
||||
sys-libs/zlib
|
||||
sys-process/lsof
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libdrm
|
||||
x11-libs/libnotify
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb
|
||||
x11-libs/libXcomposite
|
||||
x11-libs/libXdamage
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libxkbcommon
|
||||
x11-libs/libxkbfile
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXScrnSaver
|
||||
x11-libs/pango
|
||||
x11-misc/xdg-utils
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
"
|
||||
|
||||
QA_PREBUILT="*"
|
||||
|
||||
src_install() {
|
||||
if use amd64; then
|
||||
cd "${WORKDIR}/VSCode-linux-x64" || die
|
||||
elif use arm; then
|
||||
cd "${WORKDIR}/VSCode-linux-armhf" || die
|
||||
elif use arm64; then
|
||||
cd "${WORKDIR}/VSCode-linux-arm64" || die
|
||||
else
|
||||
die "Visual Studio Code only supports amd64, arm and arm64"
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
rm -r ./resources/app/ThirdPartyNotices.txt || die
|
||||
|
||||
# Disable update server
|
||||
sed -e "/updateUrl/d" -i ./resources/app/product.json || die
|
||||
|
||||
if ! use kerberos; then
|
||||
rm -r ./resources/app/node_modules.asar.unpacked/kerberos || die
|
||||
fi
|
||||
|
||||
# Install
|
||||
pax-mark m code
|
||||
mkdir -p "${ED}/opt/${PN}" || die
|
||||
cp -r . "${ED}/opt/${PN}" || die
|
||||
fperms 4711 /opt/${PN}/chrome-sandbox
|
||||
|
||||
dosym -r "/opt/${PN}/bin/code" "usr/bin/vscode"
|
||||
dosym -r "/opt/${PN}/bin/code" "usr/bin/code"
|
||||
domenu "${FILESDIR}/vscode.desktop"
|
||||
domenu "${FILESDIR}/vscode-url-handler.desktop"
|
||||
domenu "${FILESDIR}/vscode-wayland.desktop"
|
||||
domenu "${FILESDIR}/vscode-url-handler-wayland.desktop"
|
||||
newicon "resources/app/resources/linux/code.png" "vscode.png"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
optfeature "keyring support inside vscode" "virtual/secret-service"
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop pax-utils xdg optfeature
|
||||
|
||||
# Usage: arch_src_uri <gentoo arch> <upstream arch>
|
||||
arch_src_uri() {
|
||||
echo "${1}? (
|
||||
https://github.com/VSCodium/${PN}/releases/download/${PV}/VSCodium-linux-${2}-${PV}.tar.gz
|
||||
-> ${P}-${1}.tar.gz
|
||||
)"
|
||||
}
|
||||
|
||||
DESCRIPTION="A community-driven, freely-licensed binary distribution of Microsoft's VSCode"
|
||||
HOMEPAGE="https://vscodium.com/"
|
||||
SRC_URI="
|
||||
$(arch_src_uri amd64 x64)
|
||||
$(arch_src_uri arm armhf)
|
||||
$(arch_src_uri arm64 arm64)
|
||||
"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="
|
||||
Apache-2.0
|
||||
BSD
|
||||
BSD-1
|
||||
BSD-2
|
||||
BSD-4
|
||||
CC-BY-4.0
|
||||
ISC
|
||||
LGPL-2.1+
|
||||
MIT
|
||||
MPL-2.0
|
||||
openssl
|
||||
PYTHON
|
||||
TextMate-bundle
|
||||
Unlicense
|
||||
UoI-NCSA
|
||||
W3C
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~arm ~arm64"
|
||||
IUSE="kerberos"
|
||||
RESTRICT="strip bindist"
|
||||
|
||||
RDEPEND="
|
||||
>=app-accessibility/at-spi2-core-2.46.0:2
|
||||
app-crypt/libsecret[crypt]
|
||||
app-misc/ca-certificates
|
||||
dev-libs/expat
|
||||
dev-libs/glib:2
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
media-libs/alsa-lib
|
||||
media-libs/libcanberra[gtk3]
|
||||
media-libs/libglvnd
|
||||
media-libs/mesa
|
||||
net-misc/curl
|
||||
net-print/cups
|
||||
sys-apps/dbus
|
||||
sys-libs/zlib
|
||||
sys-process/lsof
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libdrm
|
||||
x11-libs/libnotify
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb
|
||||
x11-libs/libXcomposite
|
||||
x11-libs/libXdamage
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libxkbcommon
|
||||
x11-libs/libxkbfile
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXScrnSaver
|
||||
x11-libs/pango
|
||||
x11-misc/xdg-utils
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
"
|
||||
|
||||
QA_PREBUILT="*"
|
||||
|
||||
src_install() {
|
||||
# Cleanup
|
||||
rm "${S}/resources/app/LICENSE.txt" || die
|
||||
|
||||
if ! use kerberos; then
|
||||
rm -r "${S}/resources/app/node_modules.asar.unpacked/kerberos" || die
|
||||
fi
|
||||
|
||||
# Install
|
||||
pax-mark m codium
|
||||
mkdir -p "${ED}/opt/${PN}" || die
|
||||
cp -r . "${ED}/opt/${PN}" || die
|
||||
fperms 4711 /opt/${PN}/chrome-sandbox
|
||||
|
||||
dosym -r "/opt/${PN}/bin/codium" "usr/bin/vscodium"
|
||||
dosym -r "/opt/${PN}/bin/codium" "usr/bin/codium"
|
||||
domenu "${FILESDIR}/vscodium.desktop"
|
||||
domenu "${FILESDIR}/vscodium-url-handler.desktop"
|
||||
domenu "${FILESDIR}/vscodium-wayland.desktop"
|
||||
domenu "${FILESDIR}/vscodium-url-handler-wayland.desktop"
|
||||
newicon "resources/app/resources/linux/code.png" "vscodium.png"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
elog "When compared to the regular VSCode, VSCodium has a few quirks"
|
||||
elog "More information at: https://github.com/VSCodium/vscodium/blob/master/DOCS.md"
|
||||
optfeature "keyring support inside vscode" "virtual/secret-service"
|
||||
}
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST kalendar-23.04.3.tar.xz 824472 BLAKE2B 0b60122066b0b1d63d631a397a6e417592dcce236fcf86dddc0a73b704a79fc4728225fb694559a15e46c0177b92ec5dc925c0564ca48c08652521194fd87cca SHA512 15bf7ce051ed56b4178e72a35d0aace00bd8650fac387bd4b63cc541aa92fd433eee2c5711663af4cd29606ddc69c838dbe58780a0e2e35f1fc4ef8be64dbb75
|
||||
DIST merkuro-23.08.2.tar.xz 977316 BLAKE2B fa406073707aaca8e42c29c898667c5c4ca75aa6d9dcd6a08ab6e5ff86000fbfde70295222c5845876a10ef4a8fdce3853ed600a9a74ae2f042a7f18bff78d56 SHA512 de4b3794b2cad8da92bd009a7661e1007fed2b462fede5bc365bc94652f37ac1efd67efb57ceaea397e9a5e9632098bdf908c34cf053b8ec8d66cde79763844d
|
||||
DIST merkuro-23.08.3.tar.xz 979728 BLAKE2B fba3c2ecb8fdd7da86dd08fa550144acc5727f294d6595e1df9d0b7c509ecf51df7aab0f2eceadabc6fcfb6ac91aed1f2b769d04ff026591d849e77f92f537b6 SHA512 6ee5501a6eea8a1121c014e408775f0e4f1bc997259250476547ec8fb75a1a7e369ed76d53d30f5027b48d6f9015283978741fe5b93934326fe0232778be1aaa
|
Binary file not shown.
@ -1,6 +1,12 @@
|
||||
DIST postgresql-11.21.tar.bz2 20467892 BLAKE2B a20440904a6908ee1a91bf5c300b15abd2135de01300f2910abe573ba1c52aa6195c81497326c8f1edd5f1b21a993a911a9e78900720ee10e0b311455143c63e SHA512 2c76859b50ac9c6373624e5ca25a94bbb2a3b6af014304508969f2ae21760b072826c393822b33de50ab9dbb84cd5168b9f5e7d8e057a1d573223180934d7899
|
||||
DIST postgresql-11.22.tar.bz2 20482994 BLAKE2B 1bac5e9a73b1ad1f8e082cfe29f374058b866d3e1234612c01bcc4324e5e25a407531e71436a1c0e10e7574da494499540d242ac66db66d5f85c1ff5954bac41 SHA512 2e4f7322235ed616d10d1e720fa72b8700cb1ebd9fec2e65d63662fca874c8df519b5b2184b32ee63f2060f6f6f620956b790cc6b24dbb06eb0b07d2710a8278
|
||||
DIST postgresql-12.16.tar.bz2 21140532 BLAKE2B 25370615532f1b23765f7b9973fa85b9801fca575182aded4cfa682d170b4b17e92353bba441ab7c7051e9a916a564d5912041149fb287bf33c4472359fc901b SHA512 37c1e5c87e6e3437b9f3de1219a8df2085b1dfb6f687980dd0e9c8691f2caac34ac58a6c119fe69a61888b80a9cbce89ebc9dbb345d6d141a8e4ea9b1b37fa89
|
||||
DIST postgresql-12.17.tar.bz2 21181616 BLAKE2B dda4b06d8d36d3257e1eea251ccbdf38f1ce63ca811045b7b8d156d2b54614304b83b30ad3b1ead4e7ad74fa9f42acc8934f648902e17a4f7c89a117dc8e3c03 SHA512 8bf67475db4ec5baf058ca976ea3e416df39cd9d15131be3fa3c161edbfa93f74251d33b29d23b3084c95bbb73fb6606f4615e528129674047a75a86e7417373
|
||||
DIST postgresql-13.12.tar.bz2 21542293 BLAKE2B b0de1300d90f41445b941c22716986534df850754f67b81c99da9d4acc18b8e8dde4a7291d7f49960f4480a2d9755137390700bf20447d78f0432b526aeb70d7 SHA512 6b6f6de998016b33f0954d4ed8233b84d98abd2dc9b50f5e959f403d1d87a7e9c3b8c8c2ed456806578c2610982f41be3169d9afd4221c52c320b1a2795043e4
|
||||
DIST postgresql-13.13.tar.bz2 21563452 BLAKE2B ee4b2d022c1b3003dc9c4da96e5900878a2fc70b3033470d0fb972131e063a047895e86d5d1e36297885f2821f0ef3af966cabe32941efba4bd11bdd0557e44f SHA512 d7b1076cdc406ac83440c75d18e6dc6db9af709615344978ba0135b45a127082b1d3c6ad6d8cd6259d67ddf38cfcee37dd78dcfbf8e4a710b724c67cf36170a7
|
||||
DIST postgresql-14.10.tar.bz2 22298652 BLAKE2B 0c87c02b0b279d29e4a05711312bf89a655359a687c24d1cbb76cd4f6ed7666d31113a18a9976773c36853f00c1ca332af396372524467bb19c2a3bfcddea995 SHA512 f546e62eb158efdeecf091271ee60945604ca7f3683f0b259ee18eb682431158e282bf4f81d8df304c956919788f8077e72aa47c467d32d6aef1ccfe470862a5
|
||||
DIST postgresql-14.9.tar.bz2 22207374 BLAKE2B 51c2e6205092873369ca68e2502cfccb1de7d6e8275ebd02dd58d8ed6133aaab9eacc21f8057b7e6555df4207b7af51f43c84b5e6e22eaa9c494e4eceb806fbb SHA512 8a7f74c5fd1ec5339085f357b3044dd0d763e3368bd42b5d68497eba5cbf71e9c76a329580d8aa3145aa98a157f28df548c4a6dc2d880db5c0156baa231f5d24
|
||||
DIST postgresql-15.4.tar.bz2 22850355 BLAKE2B e17c62c4e3f048f28073c1706bfa1d3eb065c1416117061fd07b325072c19348f8f2badea1364a054aebccf6d65c2ca21bb46d9cf621d78bd0a75f5dc4b21fe5 SHA512 37dd3e8b644d10c4f55963e07344ff4b0079adbae60052306f230f15e4ef4662b89e84a63dacc87cbf926c80b186d064a391283dd16e29ab47f7acc8a9860d0b
|
||||
DIST postgresql-15.5.tar.bz2 23091780 BLAKE2B e3731b973242d4de8b4b78e00842df52e006f08510efc0ff02bf7b8b479e17aa9e1c8116644d9a82f23d4334f527f1a82a1c2eec7f7c199a2fdf500b46740264 SHA512 9ed9d160b3cef99954ccd47a970c107b7e3b0196a7d848f740bf3c52a1c626f6f457814c97f37b9f0467bb07734e19806a15bd9cf3c39445e1d89e75b37064cc
|
||||
DIST postgresql-16.0.tar.bz2 24528207 BLAKE2B a38bbe973796b5270ef2121e0f88dcaa46bbb8ed9e2d9f60b1b5a958e50a655ec763a5aa1a25478b0a3762494171674747e8e4b8efcd46068a7a84ff17ad9966 SHA512 c66b72d2d9bc503b9ad19c67384517ae921c494b2916f32157c2528dcbb38aefeb4a8cd5003fd40ba8a19612ea64511d534ff5d99e7a1b266024232f983bcf39
|
||||
DIST postgresql-16.1.tar.bz2 24605482 BLAKE2B f59859af644134cf0fc9289c0e0d93fe0f877794a1cc8881280d0439605a6e312866a0114d453af8e269e26173fa3742073fe5485901b7cb0af925a5c3506aad SHA512 69f4635e5841452599f13b47df41ce2425ab34b4e4582fd2c635bc78d561fa36c5b03eccb4ae6569872dc74775be1b5a62dee20c9a4f12a43339250128352918
|
||||
|
@ -0,0 +1,451 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12} )
|
||||
LLVM_MAX_SLOT=15
|
||||
|
||||
inherit flag-o-matic linux-info llvm 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? (
|
||||
<sys-devel/llvm-16:=
|
||||
<sys-devel/clang-16:=
|
||||
)
|
||||
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
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm_pkg_setup
|
||||
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
[[ -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 doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
serverman=(
|
||||
initdb
|
||||
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
|
||||
pg_{test_{fsync,timing},upgrade,waldump}
|
||||
post{gres,master}
|
||||
)
|
||||
for m in ${serverman[@]} ; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
# Don't delete libpg{port,common}.a (Bug #571046). They're always
|
||||
# needed by extensions utilizing PGXS.
|
||||
use static-libs || \
|
||||
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
|
||||
-delete
|
||||
|
||||
# Make slot specific links to programs
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
|
||||
if [[ -n ${REPLACING_VERSIONS} ]] ; then
|
||||
ewarn "If your system is using 'pg_stat_statements' and you are running a"
|
||||
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
|
||||
ewarn "the following command after upgrading:"
|
||||
ewarn
|
||||
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
|
||||
mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
|
||||
chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,451 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12} )
|
||||
LLVM_MAX_SLOT=15
|
||||
|
||||
inherit flag-o-matic linux-info llvm 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? (
|
||||
<sys-devel/llvm-16:=
|
||||
<sys-devel/clang-16:=
|
||||
)
|
||||
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
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm_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
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,463 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12} )
|
||||
LLVM_MAX_SLOT=15
|
||||
|
||||
inherit flag-o-matic linux-info llvm 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? (
|
||||
<sys-devel/llvm-16:=
|
||||
<sys-devel/clang-16:=
|
||||
)
|
||||
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
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm_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
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
# Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
|
||||
# LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
|
||||
local old_ctype=${LC_CTYPE}
|
||||
export LC_CTYPE=${LC_COLLATE}
|
||||
emake check
|
||||
export LC_CTYPE=${old_ctype}
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,463 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12} )
|
||||
LLVM_MAX_SLOT=15
|
||||
|
||||
inherit flag-o-matic linux-info llvm 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? (
|
||||
<sys-devel/llvm-16:=
|
||||
<sys-devel/clang-16:=
|
||||
)
|
||||
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
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm_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
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
# Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
|
||||
# LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
|
||||
local old_ctype=${LC_CTYPE}
|
||||
export LC_CTYPE=${LC_COLLATE}
|
||||
emake check
|
||||
export LC_CTYPE=${old_ctype}
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,465 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12} )
|
||||
LLVM_MAX_SLOT=15
|
||||
|
||||
inherit flag-o-matic linux-info llvm 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? (
|
||||
<sys-devel/llvm-16:=
|
||||
<sys-devel/clang-16:=
|
||||
)
|
||||
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
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm_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
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
# Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
|
||||
# LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
|
||||
local old_ctype=${LC_CTYPE}
|
||||
export LC_CTYPE=${LC_COLLATE}
|
||||
emake check
|
||||
export LC_CTYPE=${old_ctype}
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,466 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10,11,12} )
|
||||
LLVM_MAX_SLOT=15
|
||||
|
||||
inherit flag-o-matic linux-info llvm 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? (
|
||||
<sys-devel/llvm-16:=
|
||||
<sys-devel/clang-16:=
|
||||
)
|
||||
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
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use llvm && llvm_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
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
# Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
|
||||
# LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
|
||||
local old_ctype=${LC_CTYPE}
|
||||
export LC_CTYPE=${LC_COLLATE}
|
||||
emake check
|
||||
export LC_CTYPE=${old_ctype}
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
DIST godot-3.5.3-stable.tar.xz 24072964 BLAKE2B a4c03328e3aa77d741a1c642cfd645de04084f2852e865757fc8960c4919d3b8b8571e772f44004901fdd80a967e8e21bd8c6be8b36263db7afae787dcbd3ed6 SHA512 4c008af5bb7c298d465edbe03f6ebc642f5bbbb0a4254e99d7a7a88919e1f9424b98c5dff95a55ae68d4e2e5878c7c0bb7d13a66869cb632ecb51a913f865155
|
||||
DIST godot-4.0.4-stable.tar.xz 30267060 BLAKE2B 42f5f0c89edb96eb6f36c54229671f233ed0a49a769361195f9aaf807b45fe3968aeeaad204fc07e200114d852e4651f9dc8eb137c4f3aca7b8e8e1203ebcdc9 SHA512 4dadc123995d7262ffa6c5002d08611038957c59a8bd742284b9b62577de6b7182aad807db7a231180a355df0f25d10babdc914faf9287ed401152d98762bb5f
|
||||
DIST godot-4.1.2-stable.tar.xz 31020196 BLAKE2B fbdc4470a4db78a810dcbd7700c46dd03a9d9802c08cbad68dd3aedbc00678f7285837f34642ac833c000164f4a98559cb82bcb615ca353cf319e771d55cdc6a SHA512 d9e3c948aeece3586632ed2a8c94ca2107a6b5b4bb1ae8dc264e350fbfcb4cc1f4cd4cf7fdcd61a5b0351511c12e34d83275a79d5e0361e2eee67c8447b5f831
|
||||
DIST godot-4.1.3-stable.tar.xz 31027024 BLAKE2B 7d3eb66f080089507662fa639307d941772f79413d3f956feadaaaa5a335dd4057c03e90ee75e247689e78534d798cba3511e55d59097da2ca8a5954bbbb4172 SHA512 e8dc812fc1bd98ce4d691d51fceb75d943fb40790c5a640e6178eb53b4de8b1078de8e1649e182963cb7beea26b2365c202f6deaea9bb679f789cd546d29f858
|
||||
|
@ -1,239 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
inherit bash-completion-r1 desktop python-any-r1 scons-utils toolchain-funcs xdg
|
||||
|
||||
DESCRIPTION="Multi-platform 2D and 3D game engine with a feature-rich editor"
|
||||
HOMEPAGE="https://godotengine.org/"
|
||||
SRC_URI="
|
||||
https://downloads.tuxfamily.org/godotengine/${PV}/${P}-stable.tar.xz
|
||||
https://github.com/godotengine/godot/releases/download/${PV}-stable/${P}-stable.tar.xz
|
||||
"
|
||||
S="${WORKDIR}/${P}-stable"
|
||||
|
||||
LICENSE="
|
||||
MIT
|
||||
Apache-2.0 BSD Boost-1.0 CC0-1.0 Unlicense ZLIB
|
||||
gui? ( CC-BY-4.0 ) tools? ( OFL-1.1 )
|
||||
"
|
||||
SLOT="4"
|
||||
KEYWORDS="~amd64"
|
||||
# Enable roughly same as upstream by default so it works as expected,
|
||||
# except raycast (tools-only heavy dependency), and deprecated.
|
||||
IUSE="
|
||||
alsa +dbus debug deprecated +fontconfig +gui pulseaudio raycast
|
||||
+runner speech test +theora +tools +udev +upnp +vulkan +webp
|
||||
"
|
||||
# TODO: tests still need more figuring out
|
||||
RESTRICT="test"
|
||||
|
||||
# dlopen: libglvnd
|
||||
RDEPEND="
|
||||
app-arch/brotli:=
|
||||
app-arch/zstd:=
|
||||
dev-games/recastnavigation:=
|
||||
dev-libs/icu:=
|
||||
dev-libs/libpcre2:=[pcre32]
|
||||
media-libs/freetype[brotli,harfbuzz]
|
||||
media-libs/harfbuzz:=[icu]
|
||||
media-libs/libogg
|
||||
media-libs/libpng:=
|
||||
media-libs/libvorbis
|
||||
<net-libs/mbedtls-3:=
|
||||
net-libs/wslay
|
||||
sys-libs/zlib:=
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
dbus? ( sys-apps/dbus )
|
||||
fontconfig? ( media-libs/fontconfig )
|
||||
gui? (
|
||||
media-libs/libglvnd
|
||||
x11-libs/libX11
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXi
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
x11-libs/libxkbcommon
|
||||
tools? ( raycast? ( media-libs/embree:3 ) )
|
||||
vulkan? ( media-libs/vulkan-loader[X] )
|
||||
)
|
||||
pulseaudio? ( media-libs/libpulse )
|
||||
speech? ( app-accessibility/speech-dispatcher )
|
||||
theora? ( media-libs/libtheora )
|
||||
tools? ( app-misc/ca-certificates )
|
||||
udev? ( virtual/udev )
|
||||
upnp? ( net-libs/miniupnpc:= )
|
||||
webp? ( media-libs/libwebp:= )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
gui? ( x11-base/xorg-proto )
|
||||
tools? ( test? ( dev-cpp/doctest ) )
|
||||
"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.0_beta3-headless-header.patch
|
||||
"${FILESDIR}"/${PN}-4.0_rc2-musl.patch
|
||||
"${FILESDIR}"/${PN}-4.0_rc3-scons.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i "1,5s/ godot/&${SLOT}/i" misc/dist/linux/godot.6 || die
|
||||
sed -i "/id/s/Godot/&${SLOT}/" misc/dist/linux/org.godotengine.Godot.appdata.xml || die
|
||||
sed -e "s/=godot/&${SLOT}/" -e "/^Name=/s/$/ ${SLOT}/" \
|
||||
-i misc/dist/linux/org.godotengine.Godot.desktop || die
|
||||
|
||||
sed -i "s|pkg-config |$(tc-getPKG_CONFIG) |" platform/linuxbsd/detect.py || die
|
||||
|
||||
# use of builtin_ switches can be messy (see below), delete to be sure
|
||||
local unbundle=(
|
||||
brotli doctest embree freetype graphite harfbuzz icu4c libogg
|
||||
libpng libtheora libvorbis libwebp linuxbsd_headers mbedtls
|
||||
miniupnpc pcre2 recastnavigation volk wslay zlib zstd
|
||||
# certs: unused by generated header, but scons panics if not found
|
||||
)
|
||||
rm -r "${unbundle[@]/#/thirdparty/}" || die
|
||||
|
||||
ln -s "${ESYSROOT}"/usr/include/doctest thirdparty/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local -x BUILD_NAME=gentoo # replaces "custom_build" in version string
|
||||
|
||||
local esconsargs=(
|
||||
AR="$(tc-getAR)" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
|
||||
|
||||
progress=no
|
||||
verbose=yes
|
||||
|
||||
use_sowrap=no
|
||||
|
||||
alsa=$(usex alsa)
|
||||
dbus=$(usex dbus)
|
||||
deprecated=$(usex deprecated)
|
||||
fontconfig=$(usex fontconfig)
|
||||
opengl3=$(usex gui)
|
||||
pulseaudio=$(usex pulseaudio)
|
||||
speechd=$(usex speech)
|
||||
udev=$(usex udev)
|
||||
use_volk=no # unnecessary when linking directly to libvulkan
|
||||
vulkan=$(usex gui $(usex vulkan))
|
||||
x11=$(usex gui)
|
||||
|
||||
system_certs_path="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
# platform/*/detect.py uses builtin_* switches to check if need
|
||||
# to link with system libraries, but many ignore whether the dep
|
||||
# is actually used, so "enable" deleted builtins on disabled deps
|
||||
builtin_brotli=no
|
||||
builtin_certs=no
|
||||
builtin_embree=$(usex !gui yes $(usex !tools yes $(usex !raycast)))
|
||||
builtin_enet=yes # bundled copy is patched for IPv6+DTLS support
|
||||
builtin_freetype=no
|
||||
builtin_glslang=yes #879111 (for now, may revisit if more stable)
|
||||
builtin_graphite=no
|
||||
builtin_harfbuzz=no
|
||||
builtin_icu4c=no
|
||||
builtin_libogg=no
|
||||
builtin_libpng=no
|
||||
builtin_libtheora=$(usex !theora)
|
||||
builtin_libvorbis=no
|
||||
builtin_libwebp=$(usex !webp)
|
||||
builtin_mbedtls=no
|
||||
builtin_miniupnpc=$(usex !upnp)
|
||||
builtin_msdfgen=yes # not wired for unbundling nor packaged
|
||||
builtin_openxr=yes # not packaged
|
||||
builtin_pcre2=no
|
||||
builtin_recastnavigation=no
|
||||
builtin_rvo2=yes # bundled copy has godot-specific changes
|
||||
builtin_squish=yes # ^ likewise, may not be safe to unbundle
|
||||
builtin_wslay=no
|
||||
builtin_xatlas=yes # not wired for unbundling nor packaged
|
||||
builtin_zlib=no
|
||||
builtin_zstd=no
|
||||
# (more is bundled in third_party/ but they lack builtin_* switches)
|
||||
|
||||
# modules with optional dependencies, "possible" to disable more but
|
||||
# gets messy and breaks all sorts of features (expected enabled)
|
||||
module_mono_enabled=no # unhandled
|
||||
# note raycast is only enabled on amd64+arm64, see raycast/config.py
|
||||
module_raycast_enabled=$(usex gui $(usex tools $(usex raycast)))
|
||||
module_theora_enabled=$(usex theora)
|
||||
module_upnp_enabled=$(usex upnp)
|
||||
module_webp_enabled=$(usex webp)
|
||||
|
||||
# let *FLAGS handle these, e.g. can pass -flto as-is
|
||||
debug_symbols=no
|
||||
lto=none
|
||||
optimize=custom
|
||||
use_static_cpp=no
|
||||
)
|
||||
|
||||
if use runner && use tools; then
|
||||
# build alternate faster + ~60% smaller binary for running
|
||||
# games or servers without game development debug paths
|
||||
escons extra_suffix=runner target=template_release "${esconsargs[@]}"
|
||||
fi
|
||||
|
||||
esconsargs+=(
|
||||
target=$(usex tools editor template_$(usex debug{,} release))
|
||||
dev_build=$(usex debug)
|
||||
|
||||
# harmless but note this bakes in --test in the final binary
|
||||
tests=$(usex tools $(usex test))
|
||||
)
|
||||
|
||||
escons extra_suffix=main "${esconsargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
xdg_environment_reset
|
||||
bin/godot*.main --headless --test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local s=godot${SLOT}
|
||||
|
||||
newbin bin/godot*.main ${s}
|
||||
if use runner && use tools; then
|
||||
newbin bin/godot*.runner ${s}-runner
|
||||
else
|
||||
# always available, revdeps shouldn't depend on [runner]
|
||||
dosym ${s} /usr/bin/${s}-runner
|
||||
fi
|
||||
|
||||
newman misc/dist/linux/godot.6 ${s}.6
|
||||
dodoc AUTHORS.md CHANGELOG.md DONORS.md README.md
|
||||
|
||||
if use gui; then
|
||||
newicon icon.svg ${s}.svg
|
||||
newmenu misc/dist/linux/org.godotengine.Godot.desktop \
|
||||
org.godotengine.${s^}.desktop
|
||||
|
||||
insinto /usr/share/metainfo
|
||||
newins misc/dist/linux/org.godotengine.Godot.appdata.xml \
|
||||
org.godotengine.${s^}.appdata.xml
|
||||
|
||||
insinto /usr/share/mime/application
|
||||
newins misc/dist/linux/org.godotengine.Godot.xml \
|
||||
org.godotengine.${s^}.xml
|
||||
fi
|
||||
|
||||
newbashcomp misc/dist/shell/godot.bash-completion ${s}
|
||||
bashcomp_alias ${s}{,-runner}
|
||||
|
||||
insinto /usr/share/fish/vendor_completions.d
|
||||
newins misc/dist/shell/godot.fish ${s}.fish
|
||||
dosym ${s}.fish /usr/share/fish/vendor_completions.d/${s}-runner.fish
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins misc/dist/shell/_godot.zsh-completion _${s}
|
||||
dosym _${s} /usr/share/zsh/site-functions/_${s}-runner
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST kopeninghours-23.04.3.tar.xz 71808 BLAKE2B 734d938145fd386b6314f0e861a1b148e4a5dfac83f8b0263f8840e07f629c528f4945be16e3c6d8240b72b2be442a28071dc86982ee42b6faa60780ae15c0ee SHA512 6faddbf3da09fb4d3616abbc230c269f0ccb827f081ca3b2bf40874d7878efe69ea197ccf54f1b4db0e997eee11cca41891d64196b77062763d62e286ce4aa4c
|
||||
DIST kopeninghours-23.08.2.tar.xz 71928 BLAKE2B 422ecce42a8ab37698af4905caf7aa23a0864e0557e07253ed49cfd698d3273679fe6c0ffea4145fc860f28228623de84273e7ae4dd3eda3ae95f9eead85d27b SHA512 5a4eedb72a60a261616a321fee117e035cce796c76b053b71ab1265ea5cd26754bf577bfc99233a040fe105ea3bad21670d682ec3bbaa45db2a17dc07038b516
|
||||
DIST kopeninghours-23.08.3.tar.xz 71932 BLAKE2B 368f75ef0884a909b916497d9e5578a19288cebb1d12bf073938633a37a53a00c7f34256ee03a8ca2bd73759f72a16aa1b677c8a75305865446c2e5d935026a1 SHA512 e62794d4405321ef7c81b3981e2610e3a5f91a0a65a1899fd1e24681f4bb6296e8ad26532bb039e0fa3f47a0c33269a8c46c87658e407c87b77619ea0a09f155
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST kosmindoormap-23.04.3.tar.xz 375680 BLAKE2B 306336b33c7b03e67531f11163c579dab5b68614f4fd582eb14858a7c80e601e848aaf933c846a144d07e59c215b59f3a0021429f675a76750903144e02829d1 SHA512 1ad5acc7143842005cc02c146e90090d57d8fbafbac6a4401ab94ec966c709f66f7f832169982a808ab21911b16e6f837137c2fd9cf284c540ce03e6647c3405
|
||||
DIST kosmindoormap-23.08.2.tar.xz 380052 BLAKE2B 33fa94635a83acf28f519d0c404dc0ab404d71cffef5348f36deafbe5131625807e319677fa2d6b49cb1952abfffb305e2bf69410f91bb1305de9b0036cba52c SHA512 0ba75b3f7ad66849880be0952789e75dab51e9c7378f6716f035352afd8f49c7582a199c814e185b742e465354904f0562d67cb1f0eed4001f8dfb5289e20e2c
|
||||
DIST kosmindoormap-23.08.3.tar.xz 379980 BLAKE2B 5dae843d121543c5bd7fc3021f436b0d5ea4f7554c5f186479036af191946f57c67b95d41fef3b2ea74c71a315be159f49aab1f89afd03cd21bf326d605be1f6 SHA512 5a5d158eb6f231b6975ff24db73eaf4a1969606999fca7b3944a5bbb77393612bc2df3591b320ad8b9c42b0fca751b7f50e990636c22c3748141c20fcfb0c78e
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST kpublictransport-23.04.3.tar.xz 537716 BLAKE2B ee477dba15626a66cab15be59a1438c03d378df1e6686e5345211fa2139f0bec49ce3138f5e6cbdbd7ffb3ff6a58bd8ec1fcaa87c235af7aee7a23e926648953 SHA512 41597bf9e7c3366575a9a6698cace1f127f8c69094de906d0ab662cc563b0a440ae89c074909083d82c8d94e1cd5f2442470f45369663252b5cf6dd8f6ae7e47
|
||||
DIST kpublictransport-23.08.2.tar.xz 569208 BLAKE2B 89b8d2e7e3308a0105db95cc8e74072926b1c2aa295f0f1a7794aca2b3311340ee949c7fe58a0eb0fde971ba0a4ae5d3affec966a232413e13324b178106c368 SHA512 9a94edcaa9983ebba77bb415dcabf4af4f0aa3da92ed6b3197e6d2c44868a8316e5d4d0db60eef866e69561834309f94835aafca45b73b33bb2ccb64c4705f2f
|
||||
DIST kpublictransport-23.08.3.tar.xz 570316 BLAKE2B 9b98fdb1039273468becbe018a2904d12dcb7489e58b7354b25c79e72286917462ebff3807b14d2d5c71ee4ee2d48a223d19988329b66a23c63ef1d970321622 SHA512 278912f30881c46aa516e73f4be27e47a07fc97b6769ce120e9649c69e9cc68087bca58c1565bd66967559303caedd8c3d46b9ec4b26f481ecc12f1db58629a3
|
||||
|
@ -1,3 +1,2 @@
|
||||
DIST libzia-4.43.tar.gz 642097 BLAKE2B 34ab759fc8d4d83067df80d9d3f763717640df38f604222f3fc6b19876a9f5a5f5b79523857fa96d5badf047046b4786f100657ee0a41d0a7096a21c6006e5a0 SHA512 b6341ea6524b2040d63a7b21b9a4c12d26cb5ae30bc08dc37efd5fd7d71ecf7321511e09cc5745adc6f395f841d5e2bb4df827956204db4147ac11d204eaf8da
|
||||
DIST libzia-4.44.tar.gz 642077 BLAKE2B 0647cbfbbd05a08aafeaf64ee08485c54aa46d9c9ba81448f16cdd8c05a27dceb6646d0eebe4ae60b00b36ea0d8822fd61c157ebec1d788a49a27b9ff4dea44d SHA512 da1b65ff82e62f5b93c4e977ac5528c80e770fa4ed2a0ac4ba92db00f95bccecad2c1c81f9d179d1a4612b1801b6c3e9bab733a0ef6e67137410ac9b62a4972c
|
||||
DIST libzia-4.46.tar.gz 642261 BLAKE2B cf8a4fc32599d77114dbfb6684196f4b0fb4715af1e8bf5f647d8b383130030c0d9c62aa94b8f12f72653dcba019f57ea75adb699646b6f27ed2f6c6f410c2e9 SHA512 11242683133c094c61b55824f35c399daf187b82b33620e938c47ff09f60dc3b4bf644623ce2ad551d60e75694c4afa1747a3168df98ada245dd1e9500e52c16
|
||||
DIST libzia-4.49.tar.gz 641558 BLAKE2B 045c6edc95d95cf4180209c20f8fb4de1ee0854f93fcab59ac9e47d1c76b73b5a6be8b453c96114ba53b7ff1f7d0e06228881920096bbd0aaf8029409f155424 SHA512 7dc8e8ea2984a5aca8db01af82adf7e824d264da061616658c184694c3fb1565e90f84008d92ad4ff07dfdd8633b17366e1ca32e71e2671172453c40da87cb9f
|
||||
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools flag-o-matic
|
||||
|
||||
DESCRIPTION="Platform abstraction code for tucnak package"
|
||||
HOMEPAGE="http://tucnak.nagano.cz"
|
||||
SRC_URI="http://tucnak.nagano.cz/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="ftdi"
|
||||
|
||||
RDEPEND="dev-libs/glib:2
|
||||
x11-libs/gtk+:2
|
||||
media-libs/libsdl2
|
||||
media-libs/libpng:0
|
||||
ftdi? ( dev-embedded/libftdi:1 )
|
||||
elibc_musl? ( sys-libs/libunwind )"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
MAKEOPTS+=" -j1"
|
||||
|
||||
src_prepare() {
|
||||
eapply_user
|
||||
sed -i -e "s/docsdir/#docsdir/g" \
|
||||
-e "s/docs_/#docs_/g" Makefile.am || die
|
||||
|
||||
# Fix QA-Warning "QA Notice: pkg-config files with wrong LDFLAGS detected"
|
||||
sed -i -e 's/@LDFLAGS@//' libzia.pc.in || die
|
||||
|
||||
# fix build for MUSL (bug #832235)
|
||||
if use elibc_musl ; then
|
||||
sed -i -e "s/ backtrace(/ unw_backtrace(/" src/zbfd.c || die
|
||||
fi
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use elibc_musl && append-libs -lunwind
|
||||
econf \
|
||||
$(use_with ftdi) --with-sdl \
|
||||
--with-png --without-bfd \
|
||||
--disable-static
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
find "${D}" -name '*.la' -type f -delete || die
|
||||
}
|
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST PyQt-builder-1.15.2.tar.gz 3908851 BLAKE2B 8d8f324eb7ac6b00b00ac52a4b746789cf52032d519eca9c88c83dec3fe9c8100619e6b360c3dd6d69270b9feab118376a27c1485b453b35b6e4b8b212b34720 SHA512 3f8472ec51e9b456df80355d0351a66ea42902f81099993d57ae2c7f02c4ab142fa8089a87059f9e800a610d865e3e30bf890674b3a21f48eeb8375ec883f518
|
||||
DIST PyQt-builder-1.15.3.tar.gz 3909851 BLAKE2B 27680dbbee2fb1f549f7d98fa0b422dfe88933aedcb907bfa74dbdbce7324a5f003b62f7fd03ef4ec5c4f8ff5151fb23b73a3111b1e03bf04daba6faa00cf13e SHA512 58bd082d339cedd34c5bd8dc58f690a8a801b04c334e24c9843be0f0c24f2d4548ff69374bc0cf0aa96f8dea526f5a73c688f00cd72d29deb86fedaab5987f49
|
||||
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="The PEP 517 compliant PyQt build system"
|
||||
HOMEPAGE="
|
||||
https://www.riverbankcomputing.com/software/pyqt-builder/
|
||||
https://pypi.org/project/PyQt-builder/
|
||||
"
|
||||
|
||||
LICENSE="|| ( GPL-2 GPL-3 SIP )"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-6.7.1[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_sphinx doc --no-autodoc
|
||||
|
||||
python_prepare_all() {
|
||||
distutils-r1_python_prepare_all
|
||||
|
||||
# don't install prebuilt DLLs
|
||||
sed -i "s:'dlls/\*/\*',::" setup.py || die
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST PyQt5_sip-12.12.2.tar.gz 123020 BLAKE2B 73e0209c0e780087443f761c5c8d0b80745f836b1077ca9197ae35313e4b633421c41280320c1862c78229ff4c94100b740200402853ea8ca47b26744709bb5d SHA512 62435e6fa409a817ad7648103ce1574747ed878da3859981517d3c3fb9b918802cbf14989daae4a0d44a3fbccef44cf674f4d108f5d6eade1d1d8a3ec8d82982
|
||||
DIST PyQt5_sip-12.13.0.tar.gz 123225 BLAKE2B e3b7233e5405f7b24de157e1f0ed0f2ff47a9c331a76672892d8a7adc8aba8c7b738354d9f1c2fe9c29501b5bfe8c6302307c6731273b980a04dd327048a3a94 SHA512 ef363b21899f6d089fbc6d5adf700dc6c8838501343070ed1cf0826e05dd860343eba608d5aee5d8bece39b8ddca1f37866bb56aa07db18384ac0a372ca3532f
|
||||
|
@ -1,22 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
PYPI_PN=${PN/-/_}
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="sip extension module for PyQt5"
|
||||
HOMEPAGE="
|
||||
https://www.riverbankcomputing.com/software/sip/
|
||||
https://pypi.org/project/PyQt5-sip/
|
||||
"
|
||||
|
||||
LICENSE="|| ( GPL-2 GPL-3 SIP )"
|
||||
SLOT="0/$(ver_cut 1)"
|
||||
KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86"
|
@ -1,163 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=sip
|
||||
PYPI_NO_NORMALIZE=1
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 flag-o-matic multiprocessing pypi qmake-utils
|
||||
|
||||
DESCRIPTION="Python bindings for the Qt framework"
|
||||
HOMEPAGE="
|
||||
https://www.riverbankcomputing.com/software/pyqt/
|
||||
https://pypi.org/project/PyQt5/
|
||||
"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86"
|
||||
|
||||
# TODO: QtNfc, QtQuick3D, QtRemoteObjects
|
||||
IUSE="
|
||||
bluetooth dbus debug declarative designer examples gles2-only gui help location
|
||||
multimedia network opengl positioning printsupport sensors serialport speech
|
||||
sql +ssl svg testlib webchannel websockets widgets x11extras xmlpatterns
|
||||
"
|
||||
|
||||
# The requirements below were extracted from the qmake_QT declarations
|
||||
# in project.py and from the output of 'grep -r "%Import " ${S}/sip'
|
||||
REQUIRED_USE="
|
||||
bluetooth? ( gui )
|
||||
declarative? ( gui network )
|
||||
designer? ( widgets )
|
||||
help? ( gui widgets )
|
||||
location? ( positioning )
|
||||
multimedia? ( gui network )
|
||||
opengl? ( gui widgets )
|
||||
positioning? ( gui )
|
||||
printsupport? ( gui widgets )
|
||||
sensors? ( gui )
|
||||
serialport? ( gui )
|
||||
sql? ( widgets )
|
||||
svg? ( gui widgets )
|
||||
testlib? ( widgets )
|
||||
webchannel? ( network )
|
||||
websockets? ( network )
|
||||
widgets? ( gui )
|
||||
xmlpatterns? ( network )
|
||||
"
|
||||
|
||||
# Minimal supported version of Qt.
|
||||
QT_PV="5.15:5"
|
||||
|
||||
DEPEND="
|
||||
>=dev-qt/qtcore-${QT_PV}
|
||||
>=dev-qt/qtxml-${QT_PV}
|
||||
bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
|
||||
dbus? (
|
||||
dev-python/dbus-python[${PYTHON_USEDEP}]
|
||||
>=dev-qt/qtdbus-${QT_PV}
|
||||
sys-apps/dbus
|
||||
)
|
||||
declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
|
||||
designer? ( >=dev-qt/designer-${QT_PV} )
|
||||
gui? ( >=dev-qt/qtgui-${QT_PV}[gles2-only=] )
|
||||
help? ( >=dev-qt/qthelp-${QT_PV} )
|
||||
location? ( >=dev-qt/qtlocation-${QT_PV} )
|
||||
multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
|
||||
network? ( >=dev-qt/qtnetwork-${QT_PV}[ssl=] )
|
||||
opengl? ( >=dev-qt/qtopengl-${QT_PV} )
|
||||
positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
|
||||
printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
|
||||
sensors? ( >=dev-qt/qtsensors-${QT_PV} )
|
||||
serialport? ( >=dev-qt/qtserialport-${QT_PV} )
|
||||
speech? ( >=dev-qt/qtspeech-${QT_PV} )
|
||||
sql? ( >=dev-qt/qtsql-${QT_PV} )
|
||||
svg? ( >=dev-qt/qtsvg-${QT_PV} )
|
||||
testlib? ( >=dev-qt/qttest-${QT_PV} )
|
||||
webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
|
||||
websockets? ( >=dev-qt/qtwebsockets-${QT_PV} )
|
||||
widgets? ( >=dev-qt/qtwidgets-${QT_PV} )
|
||||
x11extras? ( >=dev-qt/qtx11extras-${QT_PV} )
|
||||
xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
>=dev-python/PyQt5-sip-12.11:=[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-python/PyQt-builder-1.14.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-6.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-qt/qtcore-${QT_PV}
|
||||
dbus? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
python_configure_all() {
|
||||
append-cxxflags ${CPPFLAGS} # respect CPPFLAGS notably for DISTUTILS_EXT=1
|
||||
|
||||
pyqt_use_enable() {
|
||||
local state=$(usex ${1} --enable= --disable=)
|
||||
shift
|
||||
echo ${*/#/${state}}
|
||||
}
|
||||
|
||||
DISTUTILS_ARGS=(
|
||||
--jobs="$(makeopts_jobs)"
|
||||
--qmake="$(qt5_get_bindir)"/qmake
|
||||
--qmake-setting="$(qt5_get_qmake_args)"
|
||||
--verbose
|
||||
--confirm-license
|
||||
|
||||
--enable=pylupdate
|
||||
--enable=pyrcc
|
||||
--enable=Qt
|
||||
--enable=QtCore
|
||||
$(pyqt_use_enable bluetooth QtBluetooth)
|
||||
$(pyqt_use_enable dbus QtDBus)
|
||||
$(pyqt_use_enable declarative QtQml QtQuick \
|
||||
$(usev widgets QtQuickWidgets))
|
||||
$(pyqt_use_enable designer QtDesigner)
|
||||
$(pyqt_use_enable gui QtGui \
|
||||
$(use gles2-only && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
|
||||
$(pyqt_use_enable help QtHelp)
|
||||
$(pyqt_use_enable location QtLocation)
|
||||
$(pyqt_use_enable multimedia QtMultimedia \
|
||||
$(usev widgets QtMultimediaWidgets))
|
||||
$(pyqt_use_enable network QtNetwork)
|
||||
$(pyqt_use_enable opengl QtOpenGL)
|
||||
$(pyqt_use_enable positioning QtPositioning)
|
||||
$(pyqt_use_enable printsupport QtPrintSupport)
|
||||
$(pyqt_use_enable sensors QtSensors)
|
||||
$(pyqt_use_enable serialport QtSerialPort)
|
||||
$(pyqt_use_enable speech QtTextToSpeech)
|
||||
$(pyqt_use_enable sql QtSql)
|
||||
$(pyqt_use_enable svg QtSvg)
|
||||
$(pyqt_use_enable testlib QtTest)
|
||||
$(pyqt_use_enable webchannel QtWebChannel)
|
||||
$(pyqt_use_enable websockets QtWebSockets)
|
||||
$(pyqt_use_enable widgets QtWidgets)
|
||||
$(pyqt_use_enable x11extras QtX11Extras)
|
||||
--enable=QtXml
|
||||
$(pyqt_use_enable xmlpatterns QtXmlPatterns)
|
||||
|
||||
$(usev debug '--debug --qml-debug --tracing')
|
||||
|
||||
$(usev !dbus --no-dbus-python)
|
||||
# note: upstream currently intentionally skips installing these two
|
||||
# plugins when using wheels w/ pep517 so, *if* something does need
|
||||
# them, it will need to be handled manually
|
||||
$(usev !declarative --no-qml-plugin)
|
||||
$(usev !designer --no-designer-plugin)
|
||||
|
||||
$(usev gles2-only --disabled-feature=PyQt_Desktop_OpenGL)
|
||||
$(usev !ssl --disabled-feature=PyQt_SSL)
|
||||
)
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
einstalldocs
|
||||
use examples && dodoc -r examples
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST jsonschema-spec-0.1.6.gh.tar.gz 36043 BLAKE2B e85cad336d6b5ed11d6a51c8fab2c28826f6a9836ad50d2423b23bef047c338307d3e9430f1d151dbaf7a92574c9899dbfd016c570456996250e8d7634373313 SHA512 78ea06a78fd25006d270e2c5033645133ee79b0f45cbfc54e250d4225a36beac59cf9aa92f15fd51bd101fac20fee990d693ab91d8343cd6a298d71735c80884
|
||||
DIST jsonschema-spec-0.2.4.gh.tar.gz 38882 BLAKE2B 0c7d1179003ef5cd8eb0a164e9e13473df233fc72dbe3d8f75e967bb238de7267a0ef154ac3a40d8ef1ee3bd34568bfd16baae33b6ecc88077fabf0bdf22c299 SHA512 87f0a227e5d12badaab30a6b512f735db968ecd25856d9005e7c7f265187a3092e12ee9c900b035c5f927f250cc9743547dab1bba5195dc7534cab256b1800c2
|
||||
|
@ -1,38 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=poetry
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..11} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="JSONSchema Spec with object-oriented paths"
|
||||
HOMEPAGE="
|
||||
https://pypi.org/project/jsonschema-spec/
|
||||
https://github.com/p1c2u/jsonschema-spec/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/p1c2u/jsonschema-spec/archive/${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
|
||||
|
||||
RDEPEND="
|
||||
<dev-python/jsonschema-4.18[${PYTHON_USEDEP}]
|
||||
>=dev-python/jsonschema-4.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/pathable[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-5.1[${PYTHON_USEDEP}]
|
||||
dev-python/pathable[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
sed -e '/--cov/d' -i pyproject.toml || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST mamba-0.11.2.gh.tar.gz 37370 BLAKE2B 90228aa9668c5c79161aee79d92a9409e5df5d9d71b94f2ae8401ec5eea32ed45cf1b1a72eb596b6e24f140bf053bca4cec848830ae83c24b108ddb4a2bcd148 SHA512 8ca6207c9df7b3388db8ecabd13456e54d8811c24f695ccc638c90bb2c975268f9e803533808f9b099651ee4744376fad3b58eaa84a6c97605631368f979915c
|
||||
DIST mamba-0.11.3.gh.tar.gz 37456 BLAKE2B e7e9fc53783cf238745d6d97f335443a569d3a88e4a26fb74c024f305eca707b3d73ea1d23d8a9b2d3463be0c31bfa1f30a6d2ec1ded58c6140909591fe961b8 SHA512 0d4ee434ff2a42dc95a8a5c94980fa224652e38b1ed7e617383882b38a8327861464424f78fb46b2f3e08dabb241bb0e1e9e6734dd68376a43bc3a5b41c01d8c
|
||||
|
@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python test runner born under the banner of Behavior Driven Development"
|
||||
HOMEPAGE="
|
||||
https://nestorsalceda.com/mamba/
|
||||
https://github.com/nestorsalceda/mamba/
|
||||
https://pypi.org/project/mamba/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/nestorsalceda/mamba/archive/v${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/clint-0.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/coverage-3.7.1[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
>=dev-python/doublex-expects-0.7.0_rc1[${PYTHON_USEDEP}]
|
||||
>=dev-python/expects-0.8.0_rc2[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_sphinx docs --no-autodoc
|
||||
|
||||
python_test() {
|
||||
"${EPYTHON}" -m mamba.cli || die "Tests failed under ${EPYTHON}"
|
||||
}
|
@ -1,9 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<!--maintainer-needed-->
|
||||
<upstream>
|
||||
<remote-id type="pypi">mamba</remote-id>
|
||||
<remote-id type="github">nestorsalceda/mamba</remote-id>
|
||||
</upstream>
|
||||
<maintainer type="project">
|
||||
<email>python@gentoo.org</email>
|
||||
<name>Python</name>
|
||||
</maintainer>
|
||||
<stabilize-allarches/>
|
||||
<upstream>
|
||||
<remote-id type="github">nestorsalceda/mamba</remote-id>
|
||||
<remote-id type="pypi">mamba</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_P=python-nbxmpp-${PV}
|
||||
DESCRIPTION="Python library to use Jabber/XMPP networks in a non-blocking way"
|
||||
HOMEPAGE="
|
||||
https://dev.gajim.org/gajim/python-nbxmpp/
|
||||
https://pypi.org/project/nbxmpp/
|
||||
"
|
||||
SRC_URI="
|
||||
https://dev.gajim.org/gajim/python-nbxmpp/-/archive/${PV}/${MY_P}.tar.bz2
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="GPL-3"
|
||||
KEYWORDS="amd64 ~arm64 ~riscv x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/gobject-introspection
|
||||
net-libs/libsoup:2.4[introspection]
|
||||
dev-python/idna[${PYTHON_USEDEP}]
|
||||
dev-python/precis-i18n[${PYTHON_USEDEP}]
|
||||
dev-python/pygobject[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests unittest
|
@ -1 +1,2 @@
|
||||
DIST oslo.utils-6.2.1.tar.gz 104079 BLAKE2B de29980ba15488005b20190b842a499ce5964a231c1350d2e6ed43fdb4cb21909f7a31fcd21761bf01c632b82966ffa8c73ffb69e42f278e7a65d2541ae6b08a SHA512 c72be6521fa15784064c114a972943a583033be6b53b81ab955cc0601c72ef0673e1e732c492bbd798270318ec89932d7a90725f477b1cc123b173f4660d4b2a
|
||||
DIST oslo.utils-6.3.0.tar.gz 104397 BLAKE2B 1195363df16e103f49d783c644bb060719fa3b43a549e229bd1c6b8f682e36b6135fb33284f536c08460892ae441c276d9e0445f30c6a5bc6d260b9a0f4bef40 SHA512 d7d1f160865238d4dd49dec891d275455befcee1926920f22409142bbab47fe3e287ad280a72f11baa99c49beaf1d0dc52745307888b8a3edda4cb9052443336
|
||||
|
@ -0,0 +1,57 @@
|
||||
# Copyright 1999-2023 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=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Oslo Utility library"
|
||||
HOMEPAGE="
|
||||
https://opendev.org/openstack/oslo.utils/
|
||||
https://github.com/openstack/oslo.utils/
|
||||
https://pypi.org/project/oslo.utils/
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/iso8601-0.1.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-i18n-3.15.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytz-2013.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/netaddr-0.7.18[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/debtcollector-1.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyparsing-2.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-20.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-3.13[${PYTHON_USEDEP}]
|
||||
dev-python/tzdata[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-python/pbr-2.2.0[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
>=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslotest-3.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/ddt-1.0.1[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests unittest
|
||||
|
||||
python_compile() {
|
||||
distutils-r1_python_compile
|
||||
find "${BUILD_DIR}"/install -name '*eventletutils*' -delete || die
|
||||
}
|
||||
|
||||
python_test() {
|
||||
cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
|
||||
eunittest
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=maturin
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..12} )
|
||||
|
||||
CRATES="
|
||||
ahash@0.8.6
|
||||
aho-corasick@1.0.2
|
||||
autocfg@1.1.0
|
||||
base64@0.21.5
|
||||
bitflags@1.3.2
|
||||
cc@1.0.79
|
||||
cfg-if@1.0.0
|
||||
enum_dispatch@0.3.12
|
||||
equivalent@1.0.1
|
||||
form_urlencoded@1.2.0
|
||||
getrandom@0.2.10
|
||||
hashbrown@0.14.0
|
||||
heck@0.4.1
|
||||
idna@0.4.0
|
||||
indexmap@2.0.0
|
||||
indoc@2.0.4
|
||||
itoa@1.0.8
|
||||
jiter@0.0.4
|
||||
lexical-core@0.8.5
|
||||
lexical-parse-float@0.8.5
|
||||
lexical-parse-integer@0.8.6
|
||||
lexical-util@0.8.5
|
||||
lexical-write-float@0.8.5
|
||||
lexical-write-integer@0.8.5
|
||||
libc@0.2.147
|
||||
lock_api@0.4.10
|
||||
memchr@2.6.3
|
||||
memoffset@0.9.0
|
||||
num-bigint@0.4.4
|
||||
num-integer@0.1.45
|
||||
num-traits@0.2.16
|
||||
once_cell@1.18.0
|
||||
parking_lot@0.12.1
|
||||
parking_lot_core@0.9.8
|
||||
percent-encoding@2.3.0
|
||||
proc-macro2@1.0.69
|
||||
pyo3-build-config@0.20.0
|
||||
pyo3-ffi@0.20.0
|
||||
pyo3-macros-backend@0.20.0
|
||||
pyo3-macros@0.20.0
|
||||
pyo3@0.20.0
|
||||
python3-dll-a@0.2.9
|
||||
quote@1.0.29
|
||||
redox_syscall@0.3.5
|
||||
regex-automata@0.4.3
|
||||
regex-syntax@0.8.2
|
||||
regex@1.10.2
|
||||
rustversion@1.0.13
|
||||
ryu@1.0.14
|
||||
scopeguard@1.1.0
|
||||
serde@1.0.190
|
||||
serde_derive@1.0.190
|
||||
serde_json@1.0.108
|
||||
smallvec@1.11.1
|
||||
speedate@0.13.0
|
||||
static_assertions@1.1.0
|
||||
strum@0.25.0
|
||||
strum_macros@0.25.3
|
||||
syn@2.0.38
|
||||
target-lexicon@0.12.9
|
||||
tinyvec@1.6.0
|
||||
tinyvec_macros@0.1.1
|
||||
unicode-bidi@0.3.13
|
||||
unicode-ident@1.0.10
|
||||
unicode-normalization@0.1.22
|
||||
unindent@0.2.3
|
||||
url@2.4.1
|
||||
uuid@1.5.0
|
||||
version_check@0.9.4
|
||||
wasi@0.11.0+wasi-snapshot-preview1
|
||||
windows-targets@0.48.1
|
||||
windows_aarch64_gnullvm@0.48.0
|
||||
windows_aarch64_msvc@0.48.0
|
||||
windows_i686_gnu@0.48.0
|
||||
windows_i686_msvc@0.48.0
|
||||
windows_x86_64_gnu@0.48.0
|
||||
windows_x86_64_gnullvm@0.48.0
|
||||
windows_x86_64_msvc@0.48.0
|
||||
zerocopy-derive@0.7.20
|
||||
zerocopy@0.7.20
|
||||
"
|
||||
|
||||
inherit cargo distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Core validation logic for pydantic written in Rust"
|
||||
HOMEPAGE="
|
||||
https://github.com/pydantic/pydantic-core/
|
||||
https://pypi.org/project/pydantic-core/
|
||||
"
|
||||
SRC_URI+="
|
||||
${CARGO_CRATE_URIS}
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
# Dependent crate licenses
|
||||
LICENSE+="
|
||||
Apache-2.0-with-LLVM-exceptions MIT Unicode-DFS-2016
|
||||
|| ( Apache-2.0 Boost-1.0 )
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/typing-extensions-4.7.1[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
>=virtual/rust-1.70.0
|
||||
test? (
|
||||
>=dev-python/dirty-equals-0.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/hypothesis-6.63.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-mock-3.10.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-timeout-2.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pydantic-1.10.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytz-2022.7.1[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/pydantic_core/_pydantic_core.*.so"
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e '/--benchmark/d' pyproject.toml || die
|
||||
sed -i -e '/^strip/d' Cargo.toml || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_IGNORE=(
|
||||
tests/benchmarks
|
||||
)
|
||||
local EPYTEST_DESELECT=(
|
||||
# TODO: recursion till segfault
|
||||
tests/serializers/test_functions.py::test_recursive_call
|
||||
)
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
rm -rf pydantic_core || die
|
||||
epytest -p pytest_mock -p timeout
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST pytest-bdd-6.1.1.gh.tar.gz 79549 BLAKE2B 0de77a2a46c852dcd7b344b385deea6473ec32dfec2eec610ae04d9d192d42eaf7aa3b1455549dc602e46c24edf078c558f2564aa9dd7f42a2beea36458438ea SHA512 69cd345d4a819a84a811ca2a5825f87a46fa4d063b9a852308d36e4f15058a27c45b170dadf684e68322d3380654f985b8ef153e34ad42ef33e0b595f8dc9d96
|
||||
DIST pytest-bdd-7.0.0.gh.tar.gz 80196 BLAKE2B cb34f5439959e93ccb68c566e284d1789a183dd85c1c3088d0c929373e88bd994de2ac159ea942119183976e64903cf7ca8f2b2137aad749f8b67728c541ee89 SHA512 0f95334a56ff7ccc774e5b94b91d232b829fb308a21ce975c88720493abbefa9e76fcd35cc2ca9bbbf0fd2e38b6f20f5be6cf59368aab4cf70abdaf24c7fd5ed
|
||||
|
@ -1,43 +0,0 @@
|
||||
# Copyright 2021-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=poetry
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="BDD library for the pytest runner"
|
||||
HOMEPAGE="https://pypi.org/project/pytest-bdd/"
|
||||
SRC_URI="https://github.com/pytest-dev/pytest-bdd/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/mako[${PYTHON_USEDEP}]
|
||||
dev-python/parse[${PYTHON_USEDEP}]
|
||||
dev-python/parse_type[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
DOCS=( AUTHORS.rst CHANGES.rst README.rst )
|
||||
|
||||
src_test() {
|
||||
# terminal_reporter test needs exact wrapping
|
||||
local -x COLUMNS=80
|
||||
|
||||
# hooks output parsing may be affected by other pytest-*, e.g. tornasync
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=pytest_bdd.plugin
|
||||
|
||||
distutils-r1_src_test
|
||||
}
|
@ -1,3 +1,2 @@
|
||||
DIST sip-6.7.11.tar.gz 1165368 BLAKE2B 62ba38ca39544e7ed0935e91729ba6f82a5e613a4b26fbf27c3708a5cb38ba0fa583ceb6a45c0c7485579f4c318fc5ac910eee8477aee6d25d33d4ae07bf527b SHA512 a9247714fd6f6e6dffff2e6b53b35a7831ced55f0706e7c883d6700f22b814dc2cf1e56e681214759c90386ff2c77cb4ace6d07cd0c8b6da0ed65444f9857056
|
||||
DIST sip-6.7.12.tar.gz 1169656 BLAKE2B 07ae682e783da5bc6fc3109c62c7bff245faab795cc28f135758b1211fae1dfae79668e7e7c0de8b3bae5c8b10534d153cdd47969b34149c8f5598867d19f17c SHA512 885c32a051e882b82b59bf1365050933f8fc1c619b19f4bc03235edc5741a5e14aae8edf90479ad0283f74ba5c5233a2589c151ec865b130199a6db9800a2294
|
||||
DIST sip-6.8.0.dev2310230931.tar.gz 1126109 BLAKE2B 53efdb9722888645b9772c6080f34459b89c745a02cfb9842f7924870afa81d4ba06ec6ac730ee1d254f5252c1c495a4b4dfd51157d759d7334d2980145214f8 SHA512 8bac33c9ae87dc11669837e2b07d5016a7e16e743439dbf763c13a118476431058d2a6c4b0c29e4ce7a7f5f86602bb1c9f27ccf0d3f6c1a298b06256f820ceaa
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Python bindings generator for C/C++ libraries"
|
||||
HOMEPAGE="
|
||||
https://www.riverbankcomputing.com/software/sip/
|
||||
https://pypi.org/project/sip/
|
||||
"
|
||||
|
||||
LICENSE="|| ( GPL-2 GPL-3 SIP )"
|
||||
SLOT="5"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
dev-python/ply[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/tomli[${PYTHON_USEDEP}]
|
||||
' 3.10)
|
||||
"
|
||||
|
||||
distutils_enable_sphinx doc --no-autodoc
|
@ -0,0 +1,36 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 pypi optfeature
|
||||
|
||||
DESCRIPTION="An easily customizable SQL parser and transpiler"
|
||||
HOMEPAGE="
|
||||
https://sqlglot.com/
|
||||
https://github.com/tobymao/sqlglot/
|
||||
https://pypi.org/project/sqlglot/
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
EPYTEST_IGNORE=(
|
||||
# Tests require pyspark or duckdb which aren't in the tree.
|
||||
# Pandas would be a requirement normally, but it gets ignored by proxy.
|
||||
"tests/dataframe/integration/test_dataframe.py"
|
||||
"tests/dataframe/integration/test_grouped_data.py"
|
||||
"tests/dataframe/integration/test_session.py"
|
||||
"tests/test_executor.py"
|
||||
"tests/test_optimizer.py"
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "simplifying timedelta expressions" dev-python/python-dateutil
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST trove-classifiers-2023.10.18.tar.gz 15862 BLAKE2B 9d634e0b9674c1b9e249999c1722217fae5ca9d8aec348706859a73f599b62a003d5ff3344e361930b9182bcf4153bd5fb40ee93a53e50b1df0430b1fec4bb7c SHA512 6f8449411b8fc82ed798901701a72f3051bb46c189ee95276dcb77a2ee9b26a61c4304b03be20f7e2bc6dc5f8db1021bf02575cadd021fe43f96fd73540bae99
|
||||
DIST trove-classifiers-2023.11.7.tar.gz 15869 BLAKE2B 5c1229b7684699d560a12030cbd6be2de699d2c91902bde2f2144bd3a7718fd610596ea473a8a5a2be0f31296bb5b410a778455e3feccc5b11ac87b98f79ef38 SHA512 445a1e3482ff970a219b6323de8ab8547cb78adf5bc17db3c8cc242e5a12dc9ea93fa241da161139724f751b49f7ff80f579612d7b61a5868422e80db6c87d17
|
||||
DIST trove-classifiers-2023.11.9.tar.gz 15893 BLAKE2B 10bdefc15abdb14e9dbfb2b8181b1f5478d1498c5168266cbaa0f4b6c7d9a7c42cf31f2c8cddfd3f9c63047f6c64b1429bc62c710b522acb05485f9ec8d8fcf7 SHA512 c7d3f7ebe06a1f8b0d7d7d7abe5d00f29fdab35e4577c726f2a3e279e0863c43cc0ceaa29b46bf2856becbead5a2468fc80f0200f199f9821e3336356425e693
|
||||
|
@ -0,0 +1,31 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
PYTHON_COMPAT=( pypy3 python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Canonical source for classifiers on PyPI (pypi.org)"
|
||||
HOMEPAGE="
|
||||
https://github.com/pypa/trove-classifiers/
|
||||
https://pypi.org/project/trove-classifiers/
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
|
||||
BDEPEND="
|
||||
dev-python/calver[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
epytest
|
||||
"${EPYTHON}" -m tests.lib || die
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST wrapt-1.15.0.gh.tar.gz 137402 BLAKE2B 8c4764251a89f7795fef71dd71d9c36611d896d2e2791a5e7ce4f665f7b477e683f21aa05251a6ceb96644221a7ff9b01dfe98a7f4d278987dedc17ead39b343 SHA512 6be3fc6380e6bb11a26e35fb093ca54d2e851ab384682f6b1201599980c0429c1e2f23089540b66dd80985baaaf3fb93ce29034758e062e2cfb2f52e3b362779
|
||||
DIST wrapt-1.16.0.gh.tar.gz 138520 BLAKE2B 6317f2fa58aaa017b510f60fb20e8b3bc4721977806f4b8e7a3f316bfa4da2a8d24156f8ab670d96f5bab6fcc29437d5d18c28ce91618f5a7093cc85d6c5b578 SHA512 65bdda3b6580748ceb720e8fc1a6b05832a355d541aa650bc87052f3aa8793d03d29a080b79eceb16392e297aed8f11a283e36f5f40a0db614b409b1dc2b6c9c
|
||||
DIST wrapt-1.16.0rc2.gh.tar.gz 138531 BLAKE2B fc6c573a80ab5a5f82b3e0dc60ecce34642361982b00d4066d84eb186cc2dc2542769205674f74370aff98b252acb65e7013f181c75da3e7389d3bdfe1ff6971 SHA512 f6b6a2a34c6f5c285e08411b2fca2464e21028776595e821e09cfc45da9519b88911fa74d47952de365a7625322672d025fd66be1393238ff776dd6b84cd8aa2
|
||||
|
@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2023 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..12} pypy3 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_P=${P/_}
|
||||
DESCRIPTION="Module for decorators, wrappers and monkey patching"
|
||||
HOMEPAGE="
|
||||
https://github.com/GrahamDumpleton/wrapt/
|
||||
https://pypi.org/project/wrapt/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/GrahamDumpleton/wrapt/archive/${PV/_}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="+native-extensions"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
distutils_enable_sphinx docs dev-python/sphinx-rtd-theme
|
||||
|
||||
python_compile() {
|
||||
local -x WRAPT_INSTALL_EXTENSIONS=$(usex native-extensions true false)
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
epytest
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=poetry
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)"
|
||||
HOMEPAGE="
|
||||
https://github.com/python-zeroconf/python-zeroconf/
|
||||
https://pypi.org/project/zeroconf/
|
||||
"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/ifaddr-0.1.7[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/async-timeout-3.0.0[${PYTHON_USEDEP}]
|
||||
' 3.10)
|
||||
"
|
||||
# the build system uses custom build script that uses distutils to build
|
||||
# C extensions, sigh
|
||||
BDEPEND="
|
||||
>=dev-python/cython-3[${PYTHON_USEDEP}]
|
||||
>=dev-python/setuptools-65.6.3[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
export REQUIRE_CYTHON=1
|
||||
|
||||
python_test() {
|
||||
local -x SKIP_IPV6=1
|
||||
local EPYTEST_DESELECT=(
|
||||
# network
|
||||
tests/test_core.py::Framework::test_close_multiple_times
|
||||
tests/test_core.py::Framework::test_launch_and_close
|
||||
tests/test_core.py::Framework::test_launch_and_close_context_manager
|
||||
|
||||
# fragile to timeouts (?)
|
||||
tests/services/test_browser.py::test_service_browser_expire_callbacks
|
||||
tests/utils/test_asyncio.py::test_run_coro_with_timeout
|
||||
)
|
||||
|
||||
epytest -o addopts=
|
||||
}
|
Binary file not shown.
@ -1,4 +1,2 @@
|
||||
DIST yard-0.9.28-git.tgz 932436 BLAKE2B 7340f6815698ddb85aa16752266af75ecd3e1f1a5f328e147dd8ea01a750c48259e6f3413bb5d00777d4e983b340b36b21110e058cf6b326973c0a7c3d756836 SHA512 f57ce1f63ab1763729c85121cf1ac5927d4f7c53eed2fb58b1ea7d700db22481e767926845558d3db31bcef50d0181f0b6cf449e558a5548243256cdda0cd355
|
||||
DIST yard-0.9.29-git.tgz 937893 BLAKE2B ccba7682aa071b6be570d0a47558107469ca2200fa2c83e93744e840e270c71d7b3fb31e9d51ddc72ede34daa741f2135e2950afd1927643e9129d0879e8f18e SHA512 fba71ae8d205595ce320143c962e9ce5ad496c158067412b20ddbfd7b5f30ed1eb3185a12997108847553ca65709bbbfb7c00e71cc6d46616e2e488bba22c2f0
|
||||
DIST yard-0.9.32-git.tgz 937946 BLAKE2B 757a4a4ab04fc88c4d0be06a33e56ffe04140e59655e91054f3222aba5a495c65692efa58289f7c6519ca78309c6cce53d9cdeb8ba5e3cd79b7da62b1056eebc SHA512 9cb8752cf079c185936b6d201f9118f40723ad3237aeac6eade163cfbfa8caa7725f8feec00f76c36fd4f92fa37c140a727b07ec852cdb4211cc854ff22adddb
|
||||
DIST yard-0.9.34-git.tgz 938057 BLAKE2B 0e5b96b29efc6b7ab6c52dc34a15d4df9b614eb56698eb76fc7d2dc1f1fcfa5f8883034697f5a3fbd76ff588a9ebf2c7ee164936809bfe4640663c996e9f648a SHA512 fb87e3706d2c1408a172e17cdb588aacb2c67b9e7ac8c9b2d2a4d2e8a67a0c571d05938f8a4a88357834f6dac13a38cf1faa086680d58380a65cc2fca93aad8f
|
||||
|
@ -0,0 +1,38 @@
|
||||
From 8481180b935922f76a36e29e83914ee6fad782cd Mon Sep 17 00:00:00 2001
|
||||
From: Brad Feehan <git@bradfeehan.com>
|
||||
Date: Tue, 21 Jun 2022 17:05:20 +1000
|
||||
Subject: [PATCH] Fix "cannot get the first element of beginless range" error
|
||||
|
||||
This implements the fix suggested by @akimd:
|
||||
|
||||
See https://github.com/lsegal/yard/issues/1434#issuecomment-1087817139
|
||||
|
||||
Fixes lsegal/yard#1434.
|
||||
---
|
||||
lib/yard/parser/ruby/ast_node.rb | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/yard/parser/ruby/ast_node.rb b/lib/yard/parser/ruby/ast_node.rb
|
||||
index c9deb3ed1..d10bdfa3a 100644
|
||||
--- a/lib/yard/parser/ruby/ast_node.rb
|
||||
+++ b/lib/yard/parser/ruby/ast_node.rb
|
||||
@@ -271,7 +271,7 @@ def has_line?
|
||||
|
||||
# @return [Fixnum] the starting line number of the node
|
||||
def line
|
||||
- line_range && line_range.first
|
||||
+ line_range && line_range.begin || 1
|
||||
end
|
||||
|
||||
# @return [String] the first line of source represented by the node.
|
||||
@@ -345,8 +345,8 @@ def reset_line_info
|
||||
elsif !children.empty?
|
||||
f = children.first
|
||||
l = children.last
|
||||
- self.line_range = Range.new(f.line_range.first, l.line_range.last)
|
||||
- self.source_range = Range.new(f.source_range.first, l.source_range.last)
|
||||
+ self.line_range = Range.new(f.line_range.begin || 1, l.line_range.last)
|
||||
+ self.source_range = Range.new(f.source_range.begin || 1, l.source_range.last)
|
||||
elsif @fallback_line || @fallback_source
|
||||
self.line_range = @fallback_line
|
||||
self.source_range = @fallback_source
|
@ -1,68 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
USE_RUBY="ruby27 ruby30 ruby31 ruby32"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
RUBY_FAKEGEM_TASK_DOC="yard"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md"
|
||||
RUBY_FAKEGEM_DOCDIR="doc docs"
|
||||
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="templates"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="yard.gemspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Documentation generation tool for the Ruby programming language"
|
||||
HOMEPAGE="https://yardoc.org/"
|
||||
|
||||
# The gem lacks the gemspec file needed to pass tests.
|
||||
SRC_URI="https://github.com/lsegal/yard/archive/v${PV}.tar.gz -> ${P}-git.tgz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_bdepend "doc? ( || ( dev-ruby/maruku dev-ruby/rdiscount dev-ruby/kramdown ) )"
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/rack:2.2 >=dev-ruby/rspec-3.11.0 )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/[Bb]undler/ s:^:#:' -e '3igem "rack", "~> 2.2.0"' spec/spec_helper.rb || die
|
||||
|
||||
sed -i -e '/samus/I s:^:#:' Rakefile || die
|
||||
|
||||
sed -i -e 's/git ls-files/find/' ${RUBY_FAKEGEM_GEMSPEC} || die
|
||||
|
||||
# Avoid specs that make assumptions on load ordering that are not
|
||||
# true for us. This may be related to how we install in Gentoo. This
|
||||
# also drops a test requirement on dev-ruby/rack.
|
||||
rm -f spec/cli/server_spec.rb || die
|
||||
|
||||
# Avoid specs that only work with bundler
|
||||
sed -i -e '/#initialize/,/^ end/ s:^:#:' spec/cli/yri_spec.rb || die
|
||||
sed -e '/overwrites options with data in/askip "wrong assumptions on file access"' \
|
||||
-e '/loads any gem plugins starting with/askip "wrong assumptions on file access"' \
|
||||
-i spec/config_spec.rb || die
|
||||
|
||||
# Avoid specs making assumptions about how rubygems works internally
|
||||
sed -i -e '/searches for .gem file/askip "rubygems internals"' spec/cli/diff_spec.rb || die
|
||||
|
||||
# Fix broken spec
|
||||
sed -i -e '/:exist?/aallow(File).to receive(:exist?).and_call_original' spec/i18n/locale_spec.rb || die
|
||||
|
||||
# Avoid ruby31 failure on whitespace-only differences
|
||||
sed -i -e '/shows a list of nodes/askip "Whitespace differences on ruby31"' spec/parser/ruby/ast_node_spec.rb || die
|
||||
|
||||
# Avoid redcarpet-specific spec that is not optional
|
||||
sed -i -e '/autolinks URLs/askip "make redcarpet optional"' spec/templates/helpers/html_helper_spec.rb || die
|
||||
|
||||
# Avoid asciidoc-specific spec that is not optional
|
||||
sed -e '/\(AsciiDoc specific\|AsciiDoc header\)/askip "skipping asciidoc test"' \
|
||||
-i spec/templates/helpers/html_helper_spec.rb || die
|
||||
}
|
Binary file not shown.
@ -1 +1 @@
|
||||
DIST idea-community-2023.2.4.tar.gz 974143871 BLAKE2B c47c931d66ddcf248c8e7c080bed0d762eaa172b89b775006888d4c9c7bfda3bacaa0fbe0c3d1d9f323904fb02834dd93f1856bd7ed2b41aaa67cdf4ac851578 SHA512 45f02cb97f66ad688d8265e19dbb410c1641bc222b4677f142adba33c202e1f271fc2fdea2394569cb749086d91e783405c1ac166128e0e63c8e554801fbc64d
|
||||
DIST idea-community-2023.2.5.tar.gz 974169852 BLAKE2B b13a2ca658a9fdcc8004e297cd3e715c0ff3637bb6041f59495e6a8925ce36a234585e1939dc6d4392e0d163903872525d2132b9ddd121de36414cda3e647a3f SHA512 b885bd6f8dd3479817ca6f9fd3da6d3932e4d425acaa27ac19ca4fd64d3373b8f77d91b0d8df2312026cd6ba61b036fd664583fcaea947d7a9048aaf308465e3
|
||||
|
@ -0,0 +1 @@
|
||||
DIST mesa-23.3.0-rc3.tar.xz 19192936 BLAKE2B a54ac02b99bf00e4dae34938fd37d5314ae0fd9dee4b2f8928119bcc5a6b4e00add8ad61da3569b9993b37014433fb38a66d945e77184d86aaf0cd79e8afb42b SHA512 be70ce2ba0051685e9585944dcfc8c66d33f68827781d6d003a98b4409bd9e28d00eef730e0eded5c1c14a600219411753c14c7e5e34190bbe8b65b5bf28fabd
|
@ -0,0 +1,114 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
|
||||
inherit llvm meson python-any-r1
|
||||
|
||||
MY_PV="${PV/_/-}"
|
||||
|
||||
DESCRIPTION="intel_clc tool used for building OpenCL C to SPIR-V"
|
||||
HOMEPAGE="https://mesa3d.org/"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
S="${WORKDIR}/intel_clc-${MY_PV}"
|
||||
EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
|
||||
inherit git-r3
|
||||
else
|
||||
S="${WORKDIR}/mesa-${MY_PV}"
|
||||
SRC_URI="https://archive.mesa3d.org/mesa-${MY_PV}.tar.xz"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
LICENSE="MIT SGI-B-2.0"
|
||||
SLOT="0"
|
||||
IUSE="debug"
|
||||
|
||||
RDEPEND="
|
||||
dev-util/spirv-tools
|
||||
>=sys-libs/zlib-1.2.8:=
|
||||
x11-libs/libdrm
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-libs/expat
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
|
||||
# we need to *really* make sure we're not pulling one than more slot
|
||||
# simultaneously.
|
||||
#
|
||||
# How to use it:
|
||||
# 1. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
|
||||
# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
|
||||
LLVM_MAX_SLOT="16"
|
||||
LLVM_MIN_SLOT="15"
|
||||
PER_SLOT_DEPSTR="
|
||||
(
|
||||
dev-util/spirv-llvm-translator:@SLOT@
|
||||
sys-devel/clang:@SLOT@
|
||||
sys-devel/llvm:@SLOT@
|
||||
)
|
||||
"
|
||||
LLVM_DEPSTR="
|
||||
|| (
|
||||
$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
|
||||
echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
|
||||
done)
|
||||
)
|
||||
<sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=
|
||||
<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=
|
||||
"
|
||||
RDEPEND="${RDEPEND}
|
||||
${LLVM_DEPSTR}
|
||||
"
|
||||
unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
|
||||
|
||||
llvm_check_deps() {
|
||||
has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" &&
|
||||
has_version "sys-devel/clang:${LLVM_SLOT}" &&
|
||||
has_version "sys-devel/llvm:${LLVM_SLOT}"
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
llvm_pkg_setup
|
||||
python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
PKG_CONFIG_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/$(get_libdir)/pkgconfig"
|
||||
|
||||
local emesonargs=(
|
||||
-Dllvm=enabled
|
||||
-Dshared-llvm=enabled
|
||||
-Dintel-clc=enabled
|
||||
|
||||
-Dgallium-drivers=''
|
||||
-Dvulkan-drivers=''
|
||||
|
||||
# Set platforms empty to avoid the default "auto" setting. If
|
||||
# platforms is empty meson.build will add surfaceless.
|
||||
-Dplatforms=''
|
||||
|
||||
-Dglx=disabled
|
||||
-Dzstd=disabled
|
||||
|
||||
--buildtype $(usex debug debug plain)
|
||||
-Db_ndebug=$(usex debug false true)
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${BUILD_DIR}"/src/intel/compiler/intel_clc
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue