Sync with portage [Fri Jan 13 10:27:25 MSK 2017].

mhiretskiy 722
root 7 years ago
parent cea78ad5eb
commit 8c6f9686c2

@ -1,4 +1,4 @@
DIST httpd-2.2.31.tar.bz2 5610489 SHA256 f32f9d19f535dac63b06cb55dfc023b40dcd28196b785f79f9346779e22f26ac SHA512 5aa47d4b76f692bbd8b309135ff99152df98cf69b505b9daf3f13f7f2a31443eaf4995161adfbc47a133b4d0e091fda2d95fc6b87a956f0ada18d7466ee28e74 WHIRLPOOL a2e3e53c51719cb6f7e641b41788cd89ce7b4d2ea105b403bfa3b3d4479b69c5604228269062f66722594e105e91121d05b1c9f27ca7dc4ecfcf339da8b8375c
DIST httpd-2.4.20.tar.bz2 6331344 SHA256 0e76a375ed3dbac636f50ac39de966ece443751fe4d62392f9a360a19d94d0da SHA512 8591e0ca8f1c4755d670f1a8780bb656c62b30635cff1f7d4434f7c5017b99f1b14bbb296da5cdb63cd3bcfa4908b8b5f99a0c036e9e0f0c9514acd2a3cb7e53 WHIRLPOOL cc61fa5a2344268cdba69ba1662d555d492b40468a81b1d67fce55f85e178f63ef218a303e51e494c91a26dcec259e3912ca640192dbbe42d2b02ee4fac19a1d
DIST httpd-2.2.32.tar.bz2 5777509 SHA256 527bc9d8092d784daf08910dd6c9d2681d6a2325055b2cc69806a0a7df7ed650 SHA512 b1802579f4fc950705ddcf0a24f502ffadbd91d5693fdd3b290ac7ca40122f8fa48132ad1055afae9b841dd55e8bb343239be07ca431b0f60ea081f5c2fad2c3 WHIRLPOOL ee2f1cb74b77f4b3eae7d58bb9bf2728d95a6e215a460d85abf60e220b816cb0e22080169167e3610872e3165951f1cc9ac753f02e46dc75e047a98a1b7384a5
DIST httpd-2.4.23.tar.bz2 6351875 SHA256 0c1694b2aad7765896faf92843452ee2555b9591ae10d4f19b245f2adfe85e58 SHA512 c520de5be748c0a785ef0dc77102749eb4f47e224968b8d4bed2ae644faa0964623a0e960b64486a0888446790d050b52a6ae34fe61717fab95b37384b4825b1 WHIRLPOOL f3defbd06a878c66236adfcac2b59b6f47115ac815708bb45f2152bd1754b14a01458c9331eb7a65cba52e0bc53e2e66b32a384d44a029b07ffdd068c7c08a19
DIST httpd-2.4.25.tar.bz2 6398218 SHA256 f87ec2df1c9fee3e6bfde3c8b855a3ddb7ca1ab20ca877bd0e2b6bf3f05c80b2 SHA512 6ba4ce1dcef71416cf1c0de2468c002767b5637a75744daf5beb0edd045749a751b3826c4132f594c48e4b33ca8e1b25ebfb63ac4c8b759ca066a89d3261fb22 WHIRLPOOL ccb783875632241e8acf7b43c59163c25b13357b307416abaa3adb0ac868fc547b3cff9585b347e98a8663ec26bea3edad4d42604e6ae86b0db5f769fc11d072

@ -0,0 +1,86 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit flag-o-matic eutils
DESCRIPTION="Useful Apache tools - htdigest, htpasswd, ab, htdbm"
HOMEPAGE="https://httpd.apache.org/"
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="ssl"
RESTRICT="test"
RDEPEND="=dev-libs/apr-1*
=dev-libs/apr-util-1*
dev-libs/expat
dev-libs/libpcre
kernel_linux? ( sys-apps/util-linux )
ssl? ( dev-libs/openssl:0= )
!<www-servers/apache-2.2.4"
DEPEND="${RDEPEND}
sys-devel/libtool"
S="${WORKDIR}/httpd-${PV}"
PATCHES=(
"${FILESDIR}/${PN}-2.2.20-Makefile.patch"
)
src_configure() {
# Brain dead check.
tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
append-ldflags $(no-as-needed)
# econf overwrites the stuff from config.layout.
econf \
--sbindir=/usr/sbin \
--with-z=/usr \
--with-apr=/usr \
--with-apr-util=/usr \
--with-pcre=/usr \
$(use_enable ssl) \
$(usex ssl '--with-ssl=/usr' '')
}
src_compile() {
cd support || die
emake
}
src_install () {
cd support || die
make DESTDIR="${D}" install || die
# install manpages
doman "${S}"/docs/man/{dbmmanage,htdigest,htpasswd,htdbm}.1 \
"${S}"/docs/man/{htcacheclean,rotatelogs,ab,logresolve}.8
# Providing compatiblity symlinks for #177697 (which we'll stop to install
# at some point).
pushd "${D}"/usr/sbin/ >/dev/null || die
for i in *; do
dosym /usr/sbin/${i} /usr/sbin/${i}2
done
popd >/dev/null || die
# Provide a symlink for ab-ssl
if use ssl; then
dosym /usr/sbin/ab /usr/sbin/ab-ssl
dosym /usr/sbin/ab /usr/sbin/ab2-ssl
fi
# make htpasswd accessible for non-root users
dosym /usr/sbin/htpasswd /usr/bin/htpasswd
dosym /usr/sbin/htdigest /usr/bin/htdigest
dodoc "${S}"/CHANGES
}

@ -1,107 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit flag-o-matic eutils multilib toolchain-funcs
DESCRIPTION="Useful Apache tools - htdigest, htpasswd, ab, htdbm"
HOMEPAGE="https://httpd.apache.org/"
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris"
IUSE="libressl ssl"
RESTRICT="test"
RDEPEND=">=dev-libs/apr-1.5.0:1
dev-libs/apr-util:1
dev-libs/expat
dev-libs/libpcre
kernel_linux? ( sys-apps/util-linux )
ssl? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
)"
DEPEND="${RDEPEND}
sys-devel/libtool"
S="${WORKDIR}/httpd-${PV}"
PATCHES=(
"${FILESDIR}/${PN}-2.4.7-Makefile.patch" #459446
)
src_prepare() {
default
# This package really should upgrade to using pcre's .pc file.
cat <<-\EOF >"${T}"/pcre-config
#!/bin/bash
flags=()
for flag; do
if [[ ${flag} == "--version" ]]; then
flags+=( --modversion )
else
flags+=( "${flag}" )
fi
done
exec ${PKG_CONFIG} libpcre "${flags[@]}"
EOF
chmod a+x "${T}"/pcre-config
}
src_configure() {
# Brain dead check.
tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
tc-export PKG_CONFIG
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
append-ldflags $(no-as-needed)
# econf overwrites the stuff from config.layout.
ac_cv_path_PKGCONFIG=${PKG_CONFIG} \
econf \
--libexecdir="${EPREFIX}"/usr/$(get_libdir)/apache2/modules \
--sbindir="${EPREFIX}"/usr/sbin \
--with-perl="${EPREFIX}"/usr/bin/perl \
--with-expat="${EPREFIX}"/usr \
--with-z="${EPREFIX}"/usr \
--with-apr="${SYSROOT}${EPREFIX}"/usr \
--with-apr-util="${SYSROOT}${EPREFIX}"/usr \
--with-pcre="${T}"/pcre-config \
$(use_enable ssl) \
$(usex ssl '--with-ssl="${EPREFIX}"/usr' '')
sed -i \
-e '/^LTFLAGS/s:--silent::' \
build/rules.mk build/config_vars.mk || die
}
src_compile() {
emake -C support
}
src_install() {
emake -C support DESTDIR="${D}" install
dodoc CHANGES
doman docs/man/{dbmmanage,htdigest,htpasswd,htdbm,ab,logresolve}.1 \
docs/man/{htcacheclean,rotatelogs}.8
# Providing compatiblity symlinks for #177697 (which we'll stop to install
# at some point).
pushd "${ED}"/usr/sbin >/dev/null || die
local i
for i in *; do
dosym ${i} /usr/sbin/${i}2
done
popd >/dev/null || die
# Provide a symlink for ab-ssl
if use ssl; then
dosym ab /usr/bin/ab-ssl
dosym ab /usr/bin/ab2-ssl
fi
}

@ -1,6 +1,6 @@
=== modified file 'support/Makefile.in'
--- support/Makefile.in 2011-09-01 06:33:22 +0000
+++ support/Makefile.in 2011-09-01 06:43:51 +0000
--- a/support/Makefile.in
+++ b/support/Makefile.in
@@ -1,9 +1,10 @@
DISTCLEAN_TARGETS = apxs apachectl dbmmanage log_server_status \
- logresolve.pl phf_abuse_log.cgi split-logfile envvars-std

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -12,7 +12,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="GPL-3 BSD LGPL-2.1 MIT"
SLOT="0"
KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86"
KEYWORDS="alpha ~arm ppc ppc64 sparc"
IUSE="apcupsd audacious curl debug eve hddtemp imlib iostats lua lua-cairo lua-imlib math moc mpd nano-syntax ncurses nvidia +portmon rss thinkpad truetype vim-syntax weather-metar weather-xoap wifi X xmms2"
DEPEND_COMMON="

@ -0,0 +1,59 @@
#!/bin/sh
buildDir="$(pwd)"
keePassRootDir="${buildDir}/.."
copyKeePassIcons()
{
cd "${buildDir}"
cp -f ../Ext/Icons_04_CB/Finals2/plockb.ico ../KeePass/KeePass.ico
cp -f ../Ext/Icons_04_CB/Finals2/plockb.ico ../KeePass/Resources/Images/KeePass.ico
}
sanitizeKeePassProjectFiles()
{
cd "${keePassRootDir}/KeePass"
local keePassProjectFile="KeePass.csproj"
local keePassProjectSolution="KeePass.sln"
sed -i 's!<SignAssembly>true</SignAssembly>!<SignAssembly>false</SignAssembly>!g' "${keePassProjectFile}"
sed -i 's! ToolsVersion="3.5"!!g' "${keePassProjectFile}"
sed -i '/sgen\.exe/d' "${keePassProjectFile}"
# Update solution .NET format to 11 (This targets Mono 4 rather than 3.5)
cd "${keePassRootDir}"
sed -i 's!Format Version 10.00!Format Version 11.00!g' "${keePassProjectSolution}"
cd "${buildDir}"
}
sanitizeKeePassLibProjectFile()
{
cd "${keePassRootDir}/KeePassLib"
local keePassProjectLibFile="KeePassLib.csproj"
sed -i 's!<SignAssembly>true</SignAssembly>!<SignAssembly>false</SignAssembly>!g' "${keePassProjectLibFile}"
sed -i 's! ToolsVersion="3.5"!!g' "${keePassProjectLibFile}"
cd "${buildDir}"
}
sanitizeTrlUtilProjectFile()
{
cd "${keePassRootDir}/Translation/TrlUtil"
local trlUtilProjectFile="TrlUtil.csproj"
sed -i 's! ToolsVersion="3.5"!!g' "${trlUtilProjectFile}"
cd "${buildDir}"
}
# Start
copyKeePassIcons
# Remove ToolsVersion 3.5 References so that newer Mono compilers can be used
sanitizeKeePassProjectFiles
sanitizeKeePassLibProjectFile
sanitizeTrlUtilProjectFile

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

@ -0,0 +1,121 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit eutils fdo-mime gnome2-utils multilib
MY_PN="KeePass"
DESCRIPTION="A free, open source, light-weight and easy-to-use password manager"
HOMEPAGE="http://keepass.info/"
SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${PV}-Source.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="aot"
COMMON_DEPEND="dev-lang/mono"
DEPEND="${COMMON_DEPEND}
app-arch/unzip"
RDEPEND="${COMMON_DEPEND}
dev-dotnet/libgdiplus[cairo]"
S="${WORKDIR}"
PATCHES=( "${FILESDIR}/${PN}-2.20-xsl-path-detection.patch" )
src_prepare() {
# KeePass looks for some XSL files in the same folder as the executable,
# we prefer to have it in /usr/share/KeePass. Apply patch using base function.
# This XSL file will not be upstreamed since the KeePass creator said that
# including this patch would break the Portable USB version of KeePass
# (which keeps/looks for xsl files in its own folder)
default
# New Mono Prep Script until keepass 2.36+ comes out.
# This script has been upstreamed, still waiting for final confirmation.
local newMonoPrepScript="${FILESDIR}/keepass-2.35-new-monoprep-script.sh"
# Switch into build dir so the mono prepration script works correctly
cd Build || die
cp -f "${newMonoPrepScript}" PrepMonoDev.sh
source PrepMonoDev.sh || die
cd ../ || die
}
src_compile() {
# Build with Release target
xbuild /target:KeePass /property:Configuration=Release || die
# Run Ahead Of Time compiler on the binary
if use aot; then
cp Ext/KeePass.exe.config Build/KeePass/Release/ || die
mono --aot -O=all Build/KeePass/Release/KeePass.exe || die
fi
}
src_install() {
# Wrapper script to launch mono
make_wrapper "${PN}" "mono /usr/$(get_libdir)/${PN}/KeePass.exe"
# Some XSL files
insinto "/usr/share/${PN}/XSL"
doins Ext/XSL/*
insinto "/usr/$(get_libdir)/${PN}/"
exeinto "/usr/$(get_libdir)/${PN}/"
doins Ext/KeePass.exe.config
# Default configuration, simply says to use user-specific configuration
doins Ext/KeePass.config.xml
# The actual executable
doexe Build/KeePass/Release/KeePass.exe
# Copy the AOT compilation result
if use aot; then
doexe Build/KeePass/Release/KeePass.exe.so
fi
# Prepare the icons
newicon -s 256 Ext/Icons_04_CB/Finals/plockb.png "${PN}.png"
newicon -s 256 -t gnome -c mimetypes Ext/Icons_04_CB/Finals/plockb.png "application-x-${PN}2.png"
# Create a desktop entry and associate it with the KeePass mime type
make_desktop_entry "${PN}" "${MY_PN}" "${PN}" "System;Security" "MimeType=application/x-keepass2;"
# MIME descriptor for .kdbx files
insinto /usr/share/mime/packages/
doins "${FILESDIR}/${PN}.xml"
# sed, because patching this really sucks
sed -i 's/mono/mono --verify-all/g' "${D}/usr/bin/keepass"
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
_update_caches
if ! has_version x11-misc/xdotool ; then
elog "Optional dependencies:"
elog " x11-misc/xdotool (enables autotype/autofill)"
fi
elog "Some systems may experience issues with copy and paste operations."
elog "If you encounter this, please install x11-misc/xsel."
}
pkg_postrm() {
_update_caches
}
_update_caches() {
gnome2_icon_cache_update
fdo-mime_mime_database_update
fdo-mime_desktop_database_update
}

@ -11,6 +11,7 @@
</maintainer>
<maintainer type="person">
<email>fearedbliss@gentoo.org</email>
<name>Jonathan Vasquez</name>
<description>Proxy maintainer. CC him on bugs.</description>
</maintainer>
<maintainer type="project">

@ -1 +1,2 @@
DIST dict-da-2-3.oxt 1861736 SHA256 ecc4cb145d0a14403d5ec39b9fd398307fa66b3d6329b979a39de3edaeac5d15 SHA512 28428096ba6d79801fdf47a61bedc06c9ee2d667ae32307bd57f9b7cdc1cb06e84ac2bd78fba11c87dd35dc88d78c5e0f81588e5145267577ca0992b35ea301a WHIRLPOOL 0773ea41aab6a09ade1f5b7b77898589e2d4095075a3272d6297f7d6fb97cf3b1e7032400f95a33ee85d15028eab511ae2d1efa1d643adde52486e73eacc24b0
DIST dict-da-2.1.oxt 1695432 SHA256 4f8862a5447c380baa9102817d6f9d41a799f89b7028366722fe6a05f448a0c5 SHA512 4dab6e4dcb2cf782ddff11126e4eebda9281c45aaf480f6c8afb655f59c23bfb29f17d9698bcfaf04b0c95d20b897c1401e363337726947aedc2411927cf233b WHIRLPOOL 237cbc5369d8386748c728a876de4097853c8d25be5b1d2bc8676e7479562869067d196a80ae5ded21e450e30bb1638d381f8c5c72cba142088bb589e3a523a7

@ -0,0 +1,29 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
MYSPELL_DICT=(
"da_DK.aff"
"da_DK.dic"
)
MYSPELL_HYPH=(
"hyph_da_DK.dic"
)
MYSPELL_THES=(
)
inherit myspell-r2
DESCRIPTION="Danish dictionaries for myspell/hunspell"
HOMEPAGE="https://extensions.libreoffice.org/extensions/stavekontrolden-danish-dictionary"
SRC_URI="http://extensions.libreoffice.org/extension-center/stavekontrolden-danish-dictionary/pscreleasefolder.2011-09-30.0280139318/2.1/dict-da-${PV}.oxt"
SRC_URI="https://extensions.libreoffice.org/extensions/stavekontrolden-danish-dictionary/${PV}/@@download/file/dict-da-${PV/./-}.oxt"
LICENSE="GPL-2 LGPL-2.1 MPL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE=""

@ -1,6 +1,3 @@
DIST dict-de_at-frami_2013-12-06.oxt 5923995 SHA256 3e1d962188a9a5d49388231d5bd6b286f3c64ba7ed39a2ce84e579ebf40019b5 SHA512 a37e061be99ba074ff52b3e0320bbb814d3f504ad353c4e562ea9617d0b60f9b2feb4d1453b55c78a6b659420c7baf0e7601e66489c9c25df9a8bad92d9aebb5 WHIRLPOOL 61c356dd5ea765ebb470861394aaf7939c30b2006e9a0d2fa78938a3d700b6adb07d2a4a158a0d3cc9ffab8189c7792c244ae587611168fb91f79f5f5f7c2bb3
DIST dict-de_at-frami_2015-12-28.oxt 8110628 SHA256 07851d417063e12a28eef21b8b343f49fdf218079f434ec79c1e18282246bbab SHA512 2d4188174fb3f7cb2ca175d54342395980497183c0c6ea233217491226b19a0f19f806935e0eb3798229db89fd3ebf93cb5b210ba326dcb1cc8b862c48aecd02 WHIRLPOOL ce2f9e31a2d008e021d10746c68524a4682ab7943ea4f11dd56a35fd70095eb1fbfe4963c19bb8ad5c6b5fe8770e28dc397dd1e799457188e30cd3163a9d6e9e
DIST dict-de_ch-frami_2013-12-06.oxt 5914138 SHA256 b053ba0f63b276bafbc1910414a735d099b59955d592f01feedbb8faf6af4ad6 SHA512 d93107b639fc9630ccd0f2afa5a9d639ea444f14e08bd4ebe5ba7c082d7cb516c2a59aa8c3ef7c743872687cc47c45b5ffb5f4be70d2449e61bf65e5cf6c84d6 WHIRLPOOL 2573ae9008191182dabbe06b67910aa82bcd76c6ef5d55757bac402f177e8c4ca105104c04dbba0b68447d6e25c0730f9c71fb3247f14c931b3503967b81c6db
DIST dict-de_ch-frami_2015-12-28.oxt 8101312 SHA256 7c5fe404f403f8c7138de6992b71fe448913392cfb1d06826e3584d6e61fcfcb SHA512 b62ad082fbef3785b5cd29bb530a4f5367771af6237d10a9ee922f0deaff0ccdd7c0a9cd93a9218444b07bf278efdb18f497660513af4b8862998ab3bb434f5a WHIRLPOOL 621bef6ca473025800fe96a74df8d2ef39c15d2e1214bd4363ec38b4513bdb6fd8ddf54d6d38245c3371f2cd6357607558d60c9fb6b36c1610e41cfca0f404b7
DIST dict-de_de-frami_2013-12-06.oxt 5924352 SHA256 c82ebfc13b047c5acb28a7b12b42447a7e7c07fbdf24ab5ef77bf099cfbab0a9 SHA512 bf852bd6be13ee02673d9011cabb6ac89b4095e529b3c44651473a06c5c0b1f9ad1261934c157654933b1ce35470e9b900f381219654d6ecc81bb3ebb221ab6f WHIRLPOOL 273da46a23667c59092f33a584f559368f1b82149fc78ec5eef78bef9bde0246252affc3097090fa076a3037da88f2fba9b16bd961041e3efea89a2c021a5d74
DIST dict-de_de-frami_2015-12-28.oxt 8110832 SHA256 4c9520497b38712d093ca8ea57edb4d04569d4f700ea35379c082862628389c6 SHA512 242cfa3f9f8046badbd56560d05cc47a2b0bc89b263f9141443b3401981e91a1124d1c2f76ae77ea017b02a34567cf4c160c31e2250f90d095a74b92dd3d636a WHIRLPOOL 140c9c7e11b69481526d94cc803e63eb8df8a073ac99d515c8bad7ebace43a04fb41b11f8215447a58385157f40fe223e9173304af4210f5eba6eebc07a12fb6

@ -1,55 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=4
MYSPELL_DICT=(
"de_AT.aff"
"de_AT.dic"
"de_DE.aff"
"de_DE.dic"
"de_CH.aff"
"de_CH.dic"
)
MYSPELL_HYPH=(
"hyph_de_AT.dic"
"hyph_de_DE.dic"
"hyph_de_CH.dic"
)
MYSPELL_THES=(
"th_de_AT_v2.dat"
"th_de_AT_v2.idx"
"th_de_DE_v2.dat"
"th_de_DE_v2.idx"
"th_de_CH_v2.dat"
"th_de_CH_v2.idx"
)
inherit myspell-r2
DESCRIPTION="German dictionaries for myspell/hunspell"
HOMEPAGE="
http://extensions.libreoffice.org/extension-center/german-de-at-frami-dictionaries
http://extensions.libreoffice.org/extension-center/german-de-de-frami-dictionaries
http://extensions.libreoffice.org/extension-center/german-de-ch-frami-dictionaries
"
SRC_URI="
http://extensions.libreoffice.org/extension-center/german-de-at-frami-dictionaries/pscreleasefolder.2011-11-05.7614737245/${PV}/dict-de_at-frami_${PV//./-}.oxt
http://extensions.libreoffice.org/extension-center/german-de-de-frami-dictionaries/releases/${PV}/dict-de_de-frami_${PV//./-}.oxt
http://extensions.libreoffice.org/extension-center/german-de-ch-frami-dictionaries/pscreleasefolder.2011-11-05.5296069116/${PV}/dict-de_ch-frami_${PV//./-}.oxt
"
LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
IUSE=""
src_prepare() {
# rename the tarballs
for i in *_frami.*; do
mv "${i}" "${i/_frami}" || die
done
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -32,14 +32,14 @@ inherit myspell-r2
DESCRIPTION="German dictionaries for myspell/hunspell"
HOMEPAGE="
http://extensions.libreoffice.org/extension-center/german-de-at-frami-dictionaries
http://extensions.libreoffice.org/extension-center/german-de-de-frami-dictionaries
http://extensions.libreoffice.org/extension-center/german-de-ch-frami-dictionaries
https://extensions.libreoffice.org/extensions/german-de-at-frami-dictionaries
https://extensions.libreoffice.org/extensions/german-de-de-frami-dictionaries
https://extensions.libreoffice.org/extensions/german-de-ch-frami-dictionaries
"
SRC_URI="
http://extensions.libreoffice.org/extension-center/german-de-at-frami-dictionaries/pscreleasefolder.2011-11-05.7614737245/${PV}/dict-de_at-frami_${PV//./-}.oxt
http://extensions.libreoffice.org/extension-center/german-de-de-frami-dictionaries/releases/${PV}/dict-de_de-frami_${PV//./-}.oxt
http://extensions.libreoffice.org/extension-center/german-de-ch-frami-dictionaries/pscreleasefolder.2011-11-05.5296069116/${PV}/dict-de_ch-frami_${PV//./-}.oxt
https://extensions.libreoffice.org/extensions/german-de-at-frami-dictionaries/${PV}/@@download/file/dict-de_at-frami_${PV//./-}.oxt
https://extensions.libreoffice.org/extensions/german-de-de-frami-dictionaries/${PV}/@@download/file/dict-de_de-frami_${PV//./-}.oxt
https://extensions.libreoffice.org/extensions/german-de-ch-frami-dictionaries/${PV}/@@download/file/dict-de_ch-frami_${PV//./-}.oxt
"
LICENSE="GPL-2 LGPL-2"

@ -1,2 +1,3 @@
DIST el_GR-0.8.zip 1532950 SHA256 fe7ae86b632daf3248bda61333a7691805c140de88eb85f86d48dda103a4448c SHA512 b8209890259dc0c003cf3219363f2270eb879cc8b6f34752b1b49ce07cd7461e0d948faf39b5b54760ad36c29264632f0fa2b4c91fec40d3e44cebf3789c42fb WHIRLPOOL e3b581852b6ebdf5477d5b13bf1733b9825182d047347f47b3d440de397d4d361985285208d1af539a5282910ebd3e6fcef910137870235e94d1539d797aa65d
DIST el_GR-0.9.zip 2120747 SHA256 638984ed883a313ee1633bfe87ba6260b4c7771f22c1a0113d3d49138be8eead SHA512 8eb9d951bab3caf09f53e7ee98ff155ade8d9198533264ebdd53b413e38d9b84e5101938c1abb3e220e0764c98186fb2f5480be50e98e7effb7bcc8c961eaa49 WHIRLPOOL 1ac6ec72df5bb1c77801059e9e05cbded2750b910ff8291f8a24fb78b6e50d8e71524f92ad2f3628ed7be940a60c9f57e3fcc4afd2de278b8e7c3d990b69321e
DIST hyph_el.zip 2224 SHA256 e3cb11a1505d3d74f7e229892c753bcca024534af14bd6f47cbda080dbb6d4e3 SHA512 259a1ad3b4f38cf6aa67027cd3354488b298375450ed99b07e4ea8d355e90211caabfc40ce71af73e5d354348541bf8a486aecced23f75a4fe9abb8f6c2ac3c3 WHIRLPOOL 17c8f3de60ff7ba6fb17ab691466e2fe7591338e9df60bd3cabce67a6ef769cbf6a23b718d69eda6f97e1b5580685f4c052bca35a59eb955a14f2f2b9e4667d7

@ -0,0 +1,28 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
MYSPELL_DICT=(
"el_GR.aff"
"el_GR.dic"
)
MYSPELL_HYPH=(
"hyph_el.dic"
)
MYSPELL_THES=(
)
inherit myspell-r2
DESCRIPTION="Greek dictionaries for myspell/hunspell"
HOMEPAGE="http://elspell.math.upatras.gr"
SRC_URI="${HOMEPAGE}/files/ooffice/el_GR-${PV}.zip ${HOMEPAGE}/files/ooffice/hyph_el.zip"
LICENSE="GPL-2 LGPL-2.1 MPL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE=""

@ -1 +1,2 @@
DIST dict-en-20160901.oxt 6025820 SHA256 04ed9a2cbfeb42d77519232239e2c850b43b618f41e36dbe6e3389d1bc76676a SHA512 f52b1fe8c32c6f7dad389d43f52356ecc989365113593513c61a36ad6fed03c6eab7e08c9a07b281c1a30bdf6dbe2d201bc2ed83c6b1fce1006e16de969a30b0 WHIRLPOOL 7819569189de66e3b988a8168f57246467fe3c64c48030592adffcddd576445db643942e2fd05ce7dde52ce93efaf8b42cf6845a3588545a29c0fa5f643df292
DIST dict-en-20170101.oxt 5960816 SHA256 0522dcd0692b00d7ef555b5f5582750d5cb8279ac4c70e2b2190cec60169b366 SHA512 fae05d3e4bdc9bbd5dda6eb2c0de2f5d0860973e75fe0931bcb0d0e0a5015fb6042beec7f811bee0011f519d13d0f3b52b09fbd906a75340bf311177885ccc1d WHIRLPOOL afc033e0a07121f5b15b1956393c950d75a42e648e885b3e65eafe8de6d191a105196f7c8a41ab2716ec8ec96bb210455d99fa5fc0b5825b7b0539ec3404c9bc

@ -0,0 +1,40 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
MY_PV="${PV:0:4}-${PV:4:2}.${PV:6:2}"
MYSPELL_DICT=(
"en_AU.aff"
"en_AU.dic"
"en_CA.aff"
"en_CA.dic"
"en_GB.aff"
"en_GB.dic"
"en_US.aff"
"en_US.dic"
"en_ZA.aff"
"en_ZA.dic"
)
MYSPELL_HYPH=(
"hyph_en_GB.dic"
)
MYSPELL_THES=(
"th_en_US_v2.dat"
"th_en_US_v2.idx"
)
inherit myspell-r2
DESCRIPTION="English dictionaries for myspell/hunspell"
HOMEPAGE="http://extensions.libreoffice.org/extensions/english-dictionaries"
SRC_URI="https://extensions.libreoffice.org/extensions/english-dictionaries/${MY_PV}/@@download/file/dict-en-${PV}.oxt"
LICENSE="GPL-2 LGPL-2.1 Princeton myspell-en_CA-KevinAtkinson"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE=""

@ -1 +1,2 @@
DIST dict-he-2012-08-15.oxt 882585 SHA256 db5f503e82d5b9e346b35234d27d86d9762d7ea7ee6abe4331e6b77ba607bc93 SHA512 418feb49dba0ec97b63c44909ca8d2192c4c78ed59b9440d3962d6e2095db11f03c3598533c8fecd9cf46f098e96008b8cc298172ab08cc6b24b7df5623438c7 WHIRLPOOL ecff531a92a8e6c553a87ec7150cb8aa054b7efa56942f7d049bc8647722a4d6b5f80131273bbde5cd442be32cf031dca828813fd0408041fd677032db7abea9
DIST myspell-he-2010.11.05.oxt 631099 SHA256 f473f12f7f260ea1fee32954577fde38812af1c77a3c4221faf3d0d1facf074b SHA512 c6c4fe6a8b69b6898c441472ed91ecc8e03a02abe795895eb4dd4f06f2ae9a96ff809323922990d518a2f59218e04aaf931b278d0c76ee0b50e75af9a84aff4f WHIRLPOOL 0c8258b8921b9be43461a76d63c98b1c69e34278828d9a45d414c30f6d71e3018e14668893b832c53eba8fe1e373a8ff85931c2dd6fc5de275fa1f74eff05c4e

@ -0,0 +1,27 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
MYSPELL_DICT=(
"he_IL.aff"
"he_IL.dic"
)
MYSPELL_HYPH=(
)
MYSPELL_THES=(
)
inherit myspell-r2
DESCRIPTION="Hebrew dictionaries for myspell/hunspell"
HOMEPAGE="https://extensions.libreoffice.org/extensions/hebrew-he-spell-check-dictionary"
SRC_URI="https://extensions.libreoffice.org/extensions/hebrew-he-spell-check-dictionary/${PV//./-}/@@download/file/dict-he-${PV//./-}.oxt"
LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE=""

@ -1,2 +1,3 @@
DIST focuswriter-1.5.5-src.tar.bz2 5249014 SHA256 b6a2085587864b2685516d20870d9375803ccdf3472e66bf457382d028c1da0e SHA512 aed6a2e203dcf349ff7fef6caa8e7ab1dbba80da988933c06d6f4ea1ad49ad4c4546b30aaacf9373d1234cb8934daac36f00d0d7b3512d9c3fc4f1e1b273a766 WHIRLPOOL 29795304e6d6687d16d2774cd4d28d0c45382474391d7ad62fa557a134e7c5d11ba6bf81bb81df2b0fb3727b4bb32f705d8fe73a7129f44c8485cc9d8b19b2e1
DIST focuswriter-1.6.2-src.tar.bz2 10205432 SHA256 ac77139b4c9b70d26643e5707a9db9003586a6633779dec20a5c1353602b2655 SHA512 fb665e2bb59b9b449c0b68e3e72cc51c14c6c8b779ac347176bdb521922fba233da6754db4772dbcc80d5c610fb180176ade1ec8dd29c9b004223dce73faa58a WHIRLPOOL 3913609be7c934795b1e1a73c2a836c88bbbaf6282db0ac70bd685b52b902e7dd085172e489aec6420b37e6b7be769138051df0bb722adeac1676a66ec5e2b3f
DIST focuswriter-1.6.3-src.tar.bz2 10211589 SHA256 7de693e8786738c50bde53d4e325334ecf3b8155d7c9b37e64bbd9adedcb9f40 SHA512 015a9153a331bffc1b87bb0d13c6aa1340f46da72084caad8a4a8811f213e5ae17802363570052702c1f1b990ccb3d314f179da0a94898bdc988b7798a3b9b0f WHIRLPOOL a8ed601dc2e53665af3be74cac385ec8afdc7c9029812250964ee660a52b4eafe568c4f5405a7348c64244c7c9ab7da1af3d43f6e923e0c7729e0c0f6fec80bd

@ -0,0 +1,59 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit fdo-mime gnome2-utils qmake-utils
DESCRIPTION="A fullscreen and distraction-free word processor"
HOMEPAGE="http://gottcode.org/focuswriter/"
SRC_URI="http://gottcode.org/${PN}/${P}-src.tar.bz2"
LICENSE="LGPL-3 GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="
app-text/hunspell:=
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtmultimedia:5
dev-qt/qtprintsupport:5
dev-qt/qtsingleapplication[qt5,X]
dev-qt/qtwidgets:5
sys-libs/zlib
"
DEPEND="${RDEPEND}
dev-qt/linguist-tools:5
dev-qt/qtconcurrent:5
virtual/pkgconfig
"
DOCS=( ChangeLog CREDITS NEWS README )
PATCHES=( "${FILESDIR}/${PN}-1.6.0-unbundle-qtsingleapplication.patch" )
src_configure() {
eqmake5 PREFIX="${EPREFIX}/usr"
}
src_install() {
emake INSTALL_ROOT="${D}" install
einstalldocs
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
gnome2_icon_cache_update
fdo-mime_desktop_database_update
}
pkg_postrm() {
gnome2_icon_cache_update
fdo-mime_desktop_database_update
}

@ -1,4 +1,2 @@
DIST joe-3.1jupp23.tgz 446234 SHA256 7f8b2e76ebb39544f5bbca2e4f7463f2afb685bc11f16603163acc3e8af0bae1 SHA512 df90b25013211407ab6476492c483d4707315629730b2bf891ad9d1b5dcd007eec1cc69872d8f2f08c7a1b4940a7284e5bd45d5839fbf9bd5878c96a9538b770 WHIRLPOOL f6fef8af3376017a3637dedfbcec0fef112e16f1a48aeef96ed35afeb8e7b983b393eaf598103e3139ad5b2c9592c61775f81425f2a109bc41d3ea99bdb1a7f3
DIST joe-3.1jupp24.tgz 446572 SHA256 3bd25ad5c9364ce0ff33ec346ec34cbeff990e5d2be35960d68d79910f98cf55 SHA512 5f15e0339a087a947cb52e62ee4b12e1e101dd8459acfeb4a6eba6cb701149902c33df4a8903d6b96dc01264c4c7d2910be4a7ca37d54a15f327f16afeb5fa51 WHIRLPOOL 2d652d517d8b9a7c0999f245876781e50e0cfb42afa54963ff31ae92c0824b35e7117a39b5addf9600daeb9d2fe197a706e0cd5d2d488bdce6a9f070f69d3e31
DIST joe-3.1jupp26.tgz 446563 SHA256 99985d6f0db5cc59ba45b30291ce6c3ef9626637f0cca039b2e03484cf5dda42 SHA512 478f5489534d109fa2ac0c5f6ae783cfdb1a8ac6df9d67bb09e11708e9a578bd1a5306916c33b98447c29b551aec593f6defa8a5a2ea70acb35c8f72da8dbbc3 WHIRLPOOL b2f743375f4f8c8484f1fa5a6d724989b7a8e393c892c773bb4b39d538e4433b43623415919e87fb808a3c3e5e0ef9782251f0c9cddc1c295018349e40968161
DIST joe-3.1jupp27.tgz 455759 SHA256 80374fbd69c4b827ba33761c669dfcddab7222755bfb858600528bb8d6b98e6f SHA512 9f7b86275ed69151e79c2b8bea4e6e0b4fbaa4093646dbd894824d8cbe5a57ead385c5f37b102bd2647f14f5426791c8d8d9fab12b8951fd27a0be79ca72c96c WHIRLPOOL 617c390957aa0ef48a65d174123155c525a62c654c530bdda7cc54f3e05151200e8768d79d537cdf51154ce6d5827d2d73555e20d19f63b74c8af123f0410bfb
DIST joe-3.1jupp30.tgz 468421 SHA256 65ddb346364a056c1d78a1cb406b0ebf6c9c2fbd753cd404b1b4c8fd3fa9916d SHA512 673d48da41f61797d6aeb548e62720d1a60e3e000445558be88fb0d7ca8a1a7ce7c8bdd5b5bd58ac2c16d46dd4541da7922999256669f693a570a11562d6550f WHIRLPOOL 6fe2533ecc314f08d2ee8a78920cc5b68ab8d284d771aee6b47a32ff6d0717f13cf9b5f05ede60fa7b12d6c76d52a7572ce67912608269a0524eab9b9dc6c6c8

@ -1,36 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=4
DESCRIPTION="portable version of JOE's Own Editor"
HOMEPAGE="https://www.mirbsd.org/jupp.htm"
SRC_URI="https://www.mirbsd.org/MirOS/dist/${PN}/joe-${PV/_p/${PN}}.tgz"
LICENSE="GPL-1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="ncurses"
RDEPEND="ncurses? ( sys-libs/ncurses )
!app-editors/joe"
DEPEND="${RDEPEND}"
S=${WORKDIR}/${PN}
src_prepare() {
chmod +x configure
}
src_configure() {
econf \
--enable-search_libs \
--enable-termcap \
$(use_enable ncurses curses)
}
src_install() {
default
dodoc HINTS INFO LIST
}

@ -1,36 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=4
DESCRIPTION="portable version of JOE's Own Editor"
HOMEPAGE="https://www.mirbsd.org/jupp.htm"
SRC_URI="https://www.mirbsd.org/MirOS/dist/${PN}/joe-${PV/_p/${PN}}.tgz"
LICENSE="GPL-1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ncurses"
RDEPEND="ncurses? ( sys-libs/ncurses )
!app-editors/joe"
DEPEND="${RDEPEND}"
S=${WORKDIR}/${PN}
src_prepare() {
chmod +x configure
}
src_configure() {
econf \
--enable-search_libs \
--enable-termcap \
$(use_enable ncurses curses)
}
src_install() {
default
dodoc HINTS INFO LIST
}

@ -1,8 +1,8 @@
# Copyright 1999-2013 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=4
EAPI=6
DESCRIPTION="portable version of JOE's Own Editor"
HOMEPAGE="https://www.mirbsd.org/jupp.htm"
@ -13,13 +13,14 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ncurses"
RDEPEND="ncurses? ( sys-libs/ncurses )
RDEPEND="ncurses? ( sys-libs/ncurses:0= )
!app-editors/joe"
DEPEND="${RDEPEND}"
S=${WORKDIR}/${PN}
src_prepare() {
default
chmod +x configure
}

@ -1,3 +1,4 @@
DIST docker-1.11.0.tar.gz 10637394 SHA256 088869b9a19ae17656e068aa6d3d473866e8133365427c601c671da1b2189057 SHA512 ecb7f531a5632fd6274e3eec59a5194c61d0788ab9f3864845cbc248232c2f14671a26c34abab8c5ca85ce6106ae72ea3ae4e5d133ad1efb126069ae82a2dba0 WHIRLPOOL 20b0ef1642d2fea2ae186a17786d95f138fb7df92daa104f00c481488f82eadd5e8f27a0a8e926d68f495fd62bc132d83817a0831f84b3786474a9408d87878f
DIST docker-1.12.6.tar.gz 13694205 SHA256 0413f3513c2a6842ed9cf837154c8a722e9b34cb36b33430348489baa183707e SHA512 98e0fa0ec0dad4d392188b0d2cf42b2b564403463c369e1fe060f1abc2e97d97375a88587080671ef905e6a34b991d83265f43c3112575af019cf85eef0c2c25 WHIRLPOOL 55d10e4c4ab960320094637a847768ad85dc1fccaa6cc77ea0ca82f2d23b27e92e2f2c0cbc03f53676012c95883f65c6fa16d26970138fa129d37bf278fc8c0b
DIST docker-1.13.0_rc5.tar.gz 7743446 SHA256 6213320b23c9f2bd38e197d0612e695d9677b84c1dd2b71f3c0f998caeb51408 SHA512 f8afaecf42585a46cbeb0457fff46e5c78cdceff437b52bd4009c351310bdc4efdee274031b6354c999308f3b8d376a3c45ebca13272ffc586212553d2f386cb WHIRLPOOL 81ed9d7758ebcd1e0856401dd3a7a37a6038ac69a7690f89082020ba1607bf8d9ca6566e9aa350253cc457789808c49c79f80b8a9cd5b6580df9a123df93086d
DIST docker-1.13.0_rc6.tar.gz 7744500 SHA256 ee8166529a47e7aeb28b12e93161a24b71cc5382256aa7b0aac652853b563a8e SHA512 19ea7d4256f30e90d30eb8cf41ba6c76cba8900bbee85ec183686e365cbf0b7766768f3e7bdec18bcf86c93749ff51b36eba2074811ee9c6fddec455f0de8ebd WHIRLPOOL ba54e42ba5ef14b339b78f74ca88daab0f8ee230dca63175361d6b6133975479b7345d9849c983fdd3ae9d60addc9fb58bb2e0494112201b4d4604b0009ea66b

@ -0,0 +1,287 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
EGO_PN="github.com/docker/docker"
if [[ ${PV} = *9999* ]]; then
# Docker cannot be fetched via "go get", thanks to autogenerated code
EGIT_REPO_URI="https://${EGO_PN}.git"
EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
inherit git-r3
else
MY_PV="${PV/_/-}"
DOCKER_GITCOMMIT="2f2d055"
EGIT_COMMIT="v${MY_PV}"
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
[ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
inherit golang-vcs-snapshot
fi
inherit bash-completion-r1 golang-base linux-info systemd udev user
DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
HOMEPAGE="https://dockerproject.org"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="apparmor aufs btrfs +container-init +device-mapper hardened overlay pkcs11 seccomp"
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
CDEPEND="
>=dev-db/sqlite-3.7.9:3
device-mapper? (
>=sys-fs/lvm2-2.02.89[thin]
)
seccomp? ( >=sys-libs/libseccomp-2.2.1 )
apparmor? ( sys-libs/libapparmor )
"
DEPEND="
${CDEPEND}
dev-go/go-md2man
btrfs? (
>=sys-fs/btrfs-progs-3.16.1
)
"
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies
RDEPEND="
${CDEPEND}
!app-emulation/docker-bin
>=net-firewall/iptables-1.4
sys-process/procps
>=dev-vcs/git-1.7
>=app-arch/xz-utils-4.9
>=app-emulation/containerd-0.2.5
app-emulation/runc[apparmor?,seccomp?]
app-emulation/docker-proxy
container-init? ( >=sys-process/tini-0.13.0[static] )
"
RESTRICT="installsources strip"
S="${WORKDIR}/${P}/src/${EGO_PN}"
# see "contrib/check-config.sh" from upstream's sources
CONFIG_CHECK="
~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
~KEYS
~VETH ~BRIDGE ~BRIDGE_NETFILTER
~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK
~NF_NAT ~NF_NAT_NEEDED
~POSIX_MQUEUE
~USER_NS
~SECCOMP
~CGROUP_PIDS
~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED
~CGROUP_PERF
~CGROUP_HUGETLB
~NET_CLS_CGROUP
~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT
~VXLAN
~XFRM_ALGO ~XFRM_USER
~IPVLAN
~MACVLAN ~DUMMY
"
ERROR_KEYS="CONFIG_KEYS: is mandatory"
ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
pkg_setup() {
if kernel_is lt 3 10; then
ewarn ""
ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies"
fi
# for where these kernel versions come from, see:
# https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog*
if ! {
kernel_is ge 3 16 \
|| { kernel_is 3 15 && kernel_is ge 3 15 5; } \
|| { kernel_is 3 14 && kernel_is ge 3 14 12; } \
|| { kernel_is 3 12 && kernel_is ge 3 12 25; }
}; then
ewarn ""
ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+"
ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)"
ewarn ""
ewarn "See also https://github.com/docker/docker/issues/2960"
fi
if kernel_is le 3 18; then
CONFIG_CHECK+="
~RESOURCE_COUNTERS
"
fi
if kernel_is le 3 13; then
CONFIG_CHECK+="
~NETPRIO_CGROUP
"
else
CONFIG_CHECK+="
~CGROUP_NET_PRIO
"
fi
if kernel_is lt 4 5; then
CONFIG_CHECK+="
~MEMCG_KMEM
"
ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
fi
if kernel_is lt 4 7; then
CONFIG_CHECK+="
~DEVPTS_MULTIPLE_INSTANCES
"
fi
if use aufs; then
CONFIG_CHECK+="
~AUFS_FS
~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
"
ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
fi
if use btrfs; then
CONFIG_CHECK+="
~BTRFS_FS
~BTRFS_FS_POSIX_ACL
"
fi
if use device-mapper; then
CONFIG_CHECK+="
~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
"
fi
if use overlay; then
CONFIG_CHECK+="
~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
"
fi
linux-info_pkg_setup
# create docker group for the code checking for it in /etc/group
enewgroup docker
}
src_compile() {
export GOPATH="${WORKDIR}/${P}:${PWD}/vendor"
# setup CFLAGS and LDFLAGS for separate build target
# see https://github.com/tianon/docker-overlay/pull/10
export CGO_CFLAGS="-I${ROOT}/usr/include"
export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
# if we're building from a tarball, we need the GITCOMMIT value
[ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
if use hardened; then
sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
-i hack/make/dynbinary-client || die
sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
-i hack/make/dynbinary-daemon || die
grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
grep -q -- '-fno-PIC' hack/make/dynbinary-client || die 'hardened sed failed'
fi
# let's set up some optional features :)
export DOCKER_BUILDTAGS=''
for gd in aufs btrfs device-mapper overlay; do
if ! use $gd; then
DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
fi
done
for tag in apparmor pkcs11 seccomp; do
if use $tag; then
DOCKER_BUILDTAGS+=" $tag"
fi
done
# time to build!
./hack/make.sh dynbinary || die 'dynbinary failed'
# build the man pages too
./man/md2man-all.sh || die "unable to generate man pages"
}
src_install() {
VERSION="$(cat VERSION)"
newbin "bundles/$VERSION/dynbinary-client/docker-$VERSION" docker
newbin "bundles/$VERSION/dynbinary-daemon/dockerd-$VERSION" dockerd
dosym containerd /usr/bin/docker-containerd
dosym containerd-shim /usr/bin/docker-containerd-shim
dosym runc /usr/bin/docker-runc
use container-init && dosym tini /usr/bin/docker-init
newinitd contrib/init/openrc/docker.initd docker
newconfd contrib/init/openrc/docker.confd docker
systemd_dounit contrib/init/systemd/docker.{service,socket}
udev_dorules contrib/udev/*.rules
dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
dodoc -r docs/*
doman man/man*/*
dobashcomp contrib/completion/bash/*
insinto /usr/share/zsh/site-functions
doins contrib/completion/zsh/_*
insinto /usr/share/vim/vimfiles
doins -r contrib/syntax/vim/ftdetect
doins -r contrib/syntax/vim/syntax
# note: intentionally not using "doins" so that we preserve +x bits
dodir /usr/share/${PN}/contrib
cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
}
pkg_postinst() {
udev_reload
elog
elog "To use Docker, the Docker daemon must be running as root. To automatically"
elog "start the Docker daemon at boot, add Docker to the default runlevel:"
elog " rc-update add docker default"
elog "Similarly for systemd:"
elog " systemctl enable docker.service"
elog
elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
elog " usermod -aG docker youruser"
elog
}

@ -1,3 +1 @@
DIST free42-1.5.10.tgz 22616956 SHA256 960d94cce3d67047d8968b4ee8b4d324bf1257002d67f971bd1f6e2552a870d1 SHA512 dfdcbdb051aa7cf7a60c27e44ae8dc5458dd418e08cd71e79eff443d09f8021efacc87e06531f312521e5b1f5af0aa72e77b0ce18b8d657499ad174b6a12578e WHIRLPOOL 8324418ab0047e05136937aa6741a4faa518f39eae203eec181958fdc6aa42f577c66716deb81b0dc6d833f79e4e49cfda37fc80e3917f0157583feac1b66985
DIST free42-1.5.12.tgz 22691715 SHA256 77f053fbfc597229f4e7d4e66d80aad0252e18bd8c3e05c757c02af5c4cdf268 SHA512 85e595f14e1ee5cf498dc9aa641edb841db450dbeca67b4a5c7853e7c2d655e3d40ca9332d0fed70c3a3e397553bc4655f87a27aefca4c0eb89d16a6fafae843 WHIRLPOOL 5c0d762660d239c6157a18bbd353734d4af9afb5d665cc75c200e92509457b898693540732be05afeb0514c5c2604207a97c0adbb22121789170de94f538de84
DIST free42-1.5.7.tgz 8159655 SHA256 63c868880e0c18374f4b309dc19e2ea36b9463471d2d77563f53036eea645316 SHA512 fb18712643f73388512fc4dc069d55ef3597f5e6a4e1b47bcd12ab05224027c4ec981ade2398fd8c1e4534003ee6c4de2b7402bade66a3dbe90a46299e7132a3 WHIRLPOOL 0504da8589d3dbf9270a914b2cb6ad86982b926f40abee43d6bbe3f8ec997efe8b0ae50b9d61952e5acd3f2a70d34e16cf0e665cec06d555b0c92438c7a32a43

@ -1,12 +0,0 @@
diff -Nuar a/gtk/build-intel-lib.sh b/gtk/build-intel-lib.sh
--- a/gtk/build-intel-lib.sh 2016-09-04 18:56:12.000000000 +0200
+++ b/gtk/build-intel-lib.sh 2016-09-24 19:39:49.284126118 +0200
@@ -4,7 +4,7 @@
cd IntelRDFPMathLib20U1
patch -p0 <../intel-lib-linux.patch
cd LIBRARY
-make CC=gcc CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0
+make A=a CC=gcc CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0
mv libbid.a ../../gcc111libbid.a
cd ../..
( echo '#ifdef FREE42_FPTEST'; echo 'const char *readtest_lines[] = {'; tr -d '\r' < IntelRDFPMathLib20U1/TESTS/readtest.in | sed 's/^\(.*\)$/"\1",/'; echo '0 };'; echo '#endif' ) > readtest_lines.cc

@ -1,38 +0,0 @@
diff -Nuar a/gtk/Makefile b/gtk/Makefile
--- a/gtk/Makefile 2016-09-04 18:56:12.000000000 +0200
+++ b/gtk/Makefile 2016-09-24 16:13:34.824116365 +0200
@@ -15,11 +15,10 @@
# along with this program; if not, see http://www.gnu.org/licenses/.
###############################################################################
-CFLAGS = -MMD \
+CFLAGS := -MMD \
-Wall \
-Wno-parentheses \
-Wno-write-strings \
- -g \
-I/usr/X11R6/include \
$(shell pkg-config --cflags gtk+-2.0) \
-DVERSION="\"$(shell cat ../VERSION)\"" \
@@ -27,14 +26,16 @@
-DDECIMAL_GLOBAL_ROUNDING=1 \
-DDECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS=1 \
-DDECIMAL_GLOBAL_EXCEPTION_FLAGS=1 \
- -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1
+ -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1 \
+ ${CFLAGS}
-CXXFLAGS = $(CFLAGS) \
+CXXFLAGS := $(CFLAGS) \
-fno-exceptions \
-fno-rtti \
- -D_WCHAR_T_DEFINED
+ -D_WCHAR_T_DEFINED \
+ ${CXXFLAGS}
-LDFLAGS = -L/usr/X11R6/lib
+LDFLAGS := -L/usr/X11R6/lib ${LDFLAGS}
-LIBS = gcc111libbid.a -lXmu $(shell pkg-config --libs gtk+-2.0)
+LIBS = gcc111libbid.a -lX11 -ldl -lXmu $(shell pkg-config --libs gtk+-2.0)
ifeq "$(shell uname -s)" "Linux"

@ -1,34 +0,0 @@
diff -Nuar a/gtk/Makefile b/gtk/Makefile
--- a/gtk/Makefile 2016-02-28 20:14:13.000000000 +0100
+++ b/gtk/Makefile 2016-03-17 12:39:42.679999704 +0100
@@ -19,7 +19,6 @@
-Wall \
-Wno-parentheses \
-Wno-write-strings \
- -g \
-I/usr/X11R6/include \
-fno-exceptions \
-fno-rtti \
@@ -30,18 +29,14 @@
-DDECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS=1 \
-DDECIMAL_GLOBAL_EXCEPTION_FLAGS=1 \
-DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1 \
- -D_WCHAR_T_DEFINED
+ -D_WCHAR_T_DEFINED \
+ ${CXXFLAGS}
-LDFLAGS = -L/usr/X11R6/lib
+LDFLAGS := -L/usr/X11R6/lib ${LDFLAGS}
ifeq "$(shell uname -s)" "Darwin"
LIBS := gcc111libbid-mac-x64.a -lXmu $(shell pkg-config --libs gtk+-2.0)
else
-LIBS := gcc111libbid-$(shell uname -m).a -lXmu $(shell pkg-config --libs gtk+-2.0)
-endif
-
-ifeq "$(shell uname -s)" "Linux"
-LDFLAGS += -Wl,--hash-style=both
-LIBS += -lpthread
+LIBS := gcc111libbid-$(shell uname -m).a -lXmu -lX11 -ldl -lpthread $(shell pkg-config --libs gtk+-2.0)
endif
SRCS = shell_main.cc shell_skin.cc skins.cc keymap.cc shell_loadimage.cc \

@ -1,47 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils toolchain-funcs
DESCRIPTION="An HP-42S Calculator Simulator"
HOMEPAGE="http://thomasokken.com/free42/"
SRC_URI="mirror://gentoo/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE="alsa"
DEPEND="dev-libs/atk
x11-libs/cairo
x11-libs/gdk-pixbuf
x11-libs/gtk+:2
x11-libs/pango
alsa? ( media-libs/alsa-lib )"
RDEPEND="${DEPEND}
x11-libs/libX11
x11-libs/libXmu"
S="${WORKDIR}/${PN}"
src_prepare() {
sed -i -e 's/print_gif_name\[FILENAMELEN\]/print_gif_name\[1000\]/' \
"${S}/gtk/shell_main.cc" || die
epatch "${FILESDIR}"/${P}-fix-makefile.patch
epatch "${FILESDIR}"/${P}-fix-build-intel-lib.patch
}
src_compile() {
local myconf
use alsa && myconf="AUDIO_ALSA=yes"
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" BCD_MATH=1 ${myconf} -C "${S}/gtk"
}
src_install() {
dodoc CREDITS HISTORY README TODO
dobin gtk/free42dec
}

@ -1,46 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils toolchain-funcs
DESCRIPTION="An HP-42S Calculator Simulator"
HOMEPAGE="http://thomasokken.com/free42/"
SRC_URI="mirror://gentoo/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="alsa"
DEPEND="dev-libs/atk
x11-libs/cairo
x11-libs/gdk-pixbuf
x11-libs/gtk+:2
x11-libs/pango
alsa? ( media-libs/alsa-lib )"
RDEPEND="${DEPEND}
x11-libs/libX11
x11-libs/libXmu"
S="${WORKDIR}/${PN}-nologo-${PV}"
src_prepare() {
sed -i -e 's/print_gif_name\[FILENAMELEN\]/print_gif_name\[1000\]/' \
"${S}/gtk/shell_main.cc" || die
epatch "${FILESDIR}"/${P}-fix-makefile.patch
}
src_compile() {
local myconf
use alsa && myconf="AUDIO_ALSA=yes"
emake CXX="$(tc-getCXX)" BCD_MATH=1 ${myconf} -C "${S}/gtk"
}
src_install() {
dodoc CREDITS HISTORY README TODO
dobin gtk/free42dec
}

@ -12,7 +12,7 @@ else
EGIT_COMMIT="v${MY_PV}"
RUNC_COMMIT="c91b5be" # Change this when you update the ebuild
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~ppc64"
KEYWORDS="amd64 ~ppc64"
inherit golang-vcs-snapshot
fi

@ -1,10 +1,9 @@
DIST ca-certificates_20151214.tar.xz 293672 SHA256 59286e6403f482a24c672e09b810c7d089a73153d4772ff4a66e86053a920525 SHA512 acee5565aa7d1f0cc120a6abb6503e0ac4b4e12f5fd1cb12442ec1374ae1570ec6dc3a8f3a247fad6835a29d96e856f12c664f466e92344db3aa1ae6292a27ac WHIRLPOOL c03d214fb15a791c14f235c58296fb06f1408c98bb78049f58b3ebf7bc1c1cea4662f90a031d86de2548267feacf6a9e3fef957aa44a19e29e9a6ba803aaa3fa
DIST ca-certificates_20160104.tar.xz 293632 SHA256 09eb770122e23260316120c0cbbddc8a1d33e7147210ce44e146084d5d5abcdd SHA512 4291ba58057b66d56853162b71862832135eab6f444a5e2cf3dd1089495d44624246dc0c540871851fe9aaceb42054516309402525c8f16a88911d3af9c3518a WHIRLPOOL 8a45acdf2c0673156bc546808df5160ebbfc3a85d775cefa8918c5b64ea6ba905e89017689a407a20444f3e550133c2af228f4d4a878670af50d88fc4739edeb
DIST ca-certificates_20161102.tar.xz 298544 SHA256 25384a67e2f1e76495ceeb00abfdbe831033780324128cb1587d09132dd173a5 SHA512 8630cbc15d311b71936901bfa4c1a61d78d4468a7d8d0c492d72afc579679402b99e563cc6f88b0377eb7ebee8dcbad1b090fb0831d610a5b8e5bbdb3d8ce284 WHIRLPOOL 8b92ba4228880bcc7b296e9b1333f695194c31e724a02bafaec97bac838f6c36b20fa052935d256930977e2944ed7450c1e1ab2c95b40c8391dffd766938cea7
DIST ca-certificates_20161130.tar.xz 298656 SHA256 04bca9e142a90a834aca0311f7ced237368d71fee7bd5c9f68ef7f4611aee471 SHA512 8395f27d2369d694b069e1bb250b06df05f732bd9f4a4dc8652091e9c96ad1a84003e28f59cb9e13fdfd22ca5818f495d80149692e74b2d63e34db4f6a95ee9f WHIRLPOOL 6903848f030a0da80e18e5d6a075c9a4ef390d67d748ff27cbadef4b1bf5866b9d7d96960f780f6bbff3f7b9720c31ee4d7a089238041bcb4d5de52fe0e46224
DIST nss-3.14.1-add_spi+cacerts_ca_certs.patch 25018 SHA256 82ca25982828fd7153ad15fc6e81408c115476eeeb4045d3a71469380b56824b SHA512 2aafbd972b073061bfd66a66a4b50060691957f2910f716f7a69d22d655c499f186f05db2101bea5248a00949f339327ba8bfffec024c61c8ee908766201ae00 WHIRLPOOL c9fe397e316dac7983b187acf7227078ebd8f8da5df53f77f2564489e85f123c4d2afb88d56e8dc14b9ebfffe8a71ade4724b3c1ea683c5c4c487cb3a64eda43
DIST nss-3.21.tar.gz 6978112 SHA256 3f7a5b027d7cdd5c0e4ff7544da33fdc6f56c2f8c27fff02938fd4a6fbe87239 SHA512 0645465b5d1ab05d819355a3f4a2879499539a00d95bfab3ca14a7dcd901e510b5d9ae797386ff5a42f68b0b57f7bbec4ec9d3a85ebd508eb824aba1fb589d53 WHIRLPOOL 7504d83de606d61840e06cb855ea688eb022d5eef062bcb7ac4d1064db96b96e35ae4ce0aff9d389a2140a7c3b974aaa9a86ada52af1199d462fdb48b11b42e4
DIST nss-3.27.1.tar.gz 7397737 SHA256 fd3637a1930cd838239a89633a7ed9a18859ae9b599043f3a18f726dc4ec2a6b SHA512 b52bc18e42cab78a325a8c4fcf2894ca879cecbb657a852baf460551ed9727f145bc328ebb61a43a1605b457f923a1495707ac4aee27be70220463818ed8db8d WHIRLPOOL 17174b7d43bd82b9e805d653a7ea8b79bc2647a5891806c1cb77e2ac99e40eb64ffee03e105a41c375ba37e26cafeff4bd4bad27c48e94ed388d0215d0545364
DIST nss-3.27.2.tar.gz 7397599 SHA256 dc8ac8524469d0230274fd13a53fdcd74efe4aa67205dde1a4a92be87dc28524 SHA512 699847665e93fd649cb60ce6bc8f849f452779e7232a09bbeb0613f9e6c57bb81948f1ae59cc86648e41a212cda259109850ccd14546d35910deb75f5d2a13b8 WHIRLPOOL 08229d87de1c7020c1d7fc12fb8a2afc4bc9ab9f0208aad12698aba17386fbe9163cb506101c7d4d568409fd99141fb88c0e71fc32cecbc6640a4a8f7a4efabf
DIST nss-3.28.1.tar.gz 7451477 SHA256 58cc0c05c0ed9523e6d820bea74f513538f48c87aac931876e3d3775de1a82ad SHA512 f10c8e404741fafe5e5772dc754ff4503ec1826942db5fbc13b99155fcac50f29e1405dd249b69a27f27ebcfef73849b1f0f636a2076ab761384e8a0ed9a2b8b WHIRLPOOL e1a6b9886759159294c4d8e47e693a2e790703e368ede18425c9a9130df72ac56a6e717cb794607c7bcfc68c82df9aec8771bc74e729f5bbd70fdcd8ce0fed3b
DIST nss-3.28.tar.gz 7440502 SHA256 c79dd15f66f581c294ce0ef032119357d03fee3a0aa61be263747d84f1b33254 SHA512 dd442c6d04edd0507cc49a1e3c2bfaa64555f7cde5cb9e512ccf33f14de458dddbb17efddd83271056ed6e6e32327e6e1b6f6609e1910a05e625b08e6f0965df WHIRLPOOL d013972f18d75e83da03c3903b712ef1094e6b8543c1755ea2b7ed7f6335e39ac20112808c86bb9df74cda4a8c5c1159401ecd05d1d8b07b3ecdca85f7f0ac82
DIST nss-cacert-class1-class3.patch 22950 SHA256 6bba29cee34276e2ca6436dabedfeba2b61fb46668c5d5ceabf0c871574649bf SHA512 a5aa740bf110a3f0262e3f1ef2fc739ac2b44f042e220039d48aee8e97cd764d5c10718220364f4098aba955882bd02cadb5481512388971a8290312f88a7df0 WHIRLPOOL 1246223b01292604e5609bb9c580f092dc5937bf8c98f6891b099e8bab960e03612b6617e30a55d6ff8817d88f190e03812fe8f89f84f25c20970493dc2f7700

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -52,7 +52,9 @@ if ${PRECOMPILED} ; then
else
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz
https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz
cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )"
cacert? (
https://dev.gentoo.org/~axs/distfiles/nss-cacert-class1-class3.patch
)"
fi
LICENSE="MPL-1.1"
@ -103,7 +105,7 @@ src_prepare() {
if use cacert ; then
pushd "${S}"/nss-${NSS_VER} >/dev/null
epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch
epatch "${DISTDIR}"/nss-cacert-class1-class3.patch
popd >/dev/null
fi
fi

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -24,7 +24,10 @@ DEPEND="
>=dev-python/wxpython-2.8.9.2:2.8[${PYTHON_USEDEP}]
dev-python/wxpython:3.0[${PYTHON_USEDEP}]
)
>=dev-python/twisted-core-10.0
|| (
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
>=dev-python/twisted-core-10.0
)
"
RDEPEND="${DEPEND}
x11-libs/libXScrnSaver

@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -10,7 +10,7 @@ SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
IUSE=""
S=${WORKDIR}

@ -0,0 +1,15 @@
# since fish supports export via upstream provided function
# we can source directly, only ommiting $PATH and comments.
grep -Ev "^(#|export (PATH|ROOTPATH)=)" /etc/profile.env | source
# strip unneded stuff from bash export lines
# apply paths and cleanup
if [ "$EUID" = "0" ] ; or [ "$USER" = "root" ]
set _rootpath (grep -o " ROOTPATH='.*'" /etc/profile.env | sed "s@.*'\(.*\)'@\1@;s@:@\n@g")
set -xg PATH /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin $_rootpath
set -e _rootpath
else
set _userpath (grep -o " PATH='.*'" /etc/profile.env | sed "s@.*'\(.*\)'@\1@;s@:@\n@g")
set -xg PATH /usr/local/bin /usr/bin /bin $_userpath
set -e _userpath
end

@ -0,0 +1,76 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
DESCRIPTION="fish is the Friendly Interactive SHell"
HOMEPAGE="http://fishshell.com/"
SRC_URI="http://fishshell.com/files/${PV}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
IUSE="X"
RDEPEND="
>=dev-libs/libpcre2-10.21[pcre32]
sys-libs/ncurses:0=
"
DEPEND="
${RDEPEND}
sys-devel/bc
sys-devel/gettext
"
src_configure() {
# Set things up for fish to be a default shell.
# It has to be in /bin in case /usr is unavailable.
# Also, all of its utilities have to be in /bin.
econf \
docdir="${EPREFIX}"/usr/share/doc/${PF} \
--bindir="${EPREFIX}"/bin \
--without-included-pcre2
}
src_install() {
default
insinto /usr/share/fish/vendor_conf.d
newins "${FILESDIR}/profile-env.fish" 00-profile-env.fish
}
src_test() {
if has_version ~${CATEGORY}/${P} ; then
emake test
else
ewarn "The test suite only works when the package is already installed"
fi
}
pkg_postinst() {
elog "fish is now installed on your system."
elog "To run fish, type 'fish' in your terminal."
elog
elog "To use fish as your login shell:"
elog "* add the line '${EPREFIX}/bin/${PN}'"
elog "* to the file '${EPREFIX}/etc/shells'."
elog "* use the command 'chsh -s ${EPREFIX}/bin/${PN}'."
elog
elog "To set your colors, run 'fish_config'"
elog "To scan your man pages for completions, run 'fish_update_completions'"
elog "To autocomplete command suggestions press Ctrl + F or right arrow key."
elog
elog "Please add a \"BROWSER\" variable to ${PN}'s environment pointing to the"
elog "browser of your choice to get acces to ${PN}'s help system:"
elog " BROWSER=\"/usr/bin/firefox\""
elog
elog "In order to get lzma and xz support for man-page completion please"
elog "emerge one of the following packages:"
elog " dev-python/backports-lzma"
elog " >=dev-lang/python-3.3"
elog
elog "Have fun!"
}

@ -1,10 +1,10 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit autotools sgml-catalog eutils flag-o-matic multilib
inherit autotools sgml-catalog eutils flag-o-matic multilib toolchain-funcs
DESCRIPTION="Jade is an implementation of DSSSL for formatting SGML and XML documents"
HOMEPAGE="http://openjade.sourceforge.net"
@ -53,7 +53,7 @@ src_configure() {
# avoids dead-store elimination optimization
# leading to segfaults on GCC 6
# bug #592590 #596506
append-cxxflags $(test-flags-CXX -fno-lifetime-dse)
tc-is-clang || append-cxxflags $(test-flags-CXX -fno-lifetime-dse)
# We need Prefix env, bug #287358
export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"

@ -0,0 +1 @@
DIST Random123-1.09.tar.gz 696854 SHA256 cf6abf623061bcf3d17e5e49bf3f3f0ae400ee89ae2e97c8cb8dcb918b1ebabe SHA512 7bd72dffa53ca8d835b4a4cf49171618cd46f4b329d7a09486efaf2e1565c98b80ff05e3bccc244fabd7013f139058511fb2e39399bfe51fd6b68cd9e63da1ac WHIRLPOOL 6c2a220f43ab96b1060109ad552cc2e1dcb4400be8e429d78c0e152d519cd1c32ed4d7e31e7ad971e4a8031385cc9c7c7d8c38424c60931dce7fff969606f32b

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>junghans@gentoo.org</email>
<name>Christoph Junghans</name>
</maintainer>
<maintainer type="project">
<email>sci@gentoo.org</email>
<name>Gentoo Science Project</name>
</maintainer>
</pkgmetadata>

@ -0,0 +1,25 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
DESCRIPTION="library of counter-based random number generators (CBRNGs)"
HOMEPAGE="https://www.deshawresearch.com/resources_random123.html"
MY_P="${P^r}"
SRC_URI="https://www.deshawresearch.com/downloads/download_${PN}.cgi/${MY_P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
src_install() {
insinto /usr/include/Random123
doins -r include/Random123/. examples/uniform.hpp
}

@ -1,17 +1,6 @@
DIST postgresql-9.1.21.tar.bz2 15850128 SHA256 d66ee9076f3149a4cab4be3c6f47e13bc047138d17dfcb531ad01f78cfdeb393 SHA512 75a96ce2c080b2e657b6f591e18c4778635a9f8c74870bbe7c99cb82bf1dfaad124942214ab6e3079b565c41b7fc77af1a4a49672e7ddba075374402c8832a5b WHIRLPOOL 4de012763b985d1fa675e151d68988f4dd4de4ae8860d67fab3818666b3e135849465a0a41bc1f073eb4d679415fb18871f8156c99376c7860c51258e607771e
DIST postgresql-9.1.23.tar.bz2 15856178 SHA256 7f7471e8b3b369726f1c1df0e6a163dde63b6546c4bba985c1f36a574c75f6d5 SHA512 192f48ed8db510663c85c217afee8eff732d467fe10f600c9be834371ccb6a788acd380c582d80f0096a0b7d7ee0daa378d1fb8177281bf4e6e2fcc39fffdc67 WHIRLPOOL 55a60cdc6a0c1e570d2a1f7fce9c160637101cf77c7dda3d1a2ccd31350d16678f07949c8bd7519f54bc6008e18074d0d57f1201c870b044e765c8057a358441
DIST postgresql-9.1.24.tar.bz2 15863767 SHA256 de0d84e9f32af145fcd66d8d324f6ef1a0b17944ea344b7bbe9d99fff68ae5d3 SHA512 a9ad0d62846598afee317eeda83406b5f85a658bfe7eb78aff6c59c904223dd165adbd5870598b74aa0e012878489f0c285e6ac7b07ebddf3cf8d81ba70bea7e WHIRLPOOL f58d79df5562c3fc22dae96ba064e19a4c83f42358911575f854cb2e062457f9331547cb19f9970003a2e15b7e8c609b9aab2a1e17099a446c89786581ccb13b
DIST postgresql-9.2.16.tar.bz2 16490199 SHA256 d2164cb8706bf828161871c195299841c5be1fbd9bc85d7866704e54f0741b11 SHA512 0f0b317473b4b42ae4261993c704a7c6cd28c7e6bd83e77a81850695655baa473d7d52e97441ee5500d646d405c84145a54f42b9bae89a0ddfebb0418d608820 WHIRLPOOL 8dfdca52555889d20e857ecc01ee75a14fd18bb7fa1ac50f5d54415a423d62223d0d389d43b143ae927446946aaff06b68cbf8214e26e2f432c39a50c0296b08
DIST postgresql-9.2.18.tar.bz2 16448429 SHA256 d7aa37d586ae4d46d07a4fac417ff966e45a9dd99bac8b3cd149be8df9ea35f4 SHA512 c311f621ac38e2dfaf5fd57a4500430333dcbb2d7f1719bc7d99fef54e06a22f93aea595391c3607d44c89c372d0e89daf18f8f295b33e3b21e5285fbbb87d5b WHIRLPOOL 08664a3378eca1a509066a6a841c1489d7cf8cbda60cd836ad67b0cb2bf112b58191d0a1170f97aec09ef5a0984916263c754bc108de2cec6945417e97ce0e66
DIST postgresql-9.2.19.tar.bz2 16466698 SHA256 1d29d73a4f590fcc348280f13ac2ff6a0f72c94908c54e3c20b7ab1560e8dbad SHA512 d3b4c5578bf6d6580028e775bff81a921258cb53b6b06567d96a352d14f3b63063adb480b2f5e2029baf8a034e14b5cd75eebc04f1ed7b16c849e1a5ec1f4867 WHIRLPOOL c13b45fd7aee08ea472557c9f40d79c45abd572fefcc215002b562b8046b1937bf522f6f7f6e280ff1e434c9698734cda9f1c3dacd3c8fee5f33dad0da21f75f
DIST postgresql-9.3.12.tar.bz2 17052755 SHA256 f3339ea23f86d07f3730adc878b2e5d433087ff44aad65a5ec9c22c32b112e67 SHA512 d88cb167ca78bd8588e3ff9b3f13b77f661e3ddec7e5b726cc0a46512db2584b15ce5f691fe7e4ab84855f102cb88014245921a38f5da41ad19e762a88968883 WHIRLPOOL 8738e18f8534f70ddbfa7c0c0ae1ab585330cb9df2d2da3a3e5f5c15a2e5070aebd38124b7295214e0105c482a79011d00c8cbe2a9061edc90bfd5ed07000dcb
DIST postgresql-9.3.14.tar.bz2 17042199 SHA256 5c4322f1c42ba1ff4b28383069c56663b46160bb08e85d41fa2ab9a5009d039d SHA512 97bd92ffdd661f7428c47a8bc87fde88a2b150e7d08bd577a7159ac65aec319d358495b883b95dff2069d24a8d15d1e7c10c3fae81fc76186bfef0127f257ac4 WHIRLPOOL d603e2016cba37fd0ea68b00c1493d23588aeeb334cceeb7fce521ed66618ffa70b4eb281e8a37650e30151cd4f1353879c63fe4076caa144d085ac96e8b5a79
DIST postgresql-9.3.15.tar.bz2 17059932 SHA256 a9fcba1446a93aa95e3e1b6535756f0472d10b0f267a0845f8b2b29f89de5c4f SHA512 35c30cdb5599f99c94ab921f9f5e7671a8c0b7bca8fe3b616630ae13d6eda8d329e77e7e802da6a83cb09c3c9ca10fa8ce0de8a184e6fff471130e1cd68ce762 WHIRLPOOL 7a627b2da1dc3671df7edfe58420f81ce24202c1251225054674d79e431bc36e1a70c84aaacb76c59e9eefb26429cbbb9ea80c45a989e3564b69e334d3dd4d84
DIST postgresql-9.4.10.tar.bz2 17802812 SHA256 7061678bed1981c681ce54c76b98b6ec17743f090a9775104a45e7e1a8826ecf SHA512 2fcf47769b22c69bc82c9d6edc317e18dfcb4a96534e012bae4355e5088afa83da98b21e08a07766794f0a166888acbd16705a806464ea11711ed97c3b4012fb WHIRLPOOL e6ed3c209043cbbacb0698e1be367f20028d649d4cff62b5d6edd162c6ad629a3ec5f55854bd12334a3d3165462fecb34188bd62cd398cfc242a3579810b5b85
DIST postgresql-9.4.7.tar.bz2 17746987 SHA256 cc795e6c35b30e697e5891e3056376af685f848a4e67fab1702e74a2385f81e0 SHA512 e61d74a4a9caeb7d4a3fb9509b37aaeb5bd563d61d20739edd777ec990c92011286a7485f275178f9f8c1ebb8c84a98290e2b5351b11e0f9a1baa781f323e374 WHIRLPOOL 2ae25affc35e12fd250161585bc5cf318930d9864c9fccbf44c9bd697933aa75860467256b811501947c0fad8c6cdc0622889e9991904a4db9fda2d19efa2b37
DIST postgresql-9.4.9.tar.bz2 17763281 SHA256 c120a62e90214c20d9160da3ca3fbaec97d5f1656f1dd033f60e7297b7a1e1c9 SHA512 980b1a8828d07151e67793367ea0ee08e4231cd76d9b20b4f4bca08a7976ee82a3aea51ce801a4107680c8203f8ebdb4cf5a0a6aaf93d580c9f337658d50819b WHIRLPOOL f5c9922bd12008a87a6ed0b8efaf8280d1a3ce8ef47fc853efd4d4d1a754e878f9cb27a4049cfb6d7c50968083e1286670a9b79588e29e127bd3f96b927f4999
DIST postgresql-9.5.2.tar.bz2 18446616 SHA256 f8d132e464506b551ef498719f18cfe9d777709c7a1589dc360afc0b20e47c41 SHA512 ba31dddee8a960a4b1a97394eae5ea7efaa5e74e21c755882efcef90404676c6052dff55f40b585932e4f752cbcda5ceac0e29d601ea6651cfbab7a49190381a WHIRLPOOL 0b9abe3a5b3933485e5d0b2c08daa20d421e5920ae5b4640b36971463915d7e7b2767575564d80bb5dfa3a353c646c9c4ca8e483dfd64df39370774e76fa1cee
DIST postgresql-9.5.4.tar.bz2 18496299 SHA256 cf5e571164ad66028ecd7dd8819e3765470d45bcd440d258b686be7e69c76ed0 SHA512 e5220bc967443d54b9dcff7ba5aefccedbe1c219f953eb0d67254c709d52b0e647d1dc473446640804165b596fc5b75fa4ff8d63696123b87d8096c3a7795c34 WHIRLPOOL d429d853062b2d2f8e999db1733b3206020f2d521401e0510376213ecaa2049b6d87987b9ee999ab81faacf6ce65ddfdcf43b0922fc23e91961594956c556e0d
DIST postgresql-9.5.5.tar.bz2 18525082 SHA256 02c65290be74de6604c3fed87c9fd3e6b32e949f0ab8105a75bd7ed5aa71f394 SHA512 727ab57796cd393ec3755e9aabf515ebbdc3152b4062c20e64511e866a7e7038ba5c5e2843f13f3a79e2263296451f0e93108346b6f638611fba2449394e338e WHIRLPOOL ec5262fd8cecea20fd12bcec8e6e015817ae8181d9e9ff6d8aca6ed43cadedac1bd5006c3d04262b99b9a79aa02c409920ab3392136f3ff3dc480fe1155cade8
DIST postgresql-9.6.0.tar.bz2 19157472 SHA256 3b5fe9634b80a4511aac1832a087586a7caa8c3413619562bdda009a015863ce SHA512 46ec903eed13bf5fb5510d56e4814405ba4510c9e5f43c533189b6ed07c7955dba326107ae0dbeebb5abdd00b7007971ca5d7213274bd653d8d4295f93e6cbf8 WHIRLPOOL aa5d30d41aca14eee3a00d5f3805b28187278a538c0f00b9cb70fad9e2c401dedc797512b9851a04c67f21e7b8cfbcf6d2f85c1486795803840b7111cccb2b19
DIST postgresql-9.6.1.tar.bz2 19260568 SHA256 e5101e0a49141fc12a7018c6dad594694d3a3325f5ab71e93e0e51bd94e51fcd SHA512 f27af67f9a96f6327150330bf091a803e10eabbac4e488cf5e4d72907e2eb1dbde7282fe0b89fd75711fd8bdcdb3688b5a9eac1e4d6871f4e8681c9c8b0e7c45 WHIRLPOOL 1ea7933817895ec4ddd531b60eead2c0c3324b90fe48224bd49748d11e76313bb7699670edaf5c8f41b8424026bed59d29aab69208c5ced5161196a4827c78f8

@ -1,384 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
# Testing within Portage's environment is broken, and the patch no
# longer applies cleanly.
RESTRICT="test"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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
epatch "${FILESDIR}/pg_ctl-exit-status.patch"
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.1-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
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
}

@ -1,384 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
# Testing within Portage's environment is broken, and the patch no
# longer applies cleanly.
RESTRICT="test"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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
epatch "${FILESDIR}/pg_ctl-exit-status.patch"
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.1-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
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
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -13,7 +13,7 @@ PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"

@ -1,394 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,394 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -9,7 +9,7 @@ PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"

@ -1,399 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,399 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -9,7 +9,7 @@ PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -9,7 +9,7 @@ PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"

@ -1,431 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,431 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,431 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,437 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
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 [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -9,7 +9,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5} )
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 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"

@ -1,434 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -1,434 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
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 ~sparc-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="http://www.postgresql.org/"
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"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
for lingua in ${LINGUAS}; do
IUSE+=" linguas_${lingua}"
done
wanted_languages() {
local enable_langs
for lingua in ${LINGUAS} ; do
use linguas_${lingua} && enable_langs+="${lingua} "
done
echo -n ${enable_langs}
}
CDEPEND="
>=app-eselect/eselect-postgresql-1.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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
# Fix bug 486556 where the server would crash at start up because of
# an infinite loop caused by a self-referencing symlink.
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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
epatch_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}
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
dodir /etc/eselect/postgresql/slots/${SLOT}
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
use static-libs || find "${ED}" -name '*.a' -delete
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" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service" | \
systemd_newunit - ${PN}-${SLOT}.service
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 0775 /run/postgresql
fi
fi
}
pkg_postinst() {
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog
elog "It looks like this is your first time installing PostgreSQL. Run the"
elog "following command in all active shells to pick up changes to the default"
elog "environment:"
elog " source /etc/profile"
fi
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
while [ "$correct" != "true" ] ; do
einfo "Are you ready to continue? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
correct="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "Aborting initialization."
else
echo "Answer not recognized"
fi
done
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
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 @@
DIST golint-0_pre20161114.tar.gz 30204 SHA256 dbad0c8963b91dcb87d216b07aa77c162dd918a9c2b60a890d5a2c5f257ce286 SHA512 6ba92ade7a84ab587383ce5fe857ac4d6f731a75390ff52ede0bf0ef85b4eea7ebb33282b8332727bf94461891e098700de6d8e8b625f580e4cf791ab436278b WHIRLPOOL 07fcc14bc4536a4c033f06d15b3b04c2badbe21d4aea4c950501537b2f01e4ca88ad70db5455b9319080907759dbcb434c211257998cf9ec50155111aaff85fd

@ -0,0 +1,38 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
EGO_PN="github.com/golang/lint/..."
if [[ ${PV} = *9999* ]]; then
inherit golang-vcs
else
EGIT_COMMIT=206c0f0
SRC_URI="https://github.com/golang/lint/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
inherit golang-vcs-snapshot
fi
inherit golang-build
DESCRIPTION="a linter for Go"
HOMEPAGE="https://godoc.org/golang.org/x/tools"
LICENSE="BSD"
SLOT="0/${PVR}"
IUSE=""
DEPEND=">=dev-lang/go-1.6
dev-go/go-tools"
RDEPEND="!<dev-lang/go-1.6
dev-go/go-tools:="
DOCS=(
src/github.com/golang/lint/CONTRIBUTING.md
src/github.com/golang/lint/README.md
src/github.com/golang/lint/misc
)
src_install() {
golang-build_src_install
einstalldocs
dobin bin/*
}

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
</pkgmetadata>

@ -9,5 +9,4 @@ DIST go-linux-ppc64-bootstrap.tbz 45266082 SHA256 89902cebaf93b95dea225b7304eedc
DIST go-linux-ppc64le-bootstrap.tbz 50134685 SHA256 ca816a3e3cbd7721200522fa39843de0bf546d0ac18e0d550e64b7cc33bea4f2 SHA512 da718166febe77b57f2f2edb18c921501a0eb7184a7e6f18411b5cba95fe0de185ef9d5e85be3632c5829e66008912d12b5259ca7fc330ad28026e53bb658e7f WHIRLPOOL 0d7875146f1bdc8f6af089f7f4b003d952419c51be7d519ca3474b39f67dbc88c6caa515f707ad9e6fac345e8a78f42d13eb794485ce18b6d90f7331ee16686c
DIST go-linux-s390x-bootstrap.tbz 49809007 SHA256 80a87bc5ac2239c99f8d7425fbc6f4fefba63f549b0835505c25378c08114656 SHA512 1b7500e6c42508b6cb07214620070065262349d2cd3698deeac0638d0bf0bfeb89c59c2d72a284af34f3071b4cfb9ce543c5fdec7add4a46adc9580295909439 WHIRLPOOL d3782cb515ab67720105224e02d96ab1ca86518db661719b2d0f7c48aa1f4f896a7cc5fed5b6ddc032c8206e8a10c6262646be0e59def61723936044d6ceb143
DIST go-solaris-amd64-bootstrap.tbz 48367195 SHA256 92ebdbf001f243a78a6c2d8ee30e929ba2cecbedf8e0fc07e129b04b107453ad SHA512 cf8725db0d001d61badee71624799a3c9e75f61f77ab090c1f6c490d694c4be367019b28d88306045d877ab5a324a1f9b0674293caf3acb19c193fc3746a48f2 WHIRLPOOL 672c6642e340b6d4f38b633f67fdc3202e3725022a8a61e2129276fccd6c42ddc24ed06c1d57eb31a25ea8056b79686619cbb36431b9c23b6d4be5bcb715bd89
DIST go1.6.3.src.tar.gz 12617426 SHA256 6326aeed5f86cf18f16d6dc831405614f855e2d416a91fd3fdc334f772345b00 SHA512 43e9b01220788112a185500bd53f091e7a0023a790092f428e2f40fc1a334dd148558b99d2a1c871b8cc79ad7d2d87a092b93eee7b5a27c2ee675c494de35306 WHIRLPOOL 0a22dc08b89ddfaccf1e871037e7ad6cdbf36f914de527011813d57a2d857478278202314b185e26aa905cb135d13cbea490d03337b42148c6fc2ef93a8cd9fe
DIST go1.7.4.src.tar.gz 14198817 SHA256 4c189111e9ba651a2bb3ee868aa881fab36b2f2da3409e80885ca758a6b614cc SHA512 dc9950c3ea7100e536ad58fd93505d584276b7c50d4b8fe2ba7f20fd043dcf0d315b735c48945302055e91517594cc2b0061ccec9478a8ab48f1f2836c20afb3 WHIRLPOOL 054f496555dd30e0ba6a3c449b915ea048d5f85f1cf6d2ef6e8aa84939b6e9674b30cfccee99d050c5d75d028cf43d83bf0267703ffb02dfc5bc780fd0a1706f

@ -1,12 +0,0 @@
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
index 6ebc69a..648092a 100644
--- a/src/runtime/runtime-gdb_test.go
+++ b/src/runtime/runtime-gdb_test.go
@@ -87,6 +87,7 @@ func TestGdbPython(t *testing.T) {
args := []string{"-nx", "-q", "--batch", "-iex",
fmt.Sprintf("add-auto-load-safe-path %s/src/runtime", runtime.GOROOT()),
+ "-ex", "set startup-with-shell off",
"-ex", "info auto-load python-scripts",
"-ex", "br main.go:10",
"-ex", "run",

@ -1,255 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
export CBUILD=${CBUILD:-${CHOST}}
export CTARGET=${CTARGET:-${CHOST}}
MY_PV=${PV/_/}
inherit toolchain-funcs
BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
SRC_URI="!gccgo? (
kernel_Darwin? (
x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap.tbz )
)
kernel_FreeBSD? (
amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-bootstrap.tbz )
x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-bootstrap-1.tbz )
)
kernel_linux? (
amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap.tbz )
arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap.tbz )
arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap.tbz )
ppc64? (
${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap.tbz
${BOOTSTRAP_DIST}/go-linux-ppc64le-bootstrap.tbz
)
x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-1.tbz )
)
kernel_SunOS? (
x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap.tbz )
)
)
"
if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="git://github.com/golang/go.git"
inherit git-r3
else
SRC_URI+="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz"
case ${PV} in
*9999*|*_rc*) ;;
*)
KEYWORDS="-* amd64 arm ~arm64 ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
;;
esac
fi
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
HOMEPAGE="http://www.golang.org"
LICENSE="BSD"
SLOT="0/${PV}"
IUSE="gccgo"
DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
RDEPEND="!<dev-go/go-tools-0_pre20150902"
# These test data objects have writable/executable stacks.
QA_EXECSTACK="usr/lib/go/src/debug/elf/testdata/*.obj"
# Do not complain about CFLAGS, etc, since Go doesn't use them.
QA_FLAGS_IGNORED='.*'
REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
# The go language uses *.a files which are _NOT_ libraries and should not be
# stripped. The test data objects should also be left alone and unstripped.
STRIP_MASK="/usr/lib/go/pkg/*.a
/usr/lib/go/src/debug/elf/testdata/*
/usr/lib/go/src/debug/dwarf/testdata/*
/usr/lib/go/src/runtime/race/*.syso"
if [[ ${PV} != 9999 ]]; then
S="${WORKDIR}"/go
fi
PATCHES=(
# patch for #581072
"${FILESDIR}"/${P}-gdb-no-shell.patch
)
go_arch()
{
# By chance most portage arch names match Go
local portage_arch=$(tc-arch $@)
case "${portage_arch}" in
x86) echo 386;;
x64-*) echo amd64;;
ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
*) echo "${portage_arch}";;
esac
}
go_arm()
{
case "${1:-${CHOST}}" in
armv5*) echo 5;;
armv6*) echo 6;;
armv7*) echo 7;;
*)
die "unknown GOARM for ${1:-${CHOST}}"
;;
esac
}
go_os()
{
case "${1:-${CHOST}}" in
*-linux*) echo linux;;
*-darwin*) echo darwin;;
*-freebsd*) echo freebsd;;
*-netbsd*) echo netbsd;;
*-openbsd*) echo openbsd;;
*-solaris*) echo solaris;;
*-cygwin*|*-interix*|*-winnt*)
echo windows
;;
*)
die "unknown GOOS for ${1:-${CHOST}}"
;;
esac
}
go_tuple()
{
echo "$(go_os $@)_$(go_arch $@)"
}
go_cross_compile()
{
[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
}
pkg_pretend()
{
# make.bash does not understand cross-compiling a cross-compiler
if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
fi
}
src_unpack()
{
if [[ ${PV} = 9999 ]]; then
git-r3_src_unpack
fi
default
}
src_compile()
{
export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
if use gccgo; then
mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
local go_binary=$(gcc-config --get-bin-path)/go-5
[[ -x ${go_binary} ]] || go_binary=$(
find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-5 | sort -V | tail -n1)
[[ -x ${go_binary} ]] || die "go-5: command not found"
ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
fi
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
export GOROOT="$(pwd)"
export GOBIN="${GOROOT}/bin"
# Go's build script does not use BUILD/HOST/TARGET consistently. :(
export GOHOSTARCH=$(go_arch ${CBUILD})
export GOHOSTOS=$(go_os ${CBUILD})
export CC=$(tc-getBUILD_CC)
export GOARCH=$(go_arch)
export GOOS=$(go_os)
export CC_FOR_TARGET=$(tc-getCC)
export CXX_FOR_TARGET=$(tc-getCXX)
if [[ ${ARCH} == arm ]]; then
export GOARM=$(go_arm)
fi
elog "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
cd src
./make.bash || die "build failed"
}
src_test()
{
go_cross_compile && return 0
cd src
PATH="${GOBIN}:${PATH}" \
./run.bash -no-rebuild || die "tests failed"
}
src_install()
{
local bin_path f x
dodir /usr/lib/go
insinto /usr/lib/go
# There is a known issue which requires the source tree to be installed [1].
# Once this is fixed, we can consider using the doc use flag to control
# installing the doc and src directories.
# [1] https://golang.org/issue/2775
doins -r bin doc lib pkg src
fperms -R +x /usr/lib/go/bin /usr/lib/go/pkg/tool
cp -a misc "${D}"/usr/lib/go/misc
if go_cross_compile; then
bin_path="bin/$(go_tuple)"
else
bin_path=bin
fi
for x in ${bin_path}/*; do
f=${x##*/}
dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
done
dodoc AUTHORS CONTRIBUTORS PATENTS README.md
}
pkg_preinst()
{
has_version '<dev-lang/go-1.4' &&
export had_support_files=true ||
export had_support_files=false
}
pkg_postinst()
{
# If the go tool sees a package file timestamped older than a dependancy it
# will rebuild that file. So, in order to stop go from rebuilding lots of
# packages for every build we need to fix the timestamps. The compiler and
# linker are also checked - so we need to fix them too.
ebegin "fixing timestamps to avoid unnecessary rebuilds"
tref="usr/lib/go/pkg/*/runtime.a"
find "${EROOT}"usr/lib/go -type f \
-exec touch -r "${EROOT}"${tref} {} \;
eend $?
if $had_support_files; then
ewarn
ewarn "All editor support, IDE support, shell completion"
ewarn "support, etc has been removed from the go package"
ewarn "upstream."
ewarn "For more information on which support is available, see"
ewarn "the following URL:"
ewarn "https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins"
fi
}

@ -12,7 +12,7 @@ SRC_URI="http://git.ghostscript.com/?p=mujs.git;a=snapshot;h=fd003eceda531e13fbd
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE=""
DEPEND=""

@ -1,13 +1,13 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib toolchain-funcs
inherit multilib toolchain-funcs virtualx
[[ ${PV} == 9999* ]] && inherit git-2
DESCRIPTION="A library that implements a user interface that focuses on simplicity and minimalism"
DESCRIPTION="UI library that focuses on simplicity and minimalism"
HOMEPAGE="http://pwmt.org/projects/girara/"
if ! [[ ${PV} == 9999* ]]; then
SRC_URI="http://pwmt.org/projects/${PN}/download/${P}.tar.gz"
@ -22,7 +22,7 @@ KEYWORDS="amd64 arm x86 ~amd64-linux ~x86-linux"
else
KEYWORDS=""
fi
IUSE="libnotify static-libs"
IUSE="libnotify static-libs test"
RDEPEND=">=dev-libs/glib-2.28
>=x11-libs/gtk+-3.2:3
@ -58,6 +58,10 @@ src_compile() {
emake "${mygiraraconf[@]}"
}
src_test() {
virtx default
}
src_install() {
emake "${mygiraraconf[@]}" install
dodoc AUTHORS

@ -1,13 +1,13 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib toolchain-funcs
inherit multilib toolchain-funcs virtualx
[[ ${PV} == 9999* ]] && inherit git-2
DESCRIPTION="A library that implements a user interface that focuses on simplicity and minimalism"
DESCRIPTION="UI library that focuses on simplicity and minimalism"
HOMEPAGE="http://pwmt.org/projects/girara/"
if ! [[ ${PV} == 9999* ]]; then
SRC_URI="http://pwmt.org/projects/${PN}/download/${P}.tar.gz"
@ -22,7 +22,7 @@ KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
else
KEYWORDS=""
fi
IUSE="libnotify static-libs"
IUSE="libnotify static-libs test"
RDEPEND=">=dev-libs/glib-2.28
>=x11-libs/gtk+-3.2:3
@ -58,6 +58,10 @@ src_compile() {
emake "${mygiraraconf[@]}"
}
src_test() {
virtx default
}
src_install() {
emake "${mygiraraconf[@]}" install
dodoc AUTHORS

@ -1,13 +1,13 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib toolchain-funcs
inherit multilib toolchain-funcs virtualx
[[ ${PV} == 9999* ]] && inherit git-2
DESCRIPTION="A library that implements a user interface that focuses on simplicity and minimalism"
DESCRIPTION="UI library that focuses on simplicity and minimalism"
HOMEPAGE="http://pwmt.org/projects/girara/"
if ! [[ ${PV} == 9999* ]]; then
SRC_URI="http://pwmt.org/projects/${PN}/download/${P}.tar.gz"
@ -22,7 +22,7 @@ KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
else
KEYWORDS=""
fi
IUSE="libnotify static-libs"
IUSE="libnotify static-libs test"
RDEPEND=">=dev-libs/glib-2.28
>=x11-libs/gtk+-3.2:3
@ -59,6 +59,10 @@ src_compile() {
emake "${mygiraraconf[@]}"
}
src_test() {
virtx default
}
src_install() {
emake "${mygiraraconf[@]}" install
dodoc AUTHORS

@ -1,13 +1,13 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib toolchain-funcs
inherit multilib toolchain-funcs virtualx
[[ ${PV} == 9999* ]] && inherit git-2
DESCRIPTION="A library that implements a user interface that focuses on simplicity and minimalism"
DESCRIPTION="UI library that focuses on simplicity and minimalism"
HOMEPAGE="http://pwmt.org/projects/girara/"
if ! [[ ${PV} == 9999* ]]; then
SRC_URI="http://pwmt.org/projects/${PN}/download/${P}.tar.gz"
@ -22,7 +22,7 @@ KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
else
KEYWORDS=""
fi
IUSE="libnotify static-libs"
IUSE="libnotify static-libs test"
RDEPEND=">=dev-libs/glib-2.28
>=x11-libs/gtk+-3.4:3
@ -59,6 +59,10 @@ src_compile() {
emake "${mygiraraconf[@]}"
}
src_test() {
virtx default
}
src_install() {
emake "${mygiraraconf[@]}" install
dodoc AUTHORS

@ -1,13 +1,13 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib toolchain-funcs
inherit multilib toolchain-funcs virtualx
[[ ${PV} == 9999* ]] && inherit git-2
DESCRIPTION="A library that implements a user interface that focuses on simplicity and minimalism"
DESCRIPTION="UI library that focuses on simplicity and minimalism"
HOMEPAGE="http://pwmt.org/projects/girara/"
if ! [[ ${PV} == 9999* ]]; then
SRC_URI="http://pwmt.org/projects/${PN}/download/${P}.tar.gz"
@ -22,7 +22,7 @@ KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
else
KEYWORDS=""
fi
IUSE="libnotify static-libs"
IUSE="libnotify static-libs test"
RDEPEND=">=dev-libs/glib-2.28
>=x11-libs/gtk+-3.4:3
@ -59,6 +59,10 @@ src_compile() {
emake "${mygiraraconf[@]}"
}
src_test() {
virtx default
}
src_install() {
emake "${mygiraraconf[@]}" install
dodoc AUTHORS

@ -1,13 +1,13 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib toolchain-funcs
inherit multilib toolchain-funcs virtualx
[[ ${PV} == 9999* ]] && inherit git-2
DESCRIPTION="A library that implements a user interface that focuses on simplicity and minimalism"
DESCRIPTION="UI library that focuses on simplicity and minimalism"
HOMEPAGE="http://pwmt.org/projects/girara/"
if ! [[ ${PV} == 9999* ]]; then
SRC_URI="http://pwmt.org/projects/${PN}/download/${P}.tar.gz"
@ -22,7 +22,7 @@ KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
else
KEYWORDS=""
fi
IUSE="libnotify static-libs"
IUSE="libnotify static-libs test"
RDEPEND=">=dev-libs/glib-2.28
>=x11-libs/gtk+-3.4:3
@ -58,6 +58,10 @@ src_compile() {
emake "${mygiraraconf[@]}"
}
src_test() {
virtx default
}
src_install() {
emake "${mygiraraconf[@]}" install
dodoc AUTHORS

@ -1 +1,2 @@
DIST kirigami-1.1.0.tar.xz 262152 SHA256 6677af0c486a4c9cfefe74a0951e85dad53435010031bf2b7fcdf9c5df6b3edd SHA512 83d1c0600fed7838b25ddfa3d20e1abef594c8e5fa202314ef1c22b6548573db36058f02620236cd9bba9f65f45f8821fa37558689b49776f9fe3119c89b0b63 WHIRLPOOL b1d4cc22a0759f561c16bb61bf2a47494e92cc766401862b97866156dfe1cda452e1db01a62805fe902320fc106708794b7f545abfbd2ff5c0d8909acd024bc1
DIST kirigami2-2.0.0.tar.xz 266580 SHA256 499bfcc5080dd65877a67700ff71f84a7b43f0f87b7c72e9f68c7bb92e11a293 SHA512 7aa7181b61cbf8fe9921535be436bbe50bd19684e1d6cae07c2fe0538722e0c496f75bd5e67d02482e88ca5407d5cfc98a10447bcc114adba703bf474a285fa5 WHIRLPOOL a176a87d1acaf6aed98c70a5b04e84d10716041978584dc7c5f3579a3f6866272ead33c5009a992bef1b1bffec9599ffa39adcfac826810f0195dc99b7216757

@ -0,0 +1,46 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
KDE_TEST="forceoptional"
QT_MINIMAL="5.7.1"
inherit kde5
if [[ ${KDE_BUILD_TYPE} = release ]]; then
MY_PN="${PN}2"
SRC_BRANCH=stable
[[ ${PV} = *.[8-9]?.* ]] && SRC_BRANCH=unstable
SRC_URI="mirror://kde/${SRC_BRANCH}/${PN}/${MY_PN}-${PV}.tar.xz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${MY_PN}-${PV}"
fi
DESCRIPTION="Lightweight user interface framework for mobile and convergent applications"
HOMEPAGE="https://techbase.kde.org/Kirigami"
LICENSE="LGPL-2+"
SLOT="2"
IUSE="examples plasma"
RDEPEND="
$(add_qt_dep qtdeclarative)
$(add_qt_dep qtgui)
$(add_qt_dep qtquickcontrols2)
$(add_qt_dep qtsvg)
plasma? ( $(add_frameworks_dep plasma) )
"
DEPEND="${RDEPEND}
$(add_qt_dep linguist-tools)
"
RESTRICT+=" test"
src_configure() {
local mycmakeargs=(
-DBUILD_EXAMPLES=$(usex examples)
-DPLASMA_ENABLED=$(usex plasma)
)
kde5_src_configure
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -15,7 +15,7 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 sparc x86"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
IUSE="static-libs test"
RDEPEND=">=dev-libs/protobuf-2.6.0[${MULTILIB_USEDEP}]"

@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -17,7 +17,7 @@ SRC_URI="https://github.com/google/${PN}/releases/download/v${PV}/${P}.tar.bz2"
LICENSE="Apache-2.0"
SLOT="0/9" # subslot = soname major version
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples java python static-libs vim-syntax zlib"
CDEPEND="emacs? ( virtual/emacs )

@ -19,4 +19,6 @@ DIST sbcl-1.3.11-source.tar.bz2 5790557 SHA256 077a2d98f94c62076bcb4dea715a11975
DIST sbcl-1.3.11-x86-64-linux-binary.tar.bz2 9248214 SHA256 9ab2c149b7ba43e7f6237c1a23e3037078db46a83913040958fa08dd6011dba5 SHA512 ffb443f9e3ede2f9dbdc1bf28554bd59ef1fd5ad855465ee10f9835221fde20211188e881be854b4760870b122dfc6c5ad5c8cad1bea613ffb3b6a6f67a36056 WHIRLPOOL 0a34701abd81cdea411ac37e276660e29f43279509bef28600e7084e9ffc525883e18c42338492b0ccb5fb21e85c91726f978aa20a87deeb92e813a15b36d9fa
DIST sbcl-1.3.12-source.tar.bz2 5795516 SHA256 8039ec01d04baad3ee3ebee7a830757dc488be33ca128f4a0592f8af701759c2 SHA512 2a2969b826dcf9d568204a01546c47af777d5866baa8da809c49ace1655b54cd4c8db1872e322a1d08a4983b0962cc0e2e346816488212709b28867c53233275 WHIRLPOOL 019f5919d2203e1ffde465d460575ad8517e176723d00acc99c6c50bbdd7ee68b90df4c8f10ab63646b0a2f5266a0328182e3c55cbfa9562ef7bac2897011663
DIST sbcl-1.3.12-x86-64-linux-binary.tar.bz2 9235579 SHA256 6508577bd6a2769a74d7b6fa7885e12932acf7a18736c4df599fc41f1b5db237 SHA512 536710d498f98edc2ca9bd794a09d57b37fab2595d1b8eb2f4c1dff186d262c059b674a7786cf78f8bc4a87dc27dc3f7cc61c21bb826abc8a4e99854742595b0 WHIRLPOOL 41daaff2dbcbe4e4b172ae45c29987eee7aeb4ae37eddfb808cd9cb7600289559f79e8395930e7364fe28b00efdcd947ba951771e6b2724d59759221ec6a63e9
DIST sbcl-1.3.13-source.tar.bz2 5783599 SHA256 4c6935e4a9022637da95f2aab04d08326762f55a35942b40cb6a4276838c76cc SHA512 c0aac045f19f8f49642027eb37be21bb68b4cdb58895f4adbb92b67d0025ab50dd4eb1725d90c6a4ad592d59395d119623cdff3a2c838b2206efbf1e37d34f4e WHIRLPOOL d4451aa39c9a90c14a2986869915c343bd1397b58bc35910e63dc97284c8190cd071cf45fe704d2cb6185e9e304ae6166ca1fb90456289c3ebaf279e03cd31a3
DIST sbcl-1.3.13-x86-64-linux-binary.tar.bz2 9103731 SHA256 f92dbcb379f3a35ba13fd75a10912b767e5d8b2b10698413e5a217cea2f49cca SHA512 0e6302e408ea0b05f89c982a1660187cf2054cc65b464e340166c8fea962c4e52960f143cd2393491c60c83f5d90ff828a0807ee7f45bc1213ba5f13a6950c2b WHIRLPOOL 1e25fc22c6cf8725380cbe018d7a4a6875e457ec76428894f00568e8b9d3872ab4fdfee932d151efae5c726aca4161753131029347d5397e5f1dc9a4ea486e76
DIST sbcl-1.3.9-armhf-linux-binary.tar.bz2 9161130 SHA256 da2d296a8ab107a7b2e10831836648d882b01193f60269853932af4f63a06571 SHA512 309e2ac7ef9ac95bf751432cf243af0de022c5b21054df2bf4e99da4ff087218af72b0ab3be69214eba3df1b6bbe707cc28840508e960c5d2ed2af0e86de3fdd WHIRLPOOL d2dde314d2b49e4246823032d953bbfe0858f7c69d0445da356426f9c5fac73036b32c1c048cf7f43615fa02707e8e434d8b085942e79d1e2b20f6fcb7e08919

@ -0,0 +1,243 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit multilib eutils flag-o-matic pax-utils
#same order as http://www.sbcl.org/platform-table.html
BV_X86=1.2.7
BV_AMD64=1.3.13
BV_PPC=1.2.7
BV_SPARC=1.0.28
BV_ALPHA=1.0.28
BV_ARM=1.3.9
BV_ARM64=1.3.11
BV_PPC_MACOS=1.0.47
BV_X86_MACOS=1.1.6
BV_X64_MACOS=1.2.11
BV_SPARC_SOLARIS=1.0.23
BV_X86_SOLARIS=1.2.7
BV_X64_SOLARIS=1.2.7
DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
HOMEPAGE="http://sbcl.sourceforge.net/"
SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
IUSE="debug doc source +threads +unicode pax_kernel zlib"
CDEPEND=">=dev-lisp/asdf-3.1:="
DEPEND="${CDEPEND}
doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
pax_kernel? ( sys-apps/elfix )"
RDEPEND="${CDEPEND}
!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
# Disable warnings about executable stacks, as this won't be fixed soon by upstream
QA_EXECSTACK="usr/bin/sbcl"
CONFIG="${S}/customize-target-features.lisp"
ENVD="${T}/50sbcl"
# Prevent ASDF from using the system libraries
CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
usep() {
use ${1} && echo "true" || echo "false"
}
sbcl_feature() {
echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
}
sbcl_apply_features() {
sed 's/^X//' > "${CONFIG}" <<-'EOF'
(lambda (list)
X (flet ((enable (x) (pushnew x list))
X (disable (x) (setf list (remove x list))))
EOF
if use x86 || use amd64; then
sbcl_feature "$(usep threads)" ":sb-thread"
fi
sbcl_feature "true" ":sb-ldb"
sbcl_feature "false" ":sb-test"
sbcl_feature "$(usep unicode)" ":sb-unicode"
sbcl_feature "$(usep zlib)" ":sb-core-compression"
sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
sed 's/^X//' >> "${CONFIG}" <<-'EOF'
X )
X list)
EOF
cat "${CONFIG}"
}
src_unpack() {
unpack ${A}
mv sbcl-*-* sbcl-binary || die
cd "${S}"
}
src_prepare() {
eapply "${FILESDIR}"/gentoo-fix_install_man.patch
# bug #468482
eapply "${FILESDIR}"/concurrency-test-1.2.6.patch
# bugs #486552, #527666, #517004
eapply "${FILESDIR}"/bsd-sockets-test-1.3.12.patch
# bugs #560276, #561018
eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch
# bug #599902
eapply "${FILESDIR}"/${PN}-1.3.11-config.patch
eapply "${FILESDIR}"/${PN}-1.2.11-solaris.patch
eapply "${FILESDIR}"/${PN}-1.2.13-verbose-build.patch
# To make the hardened compiler NOT compile with -fPIE -pie
if gcc-specs-pie ; then
einfo "Disabling PIE..."
eapply "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
fi
eapply_user
# bug #526194
sed -e "s@CFLAGS =.*\$@CFLAGS = ${CFLAGS} -g -Wall -Wsign-compare@" \
-e "s@LINKFLAGS =.*\$@LINKFLAGS = ${LDFLAGS} -g@" \
-i src/runtime/GNUmakefile || die
sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
-i make-config.sh || die
cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
# Some shells(such as dash) don't have "time" as builtin
# and we don't want to DEPEND on sys-process/time
sed "s,^time ,," -i make.sh || die
sed "s,/lib,/$(get_libdir),g" -i install.sh || die
# #define SBCL_HOME ...
sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
# change location of /etc/sbclrc ...
sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
find . -type f -name .cvsignore -delete
}
src_configure() {
# customizing SBCL version as per
# http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
# applying customizations
sbcl_apply_features
}
src_compile() {
local bindir="${WORKDIR}"/sbcl-binary
strip-unsupported-flags ; filter-flags -fomit-frame-pointer
if use pax_kernel ; then
# To disable PaX on hardened systems
pax-mark -mr "${bindir}"/src/runtime/sbcl
# Hack to disable PaX on second GENESIS stage
sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
"${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
fi
# clear the environment to get rid of non-ASCII strings, see bug 174702
# set HOME for paludis
env - HOME="${T}" PATH="${PATH}" \
CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
GNUMAKE=make ./make.sh \
"sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
|| die "make failed"
# need to set HOME because libpango(used by graphviz) complains about it
if use doc; then
env - HOME="${T}" PATH="${PATH}" \
CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
make -C doc/manual info html || die "Cannot build manual"
env - HOME="${T}" PATH="${PATH}" \
CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
make -C doc/internals info html || die "Cannot build internal docs"
fi
}
src_test() {
ewarn "Unfortunately, it is known that some tests fail eg."
ewarn "run-program.impure.lisp. This is an issue of the upstream's"
ewarn "development and not of Gentoo's side. Please, before filing"
ewarn "any bug(s) search for older submissions. Thank you."
time ( cd tests && sh run-tests.sh )
}
src_install() {
# install system-wide initfile
dodir /etc/
sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
;;; The following is required if you want source location functions to
;;; work in SLIME, for example.
X
(setf (logical-pathname-translations "SYS")
X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
X
;;; Setup ASDF2
(load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
EOF
# Install documentation
unset SBCL_HOME
INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
sh install.sh || die "install.sh failed"
# bug #517008
pax-mark -mr "${D}"/usr/bin/sbcl
# rm empty directories lest paludis complain about this
find "${ED}" -empty -type d -exec rmdir -v {} +
if use doc; then
dodoc -r doc/internals/sbcl-internals
doinfo doc/manual/*.info*
doinfo doc/internals/sbcl-internals.info
docinto internals-notes
dodoc doc/internals-notes/*
else
rm -Rv "${ED}/usr/share/doc/${PF}" || die
fi
# install the SBCL source
if use source; then
./clean.sh
cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
fi
# necessary for running newly-saved images
echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
doenvd "${ENVD}"
}

@ -5,8 +5,10 @@
EAPI=6
: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
# (needed due to CMAKE_BUILD_TYPE != Gentoo)
CMAKE_MIN_VERSION=3.7.0-r1
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils git-r3 python-any-r1
DESCRIPTION="OCaml bindings for LLVM"
@ -43,6 +45,9 @@ DEPEND="${RDEPEND}
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|| ( ${ALL_LLVM_TARGETS[*]} )"
# least intrusive of all
CMAKE_BUILD_TYPE=RelWithDebInfo
python_check_deps() {
! use test \
|| has_version "dev-python/lit[${PYTHON_USEDEP}]"

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -12,7 +12,7 @@ DESCRIPTION="A date and time object"
LICENSE="Artistic-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
KEYWORDS="~alpha ~amd64 ~hppa ~x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
IUSE="test"
CONFLICTS="

@ -12,7 +12,7 @@ DESCRIPTION="A date and time object"
LICENSE="Artistic-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~ppc-aix ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
KEYWORDS="~amd64 ~hppa ~x86 ~ppc-aix ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
IUSE="test"
CONFLICTS="

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -10,7 +10,7 @@ inherit perl-module
DESCRIPTION="Type constraints and coercions for Perl"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~x86 ~x86-fbsd"
KEYWORDS="~alpha ~amd64 ~hppa ~x86 ~x86-fbsd"
IUSE="test"
PATCHES=("${FILESDIR}/${PN}-${DIST_VERSION}-installskip.patch")

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -10,7 +10,7 @@ inherit perl-module
DESCRIPTION="Skip tests when modules not available"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~x86 ~x86-fbsd"
KEYWORDS="~alpha ~amd64 ~hppa ~x86 ~x86-fbsd"
IUSE="test"
RDEPEND=""

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -12,7 +12,7 @@ USE_PHP="php5-6 php7-0 php7-1"
inherit php-ext-source-r3 vcs-snapshot
USE_PHP="php7-0"
USE_PHP="php7-0 php7-1"
SRC_URI="https://github.com/php-memcached-dev/php-memcached/archive/e65be324557eda7167c4831b4bfb1ad23a152beb.tar.gz -> ${P}.tar.gz"
HOMEPAGE="http://pecl.php.net/package/memcached"

@ -3,3 +3,4 @@ DIST bandit-1.0.1.tar.gz 130662 SHA256 3d3a88bf82375cd18ab889c2bf86dcf840798c74a
DIST bandit-1.1.0.tar.gz 135333 SHA256 b5a011ab77bb9d9f7aca349732db7b9789ebe86a57a9cb49314abcb41161a15e SHA512 0344be4c98b4f1df056761f7735fa0b23dc234c64ca0090d3e665899905eaac9d49750a7ebe6f7f9e4c39d07f3c2cb0d653cc65c0e56dfadac0caeac5799af94 WHIRLPOOL 3df6eb26693d2d0b40ebbcb6774e2a0bba2cda8fad62952467a3b18b1cf538758fefeb2b2281c0c3c5d5de5674ab177ed38263c50451c250502b740df8f1545b
DIST bandit-1.2.0.tar.gz 138040 SHA256 cb2265e740ab2290f8621dc9d6cd0ef22b53c85f986ef6285b1867338192da87 SHA512 f2119bb7b920ca7b4254fed433ee0e41bbbde51a45cd88283fac1a9ac8f60ce621fffecca676bdb8db7ea5cb925851e50176014405425c30b5991e17f57f294a WHIRLPOOL fceed98c132887b0d85e7c926a5e71dc92b43ec75401cbb12127cb6c42111a5506ba800130b2a1bfd0f0340ca7b15045842c566d0f02bfa44a65f9c8510d65c8
DIST bandit-1.3.0.tar.gz 139075 SHA256 5e2df346b8036b413046f6163a877ba6de9d71407d6b08fe446924d55874b60f SHA512 24341cc837fa6a8bb095c7fdc684a81b3c06834b408c6328c6b3425d5cc5c63dcb119cadf54c8cea302a108923638839626f1f8c6d401ce66cd112a776a8363f WHIRLPOOL 3301f6a9a369e351968e0652eeba6da4307beb3a995f0696040176a7cef759e83a7a89f2d023860a0522957b54a7ca2edb82fb8443d8e20c04af959830b52bb7
DIST bandit-1.4.0.tar.gz 138019 SHA256 cb977045497f83ec3a02616973ab845c829cdab8144ce2e757fe031104a9abd4 SHA512 e5ae412e3b13c89f8c4a85d318b0504c2d5b9aa4ca81652266a13d96f859705c2d0112dc534373cd7fd1020790369e3fe6b55da57773fa7821e663c37fe98817 WHIRLPOOL e96d8dbe427309b6415927714863af05080b17224fdd4e5e0dbf1ba72c7b801617292b5044ee223fa4950422f08c0d278941a3fe8acb3ffcc86ba6298e7bef93

@ -0,0 +1,52 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python{2_7,3_{4,5}} )
inherit distutils-r1
DESCRIPTION="A security linter from OpenStack Security"
HOMEPAGE="https://openstack.org"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test"
CDEPEND=">=dev-python/pbr-1.8.0[${PYTHON_USEDEP}]"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
${CDEPEND}
test? (
>=dev-python/coverage-4.0[${PYTHON_USEDEP}]
>=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
>=dev-python/hacking-0.9.2[${PYTHON_USEDEP}]
<dev-python/hacking-0.10[${PYTHON_USEDEP}]
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
>=dev-python/subunit-0.0.18[${PYTHON_USEDEP}]
>=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
>=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
>=dev-python/testtools-1.4.0[${PYTHON_USEDEP}]
>=dev-python/oslotest-1.10.0[${PYTHON_USEDEP}]
>=dev-python/sphinx-1.2.1[${PYTHON_USEDEP}]
<dev-python/sphinx-1.4[${PYTHON_USEDEP}]
>=dev-python/oslo-sphinx-4.7.0[${PYTHON_USEDEP}]
dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
>=dev-python/reno-1.8.0[${PYTHON_USEDEP}]
>=dev-python/pylint-1.4.5[${PYTHON_USEDEP}]
)"
RDEPEND="
${CDEPEND}
>=dev-python/git-python-1.0.1[${PYTHON_USEDEP}]
>=dev-python/pyyaml-3.10.0[${PYTHON_USEDEP}]
>=dev-python/six-1.9.0[${PYTHON_USEDEP}]
>=dev-python/stevedore-1.17.1[${PYTHON_USEDEP}]"
python_test() {
testr init
testr run || die
}

@ -1 +1,2 @@
DIST configshell-fb-1.1.21.tar.gz 36929 SHA256 f96daac404e4483e9f3113fbd675264d14dce1db83155b8537c94c4267e9b740 SHA512 4cf353da513b0e6863a2f93086d98254c2a74596f52ea7fe8823dda7bec4c4c247b54ec277348264f6d33b576a581c7617da01891997e83619f84e9a4def3e57 WHIRLPOOL b7de33bde6891b40950b796fbf9ddbe15f7907860d5cc42097cc88f892989e0cb8f8b5f3ff3d2bf12b138e295385d048e154487356fb26352ef95572aa5ac923
DIST configshell-fb-1.1.22.tar.gz 34383 SHA256 a20b95791cdba6f7587869f4fa4337e8e4effbdec102ac6f7de349fe3b5bc612 SHA512 be6fa988ec42014da7e33c5610c2075c04ac7024e64f1c5665a0178d1390356505d69f93d58cc43b602bd26cb4ca28d085b55feafbce90a5dfb57ab26438eea8 WHIRLPOOL 2d6f0767600728c6803c61b63b4910ad56b349cc62cc74b130fb4e0f94440ec808983ee6b4e9470c00393c45bc95f10033124ef06a6dab573c47477018bf66fd

@ -0,0 +1,28 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit distutils-r1 versionator
MY_PV=$(replace_version_separator 2 '.fb' ${PV})
DESCRIPTION="A Python library for building configuration shells"
HOMEPAGE="https://github.com/open-iscsi/configshell-fb"
SRC_URI="https://github.com/open-iscsi/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="dev-python/pyparsing[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/urwid[${PYTHON_USEDEP}]
!dev-python/configshell"
S=${WORKDIR}/${PN}-${MY_PV}

@ -2,3 +2,4 @@ DIST docker-py-1.10.6.tar.gz 122462 SHA256 dd1aa55dbe507538318e51e5303077d146d51
DIST docker-py-1.2.2.tar.gz 69685 SHA256 85284a5b1a965e01a5d0a91f9f639ad5069143a276c123198fdafc3659280b38 SHA512 bf00b19e0ab56e5c0e8459234d09722ca504ecd933bfba61cb4ab4805410f53f6ad6083f2e964ef5a6eded2ea05aa01a89c27621064386bae145c7258ed996ad WHIRLPOOL bd7ff4579f924e02d18581b1aca00790dcb84afda03e4cde70b349bfdb4ad43aa2e06da2bcbe780f6074d98f9af9b14fb9d2ab4da9265e56b73288902c9ede7a
DIST docker-py-1.9.0.tar.gz 105939 SHA256 0ff58798c8cf79c7e459505786b3b83ca0552a077945b8fe20fc38ff3f732361 SHA512 49e6d4e8ab30c4e54165e7eff9e3034a1fe102348020bad2c5aefa238c44efdf39711536a7727fd9689e2e90483a348930bb91f1e76cade546161c82990f78ed WHIRLPOOL d60bca034f91569f37bef65ff42fcf950dfbc02bc42053bb650a9188661a8c0d9c21cb03128782a15799e6f208e88b32618286615ef94ba9396a4940ae3b6603
DIST docker-py-2.0.0.tar.gz 159296 SHA256 d567db615375df7655e2c4ac794b6a7c6a06c3437ee1ace476e04a88d94531c4 SHA512 773f8899bef8ac225a2d42b645b8a6f62485661fff1753bf91ab6653f8b81597ed3ea944b32e7ce106eec49215582671f4249e0569e28568559a09ca0905f58e WHIRLPOOL c2fb2686966845617b9450439060a90b0c4536c66b34aba07ae680959e842aaf9541b823505a4de81a2b8f17eb3380a578ba2802f9f80a699a3d539d85c0083a
DIST docker-py-2.0.1.tar.gz 160820 SHA256 21b37d9fb581bcf88fe5e38ed915a7e3d4bd94174ec45f654669d970da371801 SHA512 097956bbf67659702cc92762f1570c5f86c478f38c527974b9f2f9938e9baa9a8c97f0c3b5252343a92f036e0712dc09cbbc1c1d7fa893b194cef9ec02b37c5a WHIRLPOOL f3451f6a9ded054cd977c57e06608f891ad933af464254243df5be9d909883b11451620aab21e3acb535acb7aec13c077b0e62c7683166c4b4f170812e3b8759

@ -0,0 +1,56 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=( python{2_7,3_4} )
inherit distutils-r1 vcs-snapshot
DESCRIPTION="Python client for Docker"
HOMEPAGE="https://github.com/docker/docker-py"
SRC_URI="https://github.com/docker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test" # doc
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
>=dev-python/pytest-2.9.1[${PYTHON_USEDEP}]
>=dev-python/pytest-cov-2.1.0[${PYTHON_USEDEP}]
>=dev-python/coverage-3.7.1[${PYTHON_USEDEP}]
)
"
# Doc require later sphinx version that is not packaged yet
# doc? ( dev-python/recommonmark[${PYTHON_USEDEP}]
# >=dev-python/sphinx-1.4.6[${PYTHON_USEDEP}] )
RDEPEND="
>=dev-python/docker-pycreds-0.2.1[${PYTHON_USEDEP}]
!~dev-python/requests-2.12.2[${PYTHON_USEDEP}]
>=dev-python/requests-2.11.1[${PYTHON_USEDEP}]
>=dev-python/six-1.4.0[${PYTHON_USEDEP}]
>=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/backports-ssl-match-hostname-3.5[${PYTHON_USEDEP}]' 'python2_7' 'python3_4' )
$(python_gen_cond_dep '>=dev-python/ipaddress-1.0.16[${PYTHON_USEDEP}]' 'python2_7' )
"
#python_compile_all() {
#if use doc; then
# sphinx-build docs html || die "docs failed to build"
#fi
#}
python_test() {
py.test tests/unit/ || die "tests failed under ${EPYTHON}"
}
python_install_all() {
#use doc && local HTML_DOCS=( html/. )
distutils-r1_python_install_all
}

@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -15,7 +15,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="alpha ~amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="test"
RDEPEND="

@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86"
IUSE="test"
python_test() {

@ -0,0 +1 @@
DIST pushbullet-py-0.10.0.tar.gz 18929 SHA256 318c05f743c94803fc2e2cd786fe258e968d1bef26d05039f005763b0f23e703 SHA512 2e259b76413c5e644350a891678eb98f761e56b18f5a06a9d7cc34353c7c7ee67fa875aed575b1b005782b21f4440d682db5c09be7033d52b7b9cf41e9120123 WHIRLPOOL fd0f98887e73dd04c9510550dd97d711319844f82b7e7d34c35e0db886f08df0d4b800a3f95f2e61de4b909079f2eda4813950743f935c08f875f0cc6e2d227f

@ -0,0 +1,28 @@
diff --git a/pushbullet/filetype.py b/pushbullet/filetype.py
index a2f2be0..22ffedf 100644
--- a/pushbullet/filetype.py
+++ b/pushbullet/filetype.py
@@ -1,13 +1,22 @@
def _magic_get_file_type(f, _):
file_type = magic.from_buffer(f.read(1024), mime=True)
f.seek(0)
- return file_type.decode('utf-8')
+ return maybe_decode(file_type)
def _guess_file_type(_, filename):
return mimetypes.guess_type(filename)[0]
+# return str on python3. Don't want to unconditionally
+# decode because that results in unicode on python2
+def maybe_decode(s):
+ if str == bytes:
+ return s.decode('utf-8')
+ else:
+ return s
+
+
try:
import magic
except ImportError:

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

Loading…
Cancel
Save