parent
941a8ef7e8
commit
37b0239d6a
@ -1,23 +1,23 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
MANIFEST Manifest.files.gz 28825 BLAKE2B 9502e7959976223fa9a36776944d585910ce8ca6595f85a801fc7178862ac4a8fc5cf9f7e75b939d59cdac8b7597d1f78789bd4a4df114508a42e6093a87a173 SHA512 6f4a539ec60dd6424dc6063dcca13fb8c904e2fb01d579ee84e8d85a9daffd425abae09dc9447262d2cb3f0ddc52aefcc014f945291b9bec65861a0464b36c7b
|
||||
TIMESTAMP 2018-09-21T09:38:34Z
|
||||
MANIFEST Manifest.files.gz 28842 BLAKE2B a7e76b39d23d8d7cb141ae9745bac1281614f60170520e721bfacc48fb5704872a2a49e8e71212202c10fef83a3c3dbb989ac2848aeedf904ff06ed892e677d4 SHA512 05028e9dd5a61da4fa17b611e8adcde80f86c21ae0744d7c7d0c8136022d6c908442f6f0e7c6681f93241695af3cb1716708d236626538e3465a351e93e34d1c
|
||||
TIMESTAMP 2018-09-21T21:38:34Z
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAlukvBpfFIAAAAAALgAo
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAlulZNpfFIAAAAAALgAo
|
||||
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUx
|
||||
RDZBQkI2M0JGQ0ZCNEJBMDJGREYxQ0VDNTkwRUVBQzkxODkyNTAACgkQ7FkO6skY
|
||||
klDG9w//XXCGp3F8ASj/Xz/S3SBjDEJ2vJg/+6asBoZO9bwJALvT/NfQTUBXjz7r
|
||||
uBgXv0Ea3kkbEUM+I1hXYXOLT83wqLPc1fhHYfCKc8Sb9pFPJMPENrranKxblq8y
|
||||
07gw+I3gIKo45zVVwh/Wulbi7yVYSZdLMexbX5ttC/dX0wAOHWVyzfEgPUS/9mnB
|
||||
/t6aoA6CFoJJJ8ceaUlfO5hZ8JPZk8hn76K3XBiTkTgtuElUNEZbTH9V8kBpBo8V
|
||||
gGI8JZY/XxHq5hfIZc8PrdjQT8+cRRkcFao96I4kK+n6O3gLQZMCESou5fWcDMsX
|
||||
Lw3ZvYJiGXwPOHUasS7bMia8h+F9FjkvPEmCsjgOpn2F+0wS4FhVmzDnNNpEciS1
|
||||
wfZqq37NMp8eczP+E66s1JsZHyt+oBwBuTaW6NaK31fcvU5nCYzSRhaFeeRK2P5/
|
||||
qFSWOfbc4uxjRXssy9HHLPUJxDTURrFByMCqY5Ztgz1AKSVWHAqMP9L3TEH2RJt5
|
||||
14KrqdfMHxOaGQLEJVLvhVk+C3YRZuQVWwlaarcjwKN5zVCIXWhBo3XWXpZYTDio
|
||||
LjKivFTezUbb8ZONQBvBnYCyqE/EbqpKgICX79CO1Z1YvDdg9likhrF6OXSmJV1r
|
||||
+FzJZwXUwp0sL0QSrGhkN5GljbHTebSIS0bqwkKkKEv8p4ZcIZw=
|
||||
=Z/9q
|
||||
klBIkA/+OOlYnC5SpUVvCl3I9X3IhPtzUVAQLoHLOwPL7/E+ZCJNnwErLuG3VZji
|
||||
/d8Qro1+7iJY8e1EfPiOIsxV3cdSkPkvZScEq1CXBbuINoNzqsD+IMGJCItvL8Xh
|
||||
daD9uuWaY8gaGq8mM+MkUVvhqNbzFQQ3b06wEWK1aVc3vT02DR4/6Xnb1OfAMD5I
|
||||
o27pL1XsIff4ZFUOOecQViVltqxXDAkcENeckF30HZk4894c0mm6fjysb/oYIkmx
|
||||
xAZwSn5AaoreTtnBNceWKgFaAu5WA2ZFQ906bZKsCdlnxFfJeAzvRNExOEnX6KBN
|
||||
K+1I5zcKbe+h9C8WBC4awuDwxetNGs2gwfFUPXgHyIs4lodS1QABteECtiSlQtAN
|
||||
egqyuYzNiy4QDXILzR4jm1rk+UMtnFuPcUclc3GiJXsVnlCwW+DDyWP81T9KkoVD
|
||||
Nk4Q1tGc/Ti3/9xGS3gFgNwNz6eRuhgld1jvY0GpcbhjBZMT9W+gwf+WZWzwwJFd
|
||||
+VgGdSY1UA7LOn8Lp/zU5Ef6igoBpu7smDXLZZIqFdZ7+vLvLbWkC8LoCFvlFZoe
|
||||
r8ZvEt/yPmQ+eICUUKBeF1uQTNGdswYOpQu+YFXbW5nihvuEMEXobhD9IpqruVEj
|
||||
wBzDSV+vYGdDxK8awt/u9fqmGqwU5Zs/K1+q2TCMW+2kZEg65Qk=
|
||||
=OCjo
|
||||
-----END PGP SIGNATURE-----
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,8 +1,6 @@
|
||||
AUX mcollectived.initd 497 BLAKE2B 1fe966f49117f9ea1b8c8ca4f5c92d5ddd7f8fb28658e4c3b016c193b69d1c42d35da85ace176279d09778c12fcc664748ea743c9b88219cb0fec2292ca867d4 SHA512 dc77a522e3ab6af3e23c559bfcb385033f2200b58b50db59000e7f56b2a789e8fbd83340f8ee494a1a9fdbdd1bd737a2b17ae4743823794264723fdc931ea6b0
|
||||
DIST mcollective-2.12.1.tar.gz 1517946 BLAKE2B 785acc53a4854f47caebe1d6a5f9cc850c3c33fd21e1b6e57d0d9761b2a7a3bbab2f2df398aa5344d90bc11397a545c8663d60ff3b2f6ff835fdc619d874928e SHA512 2398fb0202d8d5669a6efa81d96a87ee7e9221c1bc1b2e5be1917f2fec2527879b34be8df8c3052acf0ed58074b2da185f0837889d9300bde190bc95e8237d9a
|
||||
DIST mcollective-2.12.2.tar.gz 1517725 BLAKE2B e5f2b94843b95fa0749ed7e3e1ae52aeb485bf6644b64d971efd7d7a0e7bc806de0d2b00997c7e36d004fd78c479b9cf19b927e717ad0f3e4c13e820e5481637 SHA512 83be835499adf836797a67adda9be6d1bbf32524560ae51533875a1e2507599c7a0a1d2a76513669b919cf1eeceabdf13162eedb8972c74ecdeba5427b1701e4
|
||||
DIST mcollective-2.12.3.tar.gz 1516461 BLAKE2B f8fa65ffadb98ae3511416aaf8b0875486b75f20e4da4007ad70820f453a6ecd81b57d7aa30ae38b014b984330f6c4d525002a54edb2c00d629b6fd4b2250049 SHA512 55798d4579a6be8a7790b046f8b4e72607935c83ec874b6147258d827e0bf279f08dfa121d7cc4a8ed922986aa6bad9ebd62b7e3cbc1e7ef526cf58edce1bcdc
|
||||
EBUILD mcollective-2.12.1.ebuild 1649 BLAKE2B b9fafb43c324d42bce01b95452bace880809ed327170098fb81c36fcc7c0505464624166ebcee596a9068742e1a6958e727052f553693db5e0275764180ca4aa SHA512 9ae9e1b5f0e5b31cd1dc44edc844253bfca1c80e8b626ec06a2e0a66eb08c0d935747a097f2f516d8e85f0ce79f28a675d1866b866789af47706048c92ad6c2f
|
||||
EBUILD mcollective-2.12.2.ebuild 1649 BLAKE2B b9fafb43c324d42bce01b95452bace880809ed327170098fb81c36fcc7c0505464624166ebcee596a9068742e1a6958e727052f553693db5e0275764180ca4aa SHA512 9ae9e1b5f0e5b31cd1dc44edc844253bfca1c80e8b626ec06a2e0a66eb08c0d935747a097f2f516d8e85f0ce79f28a675d1866b866789af47706048c92ad6c2f
|
||||
EBUILD mcollective-2.12.3.ebuild 1651 BLAKE2B 6cdf29afb3863a7db4eb246231f30d16a65e0acbfd36c3857db2bc30fc58e08405292a541e0b3bfd24d7368526f622de1ae1bf18fba21df8d25619faec5a12e5 SHA512 cc041a29db2039700769ac558b28206ed04c3f045b03dd2f4d037350c7d198207082c6ccef54e2f7733b8fd52a42b35a8562cfa673851da2d12bb2ef9f368dd6
|
||||
EBUILD mcollective-2.12.3.ebuild 1649 BLAKE2B b9fafb43c324d42bce01b95452bace880809ed327170098fb81c36fcc7c0505464624166ebcee596a9068742e1a6958e727052f553693db5e0275764180ca4aa SHA512 9ae9e1b5f0e5b31cd1dc44edc844253bfca1c80e8b626ec06a2e0a66eb08c0d935747a097f2f516d8e85f0ce79f28a675d1866b866789af47706048c92ad6c2f
|
||||
MISC metadata.xml 534 BLAKE2B e8866ac769b65ccc61dfe79fe5883bee78ea4066187b7136b899a1a16fa74952f88fd2b81376033d36418dc670d5669d9b65fc3195720ad95adf30bfe49729b1 SHA512 e94dd85f11b4f8b838e928220cb887eeb70860e6d04f03e904ddd4332baddd3b01221305e7229fb575585235436d0d942c116f821ef37adae636a7d5c6193199
|
||||
|
@ -1,60 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
inherit ruby-ng
|
||||
|
||||
DESCRIPTION="Framework to build server orchestration or parallel job execution
|
||||
systems"
|
||||
HOMEPAGE="https://docs.puppet.com/mcollective/"
|
||||
SRC_URI="https://github.com/puppetlabs/marionette-collective/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/all/marionette-collective-${PV}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="doc +client"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=">=dev-ruby/stomp-1.4.4"
|
||||
|
||||
src_compile() {
|
||||
einfo "nothing to compile"
|
||||
}
|
||||
|
||||
each_ruby_install() {
|
||||
cd "marionette-collective-${PV}"
|
||||
doruby -r lib/*
|
||||
insinto /usr/share/mcollective
|
||||
use client && dosbin bin/mco
|
||||
dosbin bin/mcollectived
|
||||
if use doc ; then
|
||||
dohtml -r doc/*
|
||||
insinto /usr/share/doc/${P}/ext
|
||||
doins -r ext/*
|
||||
fi
|
||||
newinitd "${FILESDIR}"/mcollectived.initd mcollectived
|
||||
insinto /etc/mcollective
|
||||
cd etc
|
||||
for cfg in *.dist ; do
|
||||
newins "${cfg}" "${cfg%%.dist}"
|
||||
sed -i -e "s:^libdir.*:libdir = /usr/share/mcollective/plugins:" \
|
||||
"${D}"/etc/mcollective/${cfg%%.dist} || die "sed failed"
|
||||
done
|
||||
insinto /etc/mcollective/plugin.d
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "Mcollective requires a stomp server installed and functioning before"
|
||||
einfo "you can use it. The recommended server to use is ActiveMQ [1] but"
|
||||
einfo "any other stomp compatible server should work."
|
||||
einfo
|
||||
einfo "It is recommended you read the \'getting started\' guide [2] if this"
|
||||
einfo "is a new installation"
|
||||
einfo
|
||||
einfo "[1] https://activemq.apache.org/"
|
||||
einfo "[2] https://code.google.com/p/mcollective/wiki/GettingStarted"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
AUX 50pass-gentoo.el 491 BLAKE2B 30c24a820e877e74d4308b42fab036c3c670353af6eb79454c18b471ab62134074765c313be5633e5fc8d1d9105a51d4dc648e3e08f200487ea62e3b9cd4e4a1 SHA512 eaba952f7b080bb44f1a415ee3fa1e71469177a993116b890a0788b177ec70948c1ea6923f17ddddf5f1c01af2fca03e98a71e06a5dff32ff6ebe0b73a79f659
|
||||
DIST password-store-1.7.3.tar.xz 63416 BLAKE2B 5931608e0208dfe6965b79f586c153a4930d1c3d3b74433d026ee0bc5889fcc29334c637ca4fb68308d0169bad7c8235b6632e9f80eda1e24f0f5721353f88e3 SHA512 89755a7b02f05d75055a9fc14fd3f456c0a49ec31bdffd097a027f91228c64a98b18c1e80017aeda811773ae3287ff1b9737532da8ded06799d8fe3979ca06f7
|
||||
EBUILD pass-1.7.3.ebuild 2177 BLAKE2B d460c9fff62a5a72f9ebe0a4d6350a58f9a7f826f751399c729c6ee88e999b13396a399035098d9cec2125cb492bcdc276410edcd27c4c0219273af15553450f SHA512 b972435fa8c8993df2f53bc3541478e9c84777957b48ca2752bc7d16604ceb6c0f9e6fac375fec6bedd9ad8044aa79bc5f9943c9ea6f0d4c28881fd4f2f0f1a3
|
||||
EBUILD pass-1.7.3.ebuild 2184 BLAKE2B f1cb3b4dc5dfb87ae1281a0d059c8c456accf1b77e324bec1594900a8af156ac2b67d4481387a2e0fb9d72f98b00025da6cb1bd0cb9b5cdb1a016c33e24c58bf SHA512 31297f5ec00aa2d2fe0188e4905a54282b97b66498bc04299b0016de0c43dac3f2657433ee1c4611205d49cf153bc020d4c940ae059dbdc5d08a3f3b997532ee
|
||||
EBUILD pass-9999.ebuild 1960 BLAKE2B e06b86833158fb55e9656a1bbc2168bbdfb0cc1fa48924437e2a05b81dc79c0f110cc2edf664610b43b29cb67c4563db568bbbf3cb6edd7f135b5db0d027751f SHA512 b170aaa7a41a628684735cd24994f40a95abd8e7c1ffa9bd52d381f4d94be246c7465cb617404eb61bc6221fede56f43dc76f18517329b83d00c0ebff02e4580
|
||||
MISC metadata.xml 881 BLAKE2B 59fee6aeadb16d050eeaedc6d5081963e3ffa8316ddd00afb67661d721fa60b80483c16348e0c3d6c20fdb6513fd5840552c3a95724b619e07122d8755c4e7c1 SHA512 49df1e24751818d46a0c23fcdc9e41d965dca29f9964f7d142e4dba9b076b472c860d9b3eafc15b04a983f49d2cd78eb6b529742469549209c7e4160a15f1323
|
||||
|
@ -1,4 +1,4 @@
|
||||
AUX passwordsafe-1.06_beta-system-gtest.patch 2962 BLAKE2B 1ef77391d355364e55da568c2686c1988916da9eadc312c37d01016df3449535b88b503dfd3aeac2bf3c8e613141552bb1d97f5f5a733becc33f3c565a610940 SHA512 2fc6745b84ad810a550c2b221aca4cd10f87d4bc77282cb31b3d3070b61a3958c126ce0d3da4eaf550d80be470ca4c5aefaeb863caaf2f9fb285bf844f5705bb
|
||||
DIST passwordsafe-1.06_beta.tar.gz 14295034 BLAKE2B 83f480eee16938e396fa01797f67f5bc61984414b7f38b91404caea3dd6b3d31ba0e2ce4d198da048dff9cf1b5c8ba04e8bb9c93351fc21552bbc05a3b9ba486 SHA512 2a5be46e0e90f98c519bf9137f32298672359d1bfeb081a71d67251b35da6c1157e18c35a2c84321ed3fa077cb15ebf9cee763ba13b201ce02965d6642bb246c
|
||||
EBUILD passwordsafe-1.06_beta.ebuild 2321 BLAKE2B 6d17e734072738021ea5638420fc9aba8854d37df6aa660ee328ab6b8f0e7907418ba3add4b2feeba598121a707a4e139edd9a6a9b312b23d7ac317f2da6ea9a SHA512 b6b2db66516dc48f3ac1beb4634697d8c033da524b0a378dc6753758a8f1ca03ea5b383c509088340215b2ea1aafd958ed75d50472569ad29ef2c52f323b0269
|
||||
EBUILD passwordsafe-1.06_beta-r1.ebuild 2087 BLAKE2B 51442c27c4fd34a344c5161253104425fe87eaa4084aeb45c2833b9b00498ed584cc8e4387585d52363f3942e2a8403374ce9e3fbc8caca2c0016413f5075d94 SHA512 c944d9a70a6a112c93ac76feb9a225ac49ba712188c2900dfc437f1dc3a5902055fb449c202129d2080d5a546cbd9092b85a0bb919b3742bd0143ef55b0bd43d
|
||||
MISC metadata.xml 778 BLAKE2B 5387ae1a60b8de35a2a845146c8016d8677e2b7381d9f1f2f7eb8c18b794969f2d1448b591885b978c7641a7b9ebf751c660fffe8780fbcd5089111c88918674 SHA512 29e765d326b3c165c0a649da8ba5e6be57a0dfdaa12a5b25ba8bac44c868638a24a6a9c8bbb27638d7f215841548577658e139d9abee0f3c61d1e96c3dffdacf
|
||||
|
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
DIST cdemu-daemon-3.1.0.tar.bz2 79943 BLAKE2B 23407c3a14b426fa9f53c2d62564e34a8f878598c24cdd9419c811786d858135a0af3a1cde8b7afc4178f7772336ed533077c089c976e98de30c932deca1c426 SHA512 f0f3de31b2bf6a97852bb1bc45d301e6cbf401ca7499f42e99811ca62431e86b344c83ddb4420571f2038e43432711e04817b9ed3859893eec7d36fbad8dfdb5
|
||||
DIST cdemu-daemon-3.2.1.tar.bz2 82426 BLAKE2B 282b1a62ca3a770e709ff31ee7b72ed9f5e102c5f318a765a99421c93881e9ecacfdc5867af494e69dddda40603c8eb6cc8904a7c82fec004a6d5644a28a9f87 SHA512 399dbb818de8a550bd31784a5a7f0adb9d2e35d922ba71f341df81d20fd7e5ebaba5f31db1554caca17919325773f9ec6bb3d5ae99afa5d6eaf5b22142e010ee
|
||||
EBUILD cdemu-daemon-3.1.0.ebuild 1110 BLAKE2B 001cea1a051505de440cf792f5c561617312d8b946675623d47a204bc7e4b94ad4fa5e4ed8e2bdcb8d47483a0f33d8c2ffdbb935ffe3f401e90358f45de8d97e SHA512 ee7fdd166e61e9a9e6339629d46ed9c6aa91984e0e2b357958aa40d79c3401cde0d9fdf24942708074a7389b66205b6b38ad156674581cd68f16e89284093d14
|
||||
EBUILD cdemu-daemon-3.2.1.ebuild 1150 BLAKE2B 2d9b9f939e2d74aa0ba2248ea2dab0294e776c5b3e2db54b93ce0c22831f6924233bbab5c771bf08729dd10d511f50abde76a9edb739eed59334929e5428f59e SHA512 b90b219ded7e2a8a013e35cbb1dc34dd0c82fcc1489a2f422b975fe506fb0e1a462433771dd23dcce8d7979c4a1048a07dfe22fbd2207c63cae8c9c9a29843ff
|
||||
EBUILD cdemu-daemon-3.2.1.ebuild 1149 BLAKE2B c291fafea057bdf318b306757e6b77a54f5b42648bc9c7ef33b9a9f32b0e586f81743dbf3671ac48783dbd3a4cf7607ddaa6a00c0a8d2bde424da762bb876681 SHA512 e24a1b64ca31e69a0deaff694d5c0ebe256242de04636b53c9ff7ee4da208daccad0bf0da97fc3683240d5b5fabe53e0213c585600360147b18371e01f0caf5b
|
||||
MISC metadata.xml 455 BLAKE2B 23500677c263c1b8fc4839698bd6f1c08e9821fe4472a0b1725ad4777cfff385531ab6ec966f32a2335571c315b6f886f973451076745aa9fe4297c3cc436a30 SHA512 51c8d87f3c49c81798e4d2e038f911a2e05bfde742f229939f759c6768c6459cf4aa6829981791c57ef766fd447923194d7c14d4ad16951ae505d3b5a73c3479
|
||||
|
@ -1,5 +1,5 @@
|
||||
DIST gcdemu-3.1.0.tar.bz2 48036 BLAKE2B 4fc14f02a7d006556bab31b82b0cb017efec2b7e3f99854567ac0e5b8211c151583e91cf72e180341077a927430688401c4ecb6112bd6758e7288c7a06e2c4ec SHA512 e3e0369cc443bc47befa52989cc2bc5d62e4c9462bb8de1c3dd8563e1240ba7f59fc8cc54aed2e96bdb23a5f6e2fa11ca36073dfa066409f097a1dca619866fc
|
||||
DIST gcdemu-3.2.0.tar.bz2 52144 BLAKE2B f349e4482905b0ac59bce5d6af74000e05ff9b7257c7ec8755106ac8fe316d59d19de8b72705fd9cccfa888d170776667ee07fe90311a81e78f251fee85601ee SHA512 61a1775c874c9c3604ce88758039ef80b262463ae180e791eb545811fa2176e4bf07c4dbcd3be5f17d446fdef92317a0ff64ce8d27f26aeaeee9d8134b6a95ea
|
||||
EBUILD gcdemu-3.1.0.ebuild 1213 BLAKE2B 8889f4c6277a8c6b736f0eea76b036d7f9534ccca1c5064d60ad800b40a5653159b63a0feee4a8008d296d0052c0020f3df13974432aa83419cdead3d1d14011 SHA512 95f84316bf0a91f2ba54fd5ed53b75d2d967507d1c14c5fb3c1c1950c83660b0efc40874bd1a6c34a1324c0f1a34ea64decd0379965a0609279405fbd40a206e
|
||||
EBUILD gcdemu-3.2.0.ebuild 1130 BLAKE2B 0555c72a8c52c930d93e60035167d17bb725220f516593f16de8dc6867243e7be7ba3a0efa9865267ff8ef32f517d32618f255c5152193c407ebec62f25c8b5b SHA512 3f7c859b26c769b44f0c56f4a1e73c4bb0931a1ff8c754e29488b04b0109462cf28902527c7012e510925e81be0f937855fd8f9ae82eba69f4fb8ae4585264da
|
||||
EBUILD gcdemu-3.2.0.ebuild 1129 BLAKE2B 4af93d2a9f88cce37cc032ece75a76b4a6462df0a2226fe5c67c5fddc84351374af74b0b00ee76624af339bb847c178b4e1317355142261722e16fbe90d34814 SHA512 8c5494ce53fd55b5fa97d339ed46840eb7d873fd71e14c255588d5fc038f0f4786cacd865151f8e425cfe48cf3208d6b5d479adb0cf283f22f0144178d5b2897
|
||||
MISC metadata.xml 455 BLAKE2B 23500677c263c1b8fc4839698bd6f1c08e9821fe4472a0b1725ad4777cfff385531ab6ec966f32a2335571c315b6f886f973451076745aa9fe4297c3cc436a30 SHA512 51c8d87f3c49c81798e4d2e038f911a2e05bfde742f229939f759c6768c6459cf4aa6829981791c57ef766fd447923194d7c14d4ad16951ae505d3b5a73c3479
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
DIST eselect-repository-4.tar.gz 5535 BLAKE2B 4dce6c0136ec9394c9bf4128ec26ab67260d4b96a165825ae7b15b8476d10d23fcc5190946fc54013d6eb8e4f18988b07df4c849ba50844571986a6823511547 SHA512 0d3c204d73bb4314bc24fdf6cd837f2a56ac00d1d11fbec7f072af874bc468777676bba40e0cc17553f6dec7a907f10865f9c356a6390372e0734173465ac483
|
||||
EBUILD eselect-repository-4.ebuild 964 BLAKE2B b9d05dcf21665010aa57754af38bb57cbe6a8c4f4ad8ebba849a6239933ecde4a18629807eb50214db0c3d7f6c1d5adec1e386d58f314c1de619224519ab0217 SHA512 220bea638a73925014368e95eaad9e5f319415f534ff2266fe6b63ba9a91e9e59efca729ad1a989ea7a8cb70ce1f4dd5118a9512573e6a54fed77928f0e6ee3e
|
||||
EBUILD eselect-repository-4.ebuild 971 BLAKE2B 18ffed0ba63a3cd42f8d543038bdabd9498252b6fe0664dc09b29287b5960b16d04469506a90a0dae2dfd911a62ac8f7054837acb0c8593d1204b5fcd39c60c3 SHA512 e0f09d7f2a0532d294512c3556296e252483704abc5999faa1db093606d5fb3ffa39ac565d84cb4770d5868375b16035ff0d845b865483be769d1c766628d936
|
||||
EBUILD eselect-repository-9999.ebuild 888 BLAKE2B 9c5cd26305709a1b6f24845a726420ff0542169656356382c4f5ab25cb34a6e2f34c20e6a4094a2fa237e9c7a0130ca0a9ab1b3ae65c123077e402e64a9bf47d SHA512 283e639f646f8501ac95793d6c3d18307c61b5a8d12c1f66ddd4144154783a95f5262792db24373344a64c20ba863e7747c54fa4177feb72b3e789180981c56b
|
||||
MISC metadata.xml 361 BLAKE2B 65f6d76855e7205041fd10b416774d373f2cbf3ef3c13ccbad5069edb5f2d980c67cd1f188471df59ce784ff5b8a100c984644dadacaa4ace8d42c22993fc594 SHA512 40082f5d7899074e331edbe92d13784a3ccff5e04f60db71297ded20b2f1cca88e70b1f4fd6cc94e76048b7f3a718b586ced406452d816333e969e64ac5a3c8e
|
||||
|
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
DIST cmospwd-5.1.tar.bz2 36792 BLAKE2B 763bf04af7591843190570d7084e16c2a4490319bc4a3aba9b4a32e440c66ee981f8d90749dca9df69f963294a29500da4641b51e74c7bb6f0f0e4f23a165d63 SHA512 eb76bbab2e686b54421556c5228b90a35c2883d59b31815ab04494df8e2d03e7193abdd83c4a7fa5915abdff1f189eb69bd29fc02ea9d84565ea8767e2c455a8
|
||||
EBUILD cmospwd-5.1-r1.ebuild 533 BLAKE2B 10cdc2d513942f6930a3c51ca4c53d448d2a2b241966ff4b8e9335046d5067ae06464aebdb36bb59a1976fdadc3b4cbed73d7b3dd1f0de9ecb0c37a2b24a22e9 SHA512 121aeabe4ca7cf83de26531a3629bf5a3e5b5fd3aa17f7c1a604354d594bdf085e34bfbdacf458d2348bfac9e9c7108aad413d7e3b2d03c2f2c0d8b7a520e48d
|
||||
EBUILD cmospwd-5.1.ebuild 525 BLAKE2B aacc16565496c67f20b8c7ec394cddfda840f8d34b240d962128c6b74252e25e87b226225db4d71f5e716eb23b95739bd1a171a7cf553c5d885841cf63e2c3f4 SHA512 aba354443e4bd2aea621a045ffd93ce074a40588ea99131a5a451fa13c3d0dd3e75472091fb2707de1030813f03ce1d77bf0773ec09d5b662a6145c30b860314
|
||||
EBUILD cmospwd-5.1-r1.ebuild 532 BLAKE2B 83d6be1185b239122ae7e27452bfe21f30880cc8ccc61c0ddfefc1ff9da892ca1b6755c9d74e1a70cb3718e2afdb741e83f5aaeeb74558477a226fec09e5ef48 SHA512 b42571b32308722bceb5d4c18c3a1b23f5e4beae8e4375ad4321456cafdbac6d06b17cf7c3165179c164646d20250d0d56463f616a6dd5fa72956b372e1a045b
|
||||
MISC metadata.xml 675 BLAKE2B e1dec7335653927acf2ffbe7bfded2d55711d7df2585c4458c2e26e9f5a8d43f9943bae98f12554e669ba6b5438345024df2b11a9bbd161885436377a036e2ed SHA512 4caf9543690502df3320fcd85b841a2a17cad7d4a309bc40d539b23fcc260ffaf25ae3b0d62f7dd84319251bf65cd2e2fc997e9f8a196a15e016b795efc5f0ff
|
||||
|
@ -1,25 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="CmosPwd decrypts password stored in cmos used to access BIOS SETUP"
|
||||
HOMEPAGE="https://www.cgsecurity.org/wiki/CmosPwd"
|
||||
SRC_URI="https://www.cgsecurity.org/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
src_compile() {
|
||||
cd src
|
||||
$(tc-getCC) ${CFLAGS} ${LDFLAGS} cmospwd.c -o cmospwd || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosbin src/cmospwd
|
||||
dodoc cmospwd.txt
|
||||
}
|
Binary file not shown.
@ -1,13 +1,13 @@
|
||||
AUX prometheus-3.initd 851 BLAKE2B 600d9e541206f99c0ddddc0f5a1d37d9bea69d8f45ce6562a2d3c040a75c3665d9862829fc44134db2fbbbbf1d38b7dc4010c9c284f5af38f0dd2cf4be1f9d11 SHA512 7d3650ef5b632507ade4cfb00a167ec7c2d3d8e91551ef8f4550f9947038df0b22a3dd0a33e093296eeb0ca88f1d12ae40e73c7fec4df03e5dcc7630893ded59
|
||||
AUX prometheus.confd 43 BLAKE2B c83afa8ad1133c9e93abd40c862ff5b3ac9a3b3c4447b915ae1482d92096dec9f200d089de2458a6cdb0e72d2bf0652d56e3afd6d5a3cd8a3ed7a6c9a0e3e42c SHA512 37468e897cd34b50b0edc65ada3f0c2e05459c3d96bb7f82d58b6de5bf10a127f1bf7912af93d83d94e3ea7287cfeb2311e36535f291d01a11d152a0b438591c
|
||||
DIST prometheus-2.2.1.tar.gz 5629500 BLAKE2B 7645267a2c5ed1c4138a5dd3929a48cb9dfa27789db38e98addbb06c37c6b482abfcf296ef1a5836bebd971d8224136c24a4ccd3093175882bb0beda1673deff SHA512 a94cf867de2b3be65b0a07307f89ebfa9c0a319820a72b3b6691edcd2e2b56b5268d27fb52bdaefea0e7084906d69b818e5292a39ccd5991e04e56d594f56ea7
|
||||
DIST prometheus-2.3.1.tar.gz 6175030 BLAKE2B 395808ce10eee18469a34caa7a358325830717cce7199f4cd3e6da346326573e65695cd444ad1c37586f9744db51808ef78f4a50fac971fa0fbc7fd7a4089994 SHA512 f0930a8de3885f9d870d41b41b602cd19addaa362d0473c95723b6cff32fd28870f8d47c89b9d39e13f43e189ad991d7569baa1a6ecd1ca59ba85cbb3d3cd6b1
|
||||
DIST prometheus-2.3.2.tar.gz 6175804 BLAKE2B 98d7fe58043e5104b6eb181edd13a2aec3c347ae6d0325f08a267b02eef3bd8963603fb17c113244b47967a549ebe860f2a3f11e297ceca85b57495df7f19070 SHA512 35bd654f3326d36846654775e924821de9efc7b39c93d5ffc5e8f4db6feb456cf3b8833de3aa3df9d9f63481c487f2633b55b9610cef4e7a037f2a9b1ffbbd23
|
||||
DIST prometheus-2.4.0.tar.gz 6090871 BLAKE2B 553d3292abfc58aba11e14786892b7dfc9ace00b29bba38a964e5b36113a4827759f5229d36693be225aca0962d7577751a8778201929b1f987a000fe31c2544 SHA512 a2fc7d67ac2fd8e17b5c69983daa385fe042e88c8c00ce71c51ae0e66d3cba201bcc7ef52ce34bef9724df002769c6fd9ee44115f397e253859f4c3f77427839
|
||||
DIST prometheus-2.4.1.tar.gz 6092025 BLAKE2B 4392c3329be255dcc1cd457e13defc6a462f094c47d8032b8389ffee8a384049d58eedf7a8a8724345d01e1d6645cd58d23d1bef078458bdf4fd54bac3c85ae1 SHA512 8d09e87c1af1bde08fc0d95fb51d8b25360d8bcb40c7a4b2f4bfaf79419183a4f90773ced6f53ae9a9bae10eb00af6248acf603cb13f9ce0afb815b2b7e0a8c1
|
||||
EBUILD prometheus-2.2.1.ebuild 2022 BLAKE2B 35b2eb824625cac8505bcc933130dd2810fd19855f73d975ef1e665baf98a60b95d4f3afcac1edc4b9cb2d6a030e7aeecff9926a460fddd9ea4ad8fa9f34cd6b SHA512 e378cbd27a7e2d033bf2ab6203955207d27f879f8c040cc54e873db8e64b225bf7aa6e977238d0203e00fe688c6328fef611516aea6d8e4afc4a5ea4649df127
|
||||
DIST prometheus-2.4.2.tar.gz 6092847 BLAKE2B 0c9f01e7bce6d406ae472a3e4b75720317a8da34715881350459d5fa52531913eecb402fec08f77f8e18b28d870316e631068077cd1118b710b37e515ef19332 SHA512 3b5d3b761ed2db1bc61225d85e2c9b7619a5fefc72b41432f2d7bc707fd0e9d84746e8ab16b30eb978de713548ca2e8c108cc7a9225ab1bd2e39741b98dd1701
|
||||
EBUILD prometheus-2.3.1.ebuild 2022 BLAKE2B f99591f9347de5c0ed88e05939bd81969f51e133ecaae1f8d275560a888e238bb1cae03085935639fcec6992ca67f16a70dfed8d923f1d2128a191921c597cf8 SHA512 6f458e28f7c6f35ad6f184a836220eeb559f966de760bdeb01f16ddeee6fa139838ed504fe07226cca4c5af6ce926fa52e96ea836a3e6f738146c51069320a4a
|
||||
EBUILD prometheus-2.3.2.ebuild 2022 BLAKE2B e35104c0f2c9d2ce49e6256287adf008344f6e75c61e7f97b46563e3e16be1c4d4759b65799fb612bff45619b9abcd4ca009e328a944733c81592329059219b1 SHA512 19b085b959bde4f81218938de7c010f585abb201eea28d3b06479635626ee955e84e094daeed41253a857d7e47db828628aa6742fa5eaa1e17aa126aa4e893a0
|
||||
EBUILD prometheus-2.4.0.ebuild 2022 BLAKE2B c5cb642b5da16bccdb03d5a2b7a1ec9446b976612981c02b6d99f1afacd299c6ac6e9d4fccc1a21e27d304d1fbce5b36dea690d386aef070fd06fac05ab0fe4e SHA512 4299f58b8aed5a4866167ceca4ed973cd21db0eb75a180c4a3796113367b1d0dfcbb2c00f5f7454fa382a38659a4ac9fadcb3560240cd2ad0a8e4ebcbafceee7
|
||||
EBUILD prometheus-2.4.1.ebuild 2022 BLAKE2B c0ec56e42c9aaf02f165f467be4fc250ce5d1e193932dfb99eee023cf94debebbd6ed91f1ddac735b9b4ddd1b0fff906a654fbc817743ecd8d5bff23077e3ce3 SHA512 a0c7541b1b59f8f2d8bcc34abd8d5c2598759eb763185d2d91d99ace036bc90c0dce96e07ce89dd2b4027a954688b5586fada529df88d9f8aaa1e2571d1470dd
|
||||
EBUILD prometheus-2.4.2.ebuild 2022 BLAKE2B 69eea2c4dfab150401f9e2f5d5eee0b39302360aca4b50264d638af6aca8cb80f8d6d424c4c23559999c88a693e947ddc92c0ba7267f12de2d31b0a40e0069d6 SHA512 ad39a7549630cec742b8fc5f09afb2552b74ccc8084f8e8213d5c3fda5aecc63bc9e9a9c740226ce721b2cd9e50703fa58573aa9a05d31f88c91f98d52609952
|
||||
MISC metadata.xml 331 BLAKE2B 80bf59233349fc1fdc6c102fb65ba146bcde2c5c2a6039ec9b9f50f21a36fb1e8c864cba422e721d01216c792ffcf0429a3a840540305442b5e516ac09c03850 SHA512 06fd0da413c0280a902bbdf50e1e0557375d2208021fda3c3081d8a25a4b17ad1ca647d994dd97ba2d838ea5c87148d3ffd13a8a54cb8dc007b45927df8de47a
|
||||
|
Binary file not shown.
@ -1,14 +1,27 @@
|
||||
DIST amd64-debug-libreoffice-6.0.3.2.tar.xz 1229801400 BLAKE2B 7803c708814a8551c495d6dacd1f15cfe54bbe95b2101f1551519718dc464f990d86ef6bf3f0de88189f0f1119dd23c00b6557c5b59f7a11c12f56849db6a690 SHA512 46a3d5b27598ffe5fa20683aa4419119659e40fdf64e45a6770627e1b308efb19297ab7f856b2b89caeb3df409d569ed4095ae13fb39b1ea4e10305d2caef3ac
|
||||
DIST amd64-debug-libreoffice-6.0.6.2.tar.xz 1226804568 BLAKE2B 0522713fa08168ed1eeada9a3c7562fd43ccae15b03b75cd7b27e9b800d165a45ee66f9540311788547e0da75c3a911831507a956b3c05f73994c09410a92014 SHA512 76a6c22ec217b338cf6f597401aef5b0d523ae9ee99a680e57b26ab07f56460396d6491e6229e71bb50cbdf3fce9912faf560f82b421093db7d5e6dfe9397e28
|
||||
DIST amd64-debug-libreoffice-gnome-6.0.3.2.xd3 337274654 BLAKE2B 469596571d6fd22622218c6dc45d9b72638fb7f00cae7137c8a18a7ba716f0049c9b0e63d6811028784a8bdba999442d3da75d1de1d6a07ac09f66b1eb1e0191 SHA512 4020dc29a8c316f6fab9ff9d77faf30008219b01c0bb0cb2a3b48edf6680b390cfebeee22d361ee4e779af30a3e59c8b1f6677669a87f9a41c11a83ea73dd6c7
|
||||
DIST amd64-debug-libreoffice-gnome-6.0.6.2.xd3 335183287 BLAKE2B 4bd98a0a3f5c3e1a1b5d68eb9601937efbec1f3dd81a4b463fc99420a2f41ce70c5d801f8045afbeadfbc2f0228941e8504344d0a282e431b53e406df4c489b1 SHA512 54ba70e76bc263e8c1ec554b6241fbc3685ce15e3e729c79bd0ab718daa506745425e514b22ace5e46284562192ae5727b7c4fff9f6f5152b5f1e44912345199
|
||||
DIST amd64-debug-libreoffice-gnome-java-6.0.3.2.xd3 611891145 BLAKE2B 9877d89fc3445401754facf2df41c962cc6b69889b2f67b536b6f7bca22ca9b608d834c10eb09ae11f602fe0196b71a37b84f9b92266d72f56c562ef27fcf4de SHA512 175ef1ca77c090e3a6f788925a79b177a7e34e1509d1eb169ca70384821b83b3b32bf4ff4913e6175cddfa3e92ec45dd18ccf1f43c8af9751617e932ff0f58e0
|
||||
DIST amd64-debug-libreoffice-gnome-java-6.0.6.2.xd3 612061584 BLAKE2B 3cba602d840a8c086161fbb46f323bf4a660d25e3c30e90c79241bc5278487d6038661a87b5610e57cbf08074ffa87cfab7620ceefc51828fa1520159415cd32 SHA512 c21a5d30d1fc6602c3fd7e79ee1942aba5c4af0767311d13289a06980f156c1c3b5c21dac8105bc57af5564d5e663ae6af2617bfc18c32330bf8fd452afad1d0
|
||||
DIST amd64-debug-libreoffice-java-6.0.3.2.xd3 602837451 BLAKE2B 71a87e3cfe01391ff0fc921e1e8227e5a5f60ea45fba1ea44c657f5a970edad464b161b60c051a8ae01570407994aebba8d69780475f7200d2c4bbf0faa167b9 SHA512 3c07c774e8b7aeb2ccd0977b9fd0737725fb3818c84d2ea35213e10b87543b73a3f7fc4a0c9748b3ca317c4f631308375720c8f73fe7a488bf07374064fd25ab
|
||||
DIST amd64-debug-libreoffice-java-6.0.6.2.xd3 603154536 BLAKE2B f9584de8d860d4a7d04ffeecd70c094152a134bf45054a1a3526f061a493045ceed27b5e5f0325f8f836e511af1c6bc64b19581c895bbce592b551460c7bcdbb SHA512 8841179dce5b2adf9a5011715354acb1f20b65f44bb318988a9df910428010ef33d59ebd58a06635905044e45da68496a25325184016e41dd8a7753a38f292d3
|
||||
DIST amd64-debug-libreoffice-kde-6.0.3.2.xd3 342896759 BLAKE2B ef402abc0739975818feda3c3112f3af36654d0ca912f017beb76b9d3043d371316b8d294ae56d98acd4d3f4073d9505895f6f8f59f1003dde39a2907db4482b SHA512 877575d6c920db5ceb81f259053c8f7296f596e6bfaf75176bb522592f5eff0b4599f5901b42a553fc224a2245cff15b002f959f001be8e438f5c6c081ea77c4
|
||||
DIST amd64-debug-libreoffice-kde-6.0.6.2.xd3 333983698 BLAKE2B 970a9f50b3f0f6780fde8948686715b3f078aeb7922e2604f24c2f57adde7efade1f47eed1f72d487f4a0f662387bfae8a3e60baa0a05e271fdfeee280282157 SHA512 99837f2968f9d4437047db9fe72e39c35797b3c38d1dc271a0156b4665e0573cc129dbc9b98f9f669c92d340dd034cb5eb005ca768f693181a70d447c0e24d56
|
||||
DIST amd64-debug-libreoffice-kde-java-6.0.3.2.xd3 617577189 BLAKE2B e22f192a8533d3500a3cc362c3d0f713d6e6fbc0874d337cc1742cf7825e4348301885317412ac2c038c6e83269f20e67c526792e0fde91df3cbbe46e5b5bbd5 SHA512 25973bade0ff78f6a482f88449de70cd237d430da1ff8ef561c6fe7eb4459d3e582ceae4721c37e589304324446bf877005de3923b857279c98f112180dca9a1
|
||||
DIST amd64-debug-libreoffice-kde-java-6.0.6.2.xd3 610851675 BLAKE2B 4f23bc53a115a1a5604106bc8398b1aa40ec9d4329fb4146c13919170172205103c73b7f679f8eae66e7d1eebf569536082e738b5ea2e6fa743d60fa8d7b2c5f SHA512 9a4195becf67a31f0c7ba6653b1c878d4b00af43f2642a80ee097eb99176114595cc2373092df9034c44593d5a3db83dd252541ba22109176393ef276b126345
|
||||
DIST x86-debug-libreoffice-6.0.3.2.tar.xz 1201421892 BLAKE2B 205c3eda17dde4f096347e962bd3e4b9806da6e1b9266c72fe85b3ecce1d8286ff16857ee32108daea3641cc9fdb92fdbc7b0f175db5b6513d8cea2407ffc071 SHA512 93211e233504f590e3b00a6322038ff40840c446e09094e781d5779d11d0c746cb3b783bee582401cda994ee9424643d5b05fb1673906deeb022b7aee7ecbcb6
|
||||
DIST x86-debug-libreoffice-6.0.6.2.tar.xz 1198893492 BLAKE2B 36eaace94d6d5bd17be50cd58924cec5459663de005d1e9cc17de13e420426dd9f75ebc30fa2e624d2ee37fb3836cde6008dbb8ea023e454603d8a733e02be80 SHA512 960c973b27ed04e27f40468823cdb092771983995760a008b733ff76af8a25ed9dc4a5fef3ba1969f881544d0d8a92476fe28ff1ff9a123cc095b4d591f28fce
|
||||
DIST x86-debug-libreoffice-gnome-6.0.3.2.xd3 327309281 BLAKE2B c27828cced30fe648ceb1005df12c2ca931dc65d3ca696dc763cf458991c92ec8ba89a98c96c30eb60b8ba7f4f6d6df40015c7e1472c656c6cb694f25e83397a SHA512 572a7126a762a8d9c3783f772b9b6b8de931e384d5699a549466157f2fa464843e3d931261e6193221fb1dc53df22e96ba8ab4f68d920bcbfa254c1a397a9082
|
||||
DIST x86-debug-libreoffice-gnome-6.0.6.2.xd3 325202188 BLAKE2B b1bdd507d9d56e4ad9d8880998b866053c76c369e29a283dbefd4d9ad73f45852ae22e4f84b10efb3290db25e1c7a5459c4c622144933b98fb581887e2f48fe1 SHA512 f5e2e806866e4990fe5c5040563c0dde7e7e7cdcb7e1b15d507a3fc7895a43ea03e941d4d06c89ce4c9b9d0776909b5a5da0962d0550ef5c65c3b2f98d2acb6c
|
||||
DIST x86-debug-libreoffice-gnome-java-6.0.3.2.xd3 590466385 BLAKE2B ce857408beada974f07df57f83e4abcd905994be1c393ee5a0319b879c561192fa2a2f7a122f530d82a0cc16ded766e49244c37b463c26bccadf2cfd811a0654 SHA512 2e1981190931cee047dc80bbc43f189447c0e7c3f533438efc7bdc001116db560530af3cd89e6e11d31d65fd05dac914fb40b0b715e5494968436fedc600ca49
|
||||
DIST x86-debug-libreoffice-gnome-java-6.0.6.2.xd3 588188373 BLAKE2B ca498345862349b7181cb1cf1dfce8669867f5ce0f40404575c3325bb36b44f89f5d25ec44fbcc71f6c604ed43889870d93d9c8f94680ef102b8b45b1127c106 SHA512 dac4ab117a4992e9b6e3e9a9e4657ed9ba2cd01630cbda6b9f8b6ed8a6e75e4a212cdcbc3040e1dff991a12212e1d2c242f461a08d236a4888e86179521146fc
|
||||
DIST x86-debug-libreoffice-java-6.0.3.2.xd3 581633470 BLAKE2B 83f32dbc5c095738a485f0dae6ce0a436f64032d9ae4e3ec789f3e1e3e73fb3155ede192fa9132f407556029c33c3915d08f5fb0a5ca05ddcd5b2f99ad48b3d7 SHA512 c31ce9b366879e7d43001212d6a49bb787bfa916b34e2b3faef8560a7b87f8a3eb25d08b2b1daea615c89e36dc98dfc79878e37038433ba3c26427230c90928f
|
||||
DIST x86-debug-libreoffice-java-6.0.6.2.xd3 579363410 BLAKE2B 5c75930a70f21696d985ee876d2fee1e92494fc9db4ff103ebc9626887fc397905f1362127848d941fe62bb70749817ef972984a60d7449753ec04aee4bd61ba SHA512 92d933204804eb3faf9beca6f075d0ff435785f13fe5fbf0701ce0e2d59102797df85ac33c50b2a62e36f9c9566c04f6551a34fd7376913592edc96f40641fdb
|
||||
DIST x86-debug-libreoffice-kde-6.0.3.2.xd3 326143479 BLAKE2B f1e4a4804b0f5b9bd26f7cada129c6de72d39706e41fde3223d933ced0aa50ff60922dee22e6d3dfbfbfb26e5d219a92644e394793fe413041173672de7704ad SHA512 22a1e19316be3f5bec3ae62dc470ef46065ebe2cc3963fe4952d0285efdb4a434224034eb8dfaa60da866ce2854e0020518e088a4be322b944f7929ceb06bb11
|
||||
DIST x86-debug-libreoffice-kde-6.0.6.2.xd3 324043934 BLAKE2B 4f1da55ca925acacc6621389e2c2dc281b39ee8cd93a819a28c9495af6c333786d9745a3021ba9db46094d5d32a345d1b4731c9e11d59304cbcd0139ac443f25 SHA512 b0103f32bf0314066011442a93144de8bf13e6116b9c9e93656d832d4c7ff8fcdfc2c22ac1aa52887a3ed35476d8954e2064e3e0e66cb43e40c4aa5469207363
|
||||
DIST x86-debug-libreoffice-kde-java-6.0.3.2.xd3 589281609 BLAKE2B 7446486d969b3672dee561b98360fdaaf4a8c61de6bec38c7de92716db5694641b6429b3aec025649a0970d30b70e8b6a168bad320571b7c72061985b14acf92 SHA512 aa25befbad574afa525477ff23ff77bc59edebdd7bd66bb20174bcce0a99164a149c572054ccc888fd0179bcb539f746b74201f01bdc35dc613b116a6b86bf49
|
||||
DIST x86-debug-libreoffice-kde-java-6.0.6.2.xd3 587012572 BLAKE2B 5a3495eb3a1b9149e9378501303716c76ba1ce82f18339e60b1727f1467e351b9fa788196fae0f03aac122534d36f26d19d10421fea79603b4240a580b1a6b6d SHA512 64fcbb87757cb8519a2d4c9935c677f112d1d6f570ee30d6226525e9159fc136271e8b31f15ea06864d63f3003526d84c6253c6f532fd0cacc99f755396bbf50
|
||||
EBUILD libreoffice-bin-debug-6.0.3.2.ebuild 2679 BLAKE2B 5d8267d6479ed3e62533f4254f401ca2641ffa93989820a25c5a22425b3e905c2aa9b26d3c177cc5fbbc5cf4d424228e27f57de3080170b24d284aa57328e08c SHA512 89d8eeedc6b58113ebc47c943f970402d5f1465807376621ed09ac877df37e57529490ba60e6cd380e895fca0cb27e2fb4c5345af61c22acf467f13ee878dfb8
|
||||
EBUILD libreoffice-bin-debug-6.0.6.2.ebuild 2631 BLAKE2B b909bb6f3a6758b3046e9f6e8bd71bddd58a8ca1c5624b2997d0cc9c834323ea669e4172a508e05e1459d9918f80354fc799f35f6a62b83db8f4dc76b6254e38 SHA512 8e4b5dc0250709283396dc9a89508ff55595a26b79d84143f86b94c1d23cfd27a2126a9d456f461eb35a4e68a8318f2456f93cafa60423b57b7304a92083e551
|
||||
MISC metadata.xml 481 BLAKE2B 2b7085b47722f20719ca5e219b52e4334c4819db8c61dcee1446ac28e70cd90a3ac7e1713a4e95a0d3952d931ebcc34b137294b1e17f79cea9f41ec31fb3cd55 SHA512 6c5698440da103c49a6a26c99d3af9ef88f79a74542bca66cc8adad77dd5412760630e5753f163e92cbe58b53c0fd899b9115ca3ae85627bbacdc01c6dd7bb63
|
||||
|
@ -0,0 +1,87 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
BASE_PACKAGENAME="debug"
|
||||
BASE_AMD64_URI="https://tamiko.kyomu.43-1.org/distfiles/amd64-${BASE_PACKAGENAME}-"
|
||||
BASE_X86_URI="https://tamiko.kyomu.43-1.org/distfiles/x86-${BASE_PACKAGENAME}-"
|
||||
|
||||
DESCRIPTION="LibreOffice, a full office productivity suite. Binary package, debug info"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
SRC_URI_AMD64="
|
||||
${BASE_AMD64_URI}libreoffice-${PVR}.tar.xz
|
||||
kde? (
|
||||
!java? ( ${BASE_AMD64_URI}libreoffice-kde-${PVR}.xd3 )
|
||||
java? ( ${BASE_AMD64_URI}libreoffice-kde-java-${PVR}.xd3 )
|
||||
)
|
||||
gnome? (
|
||||
!java? ( ${BASE_AMD64_URI}libreoffice-gnome-${PVR}.xd3 )
|
||||
java? ( ${BASE_AMD64_URI}libreoffice-gnome-java-${PVR}.xd3 )
|
||||
)
|
||||
!kde? ( !gnome? (
|
||||
java? ( ${BASE_AMD64_URI}libreoffice-java-${PVR}.xd3 )
|
||||
) )
|
||||
"
|
||||
SRC_URI_X86="
|
||||
${BASE_X86_URI}libreoffice-${PVR}.tar.xz
|
||||
kde? (
|
||||
!java? ( ${BASE_X86_URI}libreoffice-kde-${PVR}.xd3 )
|
||||
java? ( ${BASE_X86_URI}libreoffice-kde-java-${PVR}.xd3 )
|
||||
)
|
||||
gnome? (
|
||||
!java? ( ${BASE_X86_URI}libreoffice-gnome-${PVR}.xd3 )
|
||||
java? ( ${BASE_X86_URI}libreoffice-gnome-java-${PVR}.xd3 )
|
||||
)
|
||||
!kde? ( !gnome? (
|
||||
java? ( ${BASE_X86_URI}libreoffice-java-${PVR}.xd3 )
|
||||
) )
|
||||
"
|
||||
|
||||
SRC_URI="
|
||||
amd64? ( ${SRC_URI_AMD64} )
|
||||
x86? ( ${SRC_URI_X86} )
|
||||
"
|
||||
|
||||
IUSE="gnome java kde"
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
|
||||
RDEPEND="=app-office/${PN/-debug}-${PVR}[gnome=,java=,kde=]"
|
||||
|
||||
DEPEND="dev-util/xdelta:3"
|
||||
|
||||
RESTRICT="test strip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
QA_PREBUILT="/usr/*"
|
||||
|
||||
src_unpack() {
|
||||
einfo "Uncompressing distfile ${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar.xz"
|
||||
xz -cd "${DISTDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar.xz" > "${WORKDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar" || die
|
||||
|
||||
local patchname
|
||||
use kde && patchname="-kde"
|
||||
use gnome && patchname="-gnome"
|
||||
use java && patchname="${patchname}-java"
|
||||
|
||||
if [ -n "${patchname}" ]; then
|
||||
einfo "Patching distfile ${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar using ${ARCH}-${BASE_PACKAGENAME}-libreoffice${patchname}-${PVR}.xd3"
|
||||
xdelta3 -d -s "${WORKDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar" "${DISTDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice${patchname}-${PVR}.xd3" "${WORKDIR}/tmpdist.tar" || die
|
||||
mv "${WORKDIR}/tmpdist.tar" "${WORKDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar" || die
|
||||
fi
|
||||
|
||||
einfo "Unpacking new ${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar"
|
||||
unpack "./${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar"
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
dodir /usr
|
||||
cp -aR "${S}"/usr/* "${ED}"/usr/ || die
|
||||
}
|
@ -1,15 +1,28 @@
|
||||
AUX 50-libreoffice-bin 158 BLAKE2B 2091698f80fbe097785c60b20f636150a2ee65bf52639fa1bb4a92341d050146040ad8912c5f5e3ca22e48ac3d819053c9948e256fb1d0e0901f7645934bfb89 SHA512 2d1158f48ac80f9212578d020e5659e777ff494adc3abc94438cec6890b88741f92ea2ed3bb4585ffdabe531d55c6938ca9408e9ece5a438e67d480eb406ed50
|
||||
DIST amd64-bin-libreoffice-6.0.3.2.tar.xz 80241340 BLAKE2B ccf0df99283356aa384bae7d33c92fd44adb3aca4ddfd18a1afefad6c1dbf40e6fd31f2fea2ab53f15beb9d13707632c651d94a512ebc3959ae1dbce432139d7 SHA512 72a955f80c371c899c39ca2b2ad29e029ac5d71d5690b7cc198b413cbd2cf50064ee8340fc7fec82b5db24a1d94148788dfa3685dfd70ca7437aad3c0a443939
|
||||
DIST amd64-bin-libreoffice-6.0.6.2.tar.xz 80491496 BLAKE2B a182c9e47a625e15a08976dbfe16724f6201094bae93f8a9ed7f4b819a1657a0781d4970ea213e652a49c5916e8e34c0dbeaa4989ee6e2ce4760a041a3714a20 SHA512 d5a92d430022a0b56902395e9224e87681130a489b41aa93d171848d7c612d5e2138422e8738d673f43744963fe0caadacd729f49193cd96e9bd1f394c868892
|
||||
DIST amd64-bin-libreoffice-gnome-6.0.3.2.xd3 16533839 BLAKE2B 32513b9df6f67fa54ff61abbf26e48e785cc47ab7f1df38ce5b30bb5e156b79834bbd3933dd9fc15397453af44eb5d1cd60bb07b238df5360ead432f08600bc8 SHA512 677538bf28049dfd4e285ebbe260392ef12730b96c9d5772e919afbea87e07ccbfc427258ecc2715e4dd97e0e0e6c23150a972747848b352281be1da765e07ae
|
||||
DIST amd64-bin-libreoffice-gnome-6.0.6.2.xd3 16613087 BLAKE2B 7cdec36d986fc7ed3c92c26b1ea91c24d8b951d27a8f0f32821f542e7abf456cd611eee79667e2d508a4d9510d1685253807b0e2a0e62a3f3b3e76a03f12cc6b SHA512 1686d19c296096ac2d3400ea06c8a8e00d56e0db2896d66021b88f7025981d14a9ea207cdb68685a1f6efcbe9be133ebdae27771c8e7c8a9e3c5675bb1e20a9f
|
||||
DIST amd64-bin-libreoffice-gnome-java-6.0.3.2.xd3 27088942 BLAKE2B 3642466bec0631a8c801d10e699c027db8ef2b7ffb207113afd4a80cd165c5575647927095e513dbc7ba5cfc256b9b24058559a18ef47107d3632608da5c1744 SHA512 71c47127cdafc1f89a1bbec5d640916fe4005beb3a3cae750685050724817805a564c4c6ffaa1b70157e0769b363bb79b2cd5a70e42edb439e59e8a7678aec57
|
||||
DIST amd64-bin-libreoffice-gnome-java-6.0.6.2.xd3 27267767 BLAKE2B 42e3cdb1754bd97ce11320ed6a01b678399be0fb541fcbe9193dcf662955be4d3483fb561958a94b82c73c4c02cc2de88d80d951514a6a0b4667657907941f41 SHA512 820d340c0d3a20074f636b970f5a6ac37a67ea99be1c1bded2cd2d6a508f05e3406e97d42ccf1f66c9beb19f9d027acf2e557a57157e74ff2873388dca123a2d
|
||||
DIST amd64-bin-libreoffice-java-6.0.3.2.xd3 26086875 BLAKE2B 8b11a74400a5d275c72325842024cc911e38e987bd33f8a42292c4bbba1c6c25f95374c37ddf25377f02e799e47c745704faad0482840e867e53790e76a1fb41 SHA512 b8ecbc631de6451c27a40c5dbe373a829a6a1ac8ad7762817182aac71cb2efb70859badc9f08d67ccb836f32958d79f029236a910f0cd32cd583aff68422af33
|
||||
DIST amd64-bin-libreoffice-java-6.0.6.2.xd3 25919864 BLAKE2B e08fe57214893d270a2f56dd1732a72279f8ba38451ea7bc852ab1d43ea5dab0ff22d77f22456dce260164395f0900c28670c051a992368ebcb1c6a23efef609 SHA512 bf7c988e619399b36471f11ed719b8bac025fe6fb80300b2cd625346035fc823b84b812d68ebd98e81c9eceab632e5a933787088bc55a0719e9ced2305772b55
|
||||
DIST amd64-bin-libreoffice-kde-6.0.3.2.xd3 16836580 BLAKE2B b71b5945367d20e0b05cf17304ff860ba6d504a4922c125028ce02748c7fa88dabf086a0c57f35257f511475f87169137332a0b1a44e7e380041c5cf301266ed SHA512 0ff269492903f66b8702168fc9c0d432aa287ee01d167919abe7cd913e1975b8ae63b28fa4383d96cffced5a71420b445f762aa9ec3163301b164122dbe167cf
|
||||
DIST amd64-bin-libreoffice-kde-6.0.6.2.xd3 16483824 BLAKE2B 1685f5af9ffc3d879130741d7ada9abfdbd0ad54c47fa44cf60425cad9637ed2bb1c787e95193c223be44dd03c04585e27210a53f3cf518d354e698eff48a13d SHA512 897bb83515941724eb2b580887d75627e4113b87f57620046fc298cc83e4a7ced5c49320fd0f2c71c7fbd976b69be796702d8522067747b6b96e766d04d911b1
|
||||
DIST amd64-bin-libreoffice-kde-java-6.0.3.2.xd3 27332736 BLAKE2B 6ec2d1b3e66bc05bce17706206fbecc8cb00d1d472795e1b194286e2da4137aacb97f8fffe86b8628d61c3fcfd95e766ba1e58c0aca4f1ac7bfad26c143a1820 SHA512 7116c9ccac4c6453c5f859c12157ee908ad718958922b3c7cfff460319cb6b214f177f1f922fc670a395ce08630987b7f85497dc20f5802e5d2fc4c1aa7fbb45
|
||||
DIST amd64-bin-libreoffice-kde-java-6.0.6.2.xd3 27132579 BLAKE2B c7f406f0e2d3ab088985b504ddc3bf9c7e8feb1fd569918f21161dca571af134d5cdbc1aac7d00f5a99d8b943088f711ba6066009a7f399826fae85bc5b3443d SHA512 934d5faea55ec1a8292c3d45a6621e773f1132a51bf513703237b684b22784acbada8b6e5fa0e119ee4ebcf15873f4d7fc56aa60007632da32ed8ed54b6ef1cc
|
||||
DIST x86-bin-libreoffice-6.0.3.2.tar.xz 82383316 BLAKE2B 24841434c900c08fe8090e1981cf700b671dc19b7e38bc4d2a228dd86a31feec70de4c569bf9fafae48ca5adba7f7822d491433dd9579a889c9b29da319d00b6 SHA512 c9f16eacdc3efcb30c27df072851e31f519de421254b75196e566c594ae7bb9dab89effb37755554db7c24293bd96efd3647ab586ca63d20cdaf0f69512f49df
|
||||
DIST x86-bin-libreoffice-6.0.6.2.tar.xz 82803120 BLAKE2B 0257d683e1c567076619303302ae29497bb27ecc38504cec731a71b062d0f7c815dcb0e0c1738a7fad2b22e619c4d9e96932e8cb2b357923131ca50f90945a62 SHA512 8d84192778ea5f3d08c4e02cbb78234dbb5f042e17e591750659414e9bf4845155cea9a0435ae51f5cd3e454df8149494ce4407649d8901d15a47b591c0b2575
|
||||
DIST x86-bin-libreoffice-gnome-6.0.3.2.xd3 15746873 BLAKE2B ea6ba788dea6e4bf7d02359fc9278306536d6dc67fd1cdf034df012ce66ebf0ffed7a1992ec3630da8788516a07dc4960b7afd1cd885c959f758af80c436b13d SHA512 227556f927e1a9b02120d280605675e2b89598cf8d0af14074cd2caf12da1a939b275c9c720c3eb90319ab88ac5c452e4e84a0dedc62f4b0d02c3ab015503bad
|
||||
DIST x86-bin-libreoffice-gnome-6.0.6.2.xd3 16698373 BLAKE2B 28926e6691e420aec86c4ad55f01e34a40e5eb3be326c65e2340d794a2a779a57f55a60f596c48488e7c07bfcf597658b77ee4aa0fa88ae06f042590d4d29eeb SHA512 3c9b86e16a5d9f6ca4d0b4d54401641d344ed7ad49bd5dc4425f6714b60d8538dc7e35c5223ef75a18993fdb221d84673885f7078d235d423a9aacccbeed567b
|
||||
DIST x86-bin-libreoffice-gnome-java-6.0.3.2.xd3 25278665 BLAKE2B 73f17e5a6f247aec8183af3602a0e006670e128402fc313ee9421a279a35f39fe4143351df5570e2210fa0b1fe8380f54a719275ea8f35a64883209d599fa04c SHA512 0910cf556e3f6aebafe95f9dd0db45bbb90032f42a4b0245a2447b82f0cd0dd38837a499f4fa308409866fe0c3c3daa8601d75ab831fb5e5e521a02a5984542b
|
||||
DIST x86-bin-libreoffice-gnome-java-6.0.6.2.xd3 24522170 BLAKE2B 4bebdb968972ec06cd6ff65fad101dd857ac7cad3e1ff5c60396cfe24c75ebca2c9a043568444fd20e1b359531ab2902a818e954a98fd51d0396bbbafd6ff8fd SHA512 cf654354b653d682b79b22709ed3129f593e8f6de37f20e643125ebd3f4b0684e607d2fbe86ad0e69d10f113ddbfaa85d05d0f0e534ab5655fe7fa37265bd75e
|
||||
DIST x86-bin-libreoffice-java-6.0.3.2.xd3 22891551 BLAKE2B 9c83e2028c83f4b03cc4ff2b09fc207ef7dfe7168afb982519ef1581b06d97f78852fc92beebed3af04c92619d4852bf2e087601f02db6ccd3ebebb19ce8a540 SHA512 ef3b518da2d30ebab5d3a86a672adc696f68a970ab69cfd575f9687ea257985d5ccdde68587803830ad2583c1bfcc3f9e7fd30c70ede3abd8bf34b3d978c1d8b
|
||||
DIST x86-bin-libreoffice-java-6.0.6.2.xd3 23279002 BLAKE2B fc540ffbbab1d9dc5c1dd4a05425d2682188e9245532f1cc855277eda8f69e1a4e7d6f3a6ae1041d8b2f66a9f220bd2869fb2358ae7ed658b2e793ea6960986b SHA512 b953afa7faa715a2713e0aebb7fc740f9dbd7bd10830385d3cb19530f6bb4714dffa59eebc42656fa92b12b70bb71825790bdd8203a1874f0aa2604b4e736934
|
||||
DIST x86-bin-libreoffice-kde-6.0.3.2.xd3 14377062 BLAKE2B dfd9f68bb720ab03b13c3b5af83d43bbbab28ac5f263806aa89e140654b8be2a6ddf973a3ba26d97ec517ecd97c939517376f3bb8214d38bdd50d844eda0edce SHA512 d87c81ff379e3d59f014a4c14397c4020c5022db353cd5b1e00d56a4cb9aeb1f3e608b9ec1396fc54bd54c8fecd2e48cccce6cf0f4a0831763703f6f512e2fbe
|
||||
DIST x86-bin-libreoffice-kde-6.0.6.2.xd3 16613416 BLAKE2B c10e126670a948f60f51f935150d803a20e3f26ea43822173a8d31818bfa851b52ae75a038bb8fa3ae3e3547459264ce882670e88d2f132bf6315a2aa60504f4 SHA512 f857c19d0f6f431be9e9efb40daae14b5f762bf2580024215fa751e9ccccc3dbd368b5214f1669f590f54870e8d673be58fa57eb9bc452fc4f3126c06f437e7a
|
||||
DIST x86-bin-libreoffice-kde-java-6.0.3.2.xd3 26149695 BLAKE2B 7b8d349b888ca929472a519161ea915c3737cdbabbd4fdc7f850e326efa0cfb24890eb1c13e77ec600878bcd9ec22be87cfa1fa63bb692a739872e2264c28742 SHA512 3a3dbc2824afa8258ec546e500c6e232b8db49ddd489f63ed2d23d3492865bf7fc473518b115099ff68917e91d96188931b870d54f19602f3c8c3e37a5bf56cf
|
||||
DIST x86-bin-libreoffice-kde-java-6.0.6.2.xd3 24393402 BLAKE2B db927aa404b4b0d6e9cc5f8be019e5701937f3fc2146d731a8fa007ddedf5a992b1f36c4eb4e30f20821b497d20011441db305d344b24831cfa075a232dc542a SHA512 f42defba10412acb0676fe3e23dfd39a11456812db908ac1e8120d4ef9cf95fce6d1cdcd344c21b6675e17b8117488caa36b0bc44bcabbc77d19c95ac8789875
|
||||
EBUILD libreoffice-bin-6.0.3.2.ebuild 6725 BLAKE2B 1f2422c1a1494f1d40f437134e49d88140f0ad8d5a673ae0992f08dfa3642b057c0315952d7f73891f458929d9d54da3f46070ac59eb3ff0c073416472481d48 SHA512 c886bab7dab9c99839bdd18d497f7bea12379fa7c5937dacdaed87cabf4d1562a9fee2473feb168e56cae85f42ae3d9e9391b273ceb95ae1c5d6094a99506429
|
||||
EBUILD libreoffice-bin-6.0.6.2.ebuild 6797 BLAKE2B 72113e6757ac76c20e39411e08f86584bc3628568ec2d40a3362da5f8edcd423e1c5b2550be920099ad53797e080a807fae75c8c74b5dcd9fe0b2059f24d0694 SHA512 873d619eec0ffa807a235b16fba0667ed6d96f8e1326d45cbbb2063688e944085851230474727a999f33ee80a2b42eb3e894fc2f51465d9a7c21100d21c08cbf
|
||||
MISC metadata.xml 510 BLAKE2B 3c08e88fbf4a981a3adde50ee62d59899f24f87b2aee7359bec6c337adde486096de536227d81b1e3eeb2a27e01c08ca1d91db6d9311e0d34211528f63aea23c SHA512 12331dfd1fe409ce5a65bcf1ce8bd2e23f2e789b7009216e987b861fde897b78b16487399338af0e94e9e40da70ba32624251d71de5aae7d5b23891f54a994f0
|
||||
|
@ -0,0 +1,275 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
BASE_PACKAGENAME="bin"
|
||||
BASE_AMD64_URI="https://tamiko.kyomu.43-1.org/distfiles/amd64-${BASE_PACKAGENAME}-"
|
||||
BASE_X86_URI="https://tamiko.kyomu.43-1.org/distfiles/x86-${BASE_PACKAGENAME}-"
|
||||
|
||||
PYTHON_COMPAT=( python3_6 )
|
||||
PYTHON_REQ_USE="threads,xml"
|
||||
|
||||
inherit gnome2-utils java-pkg-opt-2 python-single-r1 pax-utils prefix versionator xdg-utils
|
||||
|
||||
DESCRIPTION="A full office productivity suite. Binary package"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
SRC_URI_AMD64="
|
||||
${BASE_AMD64_URI}libreoffice-${PVR}.tar.xz
|
||||
kde? (
|
||||
!java? ( ${BASE_AMD64_URI}libreoffice-kde-${PVR}.xd3 )
|
||||
java? ( ${BASE_AMD64_URI}libreoffice-kde-java-${PVR}.xd3 )
|
||||
)
|
||||
gnome? (
|
||||
!java? ( ${BASE_AMD64_URI}libreoffice-gnome-${PVR}.xd3 )
|
||||
java? ( ${BASE_AMD64_URI}libreoffice-gnome-java-${PVR}.xd3 )
|
||||
)
|
||||
!kde? ( !gnome? (
|
||||
java? ( ${BASE_AMD64_URI}libreoffice-java-${PVR}.xd3 )
|
||||
) )
|
||||
"
|
||||
SRC_URI_X86="
|
||||
${BASE_X86_URI}libreoffice-${PVR}.tar.xz
|
||||
kde? (
|
||||
!java? ( ${BASE_X86_URI}libreoffice-kde-${PVR}.xd3 )
|
||||
java? ( ${BASE_X86_URI}libreoffice-kde-java-${PVR}.xd3 )
|
||||
)
|
||||
gnome? (
|
||||
!java? ( ${BASE_X86_URI}libreoffice-gnome-${PVR}.xd3 )
|
||||
java? ( ${BASE_X86_URI}libreoffice-gnome-java-${PVR}.xd3 )
|
||||
)
|
||||
!kde? ( !gnome? (
|
||||
java? ( ${BASE_X86_URI}libreoffice-java-${PVR}.xd3 )
|
||||
) )
|
||||
"
|
||||
|
||||
SRC_URI="
|
||||
amd64? ( ${SRC_URI_AMD64} )
|
||||
x86? ( ${SRC_URI_X86} )
|
||||
"
|
||||
|
||||
IUSE="gnome java kde"
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
|
||||
BIN_COMMON_DEPEND="
|
||||
app-text/hunspell:0/1.6
|
||||
=app-text/libexttextcat-3.4*
|
||||
=app-text/libmwaw-0.3*
|
||||
dev-libs/boost:0/1.65.0
|
||||
dev-libs/icu:0/60.2
|
||||
>=media-gfx/graphite2-1.3.10
|
||||
media-libs/harfbuzz:0/0.9.18[icu]
|
||||
media-libs/libpng:0/16
|
||||
>=sys-devel/gcc-7.3.0
|
||||
>=sys-libs/glibc-2.26
|
||||
virtual/jpeg:62
|
||||
"
|
||||
|
||||
# PLEASE place any restrictions that are specific to the binary builds
|
||||
# into the BIN_COMMON_DEPEND block above.
|
||||
# All dependencies below this point should remain identical to those in
|
||||
# the source ebuilds.
|
||||
|
||||
COMMON_DEPEND="
|
||||
${BIN_COMMON_DEPEND}
|
||||
${PYTHON_DEPS}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
app-crypt/gpgme[cxx]
|
||||
app-text/hunspell:=
|
||||
>=app-text/libabw-0.1.0
|
||||
>=app-text/libebook-0.1
|
||||
app-text/libepubgen
|
||||
>=app-text/libetonyek-0.1
|
||||
app-text/libexttextcat
|
||||
app-text/liblangtag
|
||||
>=app-text/libmspub-0.1.0
|
||||
>=app-text/libmwaw-0.3.1
|
||||
>=app-text/libodfgen-0.1.0
|
||||
app-text/libqxp
|
||||
app-text/libstaroffice
|
||||
app-text/libwpd:0.10[tools]
|
||||
app-text/libwpg:0.3
|
||||
>=app-text/libwps-0.4
|
||||
app-text/mythes
|
||||
>=dev-cpp/clucene-2.3.3.4-r2
|
||||
=dev-cpp/libcmis-0.5*
|
||||
dev-db/unixODBC
|
||||
dev-lang/perl
|
||||
dev-libs/boost:=[nls]
|
||||
dev-libs/expat
|
||||
dev-libs/hyphen
|
||||
dev-libs/icu:=
|
||||
dev-libs/libassuan
|
||||
dev-libs/libgpg-error
|
||||
>=dev-libs/liborcus-0.13.3
|
||||
dev-libs/librevenge
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
>=dev-libs/redland-1.0.16
|
||||
>=dev-libs/xmlsec-1.2.24[nss]
|
||||
media-gfx/graphite2
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype:2
|
||||
>=media-libs/harfbuzz-0.9.42:=[graphite,icu]
|
||||
media-libs/lcms:2
|
||||
>=media-libs/libcdr-0.1.0
|
||||
>=media-libs/libepoxy-1.3.1[X]
|
||||
>=media-libs/libfreehand-0.1.0
|
||||
media-libs/libpagemaker
|
||||
>=media-libs/libpng-1.4:0=
|
||||
>=media-libs/libvisio-0.1.0
|
||||
media-libs/libzmf
|
||||
net-libs/neon
|
||||
net-misc/curl
|
||||
net-nds/openldap
|
||||
sci-mathematics/lpsolve
|
||||
sys-libs/zlib:=
|
||||
virtual/glu
|
||||
virtual/jpeg:0
|
||||
virtual/opengl
|
||||
x11-libs/cairo[X]
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
net-print/cups
|
||||
dev-libs/dbus-glib
|
||||
gnome? (
|
||||
dev-libs/glib:2
|
||||
gnome-base/dconf
|
||||
gnome-extra/evolution-data-server
|
||||
)
|
||||
media-libs/gstreamer:1.0
|
||||
media-libs/gst-plugins-base:1.0
|
||||
gnome? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
gnome-base/dconf
|
||||
media-libs/mesa[egl]
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/pango
|
||||
)
|
||||
kde? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
gnome-base/dconf
|
||||
media-libs/mesa[egl]
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/pango
|
||||
)
|
||||
x11-libs/gdk-pixbuf
|
||||
>=x11-libs/gtk+-2.24:2
|
||||
x11-libs/pango
|
||||
kde? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtx11extras:5
|
||||
dev-qt/qtwidgets:5
|
||||
kde-frameworks/kconfig:5
|
||||
kde-frameworks/kcoreaddons:5
|
||||
kde-frameworks/ki18n:5
|
||||
kde-frameworks/kio:5
|
||||
kde-frameworks/kwindowsystem:5
|
||||
)
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!app-office/libreoffice
|
||||
!app-office/openoffice
|
||||
media-fonts/dejavu
|
||||
media-fonts/liberation-fonts
|
||||
media-fonts/libertine
|
||||
|| ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
|
||||
java? ( >=virtual/jre-1.6 )
|
||||
kde? ( kde-frameworks/breeze-icons:* )
|
||||
"
|
||||
|
||||
PDEPEND="
|
||||
=app-office/libreoffice-l10n-${PV}*
|
||||
"
|
||||
|
||||
DEPEND="dev-util/xdelta:3"
|
||||
|
||||
# only one flavor at a time
|
||||
REQUIRED_USE="kde? ( !gnome ) gnome? ( !kde ) ${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RESTRICT="test strip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
PYTHON_UPDATER_IGNORE="1"
|
||||
|
||||
QA_PREBUILT="/usr/*"
|
||||
|
||||
pkg_pretend() {
|
||||
[[ $(gcc-major-version) -lt 4 ]] || \
|
||||
( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 4 ]] ) \
|
||||
&& die "Sorry, but gcc-4.4 and earlier won't work for libreoffice-bin package (see bug #387515)."
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
einfo "Uncompressing distfile ${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar.xz"
|
||||
xz -cd "${DISTDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar.xz" > "${WORKDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar" || die
|
||||
|
||||
local patchname
|
||||
use kde && patchname="-kde"
|
||||
use gnome && patchname="-gnome"
|
||||
use java && patchname="${patchname}-java"
|
||||
|
||||
if [ -n "${patchname}" ]; then
|
||||
einfo "Patching distfile ${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar using ${ARCH}-${BASE_PACKAGENAME}-libreoffice${patchname}-${PVR}.xd3"
|
||||
xdelta3 -d -s "${WORKDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar" "${DISTDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice${patchname}-${PVR}.xd3" "${WORKDIR}/tmpdist.tar" || die
|
||||
mv "${WORKDIR}/tmpdist.tar" "${WORKDIR}/${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar" || die
|
||||
fi
|
||||
|
||||
einfo "Unpacking new ${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar"
|
||||
unpack "./${ARCH}-${BASE_PACKAGENAME}-libreoffice-${PVR}.tar"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cp "${FILESDIR}"/50-${PN} "${T}"
|
||||
eprefixify "${T}"/50-${PN}
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
dodir /usr
|
||||
cp -aR "${S}"/usr/* "${ED}"/usr/
|
||||
|
||||
# prevent revdep-rebuild from attempting to rebuild all the time
|
||||
insinto /etc/revdep-rebuild && doins "${T}/50-${PN}"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
|
||||
pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
|
||||
pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/unopkg.bin
|
||||
|
||||
use java || \
|
||||
ewarn 'If you plan to use lbase application you should enable java or you will get various crashes.'
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
Binary file not shown.
@ -1,5 +1,7 @@
|
||||
DIST master-pdf-editor-5.1.30_qt5.amd64.tar.gz 16150271 BLAKE2B dfbdacb6df75d268c57cc5d7f6c949c796abecd09394a80694dfc05b5e666c4e836f636b5af6a17a309625ed243e88c1871347e8f7162b6e3f8c47fc27d83e26 SHA512 3cc0a85e9518e75581cfdc05ac8dbdbd534fa11b4f4cfb490a0e9b411b84c073d52e9a5a3aa620507c88117cc04e033f5e860e335b37aef49eec95f2352e9b21
|
||||
DIST master-pdf-editor-5.1.36_qt5.amd64.tar.gz 16149439 BLAKE2B 882f399bfb5cf7b2a39c8174f541a1124953df5bc3bf5ded27bba1eec3ebc966e1b5c0174219759995d939ff203426a2004be61989fa7d062c26dc64320769b5 SHA512 934e9d856476e412a7b40858365e843a8350f638b48a9b593faeab12cd9032243042fd11929e826a294a29ab3810110c40fdd07f56e8c5d0fb6fa2f957a36c21
|
||||
DIST master-pdf-editor-5.1.42_qt5.amd64.tar.gz 16150053 BLAKE2B bd536d34621d79dae596127418b23495ea2daa2906668ee006ed2ba32e61d8cd71fa1471e90496e615ae67108cd90e072c01f6dbf53671d3f0d783421e63c06c SHA512 c1c53af9235a4f31cd108643fcafab9265de56ffe1a0949af1a39aaf0df8dec50cd8f5bd426fbd1750d6e59323628bd626c0acd7a788324c81b01e6793e0f5f3
|
||||
EBUILD master-pdf-editor-5.1.30.ebuild 1186 BLAKE2B 7cdad5f7b3ddd475afe443a8311a975fb5923f31305ef115745bdebeeaccc0bde057cdc5689d58159b774ad8247a98890108555faf315c1fd4e6026f8b1a9945 SHA512 9840b21b297e7913f628d0acda4804e73ad5bd46847e14862da07aca13b9cdca4747e66de079c426dca7213abf758d950fc48127a71dd3a32280d9b053f5e4e8
|
||||
EBUILD master-pdf-editor-5.1.36.ebuild 1186 BLAKE2B 7cdad5f7b3ddd475afe443a8311a975fb5923f31305ef115745bdebeeaccc0bde057cdc5689d58159b774ad8247a98890108555faf315c1fd4e6026f8b1a9945 SHA512 9840b21b297e7913f628d0acda4804e73ad5bd46847e14862da07aca13b9cdca4747e66de079c426dca7213abf758d950fc48127a71dd3a32280d9b053f5e4e8
|
||||
EBUILD master-pdf-editor-5.1.42.ebuild 1186 BLAKE2B 7cdad5f7b3ddd475afe443a8311a975fb5923f31305ef115745bdebeeaccc0bde057cdc5689d58159b774ad8247a98890108555faf315c1fd4e6026f8b1a9945 SHA512 9840b21b297e7913f628d0acda4804e73ad5bd46847e14862da07aca13b9cdca4747e66de079c426dca7213abf758d950fc48127a71dd3a32280d9b053f5e4e8
|
||||
MISC metadata.xml 367 BLAKE2B 8636a0f12f2f2a38aaa943268b978e9269877950e8ec447f4d012e9c1833c474cff5b1d7f53a99f2ec29315858812068e7ab7f42df60127944c8edcda3a5746e SHA512 d54bf635e54008ebabde5039e2527297b8f80204138c90c7744d928041445ca667232a92e6b7ca357f844f2c8ada6b80f13b7de4ae4768e30ec676b55ae73156
|
||||
|
@ -0,0 +1,51 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit xdg-utils desktop
|
||||
|
||||
DESCRIPTION="A complete solution for viewing and editing PDF files"
|
||||
HOMEPAGE="https://code-industry.net/free-pdf-editor/"
|
||||
SRC_URI="https://code-industry.net/public/${P}_qt5.amd64.tar.gz"
|
||||
|
||||
LICENSE="master-pdf-editor"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
RESTRICT="mirror"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=media-gfx/sane-backends-1.0
|
||||
>=dev-qt/qtsvg-5.4.1:5
|
||||
>=dev-qt/qtnetwork-5.4.1:5
|
||||
>=dev-qt/qtgui-5.4.1:5
|
||||
>=dev-qt/qtprintsupport-5.4.1:5
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}"
|
||||
|
||||
QA_PREBUILT="/opt/${PN}/masterpdfeditor5"
|
||||
|
||||
S="${WORKDIR}/${PN}-${PV%%.*}"
|
||||
|
||||
src_install() {
|
||||
insinto /opt/${PN}
|
||||
doins -r fonts lang stamps templates masterpdfeditor5.png
|
||||
|
||||
exeinto /opt/${PN}
|
||||
doexe masterpdfeditor5
|
||||
dosym ../${PN}/masterpdfeditor5 /opt/bin/masterpdfeditor5
|
||||
|
||||
make_desktop_entry "masterpdfeditor5 %f" \
|
||||
"Master PDF Editor ${PV}" /opt/${PN}/masterpdfeditor5.png \
|
||||
"Office;Graphics;Viewer" \
|
||||
"MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;\nTerminal=false"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
}
|
Binary file not shown.
@ -0,0 +1,67 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit systemd s6 tmpfiles
|
||||
|
||||
DESCRIPTION="Gentoo MySQL init scripts."
|
||||
HOMEPAGE="https://www.gentoo.org/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
# This _will_ break with MySQL 5.0, 4.x, 3.x
|
||||
# It also NEEDS openrc for the save_options/get_options builtins.
|
||||
# The s6 support was added after openrc 0.16.2
|
||||
# mysql-connector-c needed for my_print_defaults
|
||||
RDEPEND="
|
||||
!<dev-db/mysql-5.1
|
||||
!<sys-apps/openrc-0.16.2
|
||||
dev-db/mysql-connector-c
|
||||
"
|
||||
# Need to set S due to PMS saying we need it existing, but no SRC_URI
|
||||
S=${WORKDIR}
|
||||
|
||||
src_install() {
|
||||
newconfd "${FILESDIR}/conf.d-2.0" "mysql"
|
||||
|
||||
# s6 init scripts
|
||||
if use amd64 || use x86 ; then
|
||||
newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6"
|
||||
newinitd "${FILESDIR}/init.d-s6-2.2" "mysql-s6"
|
||||
s6_install_service mysql "${FILESDIR}/run-s6"
|
||||
s6_install_service mysql/log "${FILESDIR}/log-s6"
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}/init.d-2.2" "mysql"
|
||||
newinitd "${FILESDIR}/init.d-supervise" "mysql-supervise"
|
||||
|
||||
# systemd unit installation
|
||||
exeinto /usr/libexec
|
||||
doexe "${FILESDIR}"/mysqld-wait-ready
|
||||
systemd_newunit "${FILESDIR}/mysqld-v2.service" "mysqld.service"
|
||||
systemd_newunit "${FILESDIR}/mysqld_at-v2.service" "mysqld@.service"
|
||||
dotmpfiles "${FILESDIR}/mysql.conf"
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/logrotate.mysql" "mysql"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process mysql.conf
|
||||
if use amd64 || use x86 ; then
|
||||
elog ""
|
||||
elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
|
||||
elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf"
|
||||
fi
|
||||
|
||||
elog ""
|
||||
elog "Starting with version 10.1.8, MariaDB includes an improved systemd unit named mariadb.service"
|
||||
elog "You should prefer that unit over this package's mysqld.service."
|
||||
einfo ""
|
||||
}
|
@ -1,460 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT=$(get_major_version)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
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
|
||||
}
|
@ -1,460 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT=$(get_major_version)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
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
|
||||
}
|
@ -1,449 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
|
||||
zh_TW"
|
||||
|
||||
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT=$(get_major_version)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
$(use_enable nls nls "'$(l10n_get_locales)'")
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
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
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${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
|
||||
}
|
@ -1,450 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,450 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,482 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,482 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,488 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
if use alpha && use server ; then
|
||||
ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
|
||||
ewarn "As a result, performance will be extremely degraded."
|
||||
fi
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,488 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
if use alpha && use server ; then
|
||||
ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
|
||||
ewarn "As a result, performance will be extremely degraded."
|
||||
fi
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,493 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,493 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="https://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
DIST libmirage-3.1.0.tar.bz2 234649 BLAKE2B 1b0194fc6271454481ba752f2e7241d9aa69b8d1608dc059b17eb32ad78ee7721d0f85677511e97ccc6fd708690950d0ed6ab662cdff4ccd94804b1a5756542b SHA512 fcf49b171b6f84ad32cdeeb63def76e8bd5c5f33aadcc678e06d7388d0c351e8047beae6db9db7b69f704ab4db86aca4e8fb9817b2450c70b5f1d3d7a3760394
|
||||
DIST libmirage-3.2.0.tar.bz2 234214 BLAKE2B f2b8c42eed89efaeddb8051160c51814b4df45c1ca7cdb4cef683b86ea73dcd1446c6806588a9df0410da5b3971ce8945f2479022f21177237ee8b0d4b18d2d3 SHA512 15507154441b660f5a58e1101d4e6f9931a7640b90d3de5e387274c72be07f367b54a6be34dd31442bc504459414f611ffc39f86ff6a7381a820d059aef1d6d6
|
||||
EBUILD libmirage-3.1.0.ebuild 1178 BLAKE2B 368ef1f9c2dafa9706b90bd21e360a85997c7f6347260b23f566851eb84d1f0b482dc0367b81ba7ab888d5c80e08718201797d327bce2e6deba61e4a7aeae81b SHA512 e73f833029df60b402a6c4ee05e348c579cf358a5e5a66743b51710629a26d420d88bb5ea336a32ff03207204794f847bd1d668295658a3e4e99f1500d92ed13
|
||||
EBUILD libmirage-3.2.0.ebuild 1179 BLAKE2B 925dc170a2f4affdb5010d885297514f09c25976f429380f21f3450a88f7358aee7cfa03a84a77f627031ac747010ba0b543a11cca252b30199ae0b6d5a0ca95 SHA512 26601559de86c9d6a194aafbeb48180bfbd032e10aa8b1b29cf74705d7803dd65bda3dd0f0e5657260c588ce199fdcd763ed01e0a0d0bd8a632c54eb49c4d93e
|
||||
EBUILD libmirage-3.2.0.ebuild 1178 BLAKE2B 8b781a34e0f1e0d8049b3be8b4fb3c0a11c96cf3bcaa655ba8309ef14e5d298609f6a78f383e1a6895e726b31a442b34c4581c610198bacb517435799fdd4a05 SHA512 491e40196a432fa0fb4d3d1d6adc430e0b0d6fb04b9f1d2b23450c35e4c51aa6984a61d1b9c934b7fa6d856875dc6eaa5204bb46a5b732298409ff467e38a931
|
||||
MISC metadata.xml 455 BLAKE2B 23500677c263c1b8fc4839698bd6f1c08e9821fe4472a0b1725ad4777cfff385531ab6ec966f32a2335571c315b6f886f973451076745aa9fe4297c3cc436a30 SHA512 51c8d87f3c49c81798e4d2e038f911a2e05bfde742f229939f759c6768c6459cf4aa6829981791c57ef766fd447923194d7c14d4ad16951ae505d3b5a73c3479
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
DIST gast-0.2.0.tar.gz 9400 BLAKE2B 1392b9ef3a007d89b6b7af5ca49f3dcaa0689e166845ea25c2e544578f65915114d763b54503825dc2b6958a71ac284ec7ae2cc2cfa861494da28df786d679b4 SHA512 651719c3035d21e02e39cd83fd54212a12c39addf69f7c9e8810ccb7bb9aae7828e176ad0adf55182f0628f18d76cb1e286e498a9665ddb12e91a51dc2303381
|
||||
EBUILD gast-0.2.0.ebuild 481 BLAKE2B 90799c2a5bff14a01c175255cedcbba1a70a9872533fe9a73dca2e05866ba1fd6ece50193c41a3890ce2bc3c690e5b5ca558059931201923edd20ccdff70d4c7 SHA512 4518a20af561cf3aec9365583032b9f80f68ef6032bd42536b1a7f52f35a50b097779949a04cf1608421bc424678136a829528f7d657c79bb609ceefff959105
|
||||
MISC metadata.xml 484 BLAKE2B d3b8be13b37bd1a2ef98b2f164c901cf21c8b73ef9b13914200c85ea26eb07dedaaca66b008dccde88dfa1bfcb733e25aac9920704625b87ce0a11a04e02b489 SHA512 5a3d09427a29d39047f396c91ad544a6cb5568f2af06216fcabc1aa12d9e4d34a71cda272d38667d8fb0114d54971626ad3de0c9d71a708cccd825ea1d7e2504
|
@ -0,0 +1,18 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_6 )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A generic AST to represent Python2 and Python3's Abstract Syntax Tree (AST)"
|
||||
HOMEPAGE="https://pypi.org/project/gast/"
|
||||
SRC_URI="https://pypi.io/packages/source/g/gast/gast-0.2.0.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>perfinion@gentoo.org</email>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
A generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST).
|
||||
GAST provides a compatibility layer between the AST of various Python versions, as produced by ast.parse from the standard ast module.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
Binary file not shown.
@ -1,108 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
# git-r3 goes after ruby-ng so that it overrides src_unpack properly
|
||||
inherit cmake-utils eutils multilib ruby-ng
|
||||
|
||||
DESCRIPTION="A cross-platform ruby library for retrieving facts from operating systems"
|
||||
HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="debug test"
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
|
||||
EGIT_BRANCH="master"
|
||||
S="${S}/${P}"
|
||||
else
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
|
||||
SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${S}/all/${P}"
|
||||
fi
|
||||
|
||||
BDEPEND="
|
||||
>=sys-devel/gcc-4.8:*
|
||||
dev-cpp/cpp-hocon"
|
||||
CDEPEND="
|
||||
>=dev-libs/leatherman-1.0.0:=
|
||||
dev-libs/openssl:*
|
||||
sys-apps/util-linux
|
||||
app-emulation/virt-what
|
||||
net-misc/curl
|
||||
>=dev-libs/boost-1.54:=[nls]
|
||||
>=dev-cpp/yaml-cpp-0.5.1
|
||||
!<app-admin/puppet-4.0.0"
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )"
|
||||
|
||||
RDEPEND="${CDEPEND}"
|
||||
DEPEND="${BDEPEND}
|
||||
${CDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
# Remove the code that installs facter.rb to the wrong directory.
|
||||
sed -i '/install(.*facter\.rb/d' lib/CMakeLists.txt || die
|
||||
sed -i '/install(.*facter\.jar/d' lib/CMakeLists.txt || die
|
||||
# make it support multilib
|
||||
sed -i "s/\ lib)/\ $(get_libdir))/g" lib/CMakeLists.txt || die
|
||||
sed -i "s/lib\")/$(get_libdir)\")/g" CMakeLists.txt || die
|
||||
# make the require work
|
||||
sed -i 's/\${LIBFACTER_INSTALL_DESTINATION}\///g' lib/facter.rb.in || die
|
||||
# be explicit about the version of rspec we test with and use the
|
||||
# correct lib directory for tests
|
||||
sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \
|
||||
-e '/libfacter.*specs/ s/lib64/lib/' CMakeLists.txt || die
|
||||
# be more lenient for software versions for tests
|
||||
sed -i -e '/rake/ s/~> 10.1.0/>= 10/' \
|
||||
-e '/rspec/ s/2.11.0/2.11/' \
|
||||
-e '/mocha/ s/0.10.5/0.14.0/' lib/Gemfile || die
|
||||
# patches
|
||||
default
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=None
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var
|
||||
-DUSE_JRUBY_SUPPORT=FALSE
|
||||
-DBLKID_LIBRARY=/$(get_libdir)/libblkid.so.1
|
||||
)
|
||||
if use debug; then
|
||||
mycmakeargs+=(
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
)
|
||||
fi
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
each_ruby_install() {
|
||||
doruby "${BUILD_DIR}"/lib/facter.rb
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cmake-utils_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
ruby-ng_src_install
|
||||
|
||||
# need a variable file in env.d :(
|
||||
diropts -m0755
|
||||
dodir /etc/env.d
|
||||
echo -n "FACTERDIR=/usr/$(get_libdir)" > "${D}/etc/env.d/00facterdir"
|
||||
fperms 0644 /etc/env.d/00facterdir
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
# git-r3 goes after ruby-ng so that it overrides src_unpack properly
|
||||
inherit cmake-utils eutils multilib ruby-ng
|
||||
|
||||
DESCRIPTION="A cross-platform ruby library for retrieving facts from operating systems"
|
||||
HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="debug test"
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
|
||||
EGIT_BRANCH="master"
|
||||
S="${S}/${P}"
|
||||
else
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
|
||||
SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${S}/all/${P}"
|
||||
fi
|
||||
|
||||
BDEPEND="
|
||||
>=sys-devel/gcc-4.8:*
|
||||
dev-cpp/cpp-hocon"
|
||||
CDEPEND="
|
||||
>=dev-libs/leatherman-1.0.0:=
|
||||
dev-libs/openssl:*
|
||||
sys-apps/util-linux
|
||||
app-emulation/virt-what
|
||||
net-misc/curl
|
||||
>=dev-libs/boost-1.54:=[nls]
|
||||
>=dev-cpp/yaml-cpp-0.5.1
|
||||
!<app-admin/puppet-4.0.0"
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )"
|
||||
|
||||
RDEPEND="${CDEPEND}"
|
||||
DEPEND="${BDEPEND}
|
||||
${CDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
# Remove the code that installs facter.rb to the wrong directory.
|
||||
sed -i '/install(.*facter\.rb/d' lib/CMakeLists.txt || die
|
||||
sed -i '/install(.*facter\.jar/d' lib/CMakeLists.txt || die
|
||||
# make it support multilib
|
||||
sed -i "s/\ lib)/\ $(get_libdir))/g" lib/CMakeLists.txt || die
|
||||
sed -i "s/lib\")/$(get_libdir)\")/g" CMakeLists.txt || die
|
||||
# make the require work
|
||||
sed -i 's/\${LIBFACTER_INSTALL_DESTINATION}\///g' lib/facter.rb.in || die
|
||||
# be explicit about the version of rspec we test with and use the
|
||||
# correct lib directory for tests
|
||||
sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \
|
||||
-e '/libfacter.*specs/ s/lib64/lib/' CMakeLists.txt || die
|
||||
# be more lenient for software versions for tests
|
||||
sed -i -e '/rake/ s/~> 10.1.0/>= 10/' \
|
||||
-e '/rspec/ s/2.11.0/2.11/' \
|
||||
-e '/mocha/ s/0.10.5/0.14.0/' lib/Gemfile || die
|
||||
# patches
|
||||
default
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=None
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
-DBLKID_LIBRARY=/$(get_libdir)/libblkid.so.1
|
||||
)
|
||||
if use debug; then
|
||||
mycmakeargs+=(
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
)
|
||||
fi
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
each_ruby_install() {
|
||||
doruby "${BUILD_DIR}"/lib/facter.rb
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cmake-utils_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
ruby-ng_src_install
|
||||
|
||||
# need a variable file in env.d :(
|
||||
diropts -m0755
|
||||
dodir /etc/env.d
|
||||
echo -n "FACTERDIR=/usr/$(get_libdir)" > "${D}/etc/env.d/00facterdir"
|
||||
fperms 0644 /etc/env.d/00facterdir
|
||||
}
|
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
AUX 3.3.6-ldflags.patch 552 BLAKE2B ebd7496be2a97cf7325d25a46e272fe287e7bd17d7e8c660f584609057ba6823b75bfbcc611178fa70a66b90d2a699d41b7e6b673ded23db188bba47ecd4d11d SHA512 5ef1d02ac3b6eaffc4c7310e80e27204c5eb0ccc9d6627a5da4598a6b13d20fa1a1eab63194578a56a0650eb07c70879370e64030ccf86caf5226a1d1c6fea7e
|
||||
AUX tkzinc-3.3.4-latex.patch 331 BLAKE2B 03697cb54e5c82b7662bd41fc6c0cf35a27c252a849950ffabcdda927d796593a97e3cb4f968b280f0df6478264d9f3e3c532648393c370adb68130b9f255aeb SHA512 20e859529ff20b41193a43baeec4c632107208311de3815795cc2a013741034dac36880d88c11e7dc1c4719259e42a180203c1ac478251ff81eec0e3d7f77ee4
|
||||
DIST Tkzinc-3.3.6plus.tar.gz 1924729 BLAKE2B 9e02b113c37cfb870b2e238591e9b35cf5851c6534249312118c54d179d9ba7dbca17217cd924cfcfb1ef2444697840e3136d0fd1385b976a8a2bfda156c488d SHA512 ead998b69569ebec92e7f60415296262f60b91250b2fe15fdeb9fb71c38756006bedcd9ed2829d915cb6ce3a6461165a48c9037f8e397ba6049a76ae474f7838
|
||||
EBUILD tkzinc-3.3.6.ebuild 988 BLAKE2B 239a80fbafcdf86462f89aefde8f0e6d64b8036e2e3569747f47b9b4b3d1025dbf466265bf52c07695a295aee0b7db3072551fdf4b013d4e3e3b5d7344b883e1 SHA512 dab1039d8d10d96ee21ca89a9feb5894865cfe1947a967e98fd849b2fa19d52dee2e379ae76d4e6cd93aecda7295ba5f09a8708b6b520be4d2aca10ef9516f2e
|
||||
EBUILD tkzinc-3.3.6.ebuild 965 BLAKE2B 367cb0545e41c5fa4671ded64a1030102b1f5f1544f0425baad3d9bd4695b2559f5dd6537e67507492b20bee4f027fcc356efb39de7de8df1c8b02b7d11d44b8 SHA512 9767a0d5028cadc76c19eadf1fcc0857db30de8c8db649f5ada987b9be7a047c94ff0ccb53f215282bb4519926abfa265da6cc76a220d4644acd1cfc36da02f4
|
||||
MISC metadata.xml 252 BLAKE2B 6c4e3a169c57e92842dc5ef7462e8bbc9a0ccae4e58886c00f117732369b30fbe3bc1c6938114f0347a82717ef6df3c2dec6e965e78f61164839b64710914fca SHA512 3120ef58677decf25b1fa664b440335b63625aded86661fd5a49fd9af149c6f829bd7fe88f5a1c8346f1e19ed183a45a42acc6e522ac9de4f4f6609f637fbe7c
|
||||
|
Binary file not shown.
@ -1,7 +1,10 @@
|
||||
DIST bitcoin-0.15.1.knots20171111.patches.tar.xz 443024 BLAKE2B 5010c8d0f6a0bc8cd22ca7d7c73d9e4e689e369f0ba39b59f62fa6b6af3dcf938dfc87d33d3fe595a6e54d99734277a34af068dc29a6e984c76d529fbbe2f383 SHA512 455fadeac6ad57be111104680ec6939d6bf235eb49cde89b9716d36f6914c255b1b69cdea459d89b1bbca56099e793be0c8d7aacf592a9d78495068297bb5890
|
||||
DIST bitcoin-0.16.0.knots20180322.patches.tar.xz 417544 BLAKE2B f14616c81e0694346fd0714032be501ad0b58e82e2a5fcc623b1fdd316759ae7ac584e6c4ab586e8c9f5a402694a36eceac6b2f1c7441da655479f832a8869bd SHA512 9eca9cbae8ce17b38ddb70326760e33e7812db78e79cfe2d1a3518b34eb8fc87fe4c145e46ab60278b14e70a75b3af238342b4e1808a77cbca4b62b8c72fb1eb
|
||||
DIST bitcoin-0.16.3.knots20180918.patches.tar.xz 466344 BLAKE2B c45b96513e4b6317e6a2a55cc3b47302fbe56fb87717ae0197010694013331b5d071b85a11a73c76f08f39e9f0294d3475e89ee63272047df83893de4dbaa390 SHA512 2c3540acc668aeef4b8f01774219736d95395201ddeaccaf70e0bad4a89f05cdd5ffaf630bae0577656efb3580fae92ce0ee4bb1a720ea757ca59e3fd66e1893
|
||||
DIST bitcoin-v0.15.1.tar.gz 7550228 BLAKE2B 0cbb7d0e9d0e5e8eb33502a28289c3f9c86b7c531ed179f7e3e8b601a69a423fa736238a2caae890fd8850eb505533995e578e676860a4014922fbc238185ebb SHA512 a09b6cb64a1649d11e3fd6deeb13a07b1bf4bed504a2fc1c585919459ca8ac1af8e5ecc89dee487359e831a8f12625d54f408f95bb341033d6380b82c290c0d9
|
||||
DIST bitcoin-v0.16.0.tar.gz 6628305 BLAKE2B 69adb5832e2a708431c06bd8ce695f25cfc2b84e7ccf11e77f40c8ec273146208c70a900d0d32f79790cf67fb359c2731b0cecfc1f27ac2d0c4057228a83aed3 SHA512 7a59de44196a3cd5b75bccfe851e8bd7d5a00ae45b6e771e082326d75846e7c6d1f6d449e18b539b95b25aa12b7b79c462367f1c89438bcd1ca6ec84eb42972c
|
||||
DIST bitcoin-v0.16.3.tar.gz 6658712 BLAKE2B 2c20b32ea30aed264115d1bd336b62fa28de69cbf116385508718efd7ff22537c3bd402c0965e0f6ddd8e79fc8b51f388f52f885847d36207a24523e927ca63e SHA512 2da25f56fe9b1f5a81815c14e70ff1a69ec15f742424e2c24d71303a71d57c8050dea5d5ba57425bbe0a01a3995ad9b30f0beea5dbafd1632a627cd3fd9a984d
|
||||
EBUILD bitcoin-tx-0.15.1.ebuild 2470 BLAKE2B 0beaf2e85ddbe60e53efed0fcea6877b9799695fac06da2dad962939a48d1a2bff1f530f1bea92799d3a8001e353cb0f08804d827bc145bca602c503eaadf42e SHA512 aba586d5ef584d1d060668a97117e9602ae1a1626b4e867f42f1a58be918678fece96fdb504b96e04317d3ade34382799100a769e00e5057ebd6f8bc738ee888
|
||||
EBUILD bitcoin-tx-0.16.0.ebuild 2432 BLAKE2B ed1721e555bcfa9490b7291e9d9dd0e901ec713ecf7a1316a930c13f337076ca27a0757afd562776a124a2553e3690a383884e850aa1156e2f457681ef4f60df SHA512 fb46d29926d4c7a1058a5452f36087c27d916608e853beb25ae79e13ea38bbd70842467a22a2170a1c73c0f1b1edc40c9f93e5e1643d5c96db9571a07973eee3
|
||||
EBUILD bitcoin-tx-0.16.3.ebuild 2429 BLAKE2B 269edff0cfca30b64e12baf834176ca2f237bf0519f3662cd907190676c3dd077b4f0e6ecf7c15c48566bb61208f736f6d5f144d5e5f9dcbaec1f28a1c307c1b SHA512 cc35f4ff20fee11e547079e5024f75960b950d533884555c068d203629f4fa490b1e46c2b96f343851085b53e9d057d83530f75b6fc9691f439ab35a40761ca1
|
||||
MISC metadata.xml 620 BLAKE2B e779b6a929a58fad28773a0aba3ef3112df14ce82ce62376b88cbc3519a857faaac6b580d2b5d866b0ec809062cf170e3c29324b03acc005246aea3cef9a0381 SHA512 c253ed29dff90ef2b9cd19b191ad870bd22cbdd371b2f353e724ba950735350225fe6d83c4ca8823ebb395dde9fb5004e781ff78987e2a30c0281ad5e0a4623a
|
||||
|
@ -0,0 +1,98 @@
|
||||
# Copyright 2010-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools bash-completion-r1
|
||||
|
||||
BITCOINCORE_COMMITHASH="49e34e288005a5b144a642e197b628396f5a0765"
|
||||
KNOTS_PV="${PV}.knots20180918"
|
||||
KNOTS_P="bitcoin-${KNOTS_PV}"
|
||||
|
||||
DESCRIPTION="Command-line Bitcoin transaction tool"
|
||||
HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
|
||||
SRC_URI="
|
||||
https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
|
||||
https://bitcoinknots.org/files/0.16.x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~amd64-linux ~arm ~arm64 ~mips ~ppc ~x86 ~x86-linux"
|
||||
IUSE="knots libressl"
|
||||
|
||||
DEPEND="
|
||||
>=dev-libs/boost-1.52.0:=[threads(+)]
|
||||
>=dev-libs/libsecp256k1-0.0.0_pre20151118:=[recovery]
|
||||
dev-libs/univalue:=
|
||||
!libressl? ( dev-libs/openssl:0=[-bindist] )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
DOCS=( doc/bips.md doc/release-notes.md )
|
||||
|
||||
S="${WORKDIR}/bitcoin-${BITCOINCORE_COMMITHASH}"
|
||||
|
||||
pkg_pretend() {
|
||||
if use knots; then
|
||||
elog "You are building ${PN} from Bitcoin Knots."
|
||||
elog "For more information, see:"
|
||||
elog "https://bitcoinknots.org/files/0.16.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
|
||||
else
|
||||
elog "You are building ${PN} from Bitcoin Core."
|
||||
elog "For more information, see:"
|
||||
elog "https://bitcoincore.org/en/2018/09/18/release-${PV}/"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
|
||||
|
||||
eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
|
||||
|
||||
if use knots; then
|
||||
eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
|
||||
eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
|
||||
eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
echo '#!/bin/true' >share/genbuild.sh || die
|
||||
mkdir -p src/obj || die
|
||||
echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
|
||||
|
||||
eautoreconf
|
||||
rm -r src/leveldb src/secp256k1 || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local my_econf=(
|
||||
--disable-asm
|
||||
--without-qtdbus
|
||||
--without-libevent
|
||||
--without-qrencode
|
||||
--without-miniupnpc
|
||||
--disable-tests
|
||||
--disable-wallet
|
||||
--disable-zmq
|
||||
--enable-util-tx
|
||||
--disable-util-cli
|
||||
--disable-bench
|
||||
--without-libs
|
||||
--without-daemon
|
||||
--without-gui
|
||||
--disable-ccache
|
||||
--disable-static
|
||||
--with-system-libsecp256k1
|
||||
--with-system-univalue
|
||||
)
|
||||
econf "${my_econf[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newbashcomp contrib/${PN}.bash-completion ${PN}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,3 +1,5 @@
|
||||
DIST baldur_s_gate_enhanced_edition_en_2_5_23121.sh 2892168067 BLAKE2B 7e20922f539be65cf7371f7f1706873e5a147313e3aa0335bfa5d6c4456a40665260a36abab6e73361c5f9c0a0bc2faff6e719dd72fb0ddd8b0e1c22d6eaedd8 SHA512 b5b84148b35984109454e1299ee29d287750172e617fb97e65c46b2c9419173348b37d54587bd44a3eacb6380c9b13e4be91af5625009cba797843483be7165d
|
||||
DIST gog_baldur_s_gate_enhanced_edition_2.5.0.9.sh 2877124067 BLAKE2B 244e93ae089703c9fae3dcfcad4fb9c1eb32695e7288f7a05b3f2996887f90d6912e745e9b47a93ba45ee3ddda8363e69d22e62c57258ee54c24c47f07b2f619 SHA512 56d4796a959658f29cabef6e7339db5ba9fa792d9fd899ebc375c9b5cf94305b6d11c21d41a8809fcb1cbe38ecb4bc7152158ef19c87395374ab9060f48756a6
|
||||
EBUILD baldurs-gate-ee-2.3.67.3-r1.ebuild 1370 BLAKE2B c250d9d87cf58a4906b8a6933d32ace06730fdf5e8b092baac03bfcfb9e688216723b7633818d8977b94575d1a86f751e5d30b77d055e79ecf8da7f620981aa7 SHA512 853b672a76099fd98ad78d368ab9c484ad39c4e323d1a893c7cd433daa8c6e0562c454e38dcea7fb852c4036509a2af1be03feb716a2b9f36a460f0414b06915
|
||||
EBUILD baldurs-gate-ee-2.5.23121.ebuild 1207 BLAKE2B 63700b6f469363a96bb2d39edc096353182c68e71945bb406f77e3b4af6dcb0c1d0422bad3ee6cd98cf9b688c778201373dc5fd78a7e69dee44b79d69026d10a SHA512 cff50d9b097c149df3bffe6c4d2acac644588e1e32591cc731074523ac1cdd2f7b546ef96440219baa0cf7484ad2bc029d2362aaa6b54a4cd269b3ec2aee12c7
|
||||
MISC metadata.xml 784 BLAKE2B e6527c6d760208259a31037ffb51533b2fa07d40be2f62bd3c08c63acf1418841abf657b678cfff42650430f75b1430a5f9bcf849e8688af57b853fa911aebb1 SHA512 d92e2613876c7c8840f640ba778f1cbdb62d2e65caf38a1e931bd7ffe6ab3bcacf6093155b01036f1cb3f18583842761242105019fbf1e72df34e096d7f5bbde
|
||||
|
@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit desktop eutils unpacker
|
||||
|
||||
DESCRIPTION="Baldur's Gate: Enhanced Edition"
|
||||
HOMEPAGE="https://www.baldursgate.com/"
|
||||
SRC_URI="baldur_s_gate_enhanced_edition_en_${PV//./_}.sh"
|
||||
|
||||
LICENSE="GOG-EULA"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
RESTRICT="bindist fetch"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
RDEPEND="dev-libs/expat
|
||||
dev-libs/openssl:0
|
||||
media-libs/openal
|
||||
virtual/opengl
|
||||
x11-libs/libX11"
|
||||
|
||||
QA_PRESTRIPPED="/opt/${PN}/BaldursGate\(64\)\?"
|
||||
|
||||
S="${WORKDIR}/data/noarch"
|
||||
|
||||
pkg_nofetch() {
|
||||
einfo "Please buy and download \"${SRC_URI}\" from"
|
||||
einfo "https://www.gog.com/game/baldurs_gate_enhanced_edition"
|
||||
einfo "and place it in your DISTDIR directory."
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack_zip ${A}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dir="/opt/${PN}"
|
||||
|
||||
dodoc -r "game/Manuals/."
|
||||
rm -r "game/Manuals" || die "rm failed"
|
||||
|
||||
insinto "${dir}"
|
||||
doins -r "game/."
|
||||
fperms +x "${dir}/BaldursGate"{,64}
|
||||
|
||||
use amd64 && make_wrapper ${PN} "./BaldursGate64" "${dir}"
|
||||
use x86 && make_wrapper ${PN} "./BaldursGate" "${dir}"
|
||||
|
||||
newicon "support/icon.png" "${PN}.png"
|
||||
make_desktop_entry "${PN}" "Baldur's Gate: Enhanced Edition" "${PN}"
|
||||
}
|
Binary file not shown.
@ -0,0 +1,99 @@
|
||||
From 55bf7628e299ef2c143e9ac97e87817b5eda3239 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Strogin <stefan.strogin@gmail.com>
|
||||
Date: Wed, 19 Sep 2018 23:52:10 +0300
|
||||
Subject: [PATCH] Fix #6854: Compilation with ICU 62
|
||||
|
||||
---
|
||||
src/gfx_layout.cpp | 18 +++++++++---------
|
||||
src/gfx_layout.h | 2 +-
|
||||
2 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
|
||||
index f5463d401..e13ece0e7 100644
|
||||
--- a/src/gfx_layout.cpp
|
||||
+++ b/src/gfx_layout.cpp
|
||||
@@ -126,7 +126,7 @@ static size_t AppendToBuffer(UChar *buff, const UChar *buffer_last, WChar c)
|
||||
* Wrapper for doing layouts with ICU.
|
||||
*/
|
||||
class ICUParagraphLayout : public AutoDeleteSmallVector<ParagraphLayouter::Line *, 4>, public ParagraphLayouter {
|
||||
- ParagraphLayout *p; ///< The actual ICU paragraph layout.
|
||||
+ icu::ParagraphLayout *p; ///< The actual ICU paragraph layout.
|
||||
public:
|
||||
/** Helper for GetLayouter, to get the right type. */
|
||||
typedef UChar CharType;
|
||||
@@ -135,10 +135,10 @@ public:
|
||||
|
||||
/** Visual run contains data about the bit of text with the same font. */
|
||||
class ICUVisualRun : public ParagraphLayouter::VisualRun {
|
||||
- const ParagraphLayout::VisualRun *vr; ///< The actual ICU vr.
|
||||
+ const icu::ParagraphLayout::VisualRun *vr; ///< The actual ICU vr.
|
||||
|
||||
public:
|
||||
- ICUVisualRun(const ParagraphLayout::VisualRun *vr) : vr(vr) { }
|
||||
+ ICUVisualRun(const icu::ParagraphLayout::VisualRun *vr) : vr(vr) { }
|
||||
|
||||
const Font *GetFont() const { return (const Font*)vr->getFont(); }
|
||||
int GetGlyphCount() const { return vr->getGlyphCount(); }
|
||||
@@ -150,10 +150,10 @@ public:
|
||||
|
||||
/** A single line worth of VisualRuns. */
|
||||
class ICULine : public AutoDeleteSmallVector<ICUVisualRun *, 4>, public ParagraphLayouter::Line {
|
||||
- ParagraphLayout::Line *l; ///< The actual ICU line.
|
||||
+ icu::ParagraphLayout::Line *l; ///< The actual ICU line.
|
||||
|
||||
public:
|
||||
- ICULine(ParagraphLayout::Line *l) : l(l)
|
||||
+ ICULine(icu::ParagraphLayout::Line *l) : l(l)
|
||||
{
|
||||
for (int i = 0; i < l->countRuns(); i++) {
|
||||
*this->Append() = new ICUVisualRun(l->getVisualRun(i));
|
||||
@@ -173,13 +173,13 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
- ICUParagraphLayout(ParagraphLayout *p) : p(p) { }
|
||||
+ ICUParagraphLayout(icu::ParagraphLayout *p) : p(p) { }
|
||||
~ICUParagraphLayout() { delete p; }
|
||||
void Reflow() { p->reflow(); }
|
||||
|
||||
ParagraphLayouter::Line *NextLine(int max_width)
|
||||
{
|
||||
- ParagraphLayout::Line *l = p->nextLine(max_width);
|
||||
+ icu::ParagraphLayout::Line *l = p->nextLine(max_width);
|
||||
return l == NULL ? NULL : new ICULine(l);
|
||||
}
|
||||
};
|
||||
@@ -196,7 +196,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
|
||||
}
|
||||
|
||||
/* Fill ICU's FontRuns with the right data. */
|
||||
- FontRuns runs(fontMapping.Length());
|
||||
+ icu::FontRuns runs(fontMapping.Length());
|
||||
for (FontMap::iterator iter = fontMapping.Begin(); iter != fontMapping.End(); iter++) {
|
||||
runs.add(iter->second, iter->first);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
|
||||
LEErrorCode status = LE_NO_ERROR;
|
||||
/* ParagraphLayout does not copy "buff", so it must stay valid.
|
||||
* "runs" is copied according to the ICU source, but the documentation does not specify anything, so this might break somewhen. */
|
||||
- ParagraphLayout *p = new ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
|
||||
+ icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
|
||||
if (status != LE_NO_ERROR) {
|
||||
delete p;
|
||||
return NULL;
|
||||
diff --git a/src/gfx_layout.h b/src/gfx_layout.h
|
||||
index 0a21d9b0c..028f5be63 100644
|
||||
--- a/src/gfx_layout.h
|
||||
+++ b/src/gfx_layout.h
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#ifdef WITH_ICU_LAYOUT
|
||||
#include "layout/ParagraphLayout.h"
|
||||
-#define ICU_FONTINSTANCE : public LEFontInstance
|
||||
+#define ICU_FONTINSTANCE : public icu::LEFontInstance
|
||||
#else /* WITH_ICU_LAYOUT */
|
||||
#define ICU_FONTINSTANCE
|
||||
#endif /* WITH_ICU_LAYOUT */
|
||||
--
|
||||
2.19.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue