Sync with portage [Fri Aug 10 08:40:14 MSK 2018].

mhiretskiy 1197
root 6 years ago
parent ea529dc4d8
commit 3e40652d87

Binary file not shown.

Binary file not shown.

@ -12,3 +12,4 @@ DIST mongo-tools-3.6.4.tar.gz 4693872 BLAKE2B 5d72b32fa8ad7bc106c6ea3c09a27a093b
DIST mongo-tools-3.6.5.tar.gz 4720814 BLAKE2B 5dd064f70557ec1ab979d08523f3dd305fb310c533b69bc99be3ad3d006036354f62b9f3d61c242e1481a254bed538a5e1cf5662f0e35705f1c50a76f31fddbb SHA512 dd2d7cc64043b42a70b5de0ea493f94722a4476248bfd77d6892861e4be6ab20175992367965dfd687bf8b7ebece6113b7f7a3e59256497e3ecd7e2678875965
DIST mongo-tools-3.6.6.tar.gz 4723751 BLAKE2B 876d46c47190398d1218a760bdeb8167c9224ef000a96b5f6080d6dcd44fe8187fdfbc38b1a61dbf437132e16e053212cf122daec3915647448d114983e51fc3 SHA512 b8cc02626accb90d8dacf50ea851619885a01503e28b17ed6a12cc9ccec2680a8cd12a566b32187d472f74c9625bf013afcdebed1a42d78ff613c49d3fc838b2
DIST mongo-tools-4.0.0.tar.gz 10872217 BLAKE2B 84e92178c0e4827926de525a70d6124635d59e270a3d37e23ec8653cc64d99bb7489fa6266917437ca45aa3ca5e00bc59b81e65c5b72e717db2701c6f7327bec SHA512 d67c4aca9b41266109adc39bb1a642206738fda393e1f9f05570c02a00a02e29ec71c71e67ad232c72d66543ae7e7bfe07fbcf26958d48ed0e631da452c1904d
DIST mongo-tools-4.0.1.tar.gz 10872813 BLAKE2B 21b36c550ee7147b013414d24042ca720d3fdb961759d8857b0ffb3ba1aa3f7f3bcb363c97287d1c7084dae246f9d7f49d2d0d5c8a11bc939fa9d3113b4c2b6e SHA512 69355ca7c8d97a9a8b257aa1cde672b3b4af7ceb5b37e2cf601746e102ca6ac290ec35c20728fdb6736dd28feb8e6b6e1b948e88fd2fb4c9b53c8a3cd3688d67

@ -0,0 +1,61 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
MY_PV=${PV/_rc/-rc}
MY_P=${PN}-r${MY_PV}
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
HOMEPAGE="https://www.mongodb.com"
SRC_URI="https://github.com/mongodb/mongo-tools/archive/r${MY_PV}.tar.gz -> mongo-tools-${MY_PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="sasl ssl"
RDEPEND="!<dev-db/mongodb-3.0.0"
DEPEND="${RDEPEND}
dev-lang/go:=
net-libs/libpcap
sasl? ( dev-libs/cyrus-sasl )
ssl? ( dev-libs/openssl:0= )"
S=${WORKDIR}/${MY_P}
src_prepare() {
default
# 1) ensure we use bash wrt #582906
# 2) do not substitute version because it uses git
sed -e 's@/bin/sh@/bin/bash@g' \
-e '/^sed/,+3d' \
-e '/^stty/d' \
-e '/^mv/d' \
-i build.sh || die
# build pie to avoid text relocations wrt #582854
# skip on ppc64 wrt #610984
if ! use ppc64; then
sed -i 's/\(go build\)/\1 -buildmode=pie/g' build.sh || die
fi
}
src_compile() {
local myconf=()
if use sasl; then
myconf+=(sasl)
fi
if use ssl; then
myconf+=(ssl)
fi
./build.sh "${myconf[@]}" || die "build failed"
}
src_install() {
dobin bin/*
}

@ -1,3 +1,3 @@
DIST sudo-1.8.22.tar.gz 3029051 BLAKE2B c77e05b6e9cee738902d6289327fb5d34d19833d96597f983d8af01434d224dd698f9257b0965a0e480e8d19eb38eef0c8216942ca5217c3fe7516cdf397f7b7 SHA512 5ce10a9302d25bb726e347499d26a0b3697446cfcdf0fd9094ee35198db7b023d5250a53fdcb4184d1a09f5fd2a78fc645bc8e80f265666b05a91f62f49b0695
DIST sudo-1.8.23.tar.gz 3150674 BLAKE2B 11b1c7bfa372005cda8baf651c4662f6fd15e94ca77f7705b23ca6573424796d5c1f8e47e2874c4b54017141d01a632885ac60c92346d932537048373cad0ede SHA512 a9d61850a4857bfd075547a13efb13b054e4736e3ebe3c8a98a90a090b1d9b9688354ec9725fc99d1d256999b6f9c6ae6215ce9770fcdebd7f24731107b48342
DIST sudo-1.8.24b1.tar.gz 3167476 BLAKE2B 23fa302773733ac84f36af006076a367c8201ed238f43007b9fff504ead6b8845614c0180aa1cfd33b7fb7082437b9701ff6e4da8df44e97f34a0084a0920feb SHA512 92746df75b32031ef890c48fe0383001640c8470bae841f2277f42008eda4e86b0ed0494ceb0a9e1ac7a7510375c9a7c7d23ec3e84a42e94d457f6771170357c
DIST sudo-1.8.24b4.tar.gz 3167803 BLAKE2B 03e4ca426ee000d9a4ae8eb020fa081e0580634f036923cf3107c44dc18be7c5fa82169430c82f2b4d2d6dbe5041a63ecd4f91d6e0cb28cce9a94b1ed48fbc4a SHA512 743adfcc7fd5bfe838dfcd362ffe8daca54964d74318732cfe068e0331aa07feb8b3b9e6a98f4616b49b19f076a43dd62c068b6bde2cb24fa4f2b8657ddc215d

Binary file not shown.

@ -0,0 +1,16 @@
Use new-style backquotes, to make it compile with Emacs 27.
--- gnuserv-3.12.8-orig/gnuserv-compat.el
+++ gnuserv-3.12.8/gnuserv-compat.el
@@ -193,9 +193,9 @@
(defmacro defgroup (&rest args)
nil)
(defmacro defcustom (var value doc &rest args)
- (` (defvar (, var) (, value) (, doc))))
+ `(defvar (, var) (, value) (, doc)))
(defmacro defface (var value doc &rest args)
- (` (make-face (, var))))
+ `(make-face (, var)))
(defmacro define-widget (&rest args)
nil)))

@ -0,0 +1,14 @@
Function process-kill-without-query is obsolete since 22.1 and no
longer exists in 27.
--- gnuserv-3.12.8-orig/gnuserv.el
+++ gnuserv-3.12.8/gnuserv.el
@@ -738,7 +738,7 @@
(start-process "gnuserv" nil gnuserv-program)))
(set-process-sentinel gnuserv-process 'gnuserv-sentinel)
(set-process-filter gnuserv-process 'gnuserv-process-filter)
- (process-kill-without-query gnuserv-process)
+ (set-process-query-on-exit-flag gnuserv-process nil)
(setq allow-deletion-of-last-visible-frame t)
(run-hooks 'gnuserv-init-hook)))

@ -0,0 +1,71 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit elisp multilib desktop xdg-utils
DESCRIPTION="Attach to an already running Emacs"
HOMEPAGE="http://meltin.net/hacks/emacs/"
SRC_URI="http://meltin.net/hacks/emacs/src/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~ppc-macos"
IUSE="X"
RDEPEND=">=app-eselect/eselect-emacs-1.15
X? ( x11-libs/libXau )"
DEPEND="${RDEPEND}
X? ( x11-base/xorg-proto )"
SITEFILE="50${PN}-gentoo.el"
src_prepare() {
eapply "${FILESDIR}"/${P}-backquotes.patch
eapply "${FILESDIR}"/${P}-process-query.patch
sed -i -e 's/exec gnuclient/&-emacs/' gnudoit || die
eapply_user
}
src_configure() {
econf $(use_enable X xauth) \
--x-includes="${EPREFIX}"/usr/include \
--x-libraries="${EPREFIX}"/usr/$(get_libdir)
}
src_compile() {
default
}
src_install() {
exeinto /usr/libexec/emacs
doexe gnuserv
newbin gnuclient gnuclient-emacs
newbin gnudoit gnudoit-emacs
# Don't install gnuattach, it is not functional with FSF GNU Emacs
newman gnuserv.1 gnuserv-emacs.1
echo ".so man1/gnuserv-emacs.1" | newman - gnuclient-emacs.1
echo ".so man1/gnuserv-emacs.1" | newman - gnudoit-emacs.1
elisp-install ${PN} *.el *.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
dodoc ChangeLog README README.orig
if use X; then
domenu "${FILESDIR}"/gnuclient.desktop || die
fi
}
pkg_postinst() {
elisp-site-regen
use X && xdg_desktop_database_update
eselect gnuclient update ifunset
}
pkg_postrm() {
elisp-site-regen
use X && xdg_desktop_database_update
eselect gnuclient update ifunset
}

@ -0,0 +1,11 @@
--- mailcrypt-3.5.9-orig/mc-gpg.el
+++ mailcrypt-3.5.9/mc-gpg.el
@@ -108,7 +108,7 @@
(defmacro with-current-buffer (buffer &rest body)
"Execute the forms in BODY with BUFFER as the current buffer.
The value returned is the value of the last form in BODY."
- (` (save-excursion (set-buffer (, buffer)) (,@ body)))))
+ `(save-excursion (set-buffer (, buffer)) (,@ body))))
)
(defun mc-gpg-debug-print (string)

@ -0,0 +1,44 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit readme.gentoo-r1 elisp autotools
DESCRIPTION="Provides a simple interface to public key cryptography with OpenPGP"
HOMEPAGE="http://mailcrypt.sourceforge.net/"
SRC_URI="mirror://sourceforge/mailcrypt/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
RESTRICT="test"
RDEPEND="app-crypt/gnupg"
ELISP_PATCHES="${P}-backquotes.patch"
ELISP_REMOVE="FSF-timer.el" # remove bundled timer.el
SITEFILE="50${PN}-gentoo.el"
src_prepare() {
elisp_src_prepare
eautoreconf
}
src_configure() {
export EMACS
econf
}
src_install() {
emake \
lispdir="${D}${SITELISP}/${PN}" \
infodir="${D}/usr/share/info" \
install
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
dodoc ANNOUNCE ChangeLog* INSTALL LCD-entry NEWS ONEWS README*
DOC_CONTENTS="See the INSTALL file in /usr/share/doc/${PF} for how
to customize mailcrypt."
readme.gentoo_create_doc
}

Binary file not shown.

@ -11,7 +11,7 @@ PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
FIRMWARE_ABI_VERSION="2.9.0-r52"
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
user udev fcaps readme.gentoo-r1 pax-utils l10n
user udev fcaps readme.gentoo-r1 pax-utils l10n versionator
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="git://git.qemu.org/qemu.git"

@ -11,7 +11,7 @@ PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
FIRMWARE_ABI_VERSION="2.11.1-r50"
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
user udev fcaps readme.gentoo-r1 pax-utils l10n
user udev fcaps readme.gentoo-r1 pax-utils l10n versionator
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="git://git.qemu.org/qemu.git"

@ -11,7 +11,7 @@ PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
FIRMWARE_ABI_VERSION="2.11.1-r50"
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
user udev fcaps readme.gentoo-r1 pax-utils l10n
user udev fcaps readme.gentoo-r1 pax-utils l10n versionator
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="git://git.qemu.org/qemu.git"

@ -11,7 +11,7 @@ PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
FIRMWARE_ABI_VERSION="2.11.1-r50"
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
user udev fcaps readme.gentoo-r1 pax-utils l10n
user udev fcaps readme.gentoo-r1 pax-utils l10n versionator
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="git://git.qemu.org/qemu.git"

Binary file not shown.

@ -1 +1 @@
DIST sunpinyin-2.0.4_pre20130108.tar.xz 964764 BLAKE2B 2c9d2e3fc02009ad10784c9408434c6806d1403026fb27629701650fe0e8a69c5580050846cf5c3b870215b8bfd68fe9c52d8bdaf83c41e523224463af9cf530 SHA512 7c1dd7db8b800e9d436746a560a16de2c6777576868f2e7e28f6dcb767b91ccd62b974f9d4ce6bd6ce80d30e1ee83887c3ee03c227e7e9fa59c01db4867465b2
DIST sunpinyin-3.0.0_rc1.tar.gz 547138 BLAKE2B 682e733241d690d1fef8ce452c497a894c5ab61bf5298c1f292ce3a25a681d594744db43ebd51b3e59274cce0e47a1bce15a793f2c20e2998915c3432f2a7c32 SHA512 c9d4936de5835a7f02e52c5b32bf1a42d76bf7588449aaa813f3df7ab2d72f3ca0f4e18f74a60be4860f0724b5e05cbe567c67e6f3150b0e71b23b3a9002fc5e

@ -0,0 +1,16 @@
--- a/wrapper/ibus/setup/main.py
+++ b/wrapper/ibus/setup/main.py
@@ -37,8 +37,11 @@
import sys
import os
from os import path
-import gtk
-import ibus
+from gi import require_version as gi_require_version
+gi_require_version('Gtk', '3.0')
+gi_require_version('IBus', '1.0')
+from gi.repository import Gtk as gtk
+from gi.repository import IBus as ibus
import gettext
import locale

@ -1,49 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit python-single-r1 scons-utils toolchain-funcs
DESCRIPTION="The SunPinYin IMEngine for IBus Framework"
HOMEPAGE="https://sunpinyin.googlecode.com/"
SRC_URI="https://dev.gentoo.org/~jstein/dist/sunpinyin-${PV}.tar.xz"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+nls"
RDEPEND="${PYTHON_DEPS}
app-i18n/ibus[python,${PYTHON_USEDEP}]
~app-i18n/sunpinyin-${PV}:=
nls? ( virtual/libintl )"
DEPEND="${RDEPEND}
virtual/pkgconfig
nls? ( sys-devel/gettext )"
REQUIRED_USE=${PYTHON_REQUIRED_USE}
src_unpack() {
default
mv "${WORKDIR}/sunpinyin-${PV}" "${S}" || die
}
src_prepare() {
sed -i -e "s/python/${EPYTHON}/" wrapper/ibus/setup/ibus-setup-sunpinyin.in || die
}
src_configure() {
tc-export CXX
myesconsargs=(
--prefix="${EPREFIX}"/usr
--libexecdir="${EPREFIX}"/usr/libexec
)
}
src_compile() {
escons -C wrapper/ibus
}
src_install() {
escons -C wrapper/ibus --install-sandbox="${ED}" install
}

@ -0,0 +1,51 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PLOCALES="zh_CN"
PYTHON_COMPAT=( python2_7 )
inherit l10n python-single-r1 scons-utils toolchain-funcs vcs-snapshot
MY_P="${P#*-}"
DESCRIPTION="SunPinyin engine for IBus"
HOMEPAGE="https://github.com/sunpinyin/sunpinyin"
SRC_URI="https://github.com/${PN#*-}/${PN#*-}/archive/v${PV/_rc/-rc}.tar.gz -> ${MY_P}.tar.gz"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+nls"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
app-i18n/ibus[python,${PYTHON_USEDEP}]
~app-i18n/sunpinyin-${PV}:=
nls? ( virtual/libintl )"
DEPEND="${RDEPEND}
virtual/pkgconfig
nls? ( sys-devel/gettext )"
S="${WORKDIR}/${MY_P}"
PATCHES=( "${FILESDIR}"/${PN}-python3.patch )
src_prepare() {
sed -i "/^locales/s/'.*'/$(l10n_get_locales | sed "s/\([^[:space:]]\+\)/\'\1\',/g")/" wrapper/ibus/SConstruct
sed -i "s/python/${EPYTHON}/" wrapper/ibus/setup/${PN/-/-setup-}.in
default
tc-export CXX
}
src_compile() {
escons -C wrapper/ibus \
--prefix="${EPREFIX}"/usr \
--libdir="${EPREFIX}"/usr/$(get_libdir) \
--libexecdir="${EPREFIX}"/usr/libexec
}
src_install() {
escons -C wrapper/ibus --install-sandbox="${D}" install
dodoc wrapper/ibus/README
}

@ -6,6 +6,6 @@
<name>Cjk</name>
</maintainer>
<upstream>
<remote-id type="google-code">sunpinyin</remote-id>
<remote-id type="github">sunpinyin/sunpinyin</remote-id>
</upstream>
</pkgmetadata>

@ -1,2 +1,2 @@
DIST ibus-typing-booster-1.5.38.tar.gz 6408096 BLAKE2B a4559044a4cd06c5dcf69d77d5ec3d8163d564702ff88d3ed11b8c073f5272e2cfab446de548a29887b74767f4318db98fb898dc4d15488fd4c9963cea151009 SHA512 67b81a47501ae4e885d2a79b122799b78dcdd044ad8e36a140d4c6587a23072d08e3e025f755c191cee82c3ab81ea1a974a5a0f6438e7203ba2d63d7e1cd4eff
DIST ibus-typing-booster-2.0.0.tar.gz 5689495 BLAKE2B a3ee39faf206c4681d10989d4e438cffc0b78d9339973523af61310482b3ec13c7935e9e49403a3359e0f32d087b72afb27ae7975dcd3abd427b9a0f5f0ba581 SHA512 140044be13b47590a0835bb4b8da7311cdb92e8134a88a7b999ea6f530298950c4f8ce9ff3462394e4b52de0c56e3072671da85c99b448a91f442fdc460c608b
DIST ibus-typing-booster-2.1.0.tar.gz 6054311 BLAKE2B c0eef436e89e1de56d47713b2c5685d15cddc08d744926b69e6d0d1d7bd7548614009f489d6ae2579482d4d770b62e51cc76734ab3866451ec4fd4d51c84d59b SHA512 7d1b8d0761bdd71a3c72a60d59e0f7f1c94c8c8863b2a1cfb4ed7742060482500d43d7f71bc328a50628a9c116297695813651d7712b88cf7e8594118c4b339f

@ -1 +1 @@
DIST scim-sunpinyin-2.0.3.tar.gz 33072 BLAKE2B 06d9bff2eb35b06a49f6be60c8cd5d257f6ca724f03acc01b29b01fd32c2d95bab87c4737448a448a42a58d070f6b254bcf52e6d0c8b98ff10718d2265e43509 SHA512 f983d40972c5792a4a27fdf699cffc7f6882c84060cfe3e260cdc3f587743b0f71339ccdb7067b393f88a69b74d999fba70c4d9bc8016b9b217b3c11667a2986
DIST sunpinyin-3.0.0_rc1.tar.gz 547138 BLAKE2B 682e733241d690d1fef8ce452c497a894c5ab61bf5298c1f292ce3a25a681d594744db43ebd51b3e59274cce0e47a1bce15a793f2c20e2998915c3432f2a7c32 SHA512 c9d4936de5835a7f02e52c5b32bf1a42d76bf7588449aaa813f3df7ab2d72f3ca0f4e18f74a60be4860f0724b5e05cbe567c67e6f3150b0e71b23b3a9002fc5e

@ -1,34 +0,0 @@
diff --git a/wrapper/scim/SConstruct b/wrapper/scim/SConstruct
index 7739300..ef7c69b 100644
--- a/wrapper/scim/SConstruct
+++ b/wrapper/scim/SConstruct
@@ -3,7 +3,7 @@ import SCons.Tool.textfile
locales = []
-cflags = '-O2 -g -pipe'
+cflags = '-O2 -g -pipe '
version = '2.0.3'
AddOption('--prefix', dest='prefix', metavar='DIR',
@@ -51,9 +51,6 @@ if GetOption('datadir') is not None:
opts.Save('configure.conf', env)
-if GetOption('rpath') is not None:
- env.Append(LINKFLAGS='-Wl,-R -Wl,%s' % GetOption('rpath'))
-
envvar = [('CC', 'CC'),
('CXX', 'CXX'),
('CFLAGS', 'CFLAGS'),
@@ -75,6 +72,10 @@ extra_cflags += ' -Isrc'
env.Append(CFLAGS=extra_cflags)
env.Append(CXXFLAGS=extra_cflags)
env.Replace(SHLIBPREFIX = '')
+
+if GetOption('rpath') is not None:
+ env.Append(LINKFLAGS=' -Wl,-R -Wl,%s' % GetOption('rpath'))
+
#
#==============================configure================================
#

@ -5,7 +5,10 @@
<email>cjk@gentoo.org</email>
<name>Cjk</name>
</maintainer>
<use>
<flag name="gtk3">Enable support for <pkg>x11-libs/gtk+</pkg>:3</flag>
</use>
<upstream>
<remote-id type="google-code">sunpinyin</remote-id>
<remote-id type="github">sunpinyin/sunpinyin</remote-id>
</upstream>
</pkgmetadata>

@ -1,31 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils scons-utils
DESCRIPTION="The SunPinyin IMEngine for Smart Common Input Method (SCIM)"
HOMEPAGE="https://sunpinyin.googlecode.com"
SRC_URI="${HOMEPAGE}/files/${P}.tar.gz"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="app-i18n/scim
~app-i18n/sunpinyin-2.0.3
x11-libs/gtk+:2 "
RDEPEND="${DEPEND}"
src_prepare() {
epatch "${FILESDIR}/${P}-force-switch.patch"
}
src_compile() {
escons --prefix="/usr"
}
src_install() {
escons --prefix="/usr" --install-sandbox="${D}" install
}

@ -0,0 +1,41 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 )
inherit python-any-r1 scons-utils toolchain-funcs vcs-snapshot
MY_P="${P#*-}"
DESCRIPTION="SunPinyin IMEngine for SCIM"
HOMEPAGE="https://github.com/sunpinyin/sunpinyin"
SRC_URI="https://github.com/${PN#*-}/${PN#*-}/archive/v${PV/_rc/-rc}.tar.gz -> ${MY_P}.tar.gz"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gtk3"
RDEPEND="app-i18n/scim[gtk3=]
~app-i18n/sunpinyin-${PV}:="
DEPEND="${RDEPEND}
virtual/pkgconfig"
S="${WORKDIR}/${MY_P}"
src_prepare() {
default
tc-export CXX
}
src_compile() {
escons -C wrapper/scim \
--prefix="${EPREFIX}"/usr \
--libdir="${EPREFIX}"/usr/$(get_libdir) \
--libexecdir="${EPREFIX}"/usr/libexec
}
src_install() {
escons -C wrapper/scim --install-sandbox="${D}" install
dodoc wrapper/scim/README
}

@ -1,2 +1,2 @@
DIST skktools-1.3.3_p20150901.tar.gz 483005 BLAKE2B 6db22c59276aee007ed4a457b8b66750d792596855ddfdd98310b14741cd20fe8594672626022dafc17c31d06f3292026e6bba35ea1fa001f4a224e7439eb082 SHA512 dbb15068239158c31a706da2fd5afcb8514d088854bdd4f0d05bb8b9e10947cbdce584ff3698571d601e3b357a1ba11b4608f0457615062016862ac89fb91b83
DIST skktools-1.3.3_p20170305.tar.gz 483715 BLAKE2B 0de2cb906e8433f66e706f0aa4dd8c4900343b48bfb9bb24aee4927f583650f54132c2a3bb607c17cefb0f0e686bcf8a0f4bd6ac07b6a9a71c0bd870eda587a7 SHA512 f6e9041fecf8c28a84c3996ca120371528c034eeca3695cb224b4cf225e8dab9e69969d7fb955112cd1e9c1e80c2ba8e2aef4f0eb81f55374dd626402482c235
DIST skktools-1.3.4.tar.gz 482860 BLAKE2B f9e822531f8f715291e55ec6dec0eeb31683dc72efc7ba73621cfd0c29f0c5147cbef8256d44848792b8a1601c1878321b2dc0260df9d32d0e5e18eb65220987 SHA512 8749dfc4f18474db860d8b7cd85fadfc00327b199addb31a339aa78dd66cb98032429664bdad4b47176b5b64b156b7264bc35a284861f6b9ec8cc9979d4d5ce1

@ -1,4 +1,4 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@ -13,7 +13,7 @@ SRC_URI="https://github.com/skk-dev/skktools/archive/${EGIT_COMMIT}.tar.gz -> ${
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
KEYWORDS="amd64 ~arm x86"
IUSE="emacs"
RDEPEND="dev-libs/glib:2

@ -1,19 +1,17 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
inherit elisp-common vcs-snapshot
EGIT_COMMIT="28e36bac97dc8ed089bac409bef15f1831b6adde"
DESCRIPTION="SKK utilities to manage dictionaries"
HOMEPAGE="http://openlab.jp/skk/"
SRC_URI="https://github.com/skk-dev/skktools/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://github.com/skk-dev/skktools/archive/${P//./_}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm x86"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="emacs"
RDEPEND="dev-libs/glib:2
@ -22,7 +20,6 @@ RDEPEND="dev-libs/glib:2
DEPEND="${RDEPEND}
virtual/pkgconfig"
DOCS=( ChangeLog README.md )
SITEFILE="50${PN}-gentoo.el"
src_configure() {
@ -48,7 +45,7 @@ src_install() {
done
insinto /usr/share/${PN}
doins *.awk *.scm
doins *.{awk,scm}
rm -rf convert2skk/obsolete
doins -r convert2skk filters

@ -1,5 +1,2 @@
DIST dict.utf8.tar.bz2 1598995 BLAKE2B 4cb990b6bbb440218c6af695369bdccf97b820da9aa10d118043a7bda1c602e53d0c63c4a460db2c64530e69ac1d98619e1a2efa2113a292063b422fc1b3d32c SHA512 04ec55e4af4b58d29b1141a824b5c3de5dbaaab0133d88e477d9183db738fc63543b4004bf071e611c6ea0d4b4c161b73849a64ab75f4df5bb5116d7f52d8e34
DIST lm_sc.t3g.arpa.tar.bz2 25098718 BLAKE2B a7cd87d4e786a7dfe854b33c5c70019075ec99b02fd6cb33f91f89babdd2b255b6d157fff30c22b5372e74908483b814cc9698fd84caa3e56c61e76a59dbea04 SHA512 1e5e577c92df2f230b6b5962298ef7c215f6069b53e8e2dd4c5ad3eb54f999fc239b0924b4ab031af59c3194da15d6317ea2860f158e805b5cf0126666eaad98
DIST sunpinyin-2.0.3.tar.gz 169394 BLAKE2B d93472c0c208da2a7aab99b1d514fa01acf67e69bdddc2c0e15f40af7a2abaf8860f8e792c2bd286bd1ec3a24124b0284d28295115c8dff1051f5df3c2314bb7 SHA512 25f1fc4b8f550663861f2c7426832924676f83e1f201689fde51b04ca78704b46dbbf2b92736234d5e1a729ba1bb23bd1f3a0394f6b8b54cb0df57b9bb7ece1d
DIST sunpinyin-2.0.4_pre20130108.tar.xz 964764 BLAKE2B 2c9d2e3fc02009ad10784c9408434c6806d1403026fb27629701650fe0e8a69c5580050846cf5c3b870215b8bfd68fe9c52d8bdaf83c41e523224463af9cf530 SHA512 7c1dd7db8b800e9d436746a560a16de2c6777576868f2e7e28f6dcb767b91ccd62b974f9d4ce6bd6ce80d30e1ee83887c3ee03c227e7e9fa59c01db4867465b2
DIST sunpinyin-3.0.0_rc1.tar.gz 547138 BLAKE2B 682e733241d690d1fef8ce452c497a894c5ab61bf5298c1f292ce3a25a681d594744db43ebd51b3e59274cce0e47a1bce15a793f2c20e2998915c3432f2a7c32 SHA512 c9d4936de5835a7f02e52c5b32bf1a42d76bf7588449aaa813f3df7ab2d72f3ca0f4e18f74a60be4860f0724b5e05cbe567c67e6f3150b0e71b23b3a9002fc5e

@ -1,28 +0,0 @@
--- a/SConstruct
+++ b/SConstruct
@@ -180,12 +180,6 @@ libdir = env['LIBDIR']
libdatadir = env['LIBDATADIR'] + '/sunpinyin/data'
headersdir = env['PREFIX'] + '/include/sunpinyin-2.0'
-if GetOS() != 'Darwin':
- env.Append(LINKFLAGS=['-Wl,-soname=libsunpinyin.so.%d' % abi_major])
-
-if GetOption('rpath') is not None and GetOS() != 'Darwin':
- env.Append(LINKFLAGS='-Wl,-R -Wl,%s' % GetOption('rpath'))
-
# pass through environmental variables
envvar = [('CC', 'CC'),
('CXX', 'CXX'),
@@ -202,6 +196,12 @@ extra_cflags=' -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR=\'"%s"\'' % libdatadir
env.Append(CFLAGS=extra_cflags)
env.Append(CXXFLAGS=extra_cflags)
+if GetOS() != 'Darwin':
+ env.Append(LINKFLAGS=' -Wl,-soname=libsunpinyin.so.%d' % abi_major)
+
+if GetOption('rpath') is not None and GetOS() != 'Darwin':
+ env.Append(LINKFLAGS=' -Wl,-R -Wl,%s' % GetOption('rpath'))
+
#
#==============================configure================================
#

@ -1,49 +0,0 @@
From 3d35aa0370d9c7bd455098caa9ba22ebe1f82968 Mon Sep 17 00:00:00 2001
From: Yong Sun <mail@yongsun.me>
Date: Wed, 4 Apr 2012 18:41:39 +0800
Subject: [PATCH] Integrated patch from YunQiang Su, fixed FTBFS with gcc-4.7
---
SConstruct | 3 ++-
src/portability.h | 5 ++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/SConstruct b/SConstruct
index 97abf47..354fd19 100644
--- a/SConstruct
+++ b/SConstruct
@@ -313,7 +313,8 @@ def DoConfigure():
conf.CheckCHeader('sys/param.h')
conf.CheckCHeader('sys/stat.h')
conf.CheckCHeader('sys/types.h')
- conf.CheckCHeader('unistd.h')
+ if conf.CheckCHeader('unistd.h'):
+ conf.Define('DHAVE_UNISTD_H', 1)
conf.CheckCHeader('wchar.h')
# add essential package requirements
diff --git a/src/portability.h b/src/portability.h
index 949d4f2..cf43bd0 100644
--- a/src/portability.h
+++ b/src/portability.h
@@ -44,15 +44,14 @@
#include <string>
#include <cstring>
-#if defined(sun)
+#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#ifdef __cplusplus
#include <algorithm>
#else
#include <sys/ddi.h>
#endif //__cpluscplus
-#endif //defined(sun)
-
+#endif //defined(HAVE_UNISTD_H)
#ifndef HOST_OS_GNUC_2
#if defined(DEBUG) && !defined(NDEBUG)
--
1.7.8.5

@ -1,65 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 )
inherit python-any-r1 scons-utils toolchain-funcs
DESCRIPTION="A Statistical Language Model based Chinese input method library"
HOMEPAGE="https://github.com/sunpinyin/sunpinyin"
SRC_URI="${HOMEPAGE}/files/${P}.tar.gz
https://open-gram.googlecode.com/files/dict.utf8.tar.bz2
https://open-gram.googlecode.com/files/lm_sc.t3g.arpa.tar.bz2"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE=""
RDEPEND="dev-db/sqlite:3"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${P}-force-switch.patch
"${FILESDIR}"/${P}-gcc-4.7.patch
)
src_unpack() {
unpack ${P}.tar.gz
ln -s "${DISTDIR}"/dict.utf8.tar.bz2 "${S}"/raw/ || die "dict file not found"
ln -s "${DISTDIR}"/lm_sc.t3g.arpa.tar.bz2 "${S}"/raw/ || die "dict file not found"
}
src_prepare() {
default
tc-export CXX
}
src_compile() {
escons \
--prefix="${EPREFIX}"/usr \
--libdir="${EPREFIX}"/usr/$(get_libdir) \
--libdatadir="${EPREFIX}"/usr/lib
}
src_install() {
escons --install-sandbox="${D}" install
}
pkg_postinst() {
elog ""
elog "If you have already installed former version of ${PN}"
elog "and any wrapper, please remerge the wrapper to make it work with"
elog "the new version."
elog ""
elog "To use any wrapper for ${PN}, please merge any of the following"
elog "packages: "
elog "emerge app-i18n/fcitx-sunpinyin"
elog "emerge app-i18n/ibus-sunpinyin"
elog "emerge app-i18n/scim-sunpinyin"
elog "emerge app-i18n/xsunpinyin"
elog ""
}

@ -1,2 +1 @@
DIST sunpinyin-2.0.4_pre20130108.tar.xz 964764 BLAKE2B 2c9d2e3fc02009ad10784c9408434c6806d1403026fb27629701650fe0e8a69c5580050846cf5c3b870215b8bfd68fe9c52d8bdaf83c41e523224463af9cf530 SHA512 7c1dd7db8b800e9d436746a560a16de2c6777576868f2e7e28f6dcb767b91ccd62b974f9d4ce6bd6ce80d30e1ee83887c3ee03c227e7e9fa59c01db4867465b2
DIST xsunpinyin-2.0.3.tar.gz 128835 BLAKE2B b8f3dd0b7efd0e40d54ee15085e4f1e7e2fff0d4f22845d7e043012f761e358e97843d1f3a26b85e49303afa86fb4a8263974f6f761d192b44bd88a1a0eef18f SHA512 71bc1677d545ecbd8572c9ba1877d091a2a58154eb326623ed240701f98a70ec29245e98d684a30aad46445e6c461359663ba3778e7f5c42469f0bea6e2bc419
DIST sunpinyin-3.0.0_rc1.tar.gz 547138 BLAKE2B 682e733241d690d1fef8ce452c497a894c5ab61bf5298c1f292ce3a25a681d594744db43ebd51b3e59274cce0e47a1bce15a793f2c20e2998915c3432f2a7c32 SHA512 c9d4936de5835a7f02e52c5b32bf1a42d76bf7588449aaa813f3df7ab2d72f3ca0f4e18f74a60be4860f0724b5e05cbe567c67e6f3150b0e71b23b3a9002fc5e

@ -1,5 +0,0 @@
To use sunpinyin with XIM, you should use the following in your user startup
scripts such as .xinitrc or .xprofile:
XMODIFIERS=@im=xsunpinyin ; export XMODIFIERS

@ -1,45 +0,0 @@
diff --git a/wrapper/xim/SConstruct b/wrapper/xim/SConstruct
index 9d1cafd..495871d 100644
--- a/wrapper/xim/SConstruct
+++ b/wrapper/xim/SConstruct
@@ -32,7 +32,7 @@ imdkit_sources = ['IMdkit/FrameMgr.c',
'IMdkit/IMValues.c']
-cflags='-O2 -g -pipe'
+cflags='-O2 -g -pipe '
# options
AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store',
@@ -52,7 +52,6 @@ def PassVariables(envvar, env):
env = Environment(ENV=os.environ,
CFLAGS=cflags, CXXFLAGS=cflags,
- LINKFLAGS=['-export-dynamic'],
CPPPATH=['.', 'IMdkit'])
opts.Update(env)
@@ -62,11 +61,6 @@ if GetOption('prefix') is not None:
opts.Save('configure.conf', env)
-
-# set rpath
-if GetOption('rpath') is not None:
- env.Append(LINKFLAGS='-Wl,-R -Wl,%s' % GetOption('rpath'))
-
envvar = [('CC', 'CC'),
('CXX', 'CXX'),
('CFLAGS', 'CFLAGS'),
@@ -83,7 +77,11 @@ extra_cflags += ' -DSUNPINYIN_XIM_SETTING_DIR=\\"%s\\"' % data_dir
env.Append(CFLAGS=extra_cflags)
env.Append(CXXFLAGS=extra_cflags)
+env.Append(LINKFLAGS=' -export-dynamic')
+# set rpath
+if GetOption('rpath') is not None:
+ env.Append(LINKFLAGS=' -Wl,-R -Wl,%s' % GetOption('rpath'))
#
#==============================configure================================

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>cjk@gentoo.org</email>
<name>Cjk</name>
</maintainer>
<upstream>
<remote-id type="google-code">sunpinyin</remote-id>
</upstream>
<maintainer type="project">
<email>cjk@gentoo.org</email>
<name>Cjk</name>
</maintainer>
<upstream>
<remote-id type="github">sunpinyin/sunpinyin</remote-id>
</upstream>
</pkgmetadata>

@ -1,31 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils scons-utils
DESCRIPTION="The SunPinyin IMEngine Wrapper for XIM Framework"
HOMEPAGE="https://sunpinyin.googlecode.com"
SRC_URI="${HOMEPAGE}/files/${P}.tar.gz"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="~app-i18n/sunpinyin-2.0.3
x11-libs/gtk+:2
x11-libs/libX11"
RDEPEND="${DEPEND}"
src_prepare() {
epatch "${FILESDIR}/${P}-force-switch.patch"
}
src_compile() {
escons --prefix="/usr"
}
src_install() {
escons --prefix="/usr" --install-sandbox="${D}" install
}

@ -1,42 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit readme.gentoo scons-utils toolchain-funcs
DESCRIPTION="The SunPinyin IMEngine Wrapper for XIM Framework"
HOMEPAGE="https://sunpinyin.googlecode.com/"
SRC_URI="https://dev.gentoo.org/~yngwin/distfiles/sunpinyin-${PV}.tar.xz"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="~app-i18n/sunpinyin-${PV}:=
x11-libs/gtk+:2
x11-libs/libX11"
RDEPEND="${DEPEND}"
src_unpack() {
default
mv "${WORKDIR}/sunpinyin-${PV}" "${S}" || die
}
src_configure() {
tc-export CXX
myesconsargs=( --prefix="${EPREFIX}/usr" )
}
src_compile() {
pushd "${S}"/wrapper/xim
escons
popd
}
src_install() {
pushd "${S}"/wrapper/xim
escons --install-sandbox="${D}" install
popd
readme.gentoo_create_doc
}

@ -0,0 +1,40 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 )
inherit python-any-r1 scons-utils toolchain-funcs vcs-snapshot
MY_P="${P:1}"
DESCRIPTION="A standalone XIM server for SunPinyin"
HOMEPAGE="https://github.com/sunpinyin/sunpinyin"
SRC_URI="https://github.com/${PN#*-}/${PN#*-}/archive/v${PV/_rc/-rc}.tar.gz -> ${MY_P}.tar.gz"
LICENSE="LGPL-2.1 CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="~app-i18n/sunpinyin-${PV}:=
x11-libs/gtk+:2
x11-libs/libX11"
DEPEND="${RDEPEND}
virtual/pkgconfig"
S="${WORKDIR}/${MY_P}"
src_prepare() {
default
tc-export CXX
}
src_compile() {
escons -C wrapper/xim \
--prefix="${EPREFIX}"/usr
}
src_install() {
escons -C wrapper/xim --install-sandbox="${D}" install
dodoc wrapper/xim/README
}

Binary file not shown.

@ -144,10 +144,13 @@ COMMON_DEPEND="${PYTHON_DEPS}
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libXrender
bluetooth? ( net-wireless/bluez )
bluetooth? (
dev-libs/glib:2
net-wireless/bluez
)
coinmp? ( sci-libs/coinor-mp )
cups? ( net-print/cups )
dbus? ( dev-libs/dbus-glib )
dbus? ( sys-apps/dbus )
eds? (
dev-libs/glib:2
gnome-base/dconf
@ -402,7 +405,6 @@ src_configure() {
--disable-openssl
--disable-pdfium
--disable-report-builder
--with-alloc=system
--with-build-version="Gentoo official package"
--enable-extension-integration
--with-external-dict-dir="${EPREFIX}/usr/share/myspell"

Binary file not shown.

@ -1,2 +1,3 @@
DIST libwps-0.4.10.tar.xz 695448 BLAKE2B ec26b6ccd918aa29d0df053b3e321b651e0c7142910009e0b50a89f88f4dba8f7e9e20f8962a7afb84497b533129d85eb5c7628aa7c64f2a57ce2976d5ff372f SHA512 e5a6155d9e59df226e72db5723ae7574d3f3fdc49bd64156e11f9d3715748fb919dd3d2ab83b6d5fb80c002e7d4ca12563f6ff80472a6485f374b037404acf83
DIST libwps-0.4.8.tar.xz 648512 BLAKE2B b446c9999ff0e760569daa52fd24e42af8cdda78f2c0bc77d26cc25957381456f045dde1eb4ec8bd7999de29f658d67b2a493fdeacde4faa12a00aa28725603f SHA512 bf5d7aeb6f06e87f15ec8e911fb6436fb4e14839123db71488638f0e658034ad4ea8849ed83926af2fab9b50a7ef7410199d4a1102abc63c83d37bf1966a4afb
DIST libwps-0.4.9.tar.xz 673784 BLAKE2B 7843de719d6c2ff3152b216e808fc06798ae77e582a644fccd34667e409ec8a34764f302c484bf991e653cd1bb8eaca48f68861aa50e5c41ae41373b5b0c531d SHA512 8703e60837c525ab24e40bb3e2e25244e9f4d2231699373b28d86430f6d7f818a5ba32de08f19febdb4f917f1a90e3b27f95e7d3200ca2d4a9101c262b37a30d

@ -0,0 +1,35 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Microsoft Works file word processor format import filter library"
HOMEPAGE="https://sourceforge.net/p/libwps/wiki/Home/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
LICENSE="|| ( LGPL-2.1 MPL-2.0 )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~x86"
IUSE="doc debug static-libs tools"
RDEPEND="
dev-libs/librevenge
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
doc? ( app-doc/doxygen )
"
src_configure() {
econf \
$(use_enable debug) \
$(use_with doc docs) \
$(use_enable static-libs static) \
$(use_enable tools)
}
src_install() {
default
find "${D}" -name '*.la' -delete || die
}

Binary file not shown.

@ -1 +1,2 @@
DIST tlib-1.20.tar.gz 111202 BLAKE2B 0ee6c662e1658607706516adab9b770942ec948633a75879b5a516b46989a34744acde52d10d5b2ea58af6e7215f1241b18c53267d643d4c2e08da425a93169e SHA512 d8a344483da2a174324dc81472b5d3bdb811e54af22a1599c5567019d33bafdf499845d3efeabf081ecf17dc6965c69640a6a01b208811529e86266ba1871218
DIST tlib-1.22.tar.gz 119979 BLAKE2B 2fe1231b6a075989c41aa2cf38d0964b6d9ada390d0729ea417aa1c2ef1a105a07d569f80c75ba91a55f7e68f349faab2dcda66741b0b1da59f76d68a5467e24 SHA512 b7fc7e3741876c92bbccc116d4e170663e3d178aa8fb546f969475723cd82e07d9470af37574f8f97cfd23b8ca8f5dd5daa2e7bef50e2f62beec0015a2355908

@ -0,0 +1,24 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit vim-plugin
MY_PN=${PN}_vim
MY_P=${MY_PN}-${PV}
DESCRIPTION="vim plugin: a library of utility functions"
HOMEPAGE="https://www.vim.org/scripts/script.php?script_id=1863 https://github.com/tomtom/tlib_vim"
SRC_URI="https://github.com/tomtom/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
KEYWORDS="~amd64 ~x86"
VIM_PLUGIN_HELPFILES="${PN}.txt"
S=${WORKDIR}/${MY_P}
src_prepare() {
default
rm -r test samples addon-info.json || die
}

Binary file not shown.

@ -1,3 +1,3 @@
DIST calendar-1.32-pkg.tar.gz 410752 BLAKE2B 698ffcef148c6c84fbea7328da45d73bdf49601a94e3776b00ea7bae58223ef6ff1706ee8bf0e090e6aca16bcc6ed5c2037af2f9bb694ba03a840b20913afc19 SHA512 ca9a2dd135d012e094044f066939dafad0ef5f73f738b538c0f7aefc08c2e9efa0e1bcd3a3630681cfb90ec3b3319fd9b8594675ca2747627924d53d3fbe8ec1
DIST calendar-1.38-pkg.tar.gz 411386 BLAKE2B be833c4f81a9d2e79e06768836fe1e58601c9b483f9febe127bd2c2bfe77259a3cd50630920e2df38de14234c1eece9c498b71073d967a06bf27258d91c9010c SHA512 d5158147df3fffcba550f4bdb34aba916b9071734c2e08b3bebb4c1969ac06b15b79337b4d2f50a53e057ff097fc63162849d5dc0983da4363e4e484357c571f
DIST calendar-1.41-pkg.tar.gz 409552 BLAKE2B f4ccf53eaf68d8f7098cd94954a3165fcd7513fa920288b08694c6c47f4b43ffe1075090bd303a838a75d67d489ec19f0ed203e6fe92167e89513635ee09f48f SHA512 0b4f48e37a367ab7337b4fd12d97235114ac1e889b6e858c644ff308879a921787c88add3bfcf4d16155324167910254854171c74205fa1822dde86570ba6e0b
DIST calendar-1.42-pkg.tar.gz 409513 BLAKE2B 81f59fa4743682beed93be1eadf211ef8f096720bc44ee47d80142ec037029942e2cb02166b15318dbba300eedaa551c1426fbf3e454c3de119f5c2e41a8d4d8 SHA512 75e0eeaab3c818d28d4b0da798c961108457d7b2ffb9c671589194473ff3d3f967e52b956601acd42d53ef584d72cac08d4de47a9aa3ea3720211bfde201c8f2

@ -1 +1,2 @@
DIST footnote-1.16-pkg.tar.gz 22152 BLAKE2B 4ff8d3df1d76fcf23ec5191516bfeb7be4dbdf11a428d387a5c4a722b8c9b7cf34680548a8e7be2fa39b8dc83f623c96328c974ea4f3d940879b57ae03fde259 SHA512 4eba15270fd4529c3a8b5e8f488cd9dc294dab2f4b968490e8bbfc09e81bc4abd4f9c95b38a295a8f5899f4df55b7dab18e8979130cd8b24a533fbc609f0bf92
DIST footnote-1.18-pkg.tar.gz 22196 BLAKE2B a6e99875cda4cf8bba7d27c2fad3d0bc61fcca09d6a79cc30b4e83004fa3dce704201e818ab6b0df96b5359425691f02ee5be92b347c41df6e842a6de6c44437 SHA512 222f2aafa6b0e56fdeacacc36a3dffec6ee6de103ae100f8900e00bfbf866d9bc1c3b6f00999c4d9a3c657bea6282a8b3fd89cac10856491745cab182a86e2c9

@ -0,0 +1,15 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="Footnoting in mail message editing modes"
XEMACS_PKG_CAT="standard"
RDEPEND="app-xemacs/mail-lib
app-xemacs/xemacs-base
"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1 +1,2 @@
DIST forms-1.15-pkg.tar.gz 48747 BLAKE2B a7695c1d07fc33cf6ccf7f0a3e7bd1039da1f662d589fea02716c9dcccf1441c7acc6bfdf344f6f0dd55965d45fd55633af3f369d57cb18bab3c62f3f95417c8 SHA512 eec09fe907c6b2ec94132ccc508d70903b27fb74cd02ae58a60d2196b80ea62111b0849db0c220e205d9e58394e588913b42dcf350d83cbe17cd9fbdd8ac6a62
DIST forms-1.17-pkg.tar.gz 49071 BLAKE2B f0ef7c71819f5d4c036025d8acd7e9da369143500850f7c094729a0d98a5ff3d7fa8f39b2783f3338a9ce81f2036ad2161edecfd3a35966284f39ce5bf44ac55 SHA512 7ef9eade79bf53b1c2e3c1f86d9e3e70225f0041c7b41db844ec55bbfaded100edf9b432813ae5dc6a0f8237faa6e3ba7c58acaa26ec73438a45cd2ba326a249

@ -0,0 +1,12 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="Forms editing support (obsolete, use Widget instead)"
XEMACS_PKG_CAT="standard"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1 +1,2 @@
DIST fortran-modes-1.05-pkg.tar.gz 70602 BLAKE2B da1e620e74b497290bf655fcbf9d45b5510193388557e33abc769d874ef2d75786cb91ea9964f0019a40b19de968690f396523144f49c7bd79be783111830d8c SHA512 c3eac57a6d84605fde545951d423855cca8a40dd02dc24d0e005e165ab4e52f2f76f7347ddf33e4e85d25717689b85c578ce1e2b3b738df8a080b56057747b27
DIST fortran-modes-1.07-pkg.tar.gz 70601 BLAKE2B 637c183415e196090acdaeaf73a1dbc35ba0aa089ed66ffb1cf69240c5bbce84dc30b7563665a0f7cb0615c16590f11ed5b167d25d71cbc50eb750d682e2d1f3 SHA512 760d60adacec1f9c1ee591193ced65560968363e7a3d148530a493ce04a4efca4c7a15e6058f30b744d7de7763968064b4f4a7b0a831542fbd2bf4d22d2adb38

@ -0,0 +1,14 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="Fortran support"
XEMACS_PKG_CAT="standard"
RDEPEND="app-xemacs/xemacs-base
"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1 +1,2 @@
DIST frame-icon-1.11-pkg.tar.gz 33800 BLAKE2B 93c404c9dfc894634e1b463d54eb53812de102e20f0d622dec9dcd5b37006bc92f5f4c1a2d47c5e1e1bc2344a49819bb6839a5c3d41df68546d6027abf6f5f8f SHA512 30e4de2e4bdac71483d39f3893b4ccd5d1ec37bc8b522a621af35f569e00c69bf02312c1039a52bfae759da2eaa748d26356a2b7db8c6b4dc8ce2ceb494d7d82
DIST frame-icon-1.13-pkg.tar.gz 33818 BLAKE2B 73f88b6a41c42a5376d68820245b341d9ff290f62b6cfb6b40201c90523d80386b07613a824e35c898456cdd8bcebeb82973eb98724c64e702b5ebdec4aa7ed9 SHA512 45e37a4dd59f6e7bdac12558079a4b7c0cd552053950fbc5b67b32b00c3631580d3645bfc2d662a91b3da7410754d89f402ed1faa02eecefcc1691460aea95a2

@ -0,0 +1,12 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="Set up mode-specific icons for each frame under XEmacs"
XEMACS_PKG_CAT="standard"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1,2 +1,3 @@
DIST fsf-compat-1.15-pkg.tar.gz 18912 BLAKE2B c44bea3e0aba7dbd13d747a6faf6e5824df5cae83a2fb341d4fe81590cd0575c163f6f3a7a919ec71a7b3d2860436342df87fb93db89375099b1e08c7ceeeea5 SHA512 87e208b0f30d58953c9d49b7988b0dcd886870e29083ec9bfd47eef347e83b2c275e446593f200c8b76075b70c9691286f6c1e6639b82eb9f1599df33c5042a6
DIST fsf-compat-1.19-pkg.tar.gz 20477 BLAKE2B d231757c8498693b1f08d164f1b93a89352e081cb52e3c46dc79007d5e5b0076d59950e7269b62eaa1efdf990aac21f56a355e42dd52b59008e5c182b4179912 SHA512 e1c64af5aee787691b527ee90a7ca6112ec0556b5939fc916c32fd4f990a60c8af70fda3b5c9e557888596ae5294b7ca8ddc4ae0df741299ec5d17a99a2479db
DIST fsf-compat-1.24-pkg.tar.gz 30304 BLAKE2B e54d2484b0dd7e42543e7e629bf403e042e3966e3776e9a108a19b34db4ce634a2e9d99122225d005e09bf2a35411d95f613b1aaac2f57755e8af685084872b0 SHA512 b16e4ac297bbc6fecd278bb7e26842f92cba279c0edf7ddf880c43470e586232d30e84d923f52f5bf13904fb7ce3fb3193f48ecc3d5709fe6613bf6dec681f2d

@ -0,0 +1,15 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="FSF Emacs compatibility files"
XEMACS_PKG_CAT="standard"
KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
inherit xemacs-packages
RDEPEND="app-xemacs/xemacs-base
"

@ -1 +1,2 @@
DIST games-1.20-pkg.tar.gz 84330 BLAKE2B c2f7fbd059de6e9da0670ed77fc86d8ada289f9841885038ed81bcf7db2825cf2006fc12f12dd308287a4bcea4d06ee98bb60ec0a0d4d4867356f1e48c446544 SHA512 dbee4a0da7a7ef1ddffcec72caa1af09aaa449c3d1f662c217bbd53ce0a7651c0ba3b31a3af750cba79454455c5325c5a9d81bcbae80610f356656b998b2f649
DIST games-1.23-pkg.tar.gz 84601 BLAKE2B 05af9e6ef9425712324947369bc84cf8dfd5996293777255f4ff8b06990057eef91bf71d504243e11688098b2ea6f3942819ca0a3aa9762e1d94b5c7066b8605 SHA512 0aad12664b89c27bb809d02514cc406165c9d9c938c0cd910ff31380f30898faaf4e38a0cbebd5d9a744321ae4c726f30ad4a920185e7d78b654329adf533a0f

@ -0,0 +1,14 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="Tetris, Sokoban, and Snake"
XEMACS_PKG_CAT="standard"
RDEPEND="app-xemacs/xemacs-base
"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1,2 +1,3 @@
DIST general-docs-1.04-pkg.tar.gz 43374 BLAKE2B 535370c9dd135ac36603812db099624a167bc234203fb4b87f5a8b0e9a535d9e0bb9f6a9adad00fd62d4caf904f551ad61e50f3b16d9ccff9ab795b9e88d5a78 SHA512 a5df76303cffcac6e334decca3b11900e927e1ee70be73bbbd217e67ab0594c8f9829f7a0f582c254e616df491aee9a4e89c5a8ad6ef54ab3157abf367ecf647
DIST general-docs-1.06-pkg.tar.gz 146305 BLAKE2B 5341120385d4c6c9d631f604e8ad71a8213c5033184a1b8ed14a14c066024a16bda397db9c656dc0d01483e42bfc9ff7754a47afce654014677187479dc4b828 SHA512 ff4847f881dd2f431e3a861015212798b23716087bd15ec117b7edb8f182bf5bddb31d370e9e69aa21847fd062164f05d2b4eba93326d6ffb784134b9152ddf8
DIST general-docs-1.10-pkg.tar.gz 150069 BLAKE2B 12bc9cdb095685d954500373dcbf5b9000cbea49bda67dc81945ade24896a66ff3ec7b9d73a840706f48570b30da2dd10874bb15bc732a6cd11de5bfa56f64aa SHA512 f94798e437d5278c31e0cf18e22f22c88cc0c8eca1febf23f6c1e5dbe8856955c9334334c70832d6ce25db535704e56355536cb402c7c587a2bfee450c1485b9

@ -0,0 +1,13 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="General XEmacs documentation"
XEMACS_PKG_CAT="standard"
RDEPEND=""
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1 +1,2 @@
DIST gnats-1.17-pkg.tar.gz 188959 BLAKE2B fd32eea586b1610abba78a51383d86714091a3656dabeeb871bb56eb5b85e7f9ff52dfba87da76bdf3abd15c1e66f98c03d807b26071879f64b33b3fac048b4e SHA512 b8d5a0faeb55c46b7a4f2d42d7b347304bff7a94f8487df72fac0a1aa4e388f188abb351de8764fac1c2381b01b3ac21abb1682878d4e998b5e141e4c443d29b
DIST gnats-1.19-pkg.tar.gz 190492 BLAKE2B a0ee4d1c7014dde6ece2f8e7919832a36ebdfa556083af37561404cd002239ff25d2c7074ac1498f2e388e133040445745620513955f5c4f345b213232c91219 SHA512 116375ab1830fff3ecb889a5236c1915a69b4d2e08daa95885aaa22c4980ee27d4e5ea41c3e5d2a9bad507acf3d668752b068c8e3ae9281e4a129f297fb0a9c1

@ -0,0 +1,15 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="XEmacs bug reports"
XEMACS_PKG_CAT="standard"
RDEPEND="app-xemacs/mail-lib
app-xemacs/xemacs-base
"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1 +1,2 @@
DIST gnus-1.99-pkg.tar.gz 3636886 BLAKE2B 5345498a95388998c5cefe65c20991ae34386e582e291c45d51194e509670ec395b2d4ad164ca219e4892a7377030bd769b2e76e3f624b6751d60f2a5161bb5d SHA512 f938e77d2a93e29b7eb89db5b67d717a55ff36e827b7ba3ea1d114f59eda763e06933b645fe42d51a53c483f1e6fe74c669d595af36aa97b30cb97f5ca39db79
DIST gnus-2.04-pkg.tar.gz 3628467 BLAKE2B 1b6f6ffd4693065a666353e87cf5ec4ae5f897470fe1423f43c5f3ec99c827f6c9074c70f4add6cbf7462491ee0a50b8faf0b9f6e1d4cab16d23e64e20d07975 SHA512 d7bce3b6ff62ca901e9dabf59a5bf2044ec569ab1dd84898f11cb966dc97bc35b1842b61c62ad024e200db4bd1df9f7d17fd642c251e42931603b0eb286356e2

@ -0,0 +1,28 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="The Gnus Newsreader and Mailreader"
XEMACS_PKG_CAT="standard"
RDEPEND="app-xemacs/mail-lib
app-xemacs/xemacs-base
app-xemacs/xemacs-eterm
app-xemacs/sh-script
app-xemacs/net-utils
app-xemacs/os-utils
app-xemacs/dired
app-xemacs/mh-e
app-xemacs/sieve
app-xemacs/ps-print
app-xemacs/w3
app-xemacs/pgg
app-xemacs/mailcrypt
app-xemacs/ecrypto
app-xemacs/sasl
"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
inherit xemacs-packages

@ -1 +1,2 @@
DIST guided-tour-0.52-pkg.tar.gz 1450982 BLAKE2B e201ec081b563998f269dd051e298591be1a885270b8e05b1c4f8e905f977ffcd173b5ea7b684a461866939490d783ef52e6d2c12c659065b542ec85d344b038 SHA512 160a4a1a70acaf6e6b02e5d9b3a0fa1d5a31accb98a3b9ad131d08dbc0366163cee21ec912aaa0c2bde7f0c785e01c417f3541bca0ba2eed8a88ad30c0a44691
DIST guided-tour-0.54-pkg.tar.gz 1451029 BLAKE2B 015887c44331679d09a32559271da90af8b713ee20cb48ebd680c2cc0efeb993ef8bfbfee70c0dacdef52d0c7ae80edfee6c64dd7bd6a816870b9abb926834d0 SHA512 fd395b0b340e0962b589a37cae4af8f2a1c36259c4417019857dcc7dc2ae10b55df754883e618a35cb95e94358f669f557dd173c1da85b251982ccb4b34adaff

@ -0,0 +1,12 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
SLOT="0"
DESCRIPTION="Phil Sung's Guided Tour of Emacs"
XEMACS_PKG_CAT="standard"
KEYWORDS="~amd64"
inherit xemacs-packages

Binary file not shown.

@ -1,2 +1 @@
DIST apache-couchdb-1.7.1.tar.gz 9963069 BLAKE2B 69a3f835f6a7b5752e4707b02edfa726cfdb76813e36e570566641b999eea556ff788b0ca8ce1e66beb819119d90e387beab3bba8618e3b7a606870794307fef SHA512 cd7417ef4b1eaeb1fe4251b559d904238fd25881c542f1498e6e9f1c4a55a79e34e06e711f90ce39e5e65fcac8be9c611943b8ed57d4a7465859b5811ac0a21f
DIST apache-couchdb-1.7.2.tar.gz 10009424 BLAKE2B 3d3b4922fe5b2c55e4851e48993442ba23369753fb17d5cafba936947624af0d3dac70e0a23d0c22c79e7e2776a3a441d5b1020a4a420b7d9a621fb59aad48d9 SHA512 507a35a7f1e826b1562eec86146cc6fcff3c65fa7762f9742e6e8fdacfca735473105772757624183778f7a532c742f6644b301677607bb81c1f3f0ceb742867

@ -1,77 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit autotools eutils multilib pax-utils user
DESCRIPTION="Distributed, fault-tolerant and schema-free document-oriented database"
HOMEPAGE="https://couchdb.apache.org/"
SRC_URI="mirror://apache/couchdb/source/${PV}/apache-${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="libressl selinux test"
RDEPEND=">=dev-libs/icu-4.3.1:=
<dev-lang/erlang-21.0[ssl]
!libressl? ( >=dev-libs/openssl-0.9.8j:0 )
libressl? ( dev-libs/libressl )
>=net-misc/curl-7.18.2
<dev-lang/spidermonkey-1.8.7
selinux? ( sec-policy/selinux-couchdb )"
DEPEND="${RDEPEND}
sys-devel/autoconf-archive"
RESTRICT=test
S="${WORKDIR}/apache-${P}"
pkg_setup() {
enewgroup couchdb
enewuser couchdb -1 -1 /var/lib/couchdb couchdb
}
src_prepare() {
sed -i ./src/couchdb/priv/Makefile.* -e 's|-Werror||g'
eautoreconf
}
src_configure() {
econf \
--with-erlang="${EPREFIX}"/usr/$(get_libdir)/erlang/usr/include \
--localstatedir="${EPREFIX}"/var \
--with-js-lib="${EPREFIX}"/usr/$(get_libdir)
# bug 296609, upstream bug #COUCHDB-621
sed -e "s#localdocdir = /usr/share/doc/couchdb#localdocdir = "${EPREFIX}"/usr/share/doc/${PF}#" -i Makefile || die "sed failed"
}
src_compile() {
emake
# bug 442616
pax-mark mr src/couchdb/priv/couchjs
}
src_test() {
emake distcheck
}
src_install() {
emake DESTDIR="${D}" install
fowners couchdb:couchdb \
/var/lib/couchdb \
/var/log/couchdb
for f in "${ED}"/etc/couchdb/*.ini ; do
fowners root:couchdb "${f#${ED}}"
fperms 660 "${f#${ED}}"
done
fperms 664 /etc/couchdb/default.ini
newinitd "${FILESDIR}/couchdb.init-4" couchdb
newconfd "${FILESDIR}/couchdb.conf-2" couchdb
sed -i -e "s:LIBDIR:$(get_libdir):" "${ED}/etc/conf.d/couchdb"
}

@ -6,13 +6,12 @@ DIST mariadb-10.1.29.tar.gz 67885370 BLAKE2B 40b94ed519522f16ee4687a9c569a0e5263
DIST mariadb-10.1.31.tar.gz 67982786 BLAKE2B 1fabbea67345024157be4be34a50c4e9c73b1a60def452321b6e9209d9fb16aace92e7ab1c37c168e5c9f6c52b623245e9df3171ce3f84e8fd0e840948b3e57f SHA512 db37ddb8ae5daf35b37d5132860c19c4a9b51c40005d05c5107f956ac5b4ecd447375b6f3a09bf59ea5aef2f4009314ed6e969ca2ac516722702b4da286dbd89
DIST mariadb-10.1.33.tar.gz 65292094 BLAKE2B 3223f9476e946112f7c1d23cc82ff52636801244136343413ae00336173ec58bb4af8dc36e065f6cd27e9aa3f9f999b1d19f9257b928bd92555b34b614b9cf76 SHA512 1d30e06d0c19e338bfbbe6815cf5eee8e1b839b525950f7f54c7cf8f89034658a284df4756f54719ab0f55875546d4713b03bab7dd094ec13291732b069f737e
DIST mariadb-10.1.34.tar.gz 65298561 BLAKE2B 3f3af7b8bad68a08f69befd3f3e7bd88b8cf058feb20309dc2cdbd16bf5d015c2cb0d1d9d2fdf831f6183c0b9bb25405124c24b2940467489e05d42c57f7b0a6 SHA512 3c18359006b340dcf724d1fce36dcc19916c42492269a7545e0726172b8f7b84860e10725c74e4458dae34572395f1650bf17838e9058544e0a6cfcbffd54f6d
DIST mariadb-10.1.35.tar.gz 65324620 BLAKE2B 659ad232a1f2f1cfd74ba8aa9b9f67adc6f4a5dc82e5d8b16011dba83155b1223138df273c935c71021f05068cd8fd14538e935847a36640fc4218b86155698c SHA512 88e6049f3bbc3aa047e108f91a2c4f335758e80f25bfa2974b5f8c2e13f5758824d7835dece021b515c531e5641b9998e4de92256ad4b47b7f694da99bd471aa
DIST mariadb-10.2.16.tar.gz 73363798 BLAKE2B 31b4d21612f72ff2784b038479ccb866f8d870019c1ff86ff8fa11256e56e659203c83ba52294cc16d0d73531f1d30f5e4ab218a1daadd02223cda3e4c984590 SHA512 3ee476987580c9105645936bbbf29e5614753120247d8909833221c66d68bd507c99643b8b17f23e99644825ad03e03c841309731915e9101f3b5cf47c14e902
DIST mariadb-10.3.7.tar.gz 71816160 BLAKE2B 213cfe2999b48c088e08e8289a6243d79b91e465fce51850a253a121896f69df03f935940f25ac290e15e29f97b3a16f75711044b8986f6ec3841ef8beafa0b4 SHA512 b1b3ad9ddc45bdfd3d03888ba160f9991b23187341deac402d5dc4b735511e29767a5dc64ca557bea9bf3d3b413b941ef2e1f5fa30be056dfaec4542a43895f1
DIST mariadb-10.3.8.tar.gz 72152953 BLAKE2B 4742be1d533c7958b61efd430411a1e7390faffc25ceccc09c736647fb263dc3797064725335abf17f9362c7a92293ea5fc72bc2ddd70636f83c25e35c4c83aa SHA512 e1b61900a06fa57992a2f8516771f5fb98799ed5a4bbe74f858c0fe87b907cc6b600942d6fe97b6064cb39b610a7213cb3bc9634a336f9ebffe11dfe67746422
DIST mariadb-5.5.61.tar.gz 45839038 BLAKE2B 2755963d51aee3b9b560531e00b9df6f5637c90a44ad181cf826234d27c15e9fd1b61ae4faf4d9a4ff06779e605c6a5757192407e6e402ad68dfb3ae45a94088 SHA512 a2bebb47ec62eb6cd15e003dea7708948cd96fd7f0fc631a85cfc4691b55e220ed78f3e3b16542b5152ad5bcc61e50a831c71cf8f29481f7de86816ec0bae594
DIST mysql-extras-20170926-1321Z.tar.bz2 312466 BLAKE2B 3e3e19a905961570cea9c1eb14dec3780da80409e996b1aeddb08625da875f5d08798a862cb1b80566b0d8be0d9ec2aab0a390ca90f991203c9871538b11f00a SHA512 556e782ccc40d8cffb2fde8c46038c90023440c07785ec667f898afdb8c802faeb4dbfe8b3918a1e563b46d1dc8c0de1172f7843ce08ee1ded435b344f8f0cf5
DIST mysql-extras-20180515-0123Z.tar.bz2 320380 BLAKE2B a56e3ef19f4e30628fea9889dbb55379a8c92f08c9c493fe3f524b98fabf3505150fbe7cc65f97fc8b75632b5dd7360ddb9bd1542714c5e9916f94c2792ff3db SHA512 3e0b36ab4cb3f2e7d30f1fb2d8d3a916439611f1714475f2ab0480ba51176f47dcccd40931de4bd0a46b0aca6dfcb62cfc92b6939eed2e61628947bf664008ee
DIST mysql-extras-20180515-1334Z.tar.bz2 321462 BLAKE2B 48fc1e0058fa824e6234b0f3319d261997e99f334c8583c0def4cdac4b59f2380d7153ab0fa2ca9a6ab15e35899c2a7586e3b61f4044c4c949110cc8ab9fb0e6 SHA512 de3000f0c65eed9595b52d53205cdcac60cb4a06a5aca27057c8beca6a7890f453aeeda0bb8487b8de75cfb4caa48682b7706273574876c5cefd0d03988c4f7e
DIST mysql-extras-20180529-0042Z.tar.bz2 321715 BLAKE2B c40e7c8de7d24f1ab6208968f3e22aae9e7782f02edef1391d37583ba4a99e67646eba2b9fdcf2a77e3e5a3a86c36632edfebb42b12ab242662cf6913313168d SHA512 a136d9f9567a3bbd396c1e33d1d7b6565be16b5b0a514835299a09b009e9d908328066701bb1c6c19af74225b1d166e3f57af81b277b6d8fad9e63c009523586
DIST mysql-extras-20180621-0218Z.tar.bz2 321959 BLAKE2B f444a3bd5e75c7ef491d175b1fc775a091c12870f4ac1003f0458dd5c7a1c91e09adec78013e828b4d8b16e96060426825b1650def8c22199dd59897b732359e SHA512 20523897dac98b369ab064932507034e547ffd283059285a4fb2bf1d63637c663d4d641dc91c5687de308a50eab3e75788d3cae720259a03d99b7e01f4146762
DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
DIST mysql-extras-20180809-1700Z.tar.bz2 322999 BLAKE2B 8b5feb32085dc35b2f68dae985b2d266c4eaa0e956b490050a2df04bbff99bf8623b67e75af9326d84e3ad625c4d86b0d21d23c9a96df5a0c9cd5ed730958970 SHA512 fbd7af9284bbf09d55f128361e7cc52d94f24ac491aac800cd6d61f2e444aeca66a4d5e6ae94c2fb4044e00cec9b232bae9a76a229f87f19d90b7aecf70792ec

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180515-1334Z"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
@ -211,7 +211,6 @@ src_prepare() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
java-pkg-opt-2_src_prepare
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
fi
@ -249,6 +248,7 @@ src_prepare() {
fi
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
@ -458,6 +458,10 @@ src_install() {
for script in "${S%/}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180628-0201Z"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
@ -211,7 +211,6 @@ src_prepare() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
java-pkg-opt-2_src_prepare
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
fi
@ -249,6 +248,7 @@ src_prepare() {
fi
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
@ -458,6 +458,10 @@ src_install() {
for script in "${S%/}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180621-0218Z"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
@ -234,7 +234,6 @@ src_prepare() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
java-pkg-opt-2_src_prepare
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
fi
@ -269,6 +268,7 @@ src_prepare() {
_disable_engine example
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
@ -491,6 +491,10 @@ src_install() {
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected

@ -0,0 +1,887 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
# Keeping eutils in EAPI=6 for emktemp in pkg_config
inherit eutils systemd flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
# Gentoo patches to MySQL
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
SRC_URI="${SRC_URI}
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
fi
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2"
SLOT="0/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos
innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam
+perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup
systemd systemtap static static-libs tcmalloc test tokudb xml yassl"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="!bindist? ( bindist ) libressl? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
S="${WORKDIR}/mysql"
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
inherit git-r3
EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
EGIT_CLONE_TYPE=shallow
else
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
fi
PATCHES=(
"${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
"${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
"${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
"${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
"${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
"${MY_PATCH_DIR}"/20029_all_mariadb-10.1.31-enable-numa.patch
"${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
)
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
COMMON_DEPEND="
kernel_linux? (
sys-process/procps:0=
dev-libs/libaio:0=
)
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
jemalloc? ( dev-libs/jemalloc:0= )
tcmalloc? ( dev-util/google-perftools:0= )
systemtap? ( >=dev-util/systemtap-1.3:0= )
!yassl? (
!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
libressl? ( dev-libs/libressl:0= )
)
>=sys-libs/zlib-1.2.3:0=
sys-libs/ncurses:0=
!bindist? (
sys-libs/binutils-libs:0=
>=sys-libs/readline-4.1:0=
)
server? (
backup? ( app-arch/libarchive:0= )
cracklib? ( sys-libs/cracklib:0= )
extraengine? (
odbc? ( dev-db/unixODBC:0= )
xml? ( dev-libs/libxml2:2= )
sys-libs/zlib[minizip]
)
innodb-lz4? ( app-arch/lz4 )
innodb-lzo? ( dev-libs/lzo )
innodb-snappy? ( app-arch/snappy )
kerberos? ( virtual/krb5 )
mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
numa? ( sys-process/numactl )
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
pam? ( virtual/pam:0= )
systemd? ( sys-apps/systemd:= )
tokudb? ( app-arch/snappy )
)
!yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) )
>=dev-libs/libpcre-8.41-r1:3=
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
"
DEPEND="virtual/yacc
static? ( sys-libs/ncurses[static-libs] )
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
${COMMON_DEPEND}"
RDEPEND="selinux? ( sec-policy/selinux-mysql )
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
${COMMON_DEPEND}
server? ( galera? (
sys-apps/iproute2
=sys-cluster/galera-25*
sst-rsync? ( sys-process/lsof )
sst-mariabackup? ( net-misc/socat[ssl] )
sst-xtrabackup? ( net-misc/socat[ssl] )
) )
perl? ( !dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes )
server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
"
# For other stuff to bring us in
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
local GCC_MAJOR_SET=$(gcc-major-version)
local GCC_MINOR_SET=$(gcc-minor-version)
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
# non x86{,_64} arches
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
fi
java-pkg-opt-2_pkg_setup
if has test ${FEATURES} && \
use server && ! has userpriv ${FEATURES} ; then
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
# This should come after all of the die statements
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
pkg_preinst() {
java-pkg-opt-2_pkg_preinst
}
pkg_postinst() {
# Make sure the vars are correctly initialized
mysql_init_vars
# Create log directory securely if it does not exist
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
if use server ; then
if use pam; then
einfo
elog "This install includes the PAM authentication plugin."
elog "To activate and configure the PAM plugin, please read:"
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
einfo
fi
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
einfo
elog "You might want to run:"
elog "\"emerge --config =${CATEGORY}/${PF}\""
elog "if this is a new install."
elog
elog "If you are switching server implentations, you should run the"
elog "mysql_upgrade tool."
einfo
else
einfo
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
fi
einfo
elog "Be sure to edit the my.cnf file to activate your cluster settings."
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
elog "The first time the cluster is activated, you should add"
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
elog "This option should then be removed for subsequent starts."
einfo
fi
}
src_unpack() {
unpack ${A}
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
}
src_prepare() {
_disable_engine() {
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
}
_disable_plugin() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
fi
# Don't build bundled xz-utils for tokudb
echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
local plugin
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
locale_info qc_info server_audit semisync sql_errlog )
local test_plugins=( audit_null auth_examples daemon_example fulltext )
if ! use server; then # These plugins are for the server
for plugin in "${server_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
if ! use test; then # These plugins are only used during testing
for plugin in "${test_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
# Collides with mariadb-connector-c bug 655980
_disable_plugin auth_dialog
# Avoid useless library checks
use mroonga || _disable_engine mroonga
use oqgraph || _disable_engine oqgraph
_disable_engine example
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
append-cxxflags -felide-constructors
# bug #283926, with GCC4.4, this is required to get correct behavior.
append-flags -fno-strict-aliasing
CMAKE_BUILD_TYPE="RelWithDebInfo"
# debug hack wrt #497532
mycmakeargs=(
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
-DINSTALL_BINDIR=bin
-DINSTALL_DOCDIR=share/doc/${PF}
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_INFODIR=share/info
-DINSTALL_LIBDIR=$(get_libdir)
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '')
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-DWITH_UNIT_TESTS=$(usex test ON OFF)
-DWITH_ZLIB=system
-DENABLED_LOCAL_INFILE=1
-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-DWITH_DEFAULT_COMPILER_OPTIONS=0
-DWITH_DEFAULT_FEATURE_SET=0
-DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
# The build forces this to be defined when cross-compiling. We pass it
# all the time for simplicity and to make sure it is actually correct.
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-DWITHOUT_CLIENTLIBS=YES
-DWITH_READLINE=$(usex bindist 1 0)
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
-DENABLE_DTRACE=$(usex systemtap)
-DWITH_SSL=$(usex yassl bundled system)
)
if use server ; then
# Federated{,X} must be treated special otherwise they will not be built as plugins
if ! use extraengine ; then
mycmakeargs+=(
-DPLUGIN_FEDERATED=NO
-DPLUGIN_FEDERATEDX=NO )
fi
mycmakeargs+=(
-DWITH_JEMALLOC=$(usex jemalloc system)
-DWITH_PCRE=system
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
-DPLUGIN_TOKUDB=$(usex tokudb YES NO)
-DPLUGIN_AUTH_PAM=$(usex pam YES NO)
-DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
-DPLUGIN_CASSANDRA=NO
-DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
-DPLUGIN_SPIDER=$(usex extraengine YES NO)
-DPLUGIN_CONNECT=$(usex extraengine YES NO)
-DCONNECT_WITH_MYSQL=1
-DCONNECT_WITH_LIBXML2=$(usex xml)
-DCONNECT_WITH_ODBC=$(usex odbc)
-DCONNECT_WITH_JDBC=$(usex jdbc)
# Build failure and autodep wrt bug 639144
-DCONNECT_WITH_MONGO=OFF
-DWITH_WSREP=$(usex galera)
-DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
-DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
-DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
-DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
-DPLUGIN_AUTH_GSSAPI_CLIENT=NO
-DWITH_MARIABACKUP=$(usex backup ON OFF)
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
-DWITH_SYSTEMD=$(usex systemd yes no)
-DWITH_NUMA=$(usex numa ON OFF)
-DINSTALL_SQLBENCHDIR=''
)
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
mycmakeargs+=(
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
)
elif ! use latin1 ; then
mycmakeargs+=(
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
)
else
mycmakeargs+=(
-DDEFAULT_CHARSET=latin1
-DDEFAULT_COLLATION=latin1_swedish_ci
)
fi
mycmakeargs+=(
-DEXTRA_CHARSETS=all
-DMYSQL_USER=mysql
-DDISABLE_SHARED=$(usex static YES NO)
-DWITH_DEBUG=$(usex debug)
-DWITH_EMBEDDED_SERVER=OFF
-DENABLED_PROFILING=$(usex profiling)
)
if use static; then
mycmakeargs+=( -DWITH_PIC=1 )
fi
if use jemalloc || use tcmalloc ; then
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
fi
# Storage engines
mycmakeargs+=(
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_CSV_STORAGE_ENGINE=1
-DWITH_HEAP_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
)
else
mycmakeargs+=(
-DWITHOUT_SERVER=1
-DWITH_EMBEDDED_SERVER=OFF
-DEXTRA_CHARSETS=none
-DINSTALL_SQLBENCHDIR=
-DWITH_SYSTEMD=no
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
}
src_install() {
cmake-utils_src_install
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
rm "${ED}/usr/include/mysql/server/private/config.h" || die
fi
# Make sure the vars are correctly initialized
mysql_init_vars
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
if [[ -d "${ED}/usr/data" ]] ; then
rm -Rf "${ED}/usr/data" || die
fi
# Unless they explicitly specific USE=test, then do not install the
# testsuite. It DOES have a use to be installed, esp. when you want to do a
# validation of your database configuration after tuning it.
if ! use test ; then
rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
fi
# Configuration stuff
einfo "Building default configuration ..."
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
local mycnf_src="my.cnf-5.6-r1"
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
"${FILESDIR}/${mycnf_src}" \
> "${TMPDIR}/my.cnf.ok" || die
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
if use latin1 ; then
sed -i \
-e "/character-set/s|utf8|latin1|g" \
"${TMPDIR}/my.cnf.ok" || die
fi
eprefixify "${TMPDIR}/my.cnf.ok"
newins "${TMPDIR}/my.cnf.ok" my.cnf
if use server ; then
einfo "Including support files and sample configurations"
docinto "support-files"
local script
for script in \
"${S}"/support-files/magic
do
[[ -f "$script" ]] && dodoc "${script}"
done
docinto "scripts"
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
}
# Official test instructions:
# USE='extraengine perl server' \
# FEATURES='test userpriv -usersandbox' \
# ebuild mariadb-X.X.XX.ebuild \
# digest clean package
src_test() {
_disable_test() {
local rawtestname reason
rawtestname="${1}" ; shift
reason="${@}"
ewarn "test '${rawtestname}' disabled: '${reason}'"
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
}
local TESTDIR="${BUILD_DIR}/mysql-test"
local retstatus_unit
local retstatus_tests
if ! use server ; then
einfo "Skipping server tests due to minimal build."
return 0
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ $UID -eq 0 ]]; then
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
# Run CTest (test-units)
# cmake-utils_src_test
# retstatus_unit=$?
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# Enable parallel testing, auto will try to detect number of cores
# You may set this by hand.
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
# create directories because mysqladmin might run out of order
mkdir -p "${T}"/var-tests{,/log} || die
# Run mysql tests
pushd "${TESTDIR}" > /dev/null || die
touch "${T}/disabled.def"
# These are failing in MariaDB 10.0 for now and are believed to be
# false positives:
#
# main.mysql_client_test, main.mysql_client_test_nonblock
# main.mysql_client_test_comp:
# segfaults at random under Portage only, suspect resource limits.
local t
for t in plugins.cracklib_password_check plugins.two_password_validations ; do
_disable_test "$t" "False positive due to varying policies"
done
for t in main.mysql_client_test main.mysql_client_test_nonblock \
rpl.rpl_semi_sync_uninstall_plugin \
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
_disable_test "$t" "False positives in Gentoo"
done
if ! use client-libs ; then
_disable_test main.plugin_auth "Needs client libraries built"
fi
_disable_test sys_vars.sysvars_server_notembedded "Broken test" # bug #661700 required profiling always on
# run mysql-test tests
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
retstatus_tests=$?
popd > /dev/null || die
# Cleanup is important for these testcases.
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
local failures=""
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
[[ -z "$failures" ]] || die "Test failures: $failures"
einfo "Tests successfully completed"
}
mysql_init_vars() {
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=""
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
| sed -e 's/.*=\s*//' \
| tail -n1`
fi
fi
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR="${MY_LOCALSTATEDIR}"
einfo "Using default MY_DATADIR"
fi
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
if [[ -e "${MY_DATADIR}" ]] ; then
# If you get this and you're wondering about it, see bug #207636
elog "MySQL datadir found in ${MY_DATADIR}"
elog "A new one will not be created."
PREVIOUS_DATADIR="yes"
else
PREVIOUS_DATADIR="no"
fi
export PREVIOUS_DATADIR
fi
else
if [[ ${EBUILD_PHASE} == "config" ]]; then
local new_MY_DATADIR
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
ewarn "MySQL MY_DATADIR has changed"
ewarn "from ${MY_DATADIR}"
ewarn "to ${new_MY_DATADIR}"
MY_DATADIR="${new_MY_DATADIR}"
fi
fi
fi
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
export MY_LOCALSTATEDIR MY_LOGDIR
export MY_DATADIR
}
pkg_config() {
_getoptval() {
local mypd="${EROOT}"/usr/bin/my_print_defaults
local section="$1"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
fi
einfo "Found password in '${tmp_mysqld_password_source}' section!"
break
fi
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
einfo "Please provide a password for the mysql 'root' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
fi
local options
local sqltmp="$(emktemp)"
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
pushd "${TMPDIR}" &>/dev/null || die
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [ $? -ne 0 ]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile}
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
fi
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
eend $?
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
}

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180515-1334Z"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
@ -260,7 +260,6 @@ src_unpack() {
}
src_prepare() {
java-pkg-opt-2_src_prepare
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
fi
@ -279,6 +278,7 @@ src_prepare() {
fi
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
@ -622,6 +622,10 @@ multilib_src_install_all() {
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180529-0042Z"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
@ -262,7 +262,6 @@ src_prepare() {
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
}
java-pkg-opt-2_src_prepare
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
fi
@ -305,6 +304,7 @@ src_prepare() {
fi
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
@ -573,6 +573,10 @@ src_install() {
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180628-0201Z"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
# Keeping eutils in EAPI=6 for emktemp in pkg_config
@ -430,6 +430,10 @@ src_install() {
for script in "${S%/}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected

@ -12,3 +12,4 @@ DIST mongodb-src-r3.6.4.tar.gz 40159916 BLAKE2B d3878d4e6bbf331de672768b2c92a4d7
DIST mongodb-src-r3.6.5.tar.gz 40310152 BLAKE2B 72110ae47b17ec8b1f60636a5ef8491b076e1cc019513fd872ea38b3bb8393efff4bddc7b795b3da711f258d21be9fa23e24d396a9429349c51ce05fff180a53 SHA512 6ecb3140ee4a7929fabe62d698f23e87cb5030cf31abefe7f82374f407fb87dc05f712089998f96bc40e23698836a86e7f3590892bde9d2d6f2c4bcc15cc3ebf
DIST mongodb-src-r3.6.6.tar.gz 40391572 BLAKE2B 1cee1ad5431d2941cf2f0ee31290b2b5bc1c628f2cb5041d4d5a1427d342ecc3bbfb123e540581d81a1c5b018464abb9dcd1ead8df0de6a01a1462ca0c258e83 SHA512 cd91979ba29538c9e1645fe81e03ac56101b0fa8980ea2bdf89a4987ee8f7f6ddc97e2b27495500548a4424f155a1847471c7a5715beabf75ff894edf05c546b
DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589
DIST mongodb-src-r4.0.1.tar.gz 49175057 BLAKE2B 69cd8268964200534d61493018044372f2991cedb027454c02023f5f54a0616b31c421d611ff2e67dfca87b99727cef5266a4279445a8693f8c676d0803553b3 SHA512 cfb0ec3227d976999f366ca15ddaa9379f90433dbd02bd16d001f0a7f986e84df697cbbd43674988b5d41a0b85445dcd0c4717cb406e05c1fbcd544088c859ea

@ -0,0 +1,164 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
SCONS_MIN_VERSION="2.5.0"
CHECKREQS_DISK_BUILD="2400M"
CHECKREQS_DISK_USR="512M"
CHECKREQS_MEMORY="1024M"
inherit check-reqs eapi7-ver eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user
MY_P=${PN}-src-r${PV/_rc/-rc}
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
HOMEPAGE="https://www.mongodb.com"
SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
LICENSE="AGPL-3 Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug kerberos libressl mms-agent ssl test +tools"
RDEPEND=">=app-arch/snappy-1.1.3
>=dev-cpp/yaml-cpp-0.5.3
>=dev-libs/boost-1.60:=[threads(+)]
>=dev-libs/libpcre-8.41[cxx]
dev-libs/snowball-stemmer
net-libs/libpcap
>=sys-libs/zlib-1.2.11:=
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
mms-agent? ( app-admin/mms-agent )
ssl? (
!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
libressl? ( dev-libs/libressl:0= )
)"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
dev-python/cheetah[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
virtual/python-typing[${PYTHON_USEDEP}]
dev-util/scons
sys-libs/ncurses:0=
sys-libs/readline:0=
debug? ( dev-util/valgrind )
test? (
dev-python/pymongo[${PYTHON_USEDEP}]
)"
PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
PATCHES=(
"${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
"${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
"${FILESDIR}/${PN}-4.0.0-no-compass.patch"
)
S=${WORKDIR}/${MY_P}
pkg_pretend() {
if [[ -n ${REPLACING_VERSIONS} ]]; then
if ver_test "$REPLACING_VERSIONS" -lt 3.6; then
ewarn "To upgrade from a version earlier than the 3.6-series, you must"
ewarn "successively upgrade major releases until you have upgraded"
ewarn "to 3.6-series. Then upgrade to 4.0 series."
else
ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading."
fi
fi
}
pkg_setup() {
enewgroup mongodb
enewuser mongodb -1 -1 /var/lib/${PN} mongodb
python-single-r1_pkg_setup
}
src_prepare() {
default
# remove bundled libs
rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
# remove compass
rm -r src/mongo/installer/compass || die
}
src_configure() {
# https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
# --use-system-icu fails tests
# --use-system-tcmalloc is strongly NOT recommended:
scons_opts=(
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
--disable-warnings-as-errors
--use-system-boost
--use-system-pcre
--use-system-snappy
--use-system-stemmer
--use-system-yaml
--use-system-zlib
)
use debug && scons_opts+=( --dbg=on )
use kerberos && scons_opts+=( --use-sasl-client )
use ssl && scons_opts+=( --ssl )
# respect mongoDB upstream's basic recommendations
# see bug #536688 and #526114
if ! use debug; then
filter-flags '-m*'
filter-flags '-O?'
fi
default
}
src_compile() {
escons "${scons_opts[@]}" core tools
}
# FEATURES="test -usersandbox" emerge dev-db/mongodb
src_test() {
"${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
}
src_install() {
escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
doman debian/mongo*.1
dodoc README docs/building.md
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
newinitd "${FILESDIR}/mongos.initd-r3" ${PN/db/s}
newconfd "${FILESDIR}/mongos.confd-r3" ${PN/db/s}
insinto /etc
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r2" ${PN/db/s}.conf
systemd_dounit "${FILESDIR}/${PN}.service"
insinto /etc/logrotate.d/
newins "${FILESDIR}/${PN}.logrotate" ${PN}
# see bug #526114
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
local x
for x in /var/{lib,log}/${PN}; do
diropts -m0750 -o mongodb -g mongodb
keepdir "${x}"
done
}
pkg_postinst() {
ewarn "Make sure to read the release notes and follow the upgrade process:"
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
}

@ -1,12 +1,18 @@
DIST postgresql-10.3.tar.bz2 19959653 BLAKE2B ba3b05f53b0f879b18d6d0649bf819697c77a066b49d941a96d13a4741854b01aeb0c8b868d6550a08ad52572c9463c968660aa83c16cbaa5b4bf7a89387a524 SHA512 05cf82d3483bdf38734e6ff0fef6b80e7f8fd3cb5ea6792ffe222a599d97d1a29638970bf28ebf5bd1f877e8dcd9986d88f5c5e5379e74fe79ce83e20d2babba
DIST postgresql-10.4.tar.bz2 20201838 BLAKE2B 6d1cdc44547740c8f9fbc2e989364640409c6d2a365568b75731277dd0fba473ce07e2ee27e8ebfad507a6ce0ab3d3a44156c0e3a069d96d320771d8a97ba82f SHA512 b7c0d2fdc724e2eb1cda9fc1eb01b47352bbe6ba6357b3e898b7f5990fd78499c8c68dcb3aa9bde7821d71b5882d8856131384e899f8055d89d51cdfdbc9e663
DIST postgresql-10.5.tar.bz2 20284578 BLAKE2B af2bc5bdc7e69682dac38785ce4a10c2c5c04202f2c3cd4acbb9200dbae7eec75d83813ac4df84b5a8064e77167f22a4dd54c6e84a68e564642cb5d75effd0ac SHA512 1bad30ae88beca66f7e8b99b82e7f02aac1e9230b328e6e5a762a704cdd9dc767d924f5a66c68c93586badfef91b7ff336120a567ce970eaa58bb44c662ad48c
DIST postgresql-11beta1.tar.bz2 20945387 BLAKE2B a99aff17a656da2250309f2652237c8df3a3aeed088250be6114964c103dec40d0c4cc60b048b2ffa1e9733aed8e9df2597d57cab58482512c42f25139dc3499 SHA512 fa4e9cf8293fecf384d98d3a5bbed208eda2e4dd8bf05a9922a74355daba74dde4dbe0cd42bea1de155f4fea3cdcd0d7621d7e315c1d5f49ce5ee794b01b9f6d
DIST postgresql-11beta2.tar.bz2 21086270 BLAKE2B ecea671334cc8dcc59ef46e1e9dfc16c1f0c44623d5355a42ef07797c6794109f10532fb6bfd6b4165e92a83d42514547e402cbe1a3618a6e6894432b3e2945d SHA512 3f9120af5f39d10937d92344c45e19f6d4de097dc24a081cd1984b27df4ecb8b0c15c638c8b1f8830b0003f01808159bd91305f9744eb6ae6c3425b3bf677937
DIST postgresql-11beta3.tar.bz2 21375988 BLAKE2B cd83fcfc55504a028bf42f2c31de4d9e12ead1ad0f238a1f36397b9405ddf8f6d371062a25e2660f8c6754447a09ddc3a122f178101b8ab80237b16422c8cf4c SHA512 6ac6ecf2fff014b3673b11f6f106fdc93e6692a4a67a4669c4a7557f2b3229e41ddf5365c1e9328d88b6fde9141c15bd1a4640356559e727ee7f9f11641d4bf6
DIST postgresql-9.3.22.tar.bz2 17022938 BLAKE2B 198705e438717d0d9e12c73e0c0e3eff0ba89ea50a1b183de70f065e13c153c164890fe56bc6ec13b0cb9617df4f66894c122eeddaf9303b9a02b8e08b19b085 SHA512 667ff496172626d2fe35c6795935fb07f4f7967a3b0631dd3b96278f8dc00b3d08794f091a5ab060a45d6f2a861e0f10f0e9660f9e343ab34eeabd693104c47f
DIST postgresql-9.3.23.tar.bz2 17033683 BLAKE2B f02ad25f6b8755a9a57c3a6dcb63b78672e29473b061ad1616be2fb97fbfd83fe0dc9fc9fda66ac0231fb30fb13f9ef8975ba5a9701d83f33495bcf2c2651b4a SHA512 bb2d54312de728aa0379ea5bc6385036bbe69d3b7f85bbd78c210840eed19ace29840849caf38d0689e21130a0c94818a362b3927805d8eded53b68e240a52b0
DIST postgresql-9.3.24.tar.bz2 17042985 BLAKE2B 976debbc2a072cc307e22beac1d59352ecc214b9879284e635f30295d1f46ad2e0542ffc5f62639527be870afe46ea5daf5b8b2d3da9a069adf1701218def968 SHA512 3d457b6218eeb8da2d8dd134dabc7ec8000cad5863870079b85ce00d94218fa049146290a8389fec15e57d586b0edee9810cdad85f36cbabce49b6b4378ce1ee
DIST postgresql-9.4.17.tar.bz2 17807762 BLAKE2B 7640c29a71c6aeff47d9b43dd1e4f52edac4295b646b34da3a0ed9c26a8a826061bfd892e9907b62f31b7f01ee3aaf437c88d79b84d1d786d608dcd088309ecf SHA512 9ac03d460e521dcd142ac463dd5bb0f3e3f47333367bf8d61499ec7e8d0129d338c6f111667d0006df0c8ced9ae8a337d4c1b40eb5f55e6bc8dd5a24dfd376f0
DIST postgresql-9.4.18.tar.bz2 17828085 BLAKE2B 346584e7d74264a7d58b3793cfd6247ae3cad3bb946bedec8df8d97278ffe6f8e881d31ad50e9f5d622aa4ae9b9711b36258bb60d520bb9a1d458af63c343e9e SHA512 2e64c3130c3dfc5183a77d72f61714bea34bfe549f55720eee25046e00b913a7effec3d7e43a021766ac957c1fa3c8c5e6c26ccbd8be1b434ae618e1fe9daab6
DIST postgresql-9.4.19.tar.bz2 17879273 BLAKE2B 775a8748218c40440df91307107d46a35bcb3b2baf1c383014684c15d06c0026548770f88dccb1c26c3247813761e4a43003c50fe930041afc5701cddabfbde3 SHA512 38e2f1f25bd80fdfdec728cd4a3fee6696ca051e496f0629a0a554ea013bfb9bb83ef5659b00130666462a45036a648cf880a2f49693a8ef2edbde938e4dd830
DIST postgresql-9.5.12.tar.bz2 18589538 BLAKE2B 4246eb2bf5fe2e3bb48bdc411ebd3c87015570f0be4d8b1ed2a0f2ed20a8374e3244fa0aa17f9145f4f951c88f5b0717a4dd2186bf1621ce3334789f5f8dd50f SHA512 ab81bc95fd587f76a1986db5616b63d861b84da0eb9e54478f5298248a81d7a608d1bb1a9e30662c8190d05630106ddb3bb6413c34b003de948417214d342654
DIST postgresql-9.5.13.tar.bz2 18600185 BLAKE2B 7560f08648ec1417d304aa8c53c3220d7a4b2fdaf2cb4920a0196273466d1dbab4c12dbceb3dc9a136458c0089dd5f5dc595c95353584d49da0d2ab6e7903bba SHA512 807b22aabee38326934213de04b782a6b22cd8fe5c5bfd8b6cfa44281924527a715dcd78adbee276746446a7b05036b4714b00a16c650027543dcbafe1888082
DIST postgresql-9.5.14.tar.bz2 18687959 BLAKE2B ac377b5e279d9e8179a94eb91d0cf1a7e3f6443c860d68a4540357d80128fbc54ac1ffec198725b2a783a80448f8a625556f2e6018162304d65659982890d46f SHA512 9b5ebc8dc13bbdbd5b5bc02552e2b9b5029d899a80e82b653542c735868590ebe57d586951bf036c5abd28aae325c71cc69536f88321d50dd3d254f8ee0cfe35
DIST postgresql-9.6.10.tar.bz2 19991204 BLAKE2B 3d99296b5045a0b56b89257b2aa3f0c8be1108428acd77469b8db94200ad6b0b8d2fa84c73f652f79db56620c46928524d2f3a1a265ac332eb36c0625b800f76 SHA512 960a32c86466f9d5f5491ef163f5c4a99cb5de7312d13371e2223b1d156e31eb2a23ed478e6654bcbb7bd19db9470aaf63473ff661c11c60971b92af5e9daf82
DIST postgresql-9.6.8.tar.bz2 19528927 BLAKE2B 6aab5dbe4b13e1624befc33c2fa5241804dff71879e2d60c166db19c2fe015cd19cfc35054e6aede82bfe6b83a7146b6d2eedaabb94111c163da732526ff1723 SHA512 6b7595c0046308c725d77360b156e979d6bc469b78ac6500f631112f19b2607ca2d816781f8c5fd3bd835c48e079e79ada7af687fbd306a8fec5e160f20dd211
DIST postgresql-9.6.9.tar.bz2 19566222 BLAKE2B e92a5ffaa8f4400364a174fc21ab11bb18c96dce9be721e6073ff7ad21b828859c2ac5fe8da81cad6a3d2a63a62d8fcb067d4bb02a9d23903525ad1f78955470 SHA512 3ce2a8f3a017d9c0bd0f1b475a9ee02bcb6a4119b0d436757911f444f49f5024bb1a1be07ce16a79e71af77799de1bf952b32279b4566bae075f23a50b8545c6

@ -6,6 +6,9 @@
<name>PostgreSQL and Related Package Development</name>
</maintainer>
<use>
<flag name="llvm">
Add support for llvm JIT engine
</flag>
<flag name="pg_legacytimestamp">
Use double precision floating-point numbers instead of 64-bit
integers for timestamp storage.

@ -0,0 +1,460 @@
# 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
}

@ -0,0 +1,452 @@
# 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 ~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 llvm nls pam perl python +readline
selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
llvm? ( sys-devel/llvm:=
sys-devel/clang:= )
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 llvm) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls 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
}

@ -0,0 +1,450 @@
# 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
}

@ -0,0 +1,482 @@
# 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
}

@ -0,0 +1,488 @@
# 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
}

@ -0,0 +1,493 @@
# 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.

@ -1,9 +1,9 @@
DIST crystal-0.23.0-1-linux-i686.tar.gz 18498501 BLAKE2B 7a8e4e5a2b1425b6effe0a634b74b28c340c4d23c4bfccc0abac4e5d47473e10421d025e68e1fb1fa5b0ba8296108e36cd17d393fb143b8012168d595e5852f9 SHA512 8745114c4824d2859c569ed1bd1057d6d649d57b10d41d22c17627f623704eb98ec2e3ab2bf06622de624906f53e053975a6b9d852aeaafeae4f43585609de28
DIST crystal-0.23.0-1-linux-x86_64.tar.gz 18729061 BLAKE2B bfca07702b2f7c7d6b11aac864475316cabe86bdba90b1819ecd5cb45769b2b7fd9fb4c9f80e46301785209cc5b35fe39bf689163b9376a32b24f8a685a6281b SHA512 6a4e427b4ab3c3be6efcfaee5c1a19eff04eaf00db949d1e1ba8f29c3277affe96a7aba4273d93fd05251453d5b5b937aa792bc448ff2f6d6aa7f2b17d175f75
DIST crystal-0.23.1-patchset.tar.bz2 7268 BLAKE2B 135990ac9f1a225f169dbc5bb6034d2194d9fc917954764564d68afec09af703382743965a801c9ce54a5866af60847b4c4fc0b9daf2cf5ea99052fbeb771b2a SHA512 68896fc5d1772eeb3dd263f1615fc8031a63d0f3eebca1feb35165adf14a610157302541c84cbc9031a3070fd5566ffe88ad03a8c523f55980520e5614b00b89
DIST crystal-0.23.1.tar.gz 1646650 BLAKE2B 3105a683e61835d1e514d5d403b00d3dfae01100a9862d6346c45201c5fb6cba879255469652463719998e976afc495ee9fd4f14f829a709f832cd323cfc2b3b SHA512 06ee0d45cc79cc343d04c346e9cd47b6e4ebc79bf21833662f268f9604f7d2080f7696824e1959de341539f801ae8f898fe1d7b18e4c75378d4eb191878668d5
DIST crystal-0.24.1.tar.gz 1744210 BLAKE2B e3a49a75f42e734753b369f1ad22db011b3af055acb0886b74151281480015c19b079cfc7246070c96e45942e51ed47d183606906bef8f2a0e6786ec7b39dbc8 SHA512 f27b64922eaff45228d9cc16bb229528e523500b8f64a3b4a5ed0584445bebf7812457e17952d0eabac2869ee259949bb12fbc80d60a6aa717307a80932345b8
DIST crystal-0.24.2-1-linux-i686.tar.gz 17667007 BLAKE2B 73104ce088e161f03a7b4a191bb6dcdd86d0c65fe4058bb81f1177c6b7162aa48ca7732fbb410de8d3c9ca58830774913acdad9a89d8420a62e6526ecd309a2a SHA512 af0019fa1d140e653812a5d8a4fbb129ccf5d66ae55aa1a4e94ec3166058eb47abd2dd429a9d72a4baad4a6032abdaafc07bc22ca6380ac85e9d1c7168d7bf5d
DIST crystal-0.24.2-1-linux-x86_64.tar.gz 35022853 BLAKE2B 5b101a27fef0dfbbf61920d826689a45f400c28afe7383320b69f8887512bcab65cbfe8a2cf35b0c598b06083d1ea5e338f4e2b910db03226ba05195483e4c89 SHA512 21d8e7fc34fc24ccb7e8e2c7aade0c3d6fe17e385f0f00534bb91e886788da0b27ff8276b634f7ae13d6342c7e22c6acd609562bcf1af8fddfdee5e256e1bcf0
DIST crystal-0.24.2.tar.gz 1745462 BLAKE2B 8f3d5cf9e274558a5622aae44c6f7d54d0b3042d08810ddc650f181b91a536a3d0cc2d8fa726b677cce1f8a946319a55b803823596cef0d4d3e63832bfcea720 SHA512 db9fb973eeb2bc72ef91bb894b7c5aea73e727ff46e739aa431d68e556238f346a688a7a43de284afb4667b49366afce3ca423a523bea521180fa8f19ba6862d
DIST crystal-0.25.0.tar.gz 1957613 BLAKE2B 4c2467e39a9bc6745b74c00f755490a2f726e775c2a0d15562af27d2a6771c95c44f79e6b59ad45f61a59566529854d75c980c55a6886538fa98663879477258 SHA512 20f2864919c7710e5aee8112e1c6ab54a2e50b244ac63d374edfed41ab659b11c062f76dbfc38e763a08bdbea9e0a39f3b5cac5e00bf453be3a31d3b0a023917
DIST crystal-0.25.1-1-linux-i686.tar.gz 39882213 BLAKE2B 35d0045a72ced6ba7348105c9b88e564f85b075af78decd52c40b47b338cd1c7c1b01565430f9aa21251cfd1266041268e037eb616a24475acfa22b1b8ae1448 SHA512 79601b6c586184e064798c4daca3de77f7c81fbc4d0062a558824533f9272f04899c0041b17dce072757f20f7940c99303c6ff1143448b6452e8216ca4bb43dd
DIST crystal-0.25.1-1-linux-x86_64.tar.gz 38004788 BLAKE2B 580ccad2227e6467c4c61ce9adf4aeb99c55f694c71a02b9d959c31deba66e428f5c5e7d920dd42d01524ccaef04b9eae3b068f2c6ff16414fa3fd36f462414f SHA512 ec33781b767f8f9f0a6d00f73109fbe9d683a23fca9cc8b462acda3eb024fc970d0daf8c36fb2239297f77510d2e3f544f58ec1cf53d08ea856bc6307f81d1dd
DIST crystal-0.26.0.tar.gz 1992091 BLAKE2B dfc96e3e9a71dbec07235a982bbb34ea81bb3adbb39f6c8f8c9bb855ac97e5faf4d47d4a78901317798941b84117399aeee6af53c6c06ae21b9504ca617a2899 SHA512 45a62a2496d477cd72666e98b36bdcbfff958a8f5f0e71f04101f2ba72fc87117d53c8c098a72edb55e9be192b68b73529d5f76e4c660033332ed6e88a372519

@ -1,102 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit bash-completion-r1 multiprocessing toolchain-funcs
BV=0.23.0-1
BV_AMD64=${BV}-linux-x86_64
BV_X86=${BV}-linux-i686
DESCRIPTION="The Crystal Programming Language"
HOMEPAGE="https://crystal-lang.org"
SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2
amd64? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz )
x86? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz )"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
DEPEND="
>=sys-devel/llvm-3.9.0:*
dev-libs/boehm-gc[static-libs,threads]
dev-libs/libatomic_ops
dev-libs/libevent
dev-libs/libpcre
sys-libs/libunwind
dev-libs/pcl
dev-libs/gmp:0
"
RDEPEND="${DEPEND}
xml? ( dev-libs/libxml2 )
yaml? ( dev-libs/libyaml )
"
PATCHES=(
"${FILESDIR}"/${PN}-0.23.0-verbose-LDFLAGS.patch
"${WORKDIR}"/${P}-patchset/${PN}-0.23.1-llvm-5.patch
)
src_prepare() {
default
use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
}
src_compile() {
emake \
$(usex debug "" release=1) \
progress=true \
stats=1 \
threads=$(makeopts_jobs) \
verbose=1 \
\
CC=$(tc-getCC) \
CXX=$(tc-getCXX) \
AR=$(tc-getAR) \
\
PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
CRYSTAL_PATH=src \
CRYSTAL_CONFIG_VERSION=${PV} \
CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
use doc && emake doc
}
src_test() {
emake spec \
$(usex debug "" release=1) \
progress=true \
stats=1 \
threads=$(makeopts_jobs) \
verbose=1 \
\
CC=$(tc-getCC) \
CXX=$(tc-getCXX) \
AR=$(tc-getAR) \
\
CRYSTAL_PATH=src \
CRYSTAL_CONFIG_VERSION=${PV}
}
src_install() {
insinto /usr/$(get_libdir)/crystal
doins -r src/.
dobin .build/crystal
insinto /usr/share/zsh/site-functions
newins etc/completion.zsh _crystal
use examples && dodoc -r samples
if use doc ; then
docinto api
dodoc -r doc/.
fi
newbashcomp etc/completion.bash ${PN}
}

@ -5,22 +5,22 @@ EAPI=6
inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
BV=0.23.0-1
BV_AMD64=${BV}-linux-x86_64
BV_X86=${BV}-linux-i686
BV=0.25.1
BV_AMD64=${BV}-1-linux-x86_64
BV_X86=${BV}-1-linux-i686
DESCRIPTION="The Crystal Programming Language"
HOMEPAGE="https://crystal-lang.org"
SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
amd64? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz )
x86? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz )"
amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/}/crystal-${BV_AMD64}.tar.gz )
x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV}/crystal-${BV_X86}.tar.gz )"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
LLVM_MAX_SLOT=5
LLVM_MAX_SLOT=6
# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
DEPEND="
@ -39,7 +39,10 @@ RDEPEND="${DEPEND}
"
PATCHES=(
"${FILESDIR}"/${PN}-0.24.0-verbose-LDFLAGS.patch
"${FILESDIR}"/${PN}-0.25.0-verbose.patch
"${FILESDIR}"/${PN}-0.24.2-gentoo-tests-sandbox.patch
"${FILESDIR}"/${PN}-0.24.2-gentoo-tests-network-sandbox.patch
"${FILESDIR}"/${PN}-0.26.0-gentoo-tests-network-sandbox-2.patch
)
src_prepare() {

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

Loading…
Cancel
Save