parent
9456b87cb8
commit
e9789f4929
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,71 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1 multiprocessing
|
||||
|
||||
MY_P=aws-cli-${PV}
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="
|
||||
https://github.com/aws/aws-cli/
|
||||
https://pypi.org/project/awscli/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/aws/aws-cli/archive/${PV}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
# botocore is x.(y+2).z
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 2)).$(ver_cut 3-)"
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
|
||||
dev-python/colorama[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pytest-forked[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# do not rely on bundled deps in botocore (sic!)
|
||||
find -name '*.py' -exec sed -i \
|
||||
-e 's:from botocore[.]vendored import:import:' \
|
||||
-e 's:from botocore[.]vendored[.]:from :' \
|
||||
{} + || die
|
||||
# strip overzealous upper bounds on requirements
|
||||
sed -i -e 's:,<[0-9.]*::' -e 's:==:>=:' setup.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# integration tests require AWS credentials and Internet access
|
||||
epytest tests/{functional,unit} -n "$(makeopts_jobs)" --forked
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp bin/aws_bash_completer aws
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins bin/aws_zsh_completer.sh _aws
|
||||
|
||||
distutils-r1_python_install_all
|
||||
|
||||
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||
}
|
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST tarlz-0.21.tar.lz 104780 BLAKE2B c3aacda3e8ab25757758d811d9cdc153777835950436dbb4827cf75d801f6c3035475330512a2657a8c9733f6afdf452d9689d7d72d11ba8ef968fceab671ed4 SHA512 1ad671da7ee115762163af57aad69ec754753e68a99ef8c4f38e880ecbb75a5b021f38794390eabcdbef4963cbc0c0e2abe36011da4135baf2c21dc22f020f4a
|
||||
DIST tarlz-0.22.tar.lz 105724 BLAKE2B 7921f7085d63f553f745cf8b7fee43ece32346a0804e41227806efae0ab338c48ee1830a8b087f03000a27fcf44338b3dba6d52d37f4de790d8b7bc5f0234ade SHA512 4e241ea0571e421c93fbeeb54a20e73fd4a7e9c85dc3b24295caec1a52e156cdcf5e85f4ee41f5dfae712b851d17fe0e96955380bb86306d8002f4187d0c60ec
|
||||
|
@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs unpacker
|
||||
|
||||
DESCRIPTION="A parallel archiver combining tar and lzip"
|
||||
HOMEPAGE="https://www.nongnu.org/lzip/tarlz.html"
|
||||
SRC_URI="https://download.savannah.gnu.org/releases/lzip/${PN}/${P}.tar.lz"
|
||||
LICENSE="GPL-2+"
|
||||
|
||||
SLOT="0"
|
||||
|
||||
KEYWORDS="amd64"
|
||||
|
||||
RDEPEND=">=app-arch/lzlib-1.12:0="
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="$(unpacker_src_uri_depends)"
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
CXX="$(tc-getCXX)" \
|
||||
CXXFLAGS="${CXXFLAGS}" \
|
||||
CPPFLAGS="${CPPFLAGS}" \
|
||||
LDFLAGS="${LDFLAGS}"
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST xarchiver-0.5.4.17.tar.gz 1077111 BLAKE2B f68f22258dbfaeb37333fab3d2ea1b06e23e143f90df6cd94f7601961636d1e5a929e1353ac956ac9a7341813593fcfb35d5197666dbb0920ddf63e4365f34e1 SHA512 5b19fd0fb90f99aee0ac2576bc4efce9ef4eef9119fc118815f6d925e3877c0895475fbdf7363d8adfb6371fb7fd73299ea3a7cb3b6d9fff19c89d1d287d3a84
|
||||
DIST xarchiver-0.5.4.18.tar.gz 1112838 BLAKE2B baeab65c9f81eecf070185fb3718b3e8a460e94393dfcdf38ad8bfb2a771c6f98a8638a28c43aa99d05a95772ca7e1546d9be1b602e22a715d5827350976f9d8 SHA512 a33236839d325a2d706fd0a9e2257ab5289895b030450b2060da856c047e5676ac5686312f8d00d3f38d329d0cf39fb22330a7c902b3ff5943856801435f6970
|
||||
|
@ -0,0 +1,62 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit xdg-utils
|
||||
|
||||
DESCRIPTION="A GTK+ archive manager that can be used with Thunar"
|
||||
HOMEPAGE="https://github.com/ib/xarchiver/"
|
||||
SRC_URI="https://github.com/ib/xarchiver/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc"
|
||||
|
||||
# older pigz versions have incompatible command-line processing
|
||||
# https://bugs.gentoo.org/661464
|
||||
DEPEND="
|
||||
>=dev-libs/glib-2:=
|
||||
x11-libs/gtk+:3=
|
||||
!!<app-arch/pigz-2.4[symlink]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
dev-util/intltool
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
app-text/docbook-xml-dtd
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
)
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
$(use_enable doc)
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
xdg_icon_cache_update
|
||||
|
||||
elog "You need external programs for some formats, including:"
|
||||
elog "7zip - app-arch/p7zip"
|
||||
elog "arj - app-arch/arj"
|
||||
elog "lha - app-arch/lha"
|
||||
elog "lzop - app-arch/lzop"
|
||||
elog "rar - app-arch/unrar app-arch/rar"
|
||||
elog "zip - app-arch/unzip app-arch/zip"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
xdg_icon_cache_update
|
||||
}
|
Binary file not shown.
@ -1 +1 @@
|
||||
DIST acme.sh-3.0.3.tar.gz 253111 BLAKE2B 43b97b033e5e16412e8a958966077ba6b26c49b17206cda5af848b7f9fbf8a8f8bc406b63a13f792dfa93ff7b0759da03a0f599c43f92d25587b582feb59a3cf SHA512 b26f20422a3b40d6c1acbdd52d41124962975313f4187cf918746ad9dc047600a92e529cd1e66ede5b456e253522920b574cb614f455dd73aac707a18f34ad35
|
||||
DIST acme.sh-3.0.4.tar.gz 253157 BLAKE2B b1bde1ca31ef34c264f5045dd36220b3fd04230c59f7e65a9623681377dbde161ed3b92d86bd3e6f5a115d8847b1c2019bf984194f2901b52eb65abefad8bf81 SHA512 919987ac026366d245fa2730edf1212deafb051129811f35b482a30af9b0034a802baa218a35048e030795127cfeae03b4c3d4f12e580cd82edbacdd72e588e7
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST commenter-0.5.2.tar.gz 2705 BLAKE2B 062b89892d4410b0964f8b540bac51574dab44ae5fdf42ef98b4286eb4183a82cd2c95bbcc7e3b04345351caf5feb4b31d50ee31bb6bd69f2f08d0ec0119deb1 SHA512 a2bdc675d39fedccc16b3cdde324a17588980bf66e899a8f58ed0e68d545ac955465bcad282dc4434a96baa340244f9b67e375c312a557dffafc20532dec4b51
|
@ -0,0 +1,20 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
NEED_EMACS=24.4
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Set both single and multi line comment variables in Emacs Lisp"
|
||||
HOMEPAGE="https://github.com/yuutayamada/commenter/"
|
||||
SRC_URI="https://github.com/yuutayamada/${PN}/archive/v${PV}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
|
||||
DOCS=( README.md )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
@ -0,0 +1 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/yuutayamada/commenter/issues/</bugs-to>
|
||||
<remote-id type="github">yuutayamada/commenter</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1 @@
|
||||
DIST ctable-0.1.3.tar.gz 237615 BLAKE2B fe80171389c5e7c96e0867e8464b28bba0901761415b4f06f608f6eb98d825de5a01e4e99cff0657017f0495aba13d51b78734844ea8650b811a8c8706882b1a SHA512 a5b20fd9fa573d6c24b052cc93c83f9012d5de5a097917dcea0f403c9570319a921967e895296d4f8d7a9bcc9d5f46f3c57ee9e6bea44398ac9ad820f8e766c0
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
H=04dbcddeba1da1f39e885bc0d36240ff37d829e9 # ctable.el == 0.1.3 without tag
|
||||
NEED_EMACS=24.3
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Table Component for Emacs Lisp"
|
||||
HOMEPAGE="https://github.com/kiwanami/emacs-ctable/"
|
||||
SRC_URI="https://github.com/kiwanami/emacs-${PN}/archive/${H}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/emacs-${PN}-${H}
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
|
||||
DOCS=( readme.md img samples )
|
||||
ELISP_REMOVE="test-${PN}.el" # tests are interactive and hang up?
|
||||
SITEFILE="50${PN}-gentoo.el"
|
@ -0,0 +1 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/kiwanami/emacs-ctable/issues/</bugs-to>
|
||||
<remote-id type="github">kiwanami/emacs-ctable</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1 @@
|
||||
DIST epc-0.1.1.tar.gz 158462 BLAKE2B afbaa496799ac698af885872ab3409ac0e7b27d1299c0450aec75cad6d213fc4efe5b6c2dc48a383b9b061c457accfea81dd821062a7027b781f005cba67e35e SHA512 c6c6e9c2f241ca275b807a387c4fb6916edb02c390d7bc350388d729e2214d7fe5addb7ea634bebc75aa09e510ab2d141ae6a197b328d1f506ee51660a5b8ddc
|
@ -0,0 +1,30 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="RPC stack for Emacs Lisp"
|
||||
HOMEPAGE="https://github.com/kiwanami/emacs-epc/"
|
||||
SRC_URI="https://github.com/kiwanami/emacs-epc/archive/${PV}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/emacs-${P}
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
app-emacs/ctable
|
||||
app-emacs/deferred
|
||||
"
|
||||
BDEPEND="${RDEPEND}"
|
||||
|
||||
DOCS=( readme.md demo img )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
src_test() {
|
||||
${EMACS} ${EMACSFLAGS} -L . -l epc.el -l epcs.el -l test-epc.el \
|
||||
-f ert-run-tests-batch-and-exit || die "tests failed"
|
||||
}
|
@ -0,0 +1 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/kiwanami/emacs-epc/issues/</bugs-to>
|
||||
<remote-id type="github">kiwanami/emacs-epc</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1 @@
|
||||
DIST flycheck-nimsuggest-0.8.1_p20171027.tar.gz 2651 BLAKE2B 22bb16b6498b5bbaaba9971875a31a58e47849f3a8a03f314c957a7e59e0b61c236eb7325de9cd2899d6d05deea953ac36d7cff1c7f78e5d7d3d0a6e9c2ce81a SHA512 fe84c88617195d8ec5010c5aa551e38edd78326919748b83e8e9a6257cf0d79da70f5f804e57cd343a749816c3c4be3ce1158fd6698bc8382cd92fce0b0e9def
|
@ -0,0 +1,4 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
||||
(autoload 'flycheck-nimsuggest-setup "flycheck-nimsuggest"
|
||||
"Setup flycheck configuration for nimsuggest.")
|
||||
(add-hook 'nimsuggest-mode-hook 'flycheck-nimsuggest-setup)
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
H=dc9a5de1cb3ee05db5794d824610959a1f603bc9
|
||||
NEED_EMACS=24.3
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Emacs Flycheck backend for Nim language using nimsuggest"
|
||||
HOMEPAGE="https://github.com/yuutayamada/flycheck-nimsuggest/"
|
||||
SRC_URI="https://github.com/yuutayamada/${PN}/archive/${H}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/${PN}-${H}
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
KEYWORDS="~amd64"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="app-emacs/flycheck"
|
||||
BDEPEND="${RDEPEND}"
|
||||
PDEPEND="app-emacs/nim-mode"
|
||||
|
||||
DOCS=( README.md )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/yuutayamada/flycheck-nimsuggest/issues/</bugs-to>
|
||||
<remote-id type="github">yuutayamada/flycheck-nimsuggest</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1 @@
|
||||
DIST haxe-mode-0.3.3.tar.gz 16146 BLAKE2B 17a74cb363cbd4483c1a99cd94fea89dd05f034bd53d339773cd61bd2e2151b58efdf64bef12fbe05709597e5f13c450e4b5a248a8fa0e12b4d8b3500909000a SHA512 14eb2cce5cb158f8d5bab0a948ce8b66ab8cfcf858cae828ec471bf67d95181b3044ad1f2e47c03b58d81ec505c5bb2c30611b612f080a4cf6ae98f3572c41fd
|
@ -0,0 +1,4 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
||||
(autoload 'haxe-mode "haxe-mode"
|
||||
"Major mode for editing Haxe code." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.hx\\'" . haxe-mode))
|
@ -0,0 +1,17 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Major mode for editing Haxe files"
|
||||
HOMEPAGE="https://github.com/emacsorphanage/haxe-mode/"
|
||||
SRC_URI="https://github.com/emacsorphanage/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
|
||||
DOCS=( README.md )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/emacsorphanage/haxe-mode/issues/</bugs-to>
|
||||
<remote-id type="github">emacsorphanage/haxe-mode</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1 @@
|
||||
DIST nim-mode-0.4.2_p20211102.tar.gz 77240 BLAKE2B 54e3acc5f4bbfe5b921a44b71a423aa2bed704ed08075c893d277eaa8922c96b08087abaef0e4999f6dd237041a06593d11bf09299b1e56edc985fbddb43d6ff SHA512 09385e9413832deb86bbe223301c99366a86e81c7ec43b2add559337184ee93ded1f6d1ed9018bcd25b870d60ff4d302c11d10b55d734ef3463432ceef186601
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/nim-lang/nim-mode/issues/</bugs-to>
|
||||
<remote-id type="github">nim-lang/nim-mode</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
H=744e076f0bea1c5ddc49f92397d9aa98ffa7eff8
|
||||
NEED_EMACS=24.4
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Emacs major mode for the Nim programming language support"
|
||||
HOMEPAGE="https://github.com/nim-lang/nim-mode/"
|
||||
SRC_URI="https://github.com/nim-lang/${PN}/archive/${H}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/${PN}-${H}
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
KEYWORDS="~amd64"
|
||||
SLOT="0"
|
||||
RESTRICT="test" # some test are broken
|
||||
|
||||
RDEPEND="
|
||||
app-emacs/commenter
|
||||
app-emacs/epc
|
||||
"
|
||||
BDEPEND="${RDEPEND}"
|
||||
PDEPEND="app-emacs/flycheck-nimsuggest"
|
||||
|
||||
DOCS=( README.md starterKit.nims )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST dxvk-1.10.1.tar.gz 1188138 BLAKE2B e4c5c5052de3f0976581317b9e6de148735198d2545e961ed4540be8660fbba0bcd30f81a1b55f032a1e00e226993d1ab3e4017b104f2829bf37d2ee4fc4420a SHA512 8fd34d9f14a7013cdc1957f63bf60feb19748fddc1cd6ec40cf271005f636de62965efb42ddf2598dad3e37a4f59a870bf769387b2534db93451d1ea6aa65410
|
@ -0,0 +1,120 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
inherit flag-o-matic meson-multilib
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/doitsujin/dxvk.git"
|
||||
else
|
||||
SRC_URI="https://github.com/doitsujin/dxvk/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine"
|
||||
HOMEPAGE="https://github.com/doitsujin/dxvk/"
|
||||
|
||||
LICENSE="ZLIB"
|
||||
SLOT="0"
|
||||
IUSE="+abi_x86_32 crossdev-mingw +d3d9 +d3d10 +d3d11 debug +dxgi"
|
||||
REQUIRED_USE="
|
||||
|| ( d3d9 d3d10 d3d11 dxgi )
|
||||
d3d10? ( d3d11 )
|
||||
dxgi? ( d3d11 )"
|
||||
|
||||
BDEPEND="
|
||||
dev-util/glslang
|
||||
!crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use crossdev-mingw; then
|
||||
local tool=-w64-mingw32-g++
|
||||
for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do
|
||||
if ! type -P ${tool} >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain."
|
||||
eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw"
|
||||
use abi_x86_32 && use abi_x86_64 &&
|
||||
eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains."
|
||||
die "USE=crossdev-mingw is set but ${tool} was not found"
|
||||
elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then
|
||||
eerror "${PN} requires GCC to be built with --enable-threads=posix"
|
||||
eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows"
|
||||
die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_dxvk.sh || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
|
||||
|
||||
# AVX has a history of causing issues with this package, disable for safety
|
||||
# https://github.com/Tk-Glitch/PKGBUILDS/issues/515
|
||||
append-flags -mno-avx
|
||||
|
||||
if [[ ${CHOST} != *-mingw* ]]; then
|
||||
unset AR CC CXX RC STRIP # likely unusable unless CHOST is mingw
|
||||
|
||||
CHOST_amd64=x86_64-w64-mingw32
|
||||
CHOST_x86=i686-w64-mingw32
|
||||
CHOST=$(usex x86 ${CHOST_x86} ${CHOST_amd64})
|
||||
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev,
|
||||
# unset again so meson eclass will set ${CHOST}-gcc + others
|
||||
use crossdev-mingw && unset AR CC CXX RC STRIP
|
||||
|
||||
local emesonargs=(
|
||||
--prefix="${EPREFIX}"/usr/lib/${PN}
|
||||
--{bin,lib}dir=x$((${ABI#x}==86?32:64))
|
||||
$(meson_use {,enable_}d3d9)
|
||||
$(meson_use {,enable_}d3d10)
|
||||
$(meson_use {,enable_}d3d11)
|
||||
$(meson_use {,enable_}dxgi)
|
||||
$(usev !debug --strip) # portage won't strip .dll, so allow it here
|
||||
-Denable_tests=false # needs wine/vulkan and is intended for manual use
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
dobin setup_dxvk.sh
|
||||
dodoc README.md dxvk.conf
|
||||
|
||||
find "${ED}" -type f -name '*.a' -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! ${REPLACING_VERSIONS} ]]; then
|
||||
elog "To enable ${PN} on a wine prefix, you can run the following command:"
|
||||
elog
|
||||
elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink"
|
||||
elog
|
||||
elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for details."
|
||||
fi
|
||||
|
||||
# don't try to keep wine-*[vulkan] in RDEPEND, but still give a warning
|
||||
local wine
|
||||
for wine in app-emulation/wine-{vanilla,staging}; do
|
||||
has_version ${wine} && ! has_version ${wine}[vulkan] &&
|
||||
ewarn "${wine} was not built with USE=vulkan, ${PN} will not be usable with it"
|
||||
done
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
inherit flag-o-matic meson-multilib
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/doitsujin/dxvk.git"
|
||||
else
|
||||
SRC_URI="https://github.com/doitsujin/dxvk/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine"
|
||||
HOMEPAGE="https://github.com/doitsujin/dxvk/"
|
||||
|
||||
LICENSE="ZLIB"
|
||||
SLOT="0"
|
||||
IUSE="+abi_x86_32 crossdev-mingw +d3d9 +d3d10 +d3d11 debug +dxgi"
|
||||
REQUIRED_USE="
|
||||
|| ( d3d9 d3d10 d3d11 dxgi )
|
||||
d3d10? ( d3d11 )
|
||||
dxgi? ( d3d11 )"
|
||||
|
||||
BDEPEND="
|
||||
dev-util/glslang
|
||||
!crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use crossdev-mingw; then
|
||||
local tool=-w64-mingw32-g++
|
||||
for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do
|
||||
if ! type -P ${tool} >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain."
|
||||
eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw"
|
||||
use abi_x86_32 && use abi_x86_64 &&
|
||||
eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains."
|
||||
die "USE=crossdev-mingw is set but ${tool} was not found"
|
||||
elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then
|
||||
eerror "${PN} requires GCC to be built with --enable-threads=posix"
|
||||
eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows"
|
||||
die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_dxvk.sh || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
|
||||
|
||||
# AVX has a history of causing issues with this package, disable for safety
|
||||
# https://github.com/Tk-Glitch/PKGBUILDS/issues/515
|
||||
append-flags -mno-avx
|
||||
|
||||
if [[ ${CHOST} != *-mingw* ]]; then
|
||||
unset AR CC CXX RC STRIP # likely unusable unless CHOST is mingw
|
||||
|
||||
CHOST_amd64=x86_64-w64-mingw32
|
||||
CHOST_x86=i686-w64-mingw32
|
||||
CHOST=$(usex x86 ${CHOST_x86} ${CHOST_amd64})
|
||||
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev,
|
||||
# unset again so meson eclass will set ${CHOST}-gcc + others
|
||||
use crossdev-mingw && unset AR CC CXX RC STRIP
|
||||
|
||||
local emesonargs=(
|
||||
--prefix="${EPREFIX}"/usr/lib/${PN}
|
||||
--{bin,lib}dir=x$((${ABI#x}==86?32:64))
|
||||
$(meson_use {,enable_}d3d9)
|
||||
$(meson_use {,enable_}d3d10)
|
||||
$(meson_use {,enable_}d3d11)
|
||||
$(meson_use {,enable_}dxgi)
|
||||
$(usev !debug --strip) # portage won't strip .dll, so allow it here
|
||||
-Denable_tests=false # needs wine/vulkan and is intended for manual use
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
dobin setup_dxvk.sh
|
||||
dodoc README.md dxvk.conf
|
||||
|
||||
find "${ED}" -type f -name '*.a' -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! ${REPLACING_VERSIONS} ]]; then
|
||||
elog "To enable ${PN} on a wine prefix, you can run the following command:"
|
||||
elog
|
||||
elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink"
|
||||
elog
|
||||
elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for details."
|
||||
fi
|
||||
|
||||
# don't try to keep wine-*[vulkan] in RDEPEND, but still give a warning
|
||||
local wine
|
||||
for wine in app-emulation/wine-{vanilla,staging}; do
|
||||
has_version ${wine} && ! has_version ${wine}[vulkan] &&
|
||||
ewarn "${wine} was not built with USE=vulkan, ${PN} will not be usable with it"
|
||||
done
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ionen@gentoo.org</email>
|
||||
<name>Ionen Wolkens</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="crossdev-mingw">
|
||||
Use <pkg>sys-devel/crossdev</pkg> for the toolchain rather than
|
||||
<pkg>dev-util/mingw64-toolchain</pkg> (requires manual setting up)
|
||||
</flag>
|
||||
<flag name="d3d9">Enable support for DirectX 9 (d3d9.dll)</flag>
|
||||
<flag name="d3d10">Enable support for DirectX 10 (d3d10.dll)</flag>
|
||||
<flag name="d3d11">Enable support for DirectX 11 (d3d11.dll)</flag>
|
||||
<flag name="dxgi">Enable support for the DirectX Graphics Infrastructure (dxgi.dll)</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">doitsujin/dxvk</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -1,506 +0,0 @@
|
||||
# Copyright 2021-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
adler-1.0.2
|
||||
adler32-1.2.0
|
||||
ahash-0.7.6
|
||||
aho-corasick-0.7.18
|
||||
alsa-0.6.0
|
||||
alsa-sys-0.3.1
|
||||
ansi_term-0.12.1
|
||||
approx-0.5.1
|
||||
arrayvec-0.5.2
|
||||
arrayvec-0.7.2
|
||||
ash-0.34.0+1.2.203
|
||||
async-channel-1.6.1
|
||||
atk-sys-0.15.1
|
||||
atty-0.2.14
|
||||
autocfg-1.1.0
|
||||
base64-0.13.0
|
||||
bindgen-0.56.0
|
||||
bit-set-0.5.2
|
||||
bit-vec-0.6.3
|
||||
bit_field-0.10.1
|
||||
bitflags-1.3.2
|
||||
bitflags_serde_shim-0.2.2
|
||||
bitstream-io-1.3.0
|
||||
bitvec-0.19.6
|
||||
block-0.1.6
|
||||
block-buffer-0.10.2
|
||||
bstr-0.2.17
|
||||
build_const-0.2.2
|
||||
bumpalo-3.9.1
|
||||
bytemuck-1.9.1
|
||||
bytemuck_derive-1.1.0
|
||||
byteorder-1.4.3
|
||||
bytes-1.1.0
|
||||
cache-padded-1.2.0
|
||||
cairo-sys-rs-0.15.1
|
||||
calloop-0.9.3
|
||||
castaway-0.1.2
|
||||
cc-1.0.73
|
||||
cesu8-1.1.0
|
||||
cexpr-0.4.0
|
||||
cfg-expr-0.10.2
|
||||
cfg-if-0.1.10
|
||||
cfg-if-1.0.0
|
||||
cfg_aliases-0.1.1
|
||||
chrono-0.4.19
|
||||
clang-sys-1.3.1
|
||||
clap-3.1.8
|
||||
clap_derive-3.1.7
|
||||
clipboard-0.5.0
|
||||
clipboard-win-2.2.0
|
||||
cocoa-0.24.0
|
||||
cocoa-foundation-0.1.0
|
||||
codespan-reporting-0.11.1
|
||||
color_quant-1.1.0
|
||||
combine-4.6.3
|
||||
concurrent-queue-1.2.2
|
||||
console-0.15.0
|
||||
console_error_panic_hook-0.1.7
|
||||
console_log-0.2.0
|
||||
cookie-factory-0.3.2
|
||||
copyless-0.1.5
|
||||
core-foundation-0.7.0
|
||||
core-foundation-0.9.3
|
||||
core-foundation-sys-0.7.0
|
||||
core-foundation-sys-0.8.3
|
||||
core-graphics-0.19.2
|
||||
core-graphics-0.22.3
|
||||
core-graphics-types-0.1.1
|
||||
core-video-sys-0.1.4
|
||||
coreaudio-rs-0.10.0
|
||||
coreaudio-sys-0.2.9
|
||||
cpal-0.13.5
|
||||
cpufeatures-0.2.1
|
||||
crc-1.8.1
|
||||
crc32fast-1.3.2
|
||||
crossbeam-channel-0.5.4
|
||||
crossbeam-deque-0.8.1
|
||||
crossbeam-epoch-0.9.8
|
||||
crossbeam-utils-0.8.8
|
||||
crypto-common-0.1.3
|
||||
csv-1.1.6
|
||||
csv-core-0.1.10
|
||||
ctor-0.1.21
|
||||
cty-0.2.2
|
||||
curl-0.4.43
|
||||
curl-sys-0.4.53+curl-7.82.0
|
||||
d3d12-0.4.1
|
||||
darling-0.13.1
|
||||
darling_core-0.13.1
|
||||
darling_macro-0.13.1
|
||||
deflate-1.0.0
|
||||
derive-try-from-primitive-1.0.0
|
||||
diff-0.1.12
|
||||
digest-0.10.3
|
||||
dirs-4.0.0
|
||||
dirs-sys-0.3.6
|
||||
dispatch-0.2.0
|
||||
dlib-0.5.0
|
||||
downcast-rs-1.2.0
|
||||
either-1.6.1
|
||||
embed-resource-1.7.2
|
||||
encode_unicode-0.3.6
|
||||
encoding_rs-0.8.31
|
||||
enum-map-2.1.0
|
||||
enum-map-derive-0.8.0
|
||||
enumset-1.0.8
|
||||
enumset_derive-0.5.5
|
||||
env_logger-0.9.0
|
||||
euclid-0.22.6
|
||||
event-listener-2.5.2
|
||||
exr-1.4.1
|
||||
fastrand-1.7.0
|
||||
flate2-1.0.23
|
||||
float_next_after-0.1.5
|
||||
flume-0.10.12
|
||||
fnv-1.0.7
|
||||
foreign-types-0.3.2
|
||||
foreign-types-shared-0.1.1
|
||||
form_urlencoded-1.0.1
|
||||
funty-1.1.0
|
||||
futures-0.3.21
|
||||
futures-channel-0.3.21
|
||||
futures-core-0.3.21
|
||||
futures-executor-0.3.21
|
||||
futures-io-0.3.21
|
||||
futures-lite-1.12.0
|
||||
futures-macro-0.3.21
|
||||
futures-sink-0.3.21
|
||||
futures-task-0.3.21
|
||||
futures-util-0.3.21
|
||||
fxhash-0.2.1
|
||||
gdk-pixbuf-sys-0.15.1
|
||||
gdk-sys-0.15.1
|
||||
generational-arena-0.2.8
|
||||
generic-array-0.14.5
|
||||
getrandom-0.2.6
|
||||
gif-0.11.3
|
||||
gio-sys-0.15.7
|
||||
glib-sys-0.15.7
|
||||
glob-0.3.0
|
||||
glow-0.11.2
|
||||
gobject-sys-0.15.9
|
||||
gpu-alloc-0.5.3
|
||||
gpu-alloc-types-0.2.0
|
||||
gpu-descriptor-0.2.2
|
||||
gpu-descriptor-types-0.1.1
|
||||
gtk-sys-0.15.3
|
||||
half-1.8.2
|
||||
hashbrown-0.11.2
|
||||
hashbrown-0.9.1
|
||||
heck-0.4.0
|
||||
hermit-abi-0.1.19
|
||||
hexf-parse-0.2.1
|
||||
http-0.2.6
|
||||
humantime-2.1.0
|
||||
ident_case-1.0.1
|
||||
idna-0.2.3
|
||||
image-0.24.1
|
||||
indexmap-1.6.2
|
||||
indicatif-0.16.2
|
||||
inflate-0.4.5
|
||||
inplace_it-0.3.3
|
||||
instant-0.1.12
|
||||
isahc-1.7.0
|
||||
itoa-0.4.8
|
||||
itoa-1.0.1
|
||||
jni-0.19.0
|
||||
jni-sys-0.3.0
|
||||
jobserver-0.1.24
|
||||
jpeg-decoder-0.1.22
|
||||
jpeg-decoder-0.2.4
|
||||
js-sys-0.3.57
|
||||
khronos-egl-4.1.0
|
||||
lazy_static-1.4.0
|
||||
lazycell-1.3.0
|
||||
lebe-0.5.1
|
||||
lexical-core-0.7.6
|
||||
libc-0.2.120
|
||||
libflate-1.2.0
|
||||
libflate_lz77-1.1.0
|
||||
libloading-0.7.3
|
||||
libnghttp2-sys-0.1.7+1.45.0
|
||||
libz-sys-1.1.5
|
||||
lock_api-0.4.6
|
||||
log-0.4.16
|
||||
lyon-0.17.10
|
||||
lyon_algorithms-0.17.7
|
||||
lyon_geom-0.17.6
|
||||
lyon_path-0.17.7
|
||||
lyon_tessellation-0.17.10
|
||||
lzma-rs-0.2.0
|
||||
mach-0.3.2
|
||||
malloc_buf-0.0.6
|
||||
matches-0.1.9
|
||||
memchr-2.4.1
|
||||
memmap2-0.3.1
|
||||
memoffset-0.6.5
|
||||
metal-0.23.1
|
||||
mime-0.3.16
|
||||
minimal-lexical-0.2.1
|
||||
minimp3-0.5.1
|
||||
minimp3-sys-0.3.2
|
||||
miniz_oxide-0.5.1
|
||||
mio-0.8.1
|
||||
miow-0.3.7
|
||||
naga-0.8.5
|
||||
nanorand-0.7.0
|
||||
ndk-0.5.0
|
||||
ndk-0.6.0
|
||||
ndk-context-0.1.0
|
||||
ndk-glue-0.5.1
|
||||
ndk-glue-0.6.1
|
||||
ndk-macro-0.3.0
|
||||
ndk-sys-0.2.2
|
||||
ndk-sys-0.3.0
|
||||
nix-0.22.3
|
||||
nix-0.23.1
|
||||
nom-5.1.2
|
||||
nom-6.1.2
|
||||
nom-7.1.1
|
||||
ntapi-0.3.7
|
||||
num-complex-0.4.0
|
||||
num-derive-0.3.3
|
||||
num-integer-0.1.44
|
||||
num-iter-0.1.42
|
||||
num-rational-0.4.0
|
||||
num-traits-0.2.14
|
||||
num_cpus-1.13.1
|
||||
num_enum-0.5.7
|
||||
num_enum_derive-0.5.7
|
||||
number_prefix-0.4.0
|
||||
objc-0.2.7
|
||||
objc-foundation-0.1.1
|
||||
objc_exception-0.1.2
|
||||
objc_id-0.1.1
|
||||
oboe-0.4.5
|
||||
oboe-sys-0.4.5
|
||||
once_cell-1.10.0
|
||||
openssl-probe-0.1.5
|
||||
openssl-sys-0.9.72
|
||||
os_str_bytes-6.0.0
|
||||
output_vt100-0.1.3
|
||||
pango-sys-0.15.1
|
||||
parking-2.0.0
|
||||
parking_lot-0.11.2
|
||||
parking_lot_core-0.8.5
|
||||
path-slash-0.1.4
|
||||
peeking_take_while-0.1.2
|
||||
percent-encoding-2.1.0
|
||||
pin-project-1.0.10
|
||||
pin-project-internal-1.0.10
|
||||
pin-project-lite-0.2.8
|
||||
pin-utils-0.1.0
|
||||
pkg-config-0.3.24
|
||||
png-0.17.5
|
||||
polling-2.2.0
|
||||
ppv-lite86-0.2.16
|
||||
pretty_assertions-1.2.1
|
||||
primal-check-0.3.1
|
||||
proc-macro-crate-1.1.3
|
||||
proc-macro-error-1.0.4
|
||||
proc-macro-error-attr-1.0.4
|
||||
proc-macro2-1.0.36
|
||||
profiling-1.0.5
|
||||
quote-1.0.18
|
||||
radium-0.5.3
|
||||
rand-0.8.5
|
||||
rand_chacha-0.3.1
|
||||
rand_core-0.6.3
|
||||
range-alloc-0.1.2
|
||||
raw-window-handle-0.4.2
|
||||
rayon-1.5.1
|
||||
rayon-core-1.9.1
|
||||
redox_syscall-0.2.11
|
||||
redox_users-0.4.0
|
||||
regex-1.5.5
|
||||
regex-automata-0.1.10
|
||||
regex-syntax-0.6.25
|
||||
regress-0.4.1
|
||||
renderdoc-sys-0.7.1
|
||||
rfd-0.8.1
|
||||
rle-decode-fast-1.0.3
|
||||
ron-0.7.0
|
||||
rustc-hash-1.1.0
|
||||
rustc_version-0.4.0
|
||||
rustdct-0.7.0
|
||||
rustfft-6.0.1
|
||||
ryu-1.0.9
|
||||
safe_arch-0.6.0
|
||||
same-file-1.0.6
|
||||
schannel-0.1.19
|
||||
scoped-tls-1.0.0
|
||||
scoped_threadpool-0.1.9
|
||||
scopeguard-1.1.0
|
||||
semver-1.0.6
|
||||
serde-1.0.136
|
||||
serde_derive-1.0.136
|
||||
serde_json-1.0.79
|
||||
sha2-0.10.2
|
||||
shlex-0.1.1
|
||||
sid-0.6.1
|
||||
slab-0.4.5
|
||||
slice-deque-0.3.0
|
||||
slotmap-1.0.6
|
||||
sluice-0.5.5
|
||||
smallvec-1.8.0
|
||||
smithay-client-toolkit-0.15.3
|
||||
socket2-0.4.4
|
||||
spin-0.9.2
|
||||
spirv-0.2.0+1.5.4
|
||||
static_assertions-1.1.0
|
||||
stdweb-0.1.3
|
||||
strength_reduce-0.2.3
|
||||
strsim-0.10.0
|
||||
svg-0.10.0
|
||||
symphonia-0.5.0
|
||||
symphonia-bundle-mp3-0.5.0
|
||||
symphonia-core-0.5.0
|
||||
symphonia-metadata-0.5.0
|
||||
syn-1.0.91
|
||||
synstructure-0.12.6
|
||||
system-deps-6.0.2
|
||||
tap-1.0.1
|
||||
termcolor-1.1.3
|
||||
terminal_size-0.1.17
|
||||
textwrap-0.15.0
|
||||
thiserror-1.0.30
|
||||
thiserror-impl-1.0.30
|
||||
threadpool-1.8.1
|
||||
tiff-0.7.1
|
||||
time-0.1.43
|
||||
tinyvec-1.5.1
|
||||
tinyvec_macros-0.1.0
|
||||
toml-0.5.8
|
||||
tracing-0.1.32
|
||||
tracing-attributes-0.1.20
|
||||
tracing-core-0.1.23
|
||||
tracing-futures-0.2.5
|
||||
transpose-0.2.1
|
||||
typenum-1.15.0
|
||||
unicode-bidi-0.3.7
|
||||
unicode-normalization-0.1.19
|
||||
unicode-width-0.1.9
|
||||
unicode-xid-0.2.2
|
||||
url-2.2.2
|
||||
vcpkg-0.2.15
|
||||
version-compare-0.1.0
|
||||
version_check-0.9.4
|
||||
vswhom-0.1.0
|
||||
vswhom-sys-0.1.1
|
||||
waker-fn-1.1.0
|
||||
walkdir-2.3.2
|
||||
wasi-0.10.2+wasi-snapshot-preview1
|
||||
wasi-0.11.0+wasi-snapshot-preview1
|
||||
wasm-bindgen-0.2.80
|
||||
wasm-bindgen-backend-0.2.80
|
||||
wasm-bindgen-futures-0.4.30
|
||||
wasm-bindgen-macro-0.2.80
|
||||
wasm-bindgen-macro-support-0.2.80
|
||||
wasm-bindgen-shared-0.2.80
|
||||
wayland-client-0.29.4
|
||||
wayland-commons-0.29.4
|
||||
wayland-cursor-0.29.4
|
||||
wayland-protocols-0.29.4
|
||||
wayland-scanner-0.29.4
|
||||
wayland-sys-0.29.4
|
||||
weak-table-0.3.2
|
||||
web-sys-0.3.57
|
||||
webbrowser-0.6.0
|
||||
weezl-0.1.5
|
||||
wepoll-ffi-0.1.2
|
||||
wgpu-0.12.0
|
||||
wgpu-core-0.12.2
|
||||
wgpu-hal-0.12.4
|
||||
wgpu-types-0.12.0
|
||||
wide-0.7.4
|
||||
widestring-0.5.1
|
||||
winapi-0.3.9
|
||||
winapi-i686-pc-windows-gnu-0.4.0
|
||||
winapi-util-0.1.5
|
||||
winapi-x86_64-pc-windows-gnu-0.4.0
|
||||
windows-0.33.0
|
||||
windows_aarch64_msvc-0.33.0
|
||||
windows_i686_gnu-0.33.0
|
||||
windows_i686_msvc-0.33.0
|
||||
windows_x86_64_gnu-0.33.0
|
||||
windows_x86_64_msvc-0.33.0
|
||||
winit-0.26.1
|
||||
winreg-0.10.1
|
||||
wyz-0.2.0
|
||||
x11-clipboard-0.3.3
|
||||
x11-dl-2.19.1
|
||||
xcb-0.8.2
|
||||
xcursor-0.3.4
|
||||
xml-rs-0.8.4"
|
||||
# python is needed by xcb-0.8.2 until update to >=0.10
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
PYTHON_REQ_USE="xml(+)"
|
||||
inherit cargo desktop flag-o-matic python-any-r1 xdg
|
||||
|
||||
# 0(github) 1(repo) 2(commit hash) 3(crate:workspace,...) [see core/Cargo.toml]
|
||||
RUFFLE_GIT=(
|
||||
"RustAudio dasp f05a703d247bb504d7e812b51e95f3765d9c5e94 dasp"
|
||||
"ruffle-rs gc-arena 4931b3bc25b2b74174ff5eb9c34ae0dda732778b gc-arena:src/gc-arena"
|
||||
"ruffle-rs h263-rs 023e14c73e565c4c778d41f66cfbac5ece6419b2 h263-rs:h263,h263-rs-yuv:yuv"
|
||||
"ruffle-rs nellymoser 4a33521c29a918950df8ae9fe07e527ac65553f5 nellymoser-rs:."
|
||||
"ruffle-rs nihav-vp6 9416fcc9fc8aab8f4681aa9093b42922214abbd3 nihav_codec_support:nihav-codec-support,nihav_core:nihav-core,nihav_duck:nihav-duck"
|
||||
"ruffle-rs quick-xml 8496365ec1412eb5ba5de350937b6bce352fa0ba quick-xml:."
|
||||
"ruffle-rs rust-flash-lso 19fecd07b9888c4bdaa66771c468095783b52bed flash-lso"
|
||||
)
|
||||
ruffle_uris() {
|
||||
cargo_crate_uris
|
||||
|
||||
local g
|
||||
for g in "${RUFFLE_GIT[@]}"; do
|
||||
g=(${g})
|
||||
echo "https://github.com/${g[0]}/${g[1]}/archive/${g[2]}.tar.gz -> ${g[1]}-${g[2]}.tar.gz"
|
||||
done
|
||||
}
|
||||
|
||||
# using _pYYYYMMDD over YYYY.MM.DD given ruffle has an underlaying version
|
||||
# (0.1.0) which could get a non-nightly release eventually (YYYY. > 0.1.0)
|
||||
MY_PV="nightly-${PV:3:4}-${PV:7:2}-${PV:9:2}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DESCRIPTION="Flash Player emulator written in Rust"
|
||||
HOMEPAGE="https://ruffle.rs/"
|
||||
SRC_URI="
|
||||
https://github.com/ruffle-rs/ruffle/archive/refs/tags/${MY_PV}.tar.gz -> ${MY_P}.tar.gz
|
||||
$(ruffle_uris)"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0 ZLIB curl"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib:2
|
||||
dev-libs/openssl:=
|
||||
media-libs/alsa-lib
|
||||
sys-libs/zlib:=
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libxcb:="
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
virtual/pkgconfig
|
||||
>=virtual/rust-1.56"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/bin/${PN}
|
||||
usr/bin/${PN}_exporter
|
||||
usr/bin/${PN}_scanner"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# use [patch] directive to register git snapshots of needed crates
|
||||
local crate g
|
||||
for g in "${RUFFLE_GIT[@]}"; do
|
||||
g=(${g})
|
||||
echo "[patch.\"https://github.com/${g[0]}/${g[1]}\"]"
|
||||
for crate in ${g[3]//,/ }; do
|
||||
echo "${crate%:*} = { path = \"../${g[1]}-${g[2]}/${crate#*:}\" }"
|
||||
done
|
||||
done >> Cargo.toml || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
filter-flags '-flto*' # undefined references with ring crate and more
|
||||
|
||||
cargo_src_compile --bins # note: configure --bins would skip tests
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc README.md
|
||||
|
||||
newicon web/packages/extension/assets/images/icon180.png ${PN}.png
|
||||
make_desktop_entry ${PN} ${PN^} ${PN} "AudioVideo;Player;Emulator;" \
|
||||
"MimeType=application/x-shockwave-flash;application/vnd.adobe.flash.movie;"
|
||||
|
||||
cd target/$(usex debug{,} release) || die
|
||||
|
||||
newbin ${PN}_desktop ${PN}
|
||||
newbin exporter ${PN}_exporter
|
||||
dobin ${PN}_scanner
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if [[ ! ${REPLACING_VERSIONS} ]]; then
|
||||
elog "${PN} is experimental software that is still under heavy development"
|
||||
elog "and only receiving nightly releases. Plans in Gentoo is to update"
|
||||
elog "roughly every two weeks if no known major regressions."
|
||||
elog
|
||||
elog "There is currently no plans to support wasm builds / browser"
|
||||
elog "extensions, this provides the desktop viewer and other tools."
|
||||
fi
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
DIST vkd3d-proton-2.6-dxil-spirv.tar.gz 631130 BLAKE2B 99f40c5efde87d0af86542b427e5b0429be68ca69ba0c2b6d10a821811756d8dadff4449f268ae404f8ace09a91b3e8aaa135e534a77c0239e58c1a970a044cc SHA512 3c20090b7a1b53c30fd4967622fc7384e1bcc504c30d8075068b87dad1bd2c6f4a12459bf42e61bf76b9dd454ec17a9d529f74ab0d5583627e966d94bb341dc3
|
||||
DIST vkd3d-proton-2.6-spirv-headers.tar.gz 1299014 BLAKE2B 0b1e635aaa6eebec3525b13698a064e0e5b8a78829a772cbe9e1890148059bf396bc5c830e8d6ee3070a3343775991642565283994c65acfa0d82a91590b7d84 SHA512 ecb2158cad55edb4ba069383668f3b311a2f6aa6777b5b7ed94795d454622426ee34fee52b13c97d2f07b5b2f965815ee61a0203b76a0b0d2c708a4786d06b96
|
||||
DIST vkd3d-proton-2.6-vulkan-headers.tar.gz 415130 BLAKE2B 0c6444c4c1cb43b9c69757d7c2257ce2fe1bc6be308341f3189766f120994e4920bc738b737d9eefc299359dab568fb8809782e3663dd589c0e4d13aecb8873a SHA512 02cf1d63b29e48ef0efe489eb32237ba2f9f4bf58a182b00dc96aab18faba94de79283398e9e945cd81130f83fff228c59b04e496716ea9ccc148a5f4465282c
|
||||
DIST vkd3d-proton-2.6.tar.gz 1271948 BLAKE2B 02d2574a66614613748fe3471a6fd5aac2650fdae15a17b17ea2ed028fa53a0579b866e7240036a26108afc343395826474bb99e015b9299c2abec811bb872ab SHA512 6f27d213652e2380a9ba4534ac9ffe4b752b4608fbc2e8acd273fa151ab19ad0b132e3436384d2b8591cd1a59f0b69d342c893dc3a64be85188b5e3274bcf3f1
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ionen@gentoo.org</email>
|
||||
<name>Ionen Wolkens</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="crossdev-mingw">
|
||||
Use <pkg>sys-devel/crossdev</pkg> for the toolchain rather than
|
||||
<pkg>dev-util/mingw64-toolchain</pkg> (requires manual setting up)
|
||||
</flag>
|
||||
<flag name="extras">Install extra tools and demos in /usr/lib/vkd3d-proton</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">HansKristian-Work/vkd3d-proton</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1,161 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
inherit flag-o-matic meson-multilib toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/HansKristian-Work/vkd3d-proton.git"
|
||||
EGIT_SUBMODULES=(
|
||||
# uses hacks / recent features and easily breaks, keep bundled headers
|
||||
# (also cross-compiled and -I/usr/include is troublesome)
|
||||
subprojects/{SPIRV,Vulkan}-Headers
|
||||
subprojects/dxil-spirv
|
||||
subprojects/dxil-spirv/third_party/spirv-headers # skip cross/tools
|
||||
)
|
||||
else
|
||||
VKD3D_HASH=3e5aab6fb3e18f81a71b339be4cb5cdf55140980 # match tag on bumps
|
||||
DXIL_HASH=b537bbb91bccdbc695cb7e5211d608f8d1c205bd
|
||||
SPIRV_HASH=ae217c17809fadb232ec94b29304b4afcd417bb4
|
||||
VULKAN_HASH=83e1a9ed8ce289cebb1c02c8167d663dc1befb24
|
||||
SRC_URI="
|
||||
https://github.com/HansKristian-Work/vkd3d-proton/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/HansKristian-Work/dxil-spirv/archive/${DXIL_HASH}.tar.gz -> ${P}-dxil-spirv.tar.gz
|
||||
https://github.com/KhronosGroup/SPIRV-Headers/archive/${SPIRV_HASH}.tar.gz -> ${P}-vulkan-headers.tar.gz
|
||||
https://github.com/KhronosGroup/Vulkan-Headers/archive/${VULKAN_HASH}.tar.gz -> ${P}-spirv-headers.tar.gz"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Fork of VKD3D, development branches for Proton's Direct3D 12 implementation"
|
||||
HOMEPAGE="https://github.com/HansKristian-Work/vkd3d-proton/"
|
||||
|
||||
LICENSE="LGPL-2.1+ Apache-2.0 MIT"
|
||||
SLOT="0"
|
||||
IUSE="+abi_x86_32 crossdev-mingw debug extras"
|
||||
|
||||
BDEPEND="
|
||||
dev-util/glslang
|
||||
!crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use crossdev-mingw; then
|
||||
local tool=-w64-mingw32-g++
|
||||
for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do
|
||||
if ! type -P ${tool} >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain."
|
||||
eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw"
|
||||
use abi_x86_32 && use abi_x86_64 &&
|
||||
eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains."
|
||||
die "USE=crossdev-mingw is set but ${tool} was not found"
|
||||
elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then
|
||||
eerror "${PN} requires GCC to be built with --enable-threads=posix"
|
||||
eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows"
|
||||
die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads"
|
||||
fi
|
||||
done
|
||||
tool=-w64-mingw32-widl
|
||||
for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do
|
||||
if ! type -P widl >/dev/null && ! type -P ${tool} >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, you need to provide the widl compiler by either"
|
||||
eerror "building crossdev mingw64-runtime with USE=tools or installing wine."
|
||||
die "USE=crossdev-mingw is set but neither widl nor ${tool} were found"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
rmdir subprojects/{{SPIRV,Vulkan}-Headers,dxil-spirv} || die
|
||||
mv ../dxil-spirv-${DXIL_HASH} subprojects/dxil-spirv || die
|
||||
mv ../SPIRV-Headers-${SPIRV_HASH} subprojects/SPIRV-Headers || die
|
||||
mv ../Vulkan-Headers-${VULKAN_HASH} subprojects/Vulkan-Headers || die
|
||||
ln -s ../../../SPIRV-Headers/include \
|
||||
subprojects/dxil-spirv/third_party/spirv-headers || die
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_vkd3d_proton.sh || die
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
# without .git, meson sets vkd3d_build as 0x${PV} leading to failure
|
||||
sed -i "s/@VCS_TAG@/${VKD3D_HASH::15}/" vkd3d_build.h.in || die
|
||||
sed -i "s/@VCS_TAG@/${VKD3D_HASH::7}/" vkd3d_version.h.in || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
|
||||
|
||||
if [[ ${CHOST} != *-mingw* ]]; then
|
||||
unset AR CC CXX STRIP WIDL # likely unusable unless CHOST is mingw
|
||||
|
||||
CHOST_amd64=x86_64-w64-mingw32
|
||||
CHOST_x86=i686-w64-mingw32
|
||||
CHOST=$(usex x86 ${CHOST_x86} ${CHOST_amd64})
|
||||
|
||||
# preferring meson eclass' cross file over upstream's but, unlike
|
||||
# dxvk, we lose static options in the process (from build-win*.txt)
|
||||
append-ldflags -static -static-libgcc -static-libstdc++
|
||||
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev,
|
||||
# unset again so meson eclass will set ${CHOST}-gcc + others
|
||||
use crossdev-mingw && unset AR CC CXX STRIP WIDL
|
||||
|
||||
# prefer ${CHOST}'s widl (mingw) over wine's as used by upstream if
|
||||
# possible, but eclasses don't handle that so setup machine files
|
||||
local widl=$(tc-getPROG WIDL widl)
|
||||
use amd64 && [[ ${widl} == widl && ${ABI} == x86 ]] && widl="widl','-m32"
|
||||
printf "[binaries]\nwidl = ['${widl}']\n" > "${T}"/widl.${ABI}.ini || die
|
||||
|
||||
local emesonargs=(
|
||||
--prefix="${EPREFIX}"/usr/lib/${PN}
|
||||
--{bin,lib}dir=x$((${ABI#x}==86?86:64))
|
||||
--{cross,native}-file="${T}"/widl.${ABI}.ini
|
||||
$(meson_use {,enable_}extras)
|
||||
$(meson_use debug enable_trace)
|
||||
$(usev !debug --strip) # portage won't strip .dll, so allow it here
|
||||
-Denable_tests=false # needs wine/vulkan and is intended for manual use
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
dobin setup_vkd3d_proton.sh
|
||||
einstalldocs
|
||||
|
||||
# unnecesasry files, see package-release.sh
|
||||
rm "${ED}"/usr/lib/${PN}/x*/libvkd3d-proton-utils-3.dll || die
|
||||
find "${ED}" -type f -name '*.a' -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! ${REPLACING_VERSIONS} ]]; then
|
||||
elog "To enable ${PN} on a wine prefix, you can run the following command:"
|
||||
elog
|
||||
elog " WINEPREFIX=/path/to/prefix setup_vkd3d_proton.sh install --symlink"
|
||||
elog
|
||||
elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for details."
|
||||
fi
|
||||
|
||||
# don't try to keep wine-*[vulkan] in RDEPEND, but still give a warning
|
||||
local wine
|
||||
for wine in app-emulation/wine-{vanilla,staging}; do
|
||||
has_version ${wine} && ! has_version ${wine}[vulkan] &&
|
||||
ewarn "${wine} was not built with USE=vulkan, ${PN} will not be usable with it"
|
||||
done
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
inherit flag-o-matic meson-multilib toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/HansKristian-Work/vkd3d-proton.git"
|
||||
EGIT_SUBMODULES=(
|
||||
# uses hacks / recent features and easily breaks, keep bundled headers
|
||||
# (also cross-compiled and -I/usr/include is troublesome)
|
||||
subprojects/{SPIRV,Vulkan}-Headers
|
||||
subprojects/dxil-spirv
|
||||
subprojects/dxil-spirv/third_party/spirv-headers # skip cross/tools
|
||||
)
|
||||
else
|
||||
VKD3D_HASH=3e5aab6fb3e18f81a71b339be4cb5cdf55140980 # match tag on bumps
|
||||
DXIL_HASH=b537bbb91bccdbc695cb7e5211d608f8d1c205bd
|
||||
SPIRV_HASH=ae217c17809fadb232ec94b29304b4afcd417bb4
|
||||
VULKAN_HASH=83e1a9ed8ce289cebb1c02c8167d663dc1befb24
|
||||
SRC_URI="
|
||||
https://github.com/HansKristian-Work/vkd3d-proton/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/HansKristian-Work/dxil-spirv/archive/${DXIL_HASH}.tar.gz -> ${P}-dxil-spirv.tar.gz
|
||||
https://github.com/KhronosGroup/SPIRV-Headers/archive/${SPIRV_HASH}.tar.gz -> ${P}-vulkan-headers.tar.gz
|
||||
https://github.com/KhronosGroup/Vulkan-Headers/archive/${VULKAN_HASH}.tar.gz -> ${P}-spirv-headers.tar.gz"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Fork of VKD3D, development branches for Proton's Direct3D 12 implementation"
|
||||
HOMEPAGE="https://github.com/HansKristian-Work/vkd3d-proton/"
|
||||
|
||||
LICENSE="LGPL-2.1+ Apache-2.0 MIT"
|
||||
SLOT="0"
|
||||
IUSE="+abi_x86_32 crossdev-mingw debug extras"
|
||||
|
||||
BDEPEND="
|
||||
dev-util/glslang
|
||||
!crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use crossdev-mingw; then
|
||||
local tool=-w64-mingw32-g++
|
||||
for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do
|
||||
if ! type -P ${tool} >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain."
|
||||
eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw"
|
||||
use abi_x86_32 && use abi_x86_64 &&
|
||||
eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains."
|
||||
die "USE=crossdev-mingw is set but ${tool} was not found"
|
||||
elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then
|
||||
eerror "${PN} requires GCC to be built with --enable-threads=posix"
|
||||
eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows"
|
||||
die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads"
|
||||
fi
|
||||
done
|
||||
tool=-w64-mingw32-widl
|
||||
for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do
|
||||
if ! type -P widl >/dev/null && ! type -P ${tool} >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, you need to provide the widl compiler by either"
|
||||
eerror "building crossdev mingw64-runtime with USE=tools or installing wine."
|
||||
die "USE=crossdev-mingw is set but neither widl nor ${tool} were found"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
rmdir subprojects/{{SPIRV,Vulkan}-Headers,dxil-spirv} || die
|
||||
mv ../dxil-spirv-${DXIL_HASH} subprojects/dxil-spirv || die
|
||||
mv ../SPIRV-Headers-${SPIRV_HASH} subprojects/SPIRV-Headers || die
|
||||
mv ../Vulkan-Headers-${VULKAN_HASH} subprojects/Vulkan-Headers || die
|
||||
ln -s ../../../SPIRV-Headers/include \
|
||||
subprojects/dxil-spirv/third_party/spirv-headers || die
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_vkd3d_proton.sh || die
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
# without .git, meson sets vkd3d_build as 0x${PV} leading to failure
|
||||
sed -i "s/@VCS_TAG@/${VKD3D_HASH::15}/" vkd3d_build.h.in || die
|
||||
sed -i "s/@VCS_TAG@/${VKD3D_HASH::7}/" vkd3d_version.h.in || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
|
||||
|
||||
if [[ ${CHOST} != *-mingw* ]]; then
|
||||
unset AR CC CXX STRIP WIDL # likely unusable unless CHOST is mingw
|
||||
|
||||
CHOST_amd64=x86_64-w64-mingw32
|
||||
CHOST_x86=i686-w64-mingw32
|
||||
CHOST=$(usex x86 ${CHOST_x86} ${CHOST_amd64})
|
||||
|
||||
# preferring meson eclass' cross file over upstream's but, unlike
|
||||
# dxvk, we lose static options in the process (from build-win*.txt)
|
||||
append-ldflags -static -static-libgcc -static-libstdc++
|
||||
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev,
|
||||
# unset again so meson eclass will set ${CHOST}-gcc + others
|
||||
use crossdev-mingw && unset AR CC CXX STRIP WIDL
|
||||
|
||||
# prefer ${CHOST}'s widl (mingw) over wine's as used by upstream if
|
||||
# possible, but eclasses don't handle that so setup machine files
|
||||
local widl=$(tc-getPROG WIDL widl)
|
||||
use amd64 && [[ ${widl} == widl && ${ABI} == x86 ]] && widl="widl','-m32"
|
||||
printf "[binaries]\nwidl = ['${widl}']\n" > "${T}"/widl.${ABI}.ini || die
|
||||
|
||||
local emesonargs=(
|
||||
--prefix="${EPREFIX}"/usr/lib/${PN}
|
||||
--{bin,lib}dir=x$((${ABI#x}==86?86:64))
|
||||
--{cross,native}-file="${T}"/widl.${ABI}.ini
|
||||
$(meson_use {,enable_}extras)
|
||||
$(meson_use debug enable_trace)
|
||||
$(usev !debug --strip) # portage won't strip .dll, so allow it here
|
||||
-Denable_tests=false # needs wine/vulkan and is intended for manual use
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
dobin setup_vkd3d_proton.sh
|
||||
einstalldocs
|
||||
|
||||
# unnecesasry files, see package-release.sh
|
||||
rm "${ED}"/usr/lib/${PN}/x*/libvkd3d-proton-utils-3.dll || die
|
||||
find "${ED}" -type f -name '*.a' -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! ${REPLACING_VERSIONS} ]]; then
|
||||
elog "To enable ${PN} on a wine prefix, you can run the following command:"
|
||||
elog
|
||||
elog " WINEPREFIX=/path/to/prefix setup_vkd3d_proton.sh install --symlink"
|
||||
elog
|
||||
elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for details."
|
||||
fi
|
||||
|
||||
# don't try to keep wine-*[vulkan] in RDEPEND, but still give a warning
|
||||
local wine
|
||||
for wine in app-emulation/wine-{vanilla,staging}; do
|
||||
has_version ${wine} && ! has_version ${wine}[vulkan] &&
|
||||
ewarn "${wine} was not built with USE=vulkan, ${PN} will not be usable with it"
|
||||
done
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,273 @@
|
||||
https://github.com/ibus/ibus/issues/2387
|
||||
https://bugs.gentoo.org/843725
|
||||
|
||||
From 17648f0522910480b6c5dd4f5356ca1f6c160bf5 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Tue, 29 Mar 2022 22:48:19 +0200
|
||||
Subject: [PATCH] src: Fix refcounting issues
|
||||
|
||||
Commit 5a455b1ead attempted to fix both GLib warnings around
|
||||
floating references and other presumed refcounting issues. However
|
||||
it missed 2 kinds of bugs:
|
||||
|
||||
- The places that take an IBusText created from a static string
|
||||
were made to avoid freeing it afterwards, but the staticness refers
|
||||
to the string content, not the object itself.
|
||||
- The places that are documented to emit signals on floating object
|
||||
references used to do the following after signal emission:
|
||||
|
||||
if (g_object_is_floating (object))
|
||||
g_object_unref (object)
|
||||
|
||||
And did possibly trigger GLib warnings were changed to:
|
||||
|
||||
if (g_object_is_floating (object))
|
||||
g_object_sink_ref (object);
|
||||
g_object_unref (object);
|
||||
|
||||
Which fixes the GLib warning for floating references, but do
|
||||
unintendedly steal one reference away for non floating references.
|
||||
|
||||
This commit is essentially a revert of commit 5a455b1ead, but
|
||||
addressing both things differently:
|
||||
|
||||
- All label/tooltip/symbol IBusText properties in IBusProperty do
|
||||
now always sink the reference of the stored object.
|
||||
|
||||
- All places documented as maybe using objects with a floating reference
|
||||
on signals changed to doing:
|
||||
|
||||
if (g_object_is_floating (object)) {
|
||||
g_object_ref_sink (object);
|
||||
g_object_unref (object);
|
||||
}
|
||||
|
||||
So the floating reference is owned and unreferenced without warnings,
|
||||
but already owned references are left unchanged.
|
||||
|
||||
This addresses the possible GLib warnings, fixes the possible double
|
||||
unrefs happening on IBusText used in signals, and fixes the missing
|
||||
unrefs on IBusText objects created from static strings.
|
||||
|
||||
BUG=https://github.com/ibus/ibus/issues/2393
|
||||
BUG=https://github.com/ibus/ibus/issues/2387
|
||||
---
|
||||
src/ibusinputcontext.c | 35 +++++++++++++++++++++--------------
|
||||
src/ibusproperty.c | 32 +++++++++++++++++---------------
|
||||
2 files changed, 38 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c
|
||||
index 4b27551b..7981de38 100644
|
||||
--- a/src/ibusinputcontext.c
|
||||
+++ b/src/ibusinputcontext.c
|
||||
@@ -549,9 +549,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
g_variant_unref (variant);
|
||||
g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text);
|
||||
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
if (g_strcmp0 (signal_name, "UpdatePreeditText") == 0) {
|
||||
@@ -569,9 +570,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
cursor_pos,
|
||||
visible);
|
||||
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
if (g_strcmp0 (signal_name, "UpdatePreeditTextWithMode") == 0) {
|
||||
@@ -592,9 +594,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
visible,
|
||||
mode);
|
||||
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -621,9 +624,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
0,
|
||||
text,
|
||||
visible);
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -640,9 +644,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
0,
|
||||
table,
|
||||
visible);
|
||||
- if (g_object_is_floating (table))
|
||||
+ if (g_object_is_floating (table)) {
|
||||
g_object_ref_sink (table);
|
||||
- g_object_unref (table);
|
||||
+ g_object_unref (table);
|
||||
+ }
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -659,9 +664,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
0,
|
||||
prop_list);
|
||||
|
||||
- if (g_object_is_floating (prop_list))
|
||||
+ if (g_object_is_floating (prop_list)) {
|
||||
g_object_ref_sink (prop_list);
|
||||
- g_object_unref (prop_list);
|
||||
+ g_object_unref (prop_list);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -673,9 +679,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
|
||||
g_signal_emit (context, context_signals[UPDATE_PROPERTY], 0, prop);
|
||||
|
||||
- if (g_object_is_floating (prop))
|
||||
+ if (g_object_is_floating (prop)) {
|
||||
g_object_ref_sink (prop);
|
||||
- g_object_unref (prop);
|
||||
+ g_object_unref (prop);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/src/ibusproperty.c b/src/ibusproperty.c
|
||||
index 6d4ed088..cd8a0e2a 100644
|
||||
--- a/src/ibusproperty.c
|
||||
+++ b/src/ibusproperty.c
|
||||
@@ -336,20 +336,17 @@ ibus_property_destroy (IBusProperty *prop)
|
||||
prop->priv->icon = NULL;
|
||||
|
||||
if (prop->priv->label) {
|
||||
- if (!ibus_text_get_is_static (prop->priv->label))
|
||||
- g_object_unref (prop->priv->label);
|
||||
+ g_object_unref (prop->priv->label);
|
||||
prop->priv->label = NULL;
|
||||
}
|
||||
|
||||
if (prop->priv->symbol) {
|
||||
- if (!ibus_text_get_is_static (prop->priv->symbol))
|
||||
- g_object_unref (prop->priv->symbol);
|
||||
+ g_object_unref (prop->priv->symbol);
|
||||
prop->priv->symbol = NULL;
|
||||
}
|
||||
|
||||
if (prop->priv->tooltip) {
|
||||
- if (!ibus_text_get_is_static (prop->priv->tooltip))
|
||||
- g_object_unref (prop->priv->tooltip);
|
||||
+ g_object_unref (prop->priv->tooltip);
|
||||
prop->priv->tooltip = NULL;
|
||||
}
|
||||
|
||||
@@ -404,7 +401,7 @@ ibus_property_deserialize (IBusProperty *prop,
|
||||
g_variant_get_child (variant, retval++, "u", &prop->priv->type);
|
||||
|
||||
GVariant *subvar = g_variant_get_child_value (variant, retval++);
|
||||
- if (prop->priv->label && !ibus_text_get_is_static (prop->priv->label)) {
|
||||
+ if (prop->priv->label) {
|
||||
g_object_unref (prop->priv->label);
|
||||
}
|
||||
prop->priv->label = IBUS_TEXT (ibus_serializable_deserialize (subvar));
|
||||
@@ -414,7 +411,7 @@ ibus_property_deserialize (IBusProperty *prop,
|
||||
ibus_g_variant_get_child_string (variant, retval++, &prop->priv->icon);
|
||||
|
||||
subvar = g_variant_get_child_value (variant, retval++);
|
||||
- if (prop->priv->tooltip && !ibus_text_get_is_static (prop->priv->tooltip)) {
|
||||
+ if (prop->priv->tooltip) {
|
||||
g_object_unref (prop->priv->tooltip);
|
||||
}
|
||||
prop->priv->tooltip = IBUS_TEXT (ibus_serializable_deserialize (subvar));
|
||||
@@ -435,7 +432,7 @@ ibus_property_deserialize (IBusProperty *prop,
|
||||
|
||||
/* Keep the serialized order for the compatibility when add new members. */
|
||||
subvar = g_variant_get_child_value (variant, retval++);
|
||||
- if (prop->priv->symbol && !ibus_text_get_is_static (prop->priv->symbol)) {
|
||||
+ if (prop->priv->symbol) {
|
||||
g_object_unref (prop->priv->symbol);
|
||||
}
|
||||
prop->priv->symbol = IBUS_TEXT (ibus_serializable_deserialize (subvar));
|
||||
@@ -567,7 +564,7 @@ ibus_property_set_label (IBusProperty *prop,
|
||||
g_assert (IBUS_IS_PROPERTY (prop));
|
||||
g_return_if_fail (label == NULL || IBUS_IS_TEXT (label));
|
||||
|
||||
- if (prop->priv->label && !ibus_text_get_is_static (prop->priv->label)) {
|
||||
+ if (prop->priv->label) {
|
||||
g_object_unref (prop->priv->label);
|
||||
}
|
||||
|
||||
@@ -575,8 +572,10 @@ ibus_property_set_label (IBusProperty *prop,
|
||||
prop->priv->label = ibus_text_new_from_static_string ("");
|
||||
}
|
||||
else {
|
||||
- prop->priv->label = g_object_ref_sink (label);
|
||||
+ prop->priv->label = label;
|
||||
}
|
||||
+
|
||||
+ g_object_ref_sink (prop->priv->label);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -586,7 +585,7 @@ ibus_property_set_symbol (IBusProperty *prop,
|
||||
g_assert (IBUS_IS_PROPERTY (prop));
|
||||
g_return_if_fail (symbol == NULL || IBUS_IS_TEXT (symbol));
|
||||
|
||||
- if (prop->priv->symbol && !ibus_text_get_is_static (prop->priv->symbol)) {
|
||||
+ if (prop->priv->symbol) {
|
||||
g_object_unref (prop->priv->symbol);
|
||||
}
|
||||
|
||||
@@ -594,8 +593,10 @@ ibus_property_set_symbol (IBusProperty *prop,
|
||||
prop->priv->symbol = ibus_text_new_from_static_string ("");
|
||||
}
|
||||
else {
|
||||
- prop->priv->symbol = g_object_ref_sink (symbol);
|
||||
+ prop->priv->symbol = symbol;
|
||||
}
|
||||
+
|
||||
+ g_object_ref_sink (prop->priv->symbol);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -615,7 +616,7 @@ ibus_property_set_tooltip (IBusProperty *prop,
|
||||
g_assert (IBUS_IS_PROPERTY (prop));
|
||||
g_assert (tooltip == NULL || IBUS_IS_TEXT (tooltip));
|
||||
|
||||
- if (prop->priv->tooltip && !ibus_text_get_is_static (prop->priv->tooltip)) {
|
||||
+ if (prop->priv->tooltip) {
|
||||
g_object_unref (prop->priv->tooltip);
|
||||
}
|
||||
|
||||
@@ -624,8 +625,9 @@ ibus_property_set_tooltip (IBusProperty *prop,
|
||||
}
|
||||
else {
|
||||
prop->priv->tooltip = tooltip;
|
||||
- g_object_ref_sink (prop->priv->tooltip);
|
||||
}
|
||||
+
|
||||
+ g_object_ref_sink (prop->priv->tooltip);
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.35.1
|
||||
|
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
DIST ceph_exporter-2.0.7.tar.gz 337138 BLAKE2B c5334ed7650b273d572c8e7b6a7138dc18c086fb4e198e8b3c5c820c95a20e2b9e7d91cbfe2224ba3de9ee03761a59cd929165e638556ce7c57e9a490906f61a SHA512 db3662811c513e732aaecbaaedcb787333886a059304a651e836c4b80661a0593b667608a9298e24561ad2db085f3adacc73ee1777b496ed0ce9760534113457
|
||||
DIST ceph_exporter-3.0.0.tar.gz 336128 BLAKE2B 32f25ea46a147be20bb4f095ab01e9f97bc17ad6b852140c9254cfb6099531c51b0867c50abccd04dd396a758e2179ebf20a6cb315fd8c474e320c303c9f1644 SHA512 815cb676d4dcf49a665ec024e82d4047c94b9fbf9c7e0d2998028da6fa074313f0bb10f3831a16d05abd28c2954605f628977f728ac37f1a69fbc9d734304747
|
||||
DIST ceph_exporter-4.0.1-deps.tar.xz 7402752 BLAKE2B 4619eba4c1630cd683193fec8f449698587dc8d17c26992e033fa7495934de26bcca84fac4ac174e25e7f405c27033fc324703748cac59f90b6e58c2548f8cd2 SHA512 893a6d246c640647ac55f5f32d657cbd80bec3c9404e1484e6188e4e045a20d01d50559723105f179d438019f66d904938a24ce164f85a41631930067d92f7ba
|
||||
DIST ceph_exporter-4.0.1.tar.gz 143653 BLAKE2B 2a8c907fb5ff06bc629644aab94b450646f6b25ff057d2b01485f0131cef3e64e3b159f029f29cf78c8d6b450ff9b750858799fe079256509e31e5b8bcf3e012 SHA512 154e75cc397635450d2b99e5e56c829fd5816e9aad95707eff42500ce21fd92a6d12772a58530b580b8e14e5db7c32d2d24f395175f414df9d89fbcbb8239ece
|
||||
|
@ -1,39 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EGO_PN=github.com/digitalocean/ceph_exporter
|
||||
MY_PV="${PV}-luminous"
|
||||
# This inherit is deliberate since this version of ceph_exporter isn't a
|
||||
# module.
|
||||
inherit golang-vcs-snapshot
|
||||
|
||||
DESCRIPTION="Prometheus exporter that scrapes metrics from a ceph cluster"
|
||||
HOMEPAGE="https://github.com/digitalocean/ceph_exporter"
|
||||
SRC_URI="https://github.com/digitalocean/ceph_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND="
|
||||
acct-group/ceph
|
||||
acct-user/ceph
|
||||
=sys-cluster/ceph-14*
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_compile() {
|
||||
pushd src/${EGO_PN} > /dev/null || die
|
||||
GOPATH="${WORKDIR}/${P}" GO111MODULE=auto go build -o bin/ceph_exporter || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
pushd src/${EGO_PN} > /dev/null || die
|
||||
dobin bin/ceph_exporter
|
||||
dodoc {README,CONTRIBUTING}.md exporter.yml
|
||||
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
keepdir /var/lib/ceph_exporter /var/log/ceph_exporter
|
||||
fowners ceph:ceph /var/lib/ceph_exporter /var/log/ceph_exporter
|
||||
}
|
Binary file not shown.
@ -1,259 +0,0 @@
|
||||
# Copyright 2021-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
aho-corasick-0.7.18
|
||||
ammonia-3.1.2
|
||||
ansi_term-0.11.0
|
||||
anyhow-1.0.43
|
||||
assert_cmd-1.0.7
|
||||
atty-0.2.14
|
||||
autocfg-1.0.1
|
||||
base64-0.13.0
|
||||
bit-set-0.5.2
|
||||
bit-vec-0.6.3
|
||||
bitflags-1.3.2
|
||||
block-buffer-0.7.3
|
||||
block-buffer-0.9.0
|
||||
block-padding-0.1.5
|
||||
bstr-0.2.17
|
||||
byte-tools-0.3.1
|
||||
byteorder-1.4.3
|
||||
bytes-1.0.1
|
||||
cfg-if-0.1.10
|
||||
cfg-if-1.0.0
|
||||
chrono-0.4.19
|
||||
clap-2.33.3
|
||||
cpufeatures-0.1.5
|
||||
ctor-0.1.20
|
||||
difference-2.0.0
|
||||
difflib-0.4.0
|
||||
digest-0.8.1
|
||||
digest-0.9.0
|
||||
doc-comment-0.3.3
|
||||
either-1.6.1
|
||||
elasticlunr-rs-2.3.13
|
||||
env_logger-0.7.1
|
||||
fake-simd-0.1.2
|
||||
filetime-0.2.15
|
||||
float-cmp-0.9.0
|
||||
fnv-1.0.7
|
||||
form_urlencoded-1.0.1
|
||||
fsevent-0.4.0
|
||||
fsevent-sys-2.0.1
|
||||
fuchsia-zircon-0.3.3
|
||||
fuchsia-zircon-sys-0.3.3
|
||||
futf-0.1.4
|
||||
futures-0.3.16
|
||||
futures-channel-0.3.16
|
||||
futures-core-0.3.16
|
||||
futures-io-0.3.16
|
||||
futures-macro-0.3.16
|
||||
futures-sink-0.3.16
|
||||
futures-task-0.3.16
|
||||
futures-util-0.3.16
|
||||
generic-array-0.12.4
|
||||
generic-array-0.14.4
|
||||
getopts-0.2.21
|
||||
getrandom-0.1.16
|
||||
getrandom-0.2.3
|
||||
gitignore-1.0.7
|
||||
glob-0.3.0
|
||||
h2-0.3.4
|
||||
handlebars-4.1.2
|
||||
hashbrown-0.11.2
|
||||
headers-0.3.4
|
||||
headers-core-0.2.0
|
||||
heck-0.3.3
|
||||
hermit-abi-0.1.19
|
||||
html5ever-0.25.1
|
||||
http-0.2.4
|
||||
http-body-0.4.3
|
||||
httparse-1.5.1
|
||||
httpdate-1.0.1
|
||||
humantime-1.3.0
|
||||
hyper-0.14.11
|
||||
idna-0.2.3
|
||||
indexmap-1.7.0
|
||||
inotify-0.7.1
|
||||
inotify-sys-0.1.5
|
||||
input_buffer-0.4.0
|
||||
iovec-0.1.4
|
||||
itertools-0.10.1
|
||||
itoa-0.4.8
|
||||
kernel32-sys-0.2.2
|
||||
lazy_static-1.4.0
|
||||
lazycell-1.3.0
|
||||
libc-0.2.100
|
||||
log-0.4.14
|
||||
mac-0.1.1
|
||||
maplit-1.0.2
|
||||
markup5ever-0.10.1
|
||||
markup5ever_rcdom-0.1.0
|
||||
matches-0.1.9
|
||||
memchr-2.4.1
|
||||
mime-0.3.16
|
||||
mime_guess-2.0.3
|
||||
mio-0.6.23
|
||||
mio-0.7.13
|
||||
mio-extras-2.0.6
|
||||
miow-0.2.2
|
||||
miow-0.3.7
|
||||
net2-0.2.37
|
||||
new_debug_unreachable-1.0.4
|
||||
normalize-line-endings-0.3.0
|
||||
notify-4.0.17
|
||||
ntapi-0.3.6
|
||||
num-integer-0.1.44
|
||||
num-traits-0.2.14
|
||||
num_cpus-1.13.0
|
||||
opaque-debug-0.2.3
|
||||
opaque-debug-0.3.0
|
||||
opener-0.5.0
|
||||
output_vt100-0.1.2
|
||||
percent-encoding-2.1.0
|
||||
pest-2.1.3
|
||||
pest_derive-2.1.0
|
||||
pest_generator-2.1.3
|
||||
pest_meta-2.1.3
|
||||
phf-0.8.0
|
||||
phf_codegen-0.8.0
|
||||
phf_generator-0.8.0
|
||||
phf_shared-0.8.0
|
||||
pin-project-1.0.8
|
||||
pin-project-internal-1.0.8
|
||||
pin-project-lite-0.2.7
|
||||
pin-utils-0.1.0
|
||||
ppv-lite86-0.2.10
|
||||
precomputed-hash-0.1.1
|
||||
predicates-2.0.1
|
||||
predicates-core-1.0.2
|
||||
predicates-tree-1.0.2
|
||||
pretty_assertions-0.6.1
|
||||
proc-macro-hack-0.5.19
|
||||
proc-macro-nested-0.1.7
|
||||
proc-macro2-1.0.28
|
||||
pulldown-cmark-0.9.0
|
||||
quick-error-1.2.3
|
||||
quick-error-2.0.1
|
||||
quote-1.0.9
|
||||
rand-0.7.3
|
||||
rand-0.8.4
|
||||
rand_chacha-0.2.2
|
||||
rand_chacha-0.3.1
|
||||
rand_core-0.5.1
|
||||
rand_core-0.6.3
|
||||
rand_hc-0.2.0
|
||||
rand_hc-0.3.1
|
||||
rand_pcg-0.2.1
|
||||
redox_syscall-0.2.10
|
||||
regex-1.5.4
|
||||
regex-automata-0.1.10
|
||||
regex-syntax-0.6.25
|
||||
remove_dir_all-0.5.3
|
||||
ryu-1.0.5
|
||||
same-file-1.0.6
|
||||
scoped-tls-1.0.0
|
||||
select-0.5.0
|
||||
semver-0.11.0
|
||||
semver-parser-0.10.2
|
||||
serde-1.0.129
|
||||
serde_derive-1.0.129
|
||||
serde_json-1.0.66
|
||||
serde_urlencoded-0.7.0
|
||||
sha-1-0.8.2
|
||||
sha-1-0.9.7
|
||||
shlex-1.0.0
|
||||
siphasher-0.3.6
|
||||
slab-0.4.4
|
||||
socket2-0.4.1
|
||||
string_cache-0.8.1
|
||||
string_cache_codegen-0.5.1
|
||||
strsim-0.8.0
|
||||
strum-0.21.0
|
||||
strum_macros-0.21.1
|
||||
syn-1.0.75
|
||||
tempfile-3.2.0
|
||||
tendril-0.4.2
|
||||
termcolor-1.1.2
|
||||
textwrap-0.11.0
|
||||
time-0.1.43
|
||||
tinyvec-1.3.1
|
||||
tinyvec_macros-0.1.0
|
||||
tokio-1.10.0
|
||||
tokio-macros-1.3.0
|
||||
tokio-stream-0.1.7
|
||||
tokio-tungstenite-0.13.0
|
||||
tokio-util-0.6.7
|
||||
toml-0.5.8
|
||||
topological-sort-0.1.0
|
||||
tower-service-0.3.1
|
||||
tracing-0.1.26
|
||||
tracing-core-0.1.19
|
||||
treeline-0.1.0
|
||||
try-lock-0.2.3
|
||||
tungstenite-0.12.0
|
||||
typenum-1.13.0
|
||||
ucd-trie-0.1.3
|
||||
unicase-2.6.0
|
||||
unicode-bidi-0.3.6
|
||||
unicode-normalization-0.1.19
|
||||
unicode-segmentation-1.8.0
|
||||
unicode-width-0.1.8
|
||||
unicode-xid-0.2.2
|
||||
url-2.2.2
|
||||
utf-8-0.7.6
|
||||
vec_map-0.8.2
|
||||
version_check-0.9.3
|
||||
wait-timeout-0.2.0
|
||||
walkdir-2.3.2
|
||||
want-0.3.0
|
||||
warp-0.3.1
|
||||
wasi-0.10.2+wasi-snapshot-preview1
|
||||
wasi-0.9.0+wasi-snapshot-preview1
|
||||
winapi-0.2.8
|
||||
winapi-0.3.9
|
||||
winapi-build-0.1.1
|
||||
winapi-i686-pc-windows-gnu-0.4.0
|
||||
winapi-util-0.1.5
|
||||
winapi-x86_64-pc-windows-gnu-0.4.0
|
||||
ws2_32-sys-0.2.1
|
||||
xml5ever-0.16.1"
|
||||
inherit cargo toolchain-funcs
|
||||
|
||||
DESCRIPTION="Create a book from markdown files"
|
||||
HOMEPAGE="https://rust-lang.github.io/mdBook/"
|
||||
SRC_URI="
|
||||
https://github.com/rust-lang/mdBook/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
$(cargo_crate_uris)"
|
||||
S="${WORKDIR}/${P/b/B}"
|
||||
|
||||
# CC-BY-4.0/OFL-1.1: embeds fonts inside the executable
|
||||
LICENSE="Apache-2.0 BSD CC-BY-4.0 CC0-1.0 ISC MIT MPL-2.0 OFL-1.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64 ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
QA_FLAGS_IGNORED="usr/bin/${PN}"
|
||||
|
||||
src_compile() {
|
||||
cargo_src_compile
|
||||
|
||||
if use doc; then
|
||||
if tc-is-cross-compiler; then
|
||||
ewarn "html docs were skipped due to cross-compilation"
|
||||
else
|
||||
target/$(usex debug{,} release)/${PN} build -d html guide || die
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cargo_src_install
|
||||
|
||||
dodoc CHANGELOG.md README.md
|
||||
|
||||
[[ -e guide/html ]] && dodoc -r guide/html
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,2 +1 @@
|
||||
DIST mysqltuner-1.7.21.tar.gz 223961 BLAKE2B 1307afc2a73b40330817fe0c0b834a537b14caed1125acbdc5a03e98787321ffbbfb84ba0a2077adb0fa49c0e2df947dc0062d2218866c689fbfd903776f7fbd SHA512 2b5d8a7cc3f0ebe3a481cd77e395ead37ec037f0a9b9649bbf450215bc83f4049a297d86b171c7e2e7d51b3fbe381069310f13d3b8152f5a90e05a9efbabd4dc
|
||||
DIST mysqltuner-1.8.3.tar.gz 254525 BLAKE2B 7fa1fe24ab454aa15a03e62410e08988a4a0d3ac9b1e4df0219a67bffa4d6113d8c89d6f93f8e6d08a35ecc4bdbf5c0148d8e53138f05a5c22899ecca98b3614 SHA512 965ad0204cb449aa113bf1880a91468d48467c84e7d42ac8f12e7ee4035e49dc7cb191d2b11b6e5b084a60c3857e92ac4d1bef63f688538f3468fda32304a702
|
||||
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_PN=MySQLTuner-perl
|
||||
|
||||
DESCRIPTION="MySQLTuner is a high-performance MySQL tuning script"
|
||||
HOMEPAGE="https://github.com/major/MySQLTuner-perl"
|
||||
SRC_URI="https://github.com/major/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
RDEPEND="dev-lang/perl
|
||||
virtual/perl-Getopt-Long"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
DOCS=( USAGE.md CONTRIBUTING.md INTERNALS.md basic_passwords.txt vulnerabilities.csv )
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
|
||||
newbin "${PN}.pl" "${PN}"
|
||||
|
||||
# Passwords and vulnerabilities are meant to be fed
|
||||
# to the script uncompressed.
|
||||
docompress -x "/usr/share/doc/${PF}/basic_passwords.txt" "/usr/share/doc/${PF}/vulnerabilities.csv"
|
||||
}
|
@ -1,11 +1,16 @@
|
||||
DIST postgresql-10.19.tar.bz2 19261478 BLAKE2B 3ccd44d68980ddb0e394b811af20c213cf89eb8d4374d2c49c9cda5165f222ca849a2db4fe4d521991f15f9cc84ec35bafa91083b9625f2a6729159f490a94c9 SHA512 41b0f5026be7d563e41b54e9ea7199dd466a132d355be0b71a91d41f533d97fbf550eccf2a2ece3d60c5dab5921ebeea3ac4780c18c54b924df52d7423305a22
|
||||
DIST postgresql-10.20.tar.bz2 19371473 BLAKE2B 24ce3e3dda749375e999206307154e79bf15d20b3cd598ba0b78bf27976241d71e88e6fa4cd459b675bc9a9047e9315321b1535dbb41ed9e558858c2a7e9dd31 SHA512 44cfca541947d58c70593b767d3c2423f20cc6904f3d4cea8f63c1802ccbc569130c4a2a15f1af152285926f6a200e13d59c21584295dafd6f6e74bd38251428
|
||||
DIST postgresql-10.21.tar.bz2 19409454 BLAKE2B 5e43abaee8156b9eb99360efeb25ba268f93a60ac2c29044d9025c4faa8753d84cb3c0c8cbcd65eb9e0eb094ebf63e0cc1cbd0ef12c0a2faa360754e63ae106a SHA512 1053e15505c0448df491119c9aad1617889b66118628a2155e3ec87e6648b2071a0a54e10d8fbbe00161b2aa86d1a6194d932a8cf5808c626e7972d135bb05c5
|
||||
DIST postgresql-11.14.tar.bz2 20172910 BLAKE2B a033752fc5fc593c96fe63a258b2cc0d4b896548a366e3fefa8afde1f96ab64aab97eb395b10ae10494709963ed924623279f76f66870c4faee435969400c1b7 SHA512 ab71461ee6fb4cdc5b4240f7ecd8af2497ce6780283fde2abf5951ffdb616bd0c8ed22b26fdfca402a346e663ff77c4d17f3284c9d700e6fd6795b2aec97c9be
|
||||
DIST postgresql-11.15.tar.bz2 20245750 BLAKE2B f6a632606fe4b34b2a44df2c165ccfa6e890b85f4f6048994f781428bbd1de6888a24493fb5d0c231f3f34e6a4e94cfd23078a9afdaf5925d284b4854847d23f SHA512 1eba7bddee1edf034617102c1d61ad0aa1b58927dad63de1d054817966c4c9a1d7d3fa6f6896af3fe5a6880b09a6ec86be298256ee6ecc3705ff2654d3d00c74
|
||||
DIST postgresql-11.16.tar.bz2 20347100 BLAKE2B 240e86b68ff8833265f10802da2fb847d72e38ac9325fc56bb6864266b2ad98939170038ccdb7044ae16f9fd29e7a9e1d404456d8bc7d53430067d714b9bb563 SHA512 e1b6be0a97e60cdd95cd0ebc756b1de6abf2f33f41f6a80da3dff25483a30146fb6bf750ab787bb5bb4f2a04718946c7429e71f891cbd491001e9f9c2ea8e63c
|
||||
DIST postgresql-12.10.tar.bz2 20990621 BLAKE2B a7a56cf75944c558ae9bb9165dfb17b30cc5f7a865961e0a588677e4dd3e53d1fab15a212a21ec12f8e7b669a448d78efa0dfe985fd4902e16485a298c7adc62 SHA512 befedb14320aa033dc55bbb93bbbec4e67d9cfced63be0e4f631c7495a0fbc6fe280bd6d2fb941d7a2e6b2ac570b7f40d8db7f07a192a81bd9cd63c6c244a9c5
|
||||
DIST postgresql-12.11.tar.bz2 21086745 BLAKE2B 7062d334f3ef3b98f69e709f5de744324c7ce53ea516384902632a454a2ccadfd7bcc0c9ef4d51a685dd7a06e1fdccc292109294517831181c3db30bc2b7be91 SHA512 705e9e1ccf8202062cce61069b5ddb7db5f804dd0736c620640ce5622b9e42fdcbc1417771e77d51aa54beb4562a09b4307f2ff7dec135bd0e31f4941ca36ac8
|
||||
DIST postgresql-12.9.tar.bz2 20904260 BLAKE2B fc88d61d369569a3054b889848eaf1405a4f5137cd8c2cf27282115f70853dd4d5d8b4bf0a9fc60c63db936246a0a64077c9bfdb90685d4dfe375558e4519b2b SHA512 11697d8283f5df5a9c74c2406e94d1b6da6df8358ad48f3b773825aab98e8395f9fd4e3fc8b1e6ebad3743c3dadbda8b795d4fe84a447d7913223e136cf2b88f
|
||||
DIST postgresql-13.5.tar.bz2 21186674 BLAKE2B 3e51d6d67bba09fb134cd71c48349674e0cacfaefee299620482c93f0b09edbfead578deb63083686ab691563b088fc0ea60a6281a0bcf9145689fb3ce1ec0f0 SHA512 c76effbca8ee63be48fa3aeb39c7038221848fe83ca2afc4e0904ba8c6a50b89aa2ad37080d4e3be75e9bdc2d6ca6dfefcda334ef55a5e1a8954bb955ce905e5
|
||||
DIST postgresql-13.6.tar.bz2 21257213 BLAKE2B f5ea95fd9ffc8846e0aaf5bac03b02afa71e62e796bbe40f68af727a2f3c74eddd98cb68427bcc13b87b6fa00a8e2a7b18dd7749318f0a4a32cfdbf9b0e0a873 SHA512 2852726a3031b8d469f1c38f3019af02fc5afe40ec27b22288a29acefd30c63a98806bce88a214d0c2f9177f547b0b5010ad64e70bcbe2c2f1d97a27ae1984f8
|
||||
DIST postgresql-13.7.tar.bz2 21364433 BLAKE2B 2d8a505f6de4eb31cae415529eeac750a60abafcf45e7fde29043597b385a8150fac55df659f8c2ad200822e8063d388ed606dff9108d4407f9e26b893fa62f4 SHA512 9254f21519c8d4e926f70082503bb5593c91064a3d2a4ea18ac503dfd9aa94751d6f01ce00fca9fec9b2b7af40caf8d0951b661dd8be4d6aa87c1e35b6fa7a41
|
||||
DIST postgresql-14.1.tar.bz2 21887101 BLAKE2B a496dfd513c52339d1b3cb72773f9611721fd7c5d2a702d6fd71f650a1d41c3d7bf6574eba23671c7f9f11718e007f51f9547949bdc3d7fe1ea2248ebfb8d70b SHA512 4a0bec157d5464bb9e5f5c0eb0efdede55526e03f6f4d660b87d161a47705eb152fa0878960b1581bce42a5ed28a1f457825ea54e8d22e34b5b8eb36473ceefd
|
||||
DIST postgresql-14.2.tar.bz2 21964841 BLAKE2B 6460533a40064404f18642147b949cf7c85d036c45ede478fb9af8919895ee7b09dc78b89ed08a292226911f07cfc9e46d7f2d42e0aaea546c5e97a291d599b9 SHA512 19aeb6528605dbcf5df84048b2eed8f54b202576134d3fe3900bb8f073179c4258d2581acd745887e7e6fa86ebdb5f7b159ffaa0a645d601efee7c5f7730456b
|
||||
DIST postgresql-14.3.tar.bz2 22092190 BLAKE2B 8c9124cb758618d770a1084553f9e8f9a3fcb4e17e1aa4a1649e04f4c057f33ce1e5890bba3288bed2257236a4569735a77b3e5ddf989c2a2a4ef60ed494b3cc SHA512 70e6f67b5729a23f80b92b04e3fad2e09596b939660e3ddebf499d06af946459a45a019279e05413673e7b65d09a28a0440ed3c2ae565068466ed37e2d4f6f17
|
||||
DIST postgresql-9.6.24.tar.bz2 19047518 BLAKE2B 63b53cfb2c9381fe09ed76ef3cad1ec5014bcd3b4dea388cda5b4ad8b8084abc15a38dcd62e0c3fe0bcc922749e7a4bef4ec39287c4b1ea952b8245bbc72bc2e SHA512 c17ef8e7149bd136f6058e20b28f9a7307625614e37ff837feb7a6fa37b6932dfab6379285120c9bb0198961eb446c9979d5ee1f3e8583b09f981f52bee33505
|
||||
|
@ -0,0 +1,453 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8,9,10} )
|
||||
|
||||
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT=$(ver_cut 1)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="debug doc icu kerberos ldap nls pam perl
|
||||
python +readline selinux +server systemd ssl static-libs tcl
|
||||
threads uuid xml zlib"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
acct-group/postgres
|
||||
acct-user/postgres
|
||||
sys-apps/less
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
icu? ( dev-libs/icu:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap:= )
|
||||
pam? ( sys-libs/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,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 server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
# https://bugs.gentoo.org/753257
|
||||
# https://bugs.gentoo.org/766225
|
||||
eapply "${FILESDIR}"/postgresql-10.0-icu68.patch
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable debug) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with icu) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
$(use_enable nls)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
serverman=(
|
||||
initdb
|
||||
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
|
||||
pg_{test_{fsync,timing},upgrade,waldump}
|
||||
post{gres,master}
|
||||
)
|
||||
for m in ${serverman[@]} ; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
# Don't delete libpg{port,common}.a (Bug #571046). They're always
|
||||
# needed by extensions utilizing PGXS.
|
||||
use static-libs || \
|
||||
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
|
||||
-delete
|
||||
|
||||
# Make slot specific links to programs
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
|
||||
if [[ -n ${REPLACING_VERSIONS} ]] ; then
|
||||
ewarn "If your system is using 'pg_stat_statements' and you are running a"
|
||||
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
|
||||
ewarn "the following command after upgrading:"
|
||||
ewarn
|
||||
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,453 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8,9,10} )
|
||||
LLVM_MAX_SLOT=13
|
||||
|
||||
inherit flag-o-matic linux-info llvm multilib pam prefix python-single-r1 systemd tmpfiles
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
SLOT=$(ver_cut 1)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="debug doc icu kerberos ldap llvm nls pam
|
||||
perl python +readline selinux +server systemd ssl static-libs tcl
|
||||
threads uuid xml zlib"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
acct-group/postgres
|
||||
acct-user/postgres
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
icu? ( dev-libs/icu:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap:= )
|
||||
llvm? (
|
||||
<sys-devel/llvm-14:=
|
||||
<sys-devel/clang-14:=
|
||||
)
|
||||
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_enable threads thread-safety) \
|
||||
$(use_with icu) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with llvm) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
$(use_enable nls)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
serverman=(
|
||||
initdb
|
||||
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
|
||||
pg_{test_{fsync,timing},upgrade,waldump}
|
||||
post{gres,master}
|
||||
)
|
||||
for m in ${serverman[@]} ; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
# Don't delete libpg{port,common}.a (Bug #571046). They're always
|
||||
# needed by extensions utilizing PGXS.
|
||||
use static-libs || \
|
||||
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
|
||||
-delete
|
||||
|
||||
# Make slot specific links to programs
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
|
||||
if [[ -n ${REPLACING_VERSIONS} ]] ; then
|
||||
ewarn "If your system is using 'pg_stat_statements' and you are running a"
|
||||
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
|
||||
ewarn "the following command after upgrading:"
|
||||
ewarn
|
||||
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
|
||||
mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
|
||||
chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,453 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8,9,10} )
|
||||
LLVM_MAX_SLOT=14
|
||||
|
||||
inherit flag-o-matic linux-info llvm multilib pam prefix python-single-r1 systemd tmpfiles
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
SLOT=$(ver_cut 1)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="debug doc icu kerberos ldap llvm nls pam
|
||||
perl python +readline selinux +server systemd ssl static-libs tcl
|
||||
threads uuid xml zlib"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
acct-group/postgres
|
||||
acct-user/postgres
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
icu? ( dev-libs/icu:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap:= )
|
||||
llvm? (
|
||||
<sys-devel/llvm-15:=
|
||||
<sys-devel/clang-15:=
|
||||
)
|
||||
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_enable threads thread-safety) \
|
||||
$(use_with icu) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with llvm) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
$(use_enable nls)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
serverman=(
|
||||
initdb
|
||||
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
|
||||
pg_{test_{fsync,timing},upgrade,waldump}
|
||||
post{gres,master}
|
||||
)
|
||||
for m in ${serverman[@]} ; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
# Don't delete libpg{port,common}.a (Bug #571046). They're always
|
||||
# needed by extensions utilizing PGXS.
|
||||
use static-libs || \
|
||||
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
|
||||
-delete
|
||||
|
||||
# Make slot specific links to programs
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
|
||||
if [[ -n ${REPLACING_VERSIONS} ]] ; then
|
||||
ewarn "If your system is using 'pg_stat_statements' and you are running a"
|
||||
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
|
||||
ewarn "the following command after upgrading:"
|
||||
ewarn
|
||||
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
|
||||
mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
|
||||
chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,465 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8,9,10} )
|
||||
LLVM_MAX_SLOT=14
|
||||
|
||||
inherit flag-o-matic linux-info llvm multilib pam prefix python-single-r1 systemd tmpfiles
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
SLOT=$(ver_cut 1)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="debug doc icu kerberos ldap llvm nls pam
|
||||
perl python +readline selinux +server systemd ssl static-libs tcl
|
||||
threads uuid xml zlib"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
acct-group/postgres
|
||||
acct-user/postgres
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
icu? ( dev-libs/icu:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap:= )
|
||||
llvm? (
|
||||
<sys-devel/llvm-15:=
|
||||
<sys-devel/clang-15:=
|
||||
)
|
||||
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_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
|
||||
|
||||
local myconf="\
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable debug) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with icu) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with llvm) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
$(use_enable nls)"
|
||||
if use alpha; then
|
||||
myconf+=" --disable-spinlocks"
|
||||
else
|
||||
# Should be the default but just in case
|
||||
myconf+=" --enable-spinlocks"
|
||||
fi
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
serverman=(
|
||||
initdb
|
||||
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
|
||||
pg_{test_{fsync,timing},upgrade,waldump}
|
||||
post{gres,master}
|
||||
)
|
||||
for m in ${serverman[@]} ; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
# Don't delete libpg{port,common}.a (Bug #571046). They're always
|
||||
# needed by extensions utilizing PGXS.
|
||||
use static-libs || \
|
||||
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
|
||||
-delete
|
||||
|
||||
# Make slot specific links to programs
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
|
||||
if [[ -n ${REPLACING_VERSIONS} ]] ; then
|
||||
ewarn "If your system is using 'pg_stat_statements' and you are running a"
|
||||
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
|
||||
ewarn "the following command after upgrading:"
|
||||
ewarn
|
||||
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
|
||||
mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
|
||||
chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
# Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
|
||||
# LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
|
||||
local old_ctype=${LC_CTYPE}
|
||||
export LC_CTYPE=${LC_COLLATE}
|
||||
emake check
|
||||
export LC_CTYPE=${old_ctype}
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -0,0 +1,462 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8,9,10} )
|
||||
|
||||
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
SLOT=$(ver_cut 1)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="debug doc icu kerberos ldap llvm lz4 nls pam
|
||||
perl python +readline selinux +server systemd ssl static-libs tcl
|
||||
threads uuid xml zlib"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
acct-group/postgres
|
||||
acct-user/postgres
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
icu? ( dev-libs/icu:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap:= )
|
||||
llvm? (
|
||||
sys-devel/llvm:=
|
||||
sys-devel/clang:=
|
||||
)
|
||||
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 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_rc1-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_enable threads thread-safety) \
|
||||
$(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
|
||||
}
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue