Sync with portage [Thu May 9 18:52:07 MSK 2019].

mhiretskiy 1416
root 5 years ago
parent 77dee64081
commit f3cf13eacf

Binary file not shown.

Binary file not shown.

@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Accessibility"
LICENSE="LGPL-2+"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="test"
RDEPEND="

@ -11,7 +11,7 @@ HOMEPAGE="https://wiki.gnome.org/Accessibility"
LICENSE="LGPL-2+"
SLOT="2"
IUSE="X gtk-doc +introspection"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
RDEPEND="
>=sys-apps/dbus-1.5[${MULTILIB_USEDEP}]

@ -13,7 +13,7 @@ HOMEPAGE="https://wiki.gnome.org/Projects/Orca"
LICENSE="LGPL-2.1+ CC-BY-SA-3.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="+braille"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

Binary file not shown.

@ -11,7 +11,7 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
LICENSE="BSD BSD-with-attribution"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="debug ipv6 freeipmi kerberos libressl pam ssl test tcpd"
DEPEND="debug? ( dev-libs/dmalloc:= )

@ -1 +1,2 @@
DIST KeePass-2.41-Source.zip 5141195 BLAKE2B 7f61efa6d73fbfd5de283567a1673f5757619ebb81f3daa3fba82c887874f2cdb15f74221bf389013fe4cf19c83f00f87de2c596d22a22f5f38b5236dab01e44 SHA512 0d9398f529e004df6a4d3e0b8e34a1324b1806bf44987e9cb2d7535eaf02192662e72c89f1e41b7da01d23b0d686fbbca7a956ef7873fd8b1948847fbf5d27a5
DIST KeePass-2.42.1-Source.zip 5163432 BLAKE2B c24a57da863c92d3f89663f33ed89c277e248c926067c14a6a7e3526e77c458e943e62c4b98a3d86595eea308d8744fd4a17da6d5456030a771e324a662abd9f SHA512 c87581afbaa516f637848db134a8d945db168bbbe97789a9a7424600d4188a21d2b1b3cf907a20577b2903ce8916b6b12355a3296ee1630a5b556c9170c4fa22

@ -0,0 +1,113 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit eutils gnome2-utils xdg-utils
MY_PN="KeePass"
DESCRIPTION="A free, open source, light-weight and easy-to-use password manager"
HOMEPAGE="https://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.36-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
# Switch into build dir so the mono prepration script works correctly
pushd Build || die
source PrepMonoDev.sh || die
popd || die
}
src_compile() {
export MONO_REGISTRY_PATH=/dev/null # bug 659808
# 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;\nStartupWMClass=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" || die
}
pkg_postinst() {
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
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() {
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
}

@ -9,7 +9,7 @@ SRC_URI="https://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}.tar.xz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="systemd"
COMMON_DEPEND="

@ -1,4 +1,4 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@ -6,7 +6,7 @@ EAPI=5
inherit eutils
DESCRIPTION="command-line tools and server to remotely administer multiple Unix filesystems"
HOMEPAGE="http://rsug.itd.umich.edu/software/radmind/"
HOMEPAGE="https://github.com/Radmind https://sourceforge.net/projects/radmind/"
SRC_URI="mirror://sourceforge/radmind/${P}.tar.gz"
LICENSE="HPND"

@ -3,8 +3,8 @@
EAPI=7
DESCRIPTION="command-line tools and server to remotely administer multiple Unix filesystems"
HOMEPAGE="http://rsug.itd.umich.edu/software/radmind/ https://github.com/voretaq7/radmind"
DESCRIPTION="Command-line tools and server to remotely administer multiple Unix filesystems"
HOMEPAGE="https://github.com/Radmind https://sourceforge.net/projects/radmind/"
SRC_URI="https://github.com/voretaq7/radmind/releases/download/${P}/${P}.tar.gz"
LICENSE="HPND"

Binary file not shown.

@ -1,13 +1,13 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
DISTUTILS_OPTIONAL="1"
DISTUTILS_IN_SOURCE_BUILD="1"
inherit cmake-multilib distutils-r1 eapi7-ver
inherit cmake-multilib distutils-r1
DESCRIPTION="Generic-purpose lossless compression algorithm"
HOMEPAGE="https://github.com/google/brotli"
@ -29,7 +29,7 @@ if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/google/${PN}.git"
inherit git-r3
else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ~ia64 ~mips ~ppc ~ppc64 sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
fi
@ -40,7 +40,6 @@ src_prepare() {
multilib_src_configure() {
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DBUILD_TESTING="$(usex test)"
)
cmake-utils_src_configure

@ -1,13 +1,13 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
DISTUTILS_OPTIONAL="1"
DISTUTILS_IN_SOURCE_BUILD="1"
inherit cmake-multilib distutils-r1 eapi7-ver
inherit cmake-multilib distutils-r1
DESCRIPTION="Generic-purpose lossless compression algorithm"
HOMEPAGE="https://github.com/google/brotli"
@ -40,7 +40,6 @@ src_prepare() {
multilib_src_configure() {
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DBUILD_TESTING="$(usex test)"
)
cmake-utils_src_configure

@ -11,7 +11,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/FileRoller"
LICENSE="GPL-2+ CC-BY-SA-3.0"
SLOT="0"
IUSE="libnotify nautilus packagekit"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
# gdk-pixbuf used extensively in the source
# cairo used in eggtreemultidnd.c

@ -11,7 +11,7 @@ HOMEPAGE="https://wiki.gnome.org/msitools"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="gtk-doc +introspection test vala"
REQUIRED_USE="vala? ( introspection )"

@ -14,7 +14,7 @@ SLOT="0"
IUSE="gtk +introspection vala"
REQUIRED_USE="vala? ( introspection )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
RDEPEND="
>=app-arch/libarchive-3.2.0

@ -1,2 +1,3 @@
DIST unshield-1.4.2.tar.gz 46051 BLAKE2B 76e8e724916f5c43c84b17db34f2c5905f99fe424679b9c9fef76e1892d0a2f90e6c195f1a02a8446473860578c34678e395f65cf5973019ed7be5d3dea14e84 SHA512 3ddd5df47198adade66acf89644efe3a1c87d60fcdf511f8e5c1fb29bbb07e77a9abc57a05b161ecb54a26a2a86242bbcba6e90df770b1325965ff5aa8eddf58
DIST unshield-1.4.3.tar.gz 58822 BLAKE2B 89e23462610d7ffd25358cb1d9f234b5c80a580deb60e85610ddacc8e3aa92420cb0e885e80375089e93786565824813f23c54f7c4d60b7773f23d174c98e5d7 SHA512 2f058e0a28d0497e2afe231ded1b1bb16745401398eb1035e628d263351b10a1343c9664f3937b8912755db9dc5236a1b43e9bcba596affb7aa8b036f49382aa
DIST unshield-1.4.tar.gz 37199 BLAKE2B 7f32cdbac3dca8e5e7dfca7e9ae7d12066b0484a8e75f611af173ec12dfd03dfd0ee7b79d05e3c7fb45a3285bbbfacf6020ad100907345a1501b3a8de81c81bc SHA512 b09c29fa8e5785f2ca90b40105304802d00d201dde42ef4f5e4b5504ca8edf10da426c7ed1daa8c0685980f085eb20437162812a2068a0c03c0dfd240edbf944

@ -0,0 +1,21 @@
From cf53f87fae324e1a4c5d9ebd49b88947a9b02267 Mon Sep 17 00:00:00 2001
From: Dan Church <amphetamachine@gmail.com>
Date: Fri, 2 Nov 2018 11:00:20 -0500
Subject: [PATCH] Fix man page install path
Use the standard CMake variable to determine location.
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0c20d3..0aeecb5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,5 +87,5 @@ endif ()
add_subdirectory(lib)
add_subdirectory(src)
-install(FILES man/unshield.1 DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man1)
+install(FILES man/unshield.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libunshield.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

@ -0,0 +1,30 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils
DESCRIPTION="InstallShield CAB file extractor"
HOMEPAGE="https://github.com/twogood/unshield"
SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
# OpenSSL (or LibreSSL) is detected at build time, and used to determine
# whether or not a hand-rolled md5 implementation is used. The build
# system prefers OpenSSL's implementation if it's available, and OpenSSL
# is common enough, so we prefer it too. Since the dependency is
# automagic (there's no way to hide it), we require Open/LibreSSL
# unconditionally.
IUSE="libressl"
DEPEND="
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
sys-libs/zlib"
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}/${P}-mandir.patch" )

Binary file not shown.

@ -1,3 +1,3 @@
DIST certbot-0.32.0.tar.gz 1284873 BLAKE2B c3fa538de87b67680a7bc7465d77ab2947606aec4def3717b5d942c83254ff758d751e137bfe33cb6f9362a11a9bad7fba0337927b638f3af7ddf304d408c447 SHA512 fa61e975d2ce09efa3570118f220cd9f9d2fc8d5ab408feb4c4e50bfa795cb28be6c7a78497fb10bc91e577e908126988197ae5d016be4823c5c4ddb68cbf5a4
DIST certbot-0.33.1.tar.gz 1304071 BLAKE2B 400c12ce254780fc0f336bbcff7917ba1ef4c6a0a708fb9607b79f8e966720a77adea9e56dc110c9424978d18eff15bd372141a0fc79edfb9f8fcc41f5f09f2b SHA512 055030e1ab1d3eb57b980c44732c8ec623d99de2d797a2b825bd2b816fce5b4c4d63d09178eb0a79fb83d991d63f00a149cc043067a2ae42a0ddcaa4fd329979
DIST certbot-0.34.1.tar.gz 1347164 BLAKE2B e35ebd3a2f2650e101f018bed73f450bf8d3acf229a4bcb1c329b90cfc899135e6d0013ee2082d6563e88ad16e3ed349c696d9855ee07b453c6b260aa4dcb9eb SHA512 18888aeac2208578063a4b099ae2e6fc706596c6288fce2f50921dfc44e6ed3becce4a9e7d5540f32e4a398a65db2eb8c86b06d93e3f3953b2f4ca9b312b1057
DIST certbot-0.34.2.tar.gz 1347778 BLAKE2B 57195e3a7a3481c4c1fa184035b73b8b5e06a33f37b317d895381ec6c4b57852a475a3b76593b8fee9922f731512ed0d0423afa26b5c04138d24781df9da42f0 SHA512 63923b1d433f4c714318e848335e696e2412c574cc16f4fb1631caeebdce5a7f599985cf450e96dceb87a958c8f09a003e1d2f24eac1bdc183c7a5c43bb362de

@ -1,3 +1,3 @@
DIST certbot-0.32.0.tar.gz 1284873 BLAKE2B c3fa538de87b67680a7bc7465d77ab2947606aec4def3717b5d942c83254ff758d751e137bfe33cb6f9362a11a9bad7fba0337927b638f3af7ddf304d408c447 SHA512 fa61e975d2ce09efa3570118f220cd9f9d2fc8d5ab408feb4c4e50bfa795cb28be6c7a78497fb10bc91e577e908126988197ae5d016be4823c5c4ddb68cbf5a4
DIST certbot-0.33.1.tar.gz 1304071 BLAKE2B 400c12ce254780fc0f336bbcff7917ba1ef4c6a0a708fb9607b79f8e966720a77adea9e56dc110c9424978d18eff15bd372141a0fc79edfb9f8fcc41f5f09f2b SHA512 055030e1ab1d3eb57b980c44732c8ec623d99de2d797a2b825bd2b816fce5b4c4d63d09178eb0a79fb83d991d63f00a149cc043067a2ae42a0ddcaa4fd329979
DIST certbot-0.34.1.tar.gz 1347164 BLAKE2B e35ebd3a2f2650e101f018bed73f450bf8d3acf229a4bcb1c329b90cfc899135e6d0013ee2082d6563e88ad16e3ed349c696d9855ee07b453c6b260aa4dcb9eb SHA512 18888aeac2208578063a4b099ae2e6fc706596c6288fce2f50921dfc44e6ed3becce4a9e7d5540f32e4a398a65db2eb8c86b06d93e3f3953b2f4ca9b312b1057
DIST certbot-0.34.2.tar.gz 1347778 BLAKE2B 57195e3a7a3481c4c1fa184035b73b8b5e06a33f37b317d895381ec6c4b57852a475a3b76593b8fee9922f731512ed0d0423afa26b5c04138d24781df9da42f0 SHA512 63923b1d433f4c714318e848335e696e2412c574cc16f4fb1631caeebdce5a7f599985cf450e96dceb87a958c8f09a003e1d2f24eac1bdc183c7a5c43bb362de

@ -1,3 +1,3 @@
DIST certbot-0.32.0.tar.gz 1284873 BLAKE2B c3fa538de87b67680a7bc7465d77ab2947606aec4def3717b5d942c83254ff758d751e137bfe33cb6f9362a11a9bad7fba0337927b638f3af7ddf304d408c447 SHA512 fa61e975d2ce09efa3570118f220cd9f9d2fc8d5ab408feb4c4e50bfa795cb28be6c7a78497fb10bc91e577e908126988197ae5d016be4823c5c4ddb68cbf5a4
DIST certbot-0.33.1.tar.gz 1304071 BLAKE2B 400c12ce254780fc0f336bbcff7917ba1ef4c6a0a708fb9607b79f8e966720a77adea9e56dc110c9424978d18eff15bd372141a0fc79edfb9f8fcc41f5f09f2b SHA512 055030e1ab1d3eb57b980c44732c8ec623d99de2d797a2b825bd2b816fce5b4c4d63d09178eb0a79fb83d991d63f00a149cc043067a2ae42a0ddcaa4fd329979
DIST certbot-0.34.1.tar.gz 1347164 BLAKE2B e35ebd3a2f2650e101f018bed73f450bf8d3acf229a4bcb1c329b90cfc899135e6d0013ee2082d6563e88ad16e3ed349c696d9855ee07b453c6b260aa4dcb9eb SHA512 18888aeac2208578063a4b099ae2e6fc706596c6288fce2f50921dfc44e6ed3becce4a9e7d5540f32e4a398a65db2eb8c86b06d93e3f3953b2f4ca9b312b1057
DIST certbot-0.34.2.tar.gz 1347778 BLAKE2B 57195e3a7a3481c4c1fa184035b73b8b5e06a33f37b317d895381ec6c4b57852a475a3b76593b8fee9922f731512ed0d0423afa26b5c04138d24781df9da42f0 SHA512 63923b1d433f4c714318e848335e696e2412c574cc16f4fb1631caeebdce5a7f599985cf450e96dceb87a958c8f09a003e1d2f24eac1bdc183c7a5c43bb362de

@ -1,3 +1,3 @@
DIST certbot-0.32.0.tar.gz 1284873 BLAKE2B c3fa538de87b67680a7bc7465d77ab2947606aec4def3717b5d942c83254ff758d751e137bfe33cb6f9362a11a9bad7fba0337927b638f3af7ddf304d408c447 SHA512 fa61e975d2ce09efa3570118f220cd9f9d2fc8d5ab408feb4c4e50bfa795cb28be6c7a78497fb10bc91e577e908126988197ae5d016be4823c5c4ddb68cbf5a4
DIST certbot-0.33.1.tar.gz 1304071 BLAKE2B 400c12ce254780fc0f336bbcff7917ba1ef4c6a0a708fb9607b79f8e966720a77adea9e56dc110c9424978d18eff15bd372141a0fc79edfb9f8fcc41f5f09f2b SHA512 055030e1ab1d3eb57b980c44732c8ec623d99de2d797a2b825bd2b816fce5b4c4d63d09178eb0a79fb83d991d63f00a149cc043067a2ae42a0ddcaa4fd329979
DIST certbot-0.34.1.tar.gz 1347164 BLAKE2B e35ebd3a2f2650e101f018bed73f450bf8d3acf229a4bcb1c329b90cfc899135e6d0013ee2082d6563e88ad16e3ed349c696d9855ee07b453c6b260aa4dcb9eb SHA512 18888aeac2208578063a4b099ae2e6fc706596c6288fce2f50921dfc44e6ed3becce4a9e7d5540f32e4a398a65db2eb8c86b06d93e3f3953b2f4ca9b312b1057
DIST certbot-0.34.2.tar.gz 1347778 BLAKE2B 57195e3a7a3481c4c1fa184035b73b8b5e06a33f37b317d895381ec6c4b57852a475a3b76593b8fee9922f731512ed0d0423afa26b5c04138d24781df9da42f0 SHA512 63923b1d433f4c714318e848335e696e2412c574cc16f4fb1631caeebdce5a7f599985cf450e96dceb87a958c8f09a003e1d2f24eac1bdc183c7a5c43bb362de

@ -16,7 +16,7 @@ SLOT="0/1" # subslot = suffix of libgcr-3
IUSE="debug gtk +introspection +vala"
REQUIRED_USE="vala? ( introspection )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
COMMON_DEPEND="
>=app-crypt/p11-kit-0.19

@ -15,7 +15,7 @@ SRC_URI="https://www.openwall.com/john/j/${MY_P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
KEYWORDS="alpha ~amd64 ~arm hppa ~mips ~ppc ~ppc64 sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
CPU_FLAGS="cpu_flags_x86_mmx cpu_flags_x86_sse2 cpu_flags_x86_avx cpu_flags_x86_xop"
IUSE="custom-cflags openmp ${CPU_FLAGS}"

@ -18,7 +18,7 @@ IUSE="+crypt +introspection test +vala"
REQUIRED_USE="test? ( introspection )
vala? ( introspection )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
RDEPEND="
>=dev-libs/glib-2.44:2[${MULTILIB_USEDEP}]

@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Seahorse"
LICENSE="GPL-2+ FDL-1.1+"
SLOT="0"
IUSE="ldap zeroconf"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
RDEPEND="
>=dev-libs/glib-2.44:2

Binary file not shown.

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Dictionary"
LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+"
SLOT="0" # does not provide a public libgdict-1.0.so anymore
IUSE="ipv6"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
COMMON_DEPEND="
>=dev-libs/glib-2.42:2

Binary file not shown.

@ -13,7 +13,7 @@ DESCRIPTION="Official plugins for gedit"
HOMEPAGE="https://wiki.gnome.org/Apps/Gedit/ShippedPlugins"
LICENSE="GPL-2+"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 ~x86"
SLOT="0"
IUSE_plugins="charmap git terminal vala"

@ -18,7 +18,7 @@ SLOT="0"
IUSE="+introspection +python spell vala"
REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} )"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
# X libs are not needed for OSX (aqua)
COMMON_DEPEND="

@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/GNOME-LaTeX"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
KEYWORDS="amd64"
IUSE="+introspection +latexmk rubber"
COMMON_DEPEND="

Binary file not shown.

@ -1 +1,2 @@
DIST diskimage-builder-2.21.0.tar.gz 409367 BLAKE2B 25c8a819be8674eee38a97e822151527dd77d3f5e85016ebc1a7fa5bf907f64bdac47012eb748b69273b519580c6ea4ca845abd7800ddb4e3f60dd81da546a73 SHA512 51a871a772fd4ae35d0a8ea51f7c01502c374805f5de5ab37c2f18ea868a829c7085ecaa6a62690e8d6e85afe225cbab7ed86266eb5fc3e8741a8ff968cb35f9
DIST diskimage-builder-2.22.0.tar.gz 410939 BLAKE2B ff5b3ce0f128001091e4621170def71cb6ef46cc278aee5a877caba0a3df054ac5e7027640a70ffdd8b8329764774ef801b0c0ad427babaec09a7123552edb50 SHA512 e051b668a86a4b386c2ec079a8f28bb5ab54ee6dbd1f39d7889075efa6abd4dff7063be24b817e05057f85036202f6193438df1a112009a1b954eaa4bb1b6e44

@ -0,0 +1,42 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1
DESCRIPTION="Golden Disk Image builder."
HOMEPAGE="http://docs.openstack.org/developer/diskimage-builder/"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://opendev.org/openstack/diskimage-builder.git"
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
fi
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
CDEPEND=">=dev-python/pbr-2.0.0[${PYTHON_USEDEP}]
!~dev-python/pbr-2.1.0[${PYTHON_USEDEP}]"
DEPEND="${CDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="${CDEPEND}
>=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
!~dev-python/Babel-2.4.0[${PYTHON_USEDEP}]
>=dev-python/networkx-1.10[${PYTHON_USEDEP}]
<dev-python/networkx-2.3[${PYTHON_USEDEP}]
>=dev-python/pyyaml-3.12[${PYTHON_USEDEP}]
>=dev-python/flake8-2.5.4[${PYTHON_USEDEP}]
<dev-python/flake8-2.6.0[${PYTHON_USEDEP}]
>=dev-python/six-1.10.0[${PYTHON_USEDEP}]
>=dev-python/stevedore-1.20.0[${PYTHON_USEDEP}]
app-emulation/qemu
sys-block/parted
sys-fs/multipath-tools
sys-fs/dosfstools
sys-apps/gptfdisk
!dev-python/dib-utils[${PYTHON_USEDEP}]"

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>zlogene@gentoo.org</email>
<name>Mikle Kolyada</name>
</maintainer>
<pkgmetadata>
<!-- maintainer needed -->
<upstream>
<remote-id type="pypi">docker-compose</remote-id>
</upstream>

@ -0,0 +1,13 @@
https://bugs.gentoo.org/684948
--- fs-uae-launcher-2.8.3/fsui/qt/qt.py 2017-01-08 19:48:56.000000000 +0000
+++ fs-uae-launcher-2.8.3/fsui/qt/qt.py 2019-05-03 22:28:16.979041988 +0100
@@ -60,7 +60,7 @@
# fix_qt_for_maverick()
fsbc.desktop.set_open_url_in_browser_function(open_url_in_browser)
- qapplication = QtBaseApplication([])
+ qapplication = QtBaseApplication([''])
initialize_qt_style(qapplication)
return qapplication

@ -19,7 +19,7 @@ IUSE="lha"
RDEPEND="
app-emulation/fs-uae
dev-python/pyopengl[${PYTHON_USEDEP}]
dev-python/PyQt5[${PYTHON_USEDEP},gui]
dev-python/PyQt5[${PYTHON_USEDEP},declarative,gui,network,opengl,widgets]
dev-python/six[${PYTHON_USEDEP}]
lha? ( dev-python/python-lhafile[${PYTHON_USEDEP}] )
"
@ -30,6 +30,7 @@ DEPEND="
PATCHES=(
"${FILESDIR}"/${P}-German-ROMs.patch
"${FILESDIR}"/${P}-QApplication.patch
)
src_prepare() {

@ -48,34 +48,31 @@ BUILD_TARGETS="all"
BUILD_TARGET_ARCH="${ARCH}"
S="${WORKDIR}/${MY_P}"
VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
pkg_setup() {
export DISTCC_DISABLE=1 #674256
MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
linux-mod_pkg_setup
BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
}
src_unpack() {
unpack ${A}
# Create and unpack a tarball with the sources of the Linux guest
# kernel modules, to include all the needed files
"${S}"/src/VBox/Additions/linux/export_modules.sh \
"${WORKDIR}/vbox-kmod.tar.gz" &>/dev/null || die
unpack ./vbox-kmod.tar.gz
src_prepare() {
# Remove shipped binaries (kBuild,yasm), see bug #232775
cd "${S}" || die
rm -r kBuild/bin tools || die
}
src_prepare() {
# Provide kernel sources
pushd src/VBox/Additions &>/dev/null || die
ebegin "Extracting guest kernel module sources"
kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die
eend
popd &>/dev/null || die
# PaX fixes (see bug #298988)
pushd "${WORKDIR}" &>/dev/null || die
pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
popd &>/dev/null || die
@ -83,15 +80,6 @@ src_prepare() {
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
# stupid new header references...
local vboxheader mdir
for vboxheader in {product,revision,version}-generated.h ; do
for mdir in vbox{guest,sf} ; do
ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
"${WORKDIR}/${mdir}/${vboxheader}"
done
done
# Remove pointless GCC version check
sed -e '/^check_gcc$/d' -i configure || die

@ -262,9 +262,7 @@ src_compile() {
}
src_install() {
local binpath="release"
use debug && binpath="debug"
cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
@ -489,7 +487,7 @@ pkg_postinst() {
elog ""
elog "WARNING!"
elog "Without USE=udev, USB devices will likely not work in ${PN}."
elif [ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
elif [[ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ]] ; then
elog ""
elog "Please remove \"${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules\""
elog "or else USB in ${PN} won't work."

Binary file not shown.

@ -13,7 +13,7 @@ SRC_URI="https://salsa.debian.org/manpages-de-team/manpages-de/-/archive/v${PV}/
LICENSE="GPL-3+ man-pages GPL-2+ GPL-2 BSD"
SLOT="0"
KEYWORDS="alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86"
IUSE=""
RDEPEND="virtual/man"

@ -10,7 +10,7 @@ SRC_URI="http://www.unicode.org/Public/zipped/${PV}/UCD.zip -> ${P}-UCD.zip
LICENSE="unicode"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE=""
DEPEND="app-arch/unzip"

Binary file not shown.

@ -30,7 +30,6 @@ src_prepare() {
rmdir logs || die
if use x-pack; then
rm bin/x-pack/*.bat || die
rm -r modules/x-pack-ml/platform/{darwin,windows}-x86_64 || die
fi
}

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@ -12,7 +12,7 @@ SRC_URI="https://gitlab.freedesktop.org/geoclue/${PN}/-/archive/${PV}/${P}.tar.b
LICENSE="LGPL-2"
SLOT="2.0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
IUSE="+introspection modemmanager zeroconf"
RDEPEND="

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -11,7 +11,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Gnote"
LICENSE="GPL-3+ FDL-1.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 ~x86"
IUSE="debug"
# Automagic:

@ -1 +1,2 @@
DIST recoll-1.24.1.tar.gz 2644672 BLAKE2B e5bce2231e075fe9a2bfad7d0d1068906e625106b09247dc5baffaf92957db111dd6be90c658266b8b9940d885b3495769c68ce66247d00568df24c1b5222226 SHA512 60bf57d2718a21dbd578fa1dc73a542fc7ab2152c4c5bb763885b19c14d080340587cb8c01f82f1ca7d1cb63a03edf03b4501f3ef63f06ab6506356c4a0a095c
DIST recoll-1.25.15.tar.gz 2843434 BLAKE2B 7facf6040560ab11b7a3d99b583020bdd4757157236a23430381c9d6932de558917f5dd1faf0f1ca87be3386307b5346ec66bb82637edd42035fd7be61ee9b39 SHA512 acd5349e1a1edd6ca22f819b0cfe76161fedb0bde8b4a86e679e78d68d090481a11a8d1980764d008074846b5033481c766e624da1322ab318b52c9c9c57104c

@ -18,8 +18,10 @@
</upstream>
<use>
<flag name="camelcase">Enable indexing for camelCase sentences and words</flag>
<flag name="chm">Enable CHM file support via <pkg>dev-python/pychm</pkg></flag>
<flag name="inotify">Use the Linux Kernel notification subsystem for monitoring file alterations in realtime</flag>
<flag name="session">Stop monitoring file alterations when X11 session terminates</flag>
<flag name="webengine">Use <pkg>dev-qt/qtwebengine</pkg> for fancy result list display</flag>
</use>
<longdescription lang="en">
Recoll is a desktop full-text search tool. It can search most document

@ -0,0 +1,134 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{5,6,7} )
inherit eutils linux-info python-single-r1 qmake-utils
DESCRIPTION="A personal full text search package"
HOMEPAGE="https://www.lesbonscomptes.com/recoll/"
SRC_URI="https://www.lesbonscomptes.com/recoll/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="camelcase chm doc +inotify qt5 session +spell webengine"
REQUIRED_USE="
session? ( inotify )
webengine? ( qt5 )
${PYTHON_REQUIRED_USE}
"
DEPEND="
dev-libs/xapian:=
sys-libs/zlib:=
virtual/libiconv
chm? (
dev-libs/chmlib
dev-python/pychm
)
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtprintsupport:5
webengine? ( dev-qt/qtwebengine:5[widgets] )
)
session? (
inotify? (
x11-libs/libSM
x11-libs/libICE
x11-libs/libX11
)
)
spell? ( app-text/aspell )
${PYTHON_DEPS}
"
BDEPEND="
qt5? ( dev-qt/linguist-tools:5 )
"
RDEPEND="
${DEPEND}
app-arch/unzip
"
pkg_pretend() {
if has_version "<app-misc/recoll-1.20"; then
elog "Installing ${PV} over an 1.19 index is possible,"
elog "but there have been small changes in the way"
elog "compound words are indexed. So it is best to reset"
elog "the index. The best method to reset the index is to"
elog "quit all recoll programs and delete the index directory"
elog "rm -rf ~/.recoll/xapiandb, then start recoll or recollindex."
fi
}
pkg_setup() {
if use inotify; then
local CONFIG_CHECK="~INOTIFY_USER"
check_extra_config
fi
python-single-r1_pkg_setup
}
src_prepare() {
default
python_fix_shebang filters
}
src_configure() {
use qt5 && export QMAKE="$(qt5_get_bindir)/qmake"
local myeconfargs=(
$(use_enable camelcase)
$(use_enable chm python-chm)
$(use_enable session x11mon)
$(use_enable qt5 qtgui)
$(use_enable webengine)
$(use_with inotify)
$(use_with spell aspell)
--disable-webkit
--without-fam
--enable-recollq
)
econf "${myeconfargs[@]}"
}
src_install() {
emake STRIP="$(type -P true)" DESTDIR="${D}" install
# html docs should be placed in /usr/share/doc/${PN}/html
use doc && dodoc -r "${ED}"/usr/share/recoll/doc/.
rm -r "${ED}/usr/share/recoll/doc" || die
find "${D}" -name '*.la' -delete || die
}
pkg_postinst() {
elog "In order to extract the full functionality of "
elog "recoll, the following packages should be installed "
elog "to get the corresponding document support."
optfeature "XML based documents support" "dev-libs/libxslt[python] dev-libs/libxml2[python]"
optfeature "PDF files support" app-text/poppler
optfeature "PDF files with OCR support" app-text/tesseract
optfeature "MS Word files support" app-text/antiword
optfeature "Wordperfect files support" "app-text/libwpd[tools]"
optfeature "Lyx files support" app-office/lyx
optfeature "GNU Info files support" sys-apps/texinfo
optfeature "RAR archives support" dev-python/rarfile
optfeature "7zip archives support" dev-python/pylzma
optfeature "iCalendar files support" dev-python/icalendar
optfeature "Postscript files support" app-text/pstotext
optfeature "RTF files support" app-text/unrtf
optfeature "TeX files support" dev-text/detex
optfeature "DVI files support" virtual/tex-base
optfeature "DJVU files support" app-text/djvu
optfeature "tags in audio files support" media-libs/mutagen
optfeature "tags in image files support" media-libs/exiftool
optfeature "Midi karaoke files support" dev-python/chardet
}

Binary file not shown.

@ -14,7 +14,7 @@ SRC_URI="http://www.abisource.com/downloads/${PN}/${PV}/source/${P}.tar.gz
LICENSE="GPL-2"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~x86 ~amd64-linux ~x86-linux"
IUSE="calendar collab cups debug eds +goffice grammar +introspection latex map math ots +plugins readline redland spell wordperfect wmf thesaurus"
# You need 'plugins' enabled if want to enable the extra plugins

@ -1 +1,2 @@
DIST scribus-1.5.5_pre20190124.tar.gz 85713996 BLAKE2B c4bb181012c5b2d15076239cb06d5b2d88fb24ef67d5e258142a4acb7979a304d5fdbd9163a24aaa47a1c8f354b0b70af7115430173ade9a8e77c1cb489fc849 SHA512 e9bd63c37a4818a5dda151b7bb6b7fa9cf7918949bd5612009646335d630b4b4188c2346c7567a3dc5f857849a2d49967f825320720c12e38a6038c7a0d3c34a
DIST scribus-1.5.5_pre20190429.tar.gz 85838093 BLAKE2B 4ffdc6356b5a2c7372bf6395847f348e7c56276d39114fa5691b6c7f8345aa89a0efe221adbbf1d431d89208fae53ae211c5298d9406487d46ddf98dd69d8c1a SHA512 1aa76491560848dccbeb17f03ba4ac24d6045881f6f92f31b921cf1a91c051176b835d86e0c46046e73573bf60b330e07945c279c077a7619bf2ee9331ca9324

@ -0,0 +1,59 @@
From aeea6a2ed4cb15ce8c35bb83066ef03e4e04b29b Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Thu, 2 May 2019 00:08:12 +0200
Subject: [PATCH] Fix build with poppler-0.76
findPage(int num, int gen) -> findPage(const Ref ref)
https://gitlab.freedesktop.org/poppler/poppler/commit/244c7d6926463b079b1f96e34d9e4451d352942e
---
scribus/plugins/import/pdf/slaoutput.cpp | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
index fe9794a65..b25082de6 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -429,8 +429,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
{
if (dst->isPageRef())
{
- Ref dstr = dst->getPageRef();
- pagNum = pdfDoc->findPage(dstr.num, dstr.gen);
+ pagNum = pdfDoc->findPage(dst->getPageRef());
}
else
pagNum = dst->getPageNum();
@@ -451,8 +450,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
{
if (dstn->isPageRef())
{
- Ref dstr = dstn->getPageRef();
- pagNum = pdfDoc->findPage(dstr.num, dstr.gen);
+ pagNum = pdfDoc->findPage(dstn->getPageRef());
}
else
pagNum = dstn->getPageNum();
@@ -931,8 +929,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
{
if (dst->isPageRef())
{
- Ref dstr = dst->getPageRef();
- pagNum = pdfDoc->findPage(dstr.num, dstr.gen);
+ pagNum = pdfDoc->findPage(dst->getPageRef());
}
else
pagNum = dst->getPageNum();
@@ -955,8 +952,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
{
if (dstn->isPageRef())
{
- Ref dstr = dstn->getPageRef();
- pagNum = pdfDoc->findPage(dstr.num, dstr.gen);
+ pagNum = pdfDoc->findPage(dstn->getPageRef());
}
else
pagNum = dstn->getPageNum();
--
2.21.0

@ -0,0 +1,230 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="tk?"
CMAKE_MAKEFILE_GENERATOR=ninja
COMMIT=a6cf8dce47922ebe3fca131316236e3aa7ca2d9b
inherit cmake-utils desktop flag-o-matic python-single-r1 xdg
DESCRIPTION="Desktop publishing (DTP) and layout program"
HOMEPAGE="https://www.scribus.net/"
SRC_URI="https://github.com/${PN}project/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts templates tk"
#a=$((ls resources/translations/scribus.*ts | sed -e 's:\.: :g' | awk '{print $2}'; ls resources/loremipsum/*xml | sed -e 's:\.: :g' -e 's:loremipsum\/: :g'| awk '{print $2}'; ls resources/dicts/hyph*dic | sed -e 's:\.: :g' -e 's:hyph_: :g' | awk '{print $2}'; ls resources/dicts/README_*txt | sed -e 's:_hyph::g' -e 's:\.: :g' -e 's:README_: :g' | awk '{print $2}') | sort | uniq); echo $a
# Keep this sorted, otherwise eliminating of duplicates below won't work
IUSE_L10N=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de_1901 de_CH de_DE el en_AU en_GB en_US eo es es_ES et eu fa_IR fi fi_FI fr gl he he_IL hr hu hu_HU ia id id_ID is is_IS it ja kab kn_IN ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU_0 sa sk sk_SK sl sl_SI so sq sr sv sv_SE te th_TH tr uk uk_UA zh_CN zh_TW"
map_lang() {
local lang=${1/_/-}
case $1 in
# Retain the following, which have a specific subtag
de_*|en_*|pt_*|zh_*) ;;
# Consider all other xx_XX as duplicates of the generic xx tag
*_*) lang=${1%%_*} ;;
esac
echo ${lang}
}
prev_l=
for l in ${IUSE_L10N}; do
l=$(map_lang ${l})
[[ ${l} != "${prev_l}" ]] && IUSE+=" l10n_${l}"
prev_l=${l}
done
unset l prev_l
REQUIRED_USE="${PYTHON_REQUIRED_USE}
tk? ( scripts )"
# osg
# couple of third_party libs bundled
COMMON_DEPEND="${PYTHON_DEPS}
app-text/libmspub
app-text/libqxp
app-text/poppler:=
dev-libs/hyphen
>=dev-libs/icu-58.2:0=
dev-libs/librevenge
dev-libs/libxml2
dev-qt/qtcore:5
dev-qt/qtgui:5[-gles2]
dev-qt/qtnetwork:5
dev-qt/qtopengl:5
dev-qt/qtprintsupport:5
dev-qt/qtwidgets:5
dev-qt/qtxml:5
media-libs/fontconfig
media-libs/freetype:2
>=media-libs/harfbuzz-0.9.42:0=[icu]
media-libs/lcms:2
media-libs/libcdr
media-libs/libfreehand
media-libs/libpagemaker
media-libs/libpng:0=
media-libs/libvisio
media-libs/libzmf
media-libs/tiff:0
net-print/cups
sys-libs/zlib[minizip]
virtual/jpeg:0=
>=x11-libs/cairo-1.10.0[X,svg]
boost? ( >=dev-libs/boost-1.62:= )
hunspell? ( app-text/hunspell:= )
graphicsmagick? ( media-gfx/graphicsmagick:= )
osg? ( dev-games/openscenegraph:= )
pdf? ( app-text/podofo:0= )
scripts? ( dev-python/pillow[tk?,${PYTHON_USEDEP}] )
"
RDEPEND="${COMMON_DEPEND}
app-text/ghostscript-gpl
"
DEPEND="${COMMON_DEPEND}
dev-qt/linguist-tools:5
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-1.5.3-docdir.patch
"${FILESDIR}"/${PN}-1.5.3-fpic.patch
)
S="${WORKDIR}"/${PN}-${COMMIT}
src_prepare() {
rm -r codegen/cheetah || die
cat > cmake/modules/FindZLIB.cmake <<- EOF || die
find_package(PkgConfig)
pkg_check_modules(ZLIB minizip zlib)
SET( ZLIB_LIBRARY \${ZLIB_LIBRARIES} )
SET( ZLIB_INCLUDE_DIR \${ZLIB_INCLUDE_DIRS} )
MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
EOF
sed \
-e "/^\s*unzip\.[ch]/d" \
-e "/^\s*ioapi\.[ch]/d" \
-i scribus/CMakeLists.txt Scribus.pro || die
rm scribus/ioapi.[ch] || die
sed \
-e 's:\(${CMAKE_INSTALL_PREFIX}\):./\1:g' \
-i resources/templates/CMakeLists.txt || die
sed \
-e "/^add_subdirectory(ui\/qml)/s/^/#DONT/" \
-i scribus/CMakeLists.txt || die # nothing but a bogus Hello World test
has_version ">=app-text/poppler-0.76.0" && PATCHES+=( "${FILESDIR}"/${P}-poppler-0.76.patch )
cmake-utils_src_prepare
}
src_configure() {
# bug #550818
append-cppflags -DHAVE_MEMRCHR
local _lang lang langs
for _lang in ${IUSE_L10N}; do
lang=$(map_lang ${_lang})
if use l10n_${lang}; then
# From the CMakeLists.txt
# "#Bit of a hack, preprocess all the filenames to generate our language string, needed for -DWANT_GUI_LANG=en_GB;de_DE , etc"
langs+=";${_lang}"
else
# Don't install localized documentation
sed -e "/${_lang}/d" -i doc/CMakeLists.txt || die
safe_delete \
./resources/dicts/README_${_lang}.txt \
./resources/dicts/README_hyph_${_lang}.txt \
./resources/dicts/hyph_${_lang}.dic \
./resources/loremipsum/${_lang}.xml
fi
sed -e "/en_EN/d" -i doc/CMakeLists.txt || die
safe_delete \
./resources/dicts/README_en_EN.txt \
./resources/dicts/README_hyph_en_EN.txt \
./resources/dicts/hyph_en_EN.dic \
./resources/loremipsum/en_EN.xml
done
local mycmakeargs=(
-DHAVE_PYTHON=ON
-DPYTHON_INCLUDE_PATH="$(python_get_includedir)"
-DPYTHON_LIBRARY="$(python_get_library_path)"
-DWANT_DISTROBUILD=ON
-DDOCDIR="${EPREFIX%/}/usr/share/doc/${PF}/"
-DWANT_GUI_LANG="${langs#;};en"
-DWITH_PODOFO="$(usex pdf)"
-DWITH_BOOST="$(usex boost)"
-DWANT_GRAPHICSMAGICK="$(usex graphicsmagick)"
-DWANT_NOOSG="$(usex !osg)"
-DWANT_DEBUG="$(usex debug)"
-DWANT_HEADERINSTALL="$(usex !minimal)"
-DWANT_HUNSPELL="$(usex hunspell)"
-DWANT_NOEXAMPLES="$(usex !examples)"
-DWANT_NOTEMPLATES="$(usex !templates)"
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
local lang _lang
# en_EN can be deleted always
for _lang in ${IUSE_L10N}; do
lang=$(map_lang ${_lang})
if ! use l10n_${lang}; then
safe_delete "${ED%/}"/usr/share/man/${_lang}
fi
done
if ! use scripts; then
rm "${ED%/}"/usr/share/scribus/scripts/*.py || die
elif ! use tk; then
rm "${ED%/}"/usr/share/scribus/scripts/{FontSample,CalendarWizard}.py || die
fi
use scripts && \
python_fix_shebang "${ED%/}"/usr/share/scribus/scripts && \
python_optimize "${ED%/}"/usr/share/scribus/scripts
mv "${ED%/}"/usr/share/doc/${PF}/{en,html} || die
ln -sf html "${ED%/}"/usr/share/doc/${PF}/en || die
cat >> "${T}"/COPYING <<- EOF || die
${PN} is licensed under the "${LICENSE}".
Please visit https://www.gnu.org/licenses/gpl-2.0.html for the complete license text.
EOF
dodoc "${T}"/COPYING
docompress -x /usr/share/doc/${PF}/en /usr/share/doc/${PF}/{AUTHORS,TRANSLATION,LINKS,COPYING}
local size
for size in 16 32 128 256; do
newicon -s $size resources/iconsets/artwork/icon_${size}x${size}.png scribus.png
done
newicon -s 64 resources/iconsets/artwork/icon_32x32@2x.png scribus.png
doicon resources/iconsets/*/scribus.png
domenu scribus.desktop
}
safe_delete () {
local x
for x in ${@}; do
if [[ -d "${x}" ]]; then
ebegin "Deleting ${x} recursively"
rm -r "${x}" || die
eend $?
elif [[ -f "${x}" ]]; then
ebegin "Deleting ${x}"
rm "${x}" || die
eend $?
fi
done
}

Binary file not shown.

@ -14,7 +14,7 @@ LICENSE="GPL-2+ CC-BY-SA-3.0"
# subslot = evd3.(suffix of libevdocument3)-evv3.(suffix of libevview3)
SLOT="0/evd3.4-evv3.3"
IUSE="djvu dvi gstreamer gnome gnome-keyring +introspection nautilus nsplugin postscript spell t1lib tiff xps"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-solaris"
# atk used in libview
# bundles unarr

@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Gtranslator"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
KEYWORDS="amd64 ~ppc ~x86"
IUSE=""
RDEPEND="

@ -1 +1,2 @@
DIST kbibtex-0.8.2.tar.xz 4065904 BLAKE2B 5b862ef48dc3e0fb2895aa2ad0c1fa8e712c5f63d0a279b33f9d41fca0262bbde1bd00423657e2714dfbacb28657e067760192adfa033f70ac5771a7188ad4cb SHA512 f15e2d1969f79f354881ccb1e41c5d6f1628c4850b3bd177cba0b74b1aab9aa61935f65ef280d242d0ef2ac816ce45b8a2e8a4ff51720a2400ec52bd555f594e
DIST kbibtex-0.8.91.tar.xz 4183808 BLAKE2B 7cc37909f44fb8463dbdad5260cc0805aded4fa92bd05b0e6b613da79f94217e030f5484465a19acb19e67b1c488d196901ccf285120d84ffbce9ac44816378e SHA512 10ea1285b7e174c7e0c66c1961e5a3f490e9e1afb2b62b35d31af6759dfe9b785a40a36863e0fad119017981038556386085ef7c4bd90d8745b9259550b1424a

@ -0,0 +1,77 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
KDE_HANDBOOK="optional"
KDE_TEST="true"
inherit kde5
DESCRIPTION="BibTeX editor to edit bibliographies used with LaTeX"
HOMEPAGE="https://userbase.kde.org/KBibTeX"
if [[ ${KDE_BUILD_TYPE} != live ]]; then
SRC_URI="mirror://kde/unstable/KBibTeX/${P}.tar.xz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2"
IUSE="webengine zotero"
DEPEND="
$(add_frameworks_dep kcompletion)
$(add_frameworks_dep kconfig)
$(add_frameworks_dep kconfigwidgets)
$(add_frameworks_dep kcoreaddons)
$(add_frameworks_dep kcrash)
$(add_frameworks_dep ki18n)
$(add_frameworks_dep kiconthemes)
$(add_frameworks_dep kio)
$(add_frameworks_dep kitemviews)
$(add_frameworks_dep kjobwidgets)
$(add_frameworks_dep kparts)
$(add_frameworks_dep kservice)
$(add_frameworks_dep ktexteditor)
$(add_frameworks_dep ktextwidgets)
$(add_frameworks_dep kwallet)
$(add_frameworks_dep kwidgetsaddons)
$(add_frameworks_dep kxmlgui)
$(add_qt_dep qtconcurrent)
$(add_qt_dep qtdbus)
$(add_qt_dep qtgui)
$(add_qt_dep qtnetwork)
$(add_qt_dep qtwidgets)
$(add_qt_dep qtxml)
$(add_qt_dep qtxmlpatterns)
app-text/poppler[qt5]
dev-libs/icu:=
virtual/tex-base
webengine? ( $(add_qt_dep qtwebengine 'widgets') )
zotero? (
app-crypt/qca[qt5(+)]
dev-libs/qoauth:5
)
"
RDEPEND="${DEPEND}
!app-text/kbibtex:4
dev-tex/bibtex2html
"
S="${WORKDIR}/${P/_/-}"
src_configure() {
local mycmakeargs=(
-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKitWidgets=ON
$(cmake-utils_use_find_package webengine Qt5WebEngineWidgets)
$(cmake-utils_use_find_package zotero Qca-qt5)
)
kde5_src_configure
}
pkg_postinst() {
kde5_pkg_postinst
if ! has_version "kde-apps/okular:${SLOT}" ; then
elog "For PDF or PostScript document preview support, please install kde-apps/okular:${SLOT}"
fi
}

@ -1 +1 @@
DIST LanguageTool-3.5.zip 93540212 BLAKE2B 166be74df8424692d637d1f23f2044492741984feb8c863aa363aca07ca9903c1e5934e4026a4e8c7b135320053808f1735ae5800a3964e9d75381368a8c5b7b SHA512 ad49dd292ca6841e1ef439b2dbe55748f621333b418bd6a596534cd5b2cb7019170c98046c8e2c68c3d75a9e5d132cf329de6481eaaccb8f78aae2233bdb8e45
DIST LanguageTool-4.5.zip 189327638 BLAKE2B b0ba0a67ee3de4ef6e452e6c47d5c03800f4e93acdaee03da37dca1a626e808bef91a167a62bd1fd7e732c86010523193d197083179cd40aa22de67bbbe5c4d5 SHA512 66bf6c99425d66ca8bc03b609f07d85f3989dbe73d7a93e81b6dc21d751fe05dd439d4753b51282d359a08ecdd92a18d9deab53d7b3a144c605d4429b2949eef

@ -1,7 +1,7 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit java-pkg-2
MY_PN=LanguageTool
@ -23,8 +23,6 @@ CP_DEPEND="
dev-java/commons-logging:0
dev-java/guava:20
dev-java/hamcrest-core:1.3
dev-java/jackson:2
dev-java/jackson-databind:2
dev-java/jcommander:0
dev-java/jna:4
dev-java/slf4j-api:0
@ -40,7 +38,8 @@ S=${WORKDIR}/${MY_P}
src_prepare() {
default
rm -v libs/{commons,hamcrest,guava,jackson,jcommander,jna,junit,slf4j}*.jar || die
rm libs/commons-{cli,collections4,io,lang,logging}.jar || die
rm libs/{hamcrest-core,guava,jcommander,jna,junit,slf4j-api}.jar || die
# Loads of bundled stuff :(
#java-pkg-2_src_prepare

@ -10,7 +10,7 @@ HOMEPAGE="https://git.gnome.org/browse/libgepub"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 ~x86"
IUSE="+introspection"
RDEPEND="

@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Projects/libgxps"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="gtk-doc +introspection jpeg lcms tiff"
RDEPEND="

@ -0,0 +1,35 @@
From aa3fdae51c19ad2865f92882ec9007feeb7e477a Mon Sep 17 00:00:00 2001
From: Jakub Wilk <jwilk@jwilk.net>
Date: Mon, 1 Apr 2019 08:23:51 +0200
Subject: [PATCH] Put Ref in pdf namespace.
---
pdf-backend.hh | 1 +
pdf2djvu.cc | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/pdf-backend.hh b/pdf-backend.hh
index 43899c0..d7872c3 100644
--- a/pdf-backend.hh
+++ b/pdf-backend.hh
@@ -82,6 +82,7 @@ namespace pdf
typedef ::Catalog Catalog;
typedef ::GooString String;
typedef ::Goffset Offset;
+ typedef ::Ref Ref;
/* type definitions — annotations
* ==============================
diff --git a/pdf2djvu.cc b/pdf2djvu.cc
index 669eba5..d9e1532 100644
--- a/pdf2djvu.cc
+++ b/pdf2djvu.cc
@@ -86,7 +86,7 @@ static int get_page_for_goto_link(pdf::link::GoTo *goto_link, pdf::Catalog *cata
int page;
if (dest->isPageRef())
{
- Ref pageref = dest->getPageRef();
+ pdf::Ref pageref = dest->getPageRef();
page = catalog->findPage(pageref.num, pageref.gen);
}
else

@ -0,0 +1,69 @@
From 8b0348b3d5f33494d7e637411633fbea511a78d7 Mon Sep 17 00:00:00 2001
From: Jakub Wilk <jwilk@jwilk.net>
Date: Mon, 1 Apr 2019 08:49:02 +0200
Subject: [PATCH] Use Catalog::findPage(Ref) as alternative to
Catalog::findPage(int, int).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes:
pdf2djvu.cc: In function int get_page_for_goto_link(pdf::link::GoTo*, pdf::Catalog*):
pdf2djvu.cc:90:56: error: no matching function for call to Catalog::findPage(int&, int&)
---
pdf-backend.cc | 15 +++++++++++++++
pdf-backend.hh | 2 ++
pdf2djvu.cc | 2 +-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/pdf-backend.cc b/pdf-backend.cc
index f1d7662..a1b9b63 100644
--- a/pdf-backend.cc
+++ b/pdf-backend.cc
@@ -631,4 +631,19 @@ const char * pdf::get_c_string(const pdf::String *str)
}
#endif
+template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(0, 0))
+{
+ return catalog->findPage(pgref.num, pgref.gen);
+}
+
+template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(pgref))
+{
+ return catalog->findPage(pgref);
+}
+
+int pdf::find_page(pdf::Catalog *catalog, pdf::Ref pgref)
+{
+ return find_page_impl<pdf::Catalog>(catalog, pgref);
+}
+
// vim:ts=2 sts=2 sw=2 et
diff --git a/pdf-backend.hh b/pdf-backend.hh
index d7872c3..d88c956 100644
--- a/pdf-backend.hh
+++ b/pdf-backend.hh
@@ -436,6 +436,8 @@ namespace pdf
const char * get_c_string(const pdf::String *str);
+ int find_page(pdf::Catalog *catalog, pdf::Ref pgref);
+
}
#endif
diff --git a/pdf2djvu.cc b/pdf2djvu.cc
index d9e1532..21f2d50 100644
--- a/pdf2djvu.cc
+++ b/pdf2djvu.cc
@@ -87,7 +87,7 @@ static int get_page_for_goto_link(pdf::link::GoTo *goto_link, pdf::Catalog *cata
if (dest->isPageRef())
{
pdf::Ref pageref = dest->getPageRef();
- page = catalog->findPage(pageref.num, pageref.gen);
+ page = pdf::find_page(catalog, pageref);
}
else
page = dest->getPageNum();

@ -0,0 +1,38 @@
From 8325358a9769e8aa33693fc5ea2ac771dd82716f Mon Sep 17 00:00:00 2001
From: Jakub Wilk <jwilk@jwilk.net>
Date: Tue, 23 Apr 2019 08:23:46 +0200
Subject: [PATCH] pdf-backend: simplify find_page() implementation.
---
pdf-backend.cc | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/pdf-backend.cc b/pdf-backend.cc
index f6f5267..a94383e 100644
--- a/pdf-backend.cc
+++ b/pdf-backend.cc
@@ -631,19 +631,13 @@ const char * pdf::get_c_string(const pdf::String *str)
}
#endif
-template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(0, 0))
-{
- return catalog->findPage(pgref.num, pgref.gen);
-}
-
-template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(pgref))
-{
- return catalog->findPage(pgref);
-}
-
int pdf::find_page(pdf::Catalog *catalog, pdf::Ref pgref)
{
- return find_page_impl<pdf::Catalog>(catalog, pgref);
+#if POPPLER_VERSION >= 7600
+ return catalog->findPage(pgref);
+#else
+ return catalog->findPage(pgref.num, pgref.gen);
+#endif
}
// vim:ts=2 sts=2 sw=2 et

@ -39,6 +39,10 @@ DOCS=(
doc/{changelog,credits,djvudigital,README}
)
PATCHES=(
"${FILESDIR}"/${P}-poppler-0.76-{1,2}.patch
)
pkg_setup() {
use test && python-any-r1_pkg_setup
}

@ -1,4 +1,3 @@
DIST poppler-0.74.0.tar.xz 1514044 BLAKE2B af3821d5a5c68a3f2541cd9468fd7318ad0182cda66cea068dc42208fef6c2af78a401e50a6a5906cdc943de7339620937ddc6f69f0d8d1b15082aabc6cc3482 SHA512 4e48e2ffb559863ee693930db3b8594fd7e60e4b4ca3cdeb198faf90a6f4dbb5e102461492a12058221bc1218fe7e17c9085afb9e7956ae4bf26c11674315e66
DIST poppler-0.75.0.tar.xz 1523872 BLAKE2B 245f574e985570a1d0923e732da8694728506fc59382c9e4532159867e1b18ad9f03f6b995891796d72a6e401d2c86ac18403c9219bf533e36c8a07a1dc85d61 SHA512 6a1b76cc5095b7c5809eaa5072aeb4ea615744ff8ffce537f40a3f73a81fc12cc18d596876ceda1c78b5312ad20535f72366e69c861b620d108616f24a98e6b8
DIST poppler-0.76.0.tar.xz 1530264 BLAKE2B 6496b7e069c98b8ac0bdb9001abd96bf0d71129e436813f4c91832f732e9ae6e125dd1adf49c238cad095185ecdeb47f7efc70b39a03309964dc2bb8552bf4e6 SHA512 bff0dacfabcfb6d4843d3dbc526e45eca85c1e043734d4cd2adb11c025c432559a26d59427169e2172a89e1d7d2bd6cad773688d11410495c6dcda108cf5ca9c
DIST poppler-0.76.1.tar.xz 1531548 BLAKE2B edbd9c1be99aadf4f14608a1e0dc58a2fed351b10e18aa3c006f4e54cf0f2082deaded9c67a0181bb0f012bcbc550f1208e8a632df9cbe26261b735ca44cde60 SHA512 e4af2785948ecc89c105ab00269b0072b33feea25224e5beb158d515b1de789f979084bed2d4260c9659382cf437c25c0baf2444f5b4fbbba5c58afeb707b7ac

@ -1,127 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils flag-o-matic toolchain-funcs xdg-utils
if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.freedesktop.org/git/poppler/poppler.git"
SLOT="0/9999"
else
SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0/87" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
fi
DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
HOMEPAGE="https://poppler.freedesktop.org/"
LICENSE="GPL-2"
IUSE="cairo cjk curl cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils"
# No test data provided
RESTRICT="test"
BDEPEND="
dev-util/glib-utils
virtual/pkgconfig
"
DEPEND="
media-libs/fontconfig
media-libs/freetype
sys-libs/zlib
cairo? (
dev-libs/glib:2
x11-libs/cairo
introspection? ( dev-libs/gobject-introspection:= )
)
curl? ( net-misc/curl )
jpeg? ( virtual/jpeg:0 )
jpeg2k? ( >=media-libs/openjpeg-2.3.0-r1:2= )
lcms? ( media-libs/lcms:2 )
nss? ( >=dev-libs/nss-3.19:0 )
png? ( media-libs/libpng:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtxml:5
)
tiff? ( media-libs/tiff:0 )
"
RDEPEND="${DEPEND}
cjk? ( app-text/poppler-data )
"
DOCS=( AUTHORS NEWS README README-XPDF )
PATCHES=(
"${FILESDIR}/${PN}-0.60.1-qt5-dependencies.patch"
"${FILESDIR}/${PN}-0.28.1-fix-multilib-configuration.patch"
"${FILESDIR}/${PN}-0.71.0-respect-cflags.patch"
"${FILESDIR}/${PN}-0.61.0-respect-cflags.patch"
"${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch"
)
src_prepare() {
cmake-utils_src_prepare
# Clang doesn't grok this flag, the configure nicely tests that, but
# cmake just uses it, so remove it if we use clang
if [[ ${CC} == clang ]] ; then
sed -e 's/-fno-check-new//' -i cmake/modules/PopplerMacros.cmake || die
fi
if ! grep -Fq 'cmake_policy(SET CMP0002 OLD)' CMakeLists.txt ; then
sed -e '/^cmake_minimum_required/acmake_policy(SET CMP0002 OLD)' \
-i CMakeLists.txt || die
else
einfo "policy(SET CMP0002 OLD) - workaround can be removed"
fi
# we need to up the C++ version, bug #622526, #643278
append-cxxflags -std=c++11
}
src_configure() {
xdg_environment_reset
local mycmakeargs=(
-DBUILD_GTK_TESTS=OFF
-DBUILD_QT5_TESTS=OFF
-DBUILD_CPP_TESTS=OFF
-DENABLE_SPLASH=ON
-DENABLE_ZLIB=ON
-DENABLE_ZLIB_UNCOMPRESS=OFF
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON
-DSPLASH_CMYK=OFF
-DUSE_FIXEDPOINT=OFF
-DUSE_FLOAT=OFF
-DWITH_Cairo=$(usex cairo)
-DENABLE_LIBCURL=$(usex curl)
-DENABLE_CPP=$(usex cxx)
-DWITH_JPEG=$(usex jpeg)
-DENABLE_DCTDECODER=$(usex jpeg libjpeg none)
-DENABLE_LIBOPENJPEG=$(usex jpeg2k openjpeg2 none)
-DENABLE_CMS=$(usex lcms lcms2 none)
-DWITH_NSS3=$(usex nss)
-DWITH_PNG=$(usex png)
$(cmake-utils_use_find_package qt5 Qt5Core)
-DWITH_TIFF=$(usex tiff)
-DENABLE_UTILS=$(usex utils)
)
use cairo && mycmakeargs+=( -DWITH_GObjectIntrospection=$(usex introspection) )
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
# live version doesn't provide html documentation
if use cairo && use doc && [[ ${PV} != *9999* ]]; then
# For now install gtk-doc there
insinto /usr/share/gtk-doc/html/poppler
doins -r "${S}"/glib/reference/html/*
fi
}

@ -1,5 +1,6 @@
DIST texlive-20170524-source-freetype.patch.xz 625056 BLAKE2B 70bcd15da1edfe5422f6dc0e736bc842f93787d45a81f823c8ddc5a420eff65f176ccce20cb17ac1dbc3b4eef3081de7dfbe34eb390f1baaa925e17f3d55c6c1 SHA512 daa0ff9306b39e6d5058c53572fdc741adad17cec9a874785005aacd0e57b75ce59f21d0d12260f4178d47b7b0e6509e49c44e2ab524613fe962ac1199a9120b
DIST texlive-20170524-source.tar.xz 63483372 BLAKE2B 44669d1228f5be27e9d93672a4f4ead40f7f4c6cf386f2db6fef54d64f8b8a743a485fe1170904d8117b9745f71ec77db8434caa6cdd79359b1f3f387130a3b4 SHA512 18c18940992ab94ce22e22ccd4ad798253ea14ac2ab296a10ea5e9a8da9f33989f2e2641b42b564d1d5fb53bd371da3e68726b676d706b469016ad146cd19daa
DIST texlive-core-2017-poppler076.tar.xz 9232 BLAKE2B 945e4f8e6f3230b78dc43560c664fbe4989fb32759b41c0ef83d656b43b008030cebdbf668718c4f22831d01c3fe1466f686f7f6b76183d3d1bb5e760f17140d SHA512 63fb2b426921be5f6d310b31e7fea6fc0edc0900f4790445fcaface9c931ca6c3e8f98b81a3bccfd1c877750e854c9410a59ff9a124aa2826d7b4187d54ed8ab
DIST texlive-core-patches-70.tar.xz 13068 BLAKE2B 011cf51af10d28ac9df7c9b9d7aea2cac3e562d393dcf09d57b3c2832fe6816cf926458417577f7c9d9414639a291c09240444145bdbb3d132170f51a8a16980 SHA512 fd26b92a03cd0446007728d0c16a8c7301e254515b997e6a0bd9b325db162bf3f2a2e96be0cb185f042038205c4b4dacf1785a216c8326328682f1c42da9079e
DIST texlive-module-a2ping-2017.tar.xz 31136 BLAKE2B cc0d99992cb780711a2a423fa26135845fa1f2cbbac76485d64a0b3184e338e7a60cdcfeaca129e6251f72110b0069c32164f9c4904d7f7c9c2edc6306f50411 SHA512 4711f184222fd95498a6d3ee94db19209c7836e6b775303926766d97921f2e8324b0aa2252a958fb619dbeca50729d2be4851a2add5503e7e8f4e713fc993e41
DIST texlive-module-a2ping.doc-2017.tar.xz 17524 BLAKE2B dea1db9fb3650c56161190823e4015d3e6399be3612f7e54702264a5187e72c7be987abb2cf8465d82711c9894d604fa03d79dc770bbf93b3404f18a633fbfa0 SHA512 8cfcc3b2a5dc462895a2bbd82f3a21537ae5d3fe81217b0b664b2008d6d18259f18de10e6eb3e3ac2655f96067b0f9bc6e30f69d068d9335598eb0b075eb4cea

@ -1,118 +0,0 @@
Source: https://github.com/TeX-Live/texlive-source/commit/ea9e7b25c6566505fe6d994aa5263bd736593be1
Backport: dilfridge@gentoo.org
diff -ruN texlive-20170524-source.orig/texk/web2c/luatexdir/image/pdftoepdf.w texlive-20170524-source/texk/web2c/luatexdir/image/pdftoepdf.w
--- texlive-20170524-source.orig/texk/web2c/luatexdir/image/pdftoepdf.w 2018-05-20 22:11:35.787633516 +0200
+++ texlive-20170524-source/texk/web2c/luatexdir/image/pdftoepdf.w 2018-05-20 22:12:26.607265149 +0200
@@ -472,10 +472,10 @@
break;
*/
case objString:
- copyString(pdf, obj->getString());
+ copyString(pdf, (GooString *)obj->getString());
break;
case objName:
- copyName(pdf, obj->getName());
+ copyName(pdf, (char *)obj->getName());
break;
case objNull:
pdf_add_null(pdf);
diff -ruN texlive-20170524-source.orig/texk/web2c/luatexdir/lua/lepdflib.cc texlive-20170524-source/texk/web2c/luatexdir/lua/lepdflib.cc
--- texlive-20170524-source.orig/texk/web2c/luatexdir/lua/lepdflib.cc 2018-05-20 22:11:35.788633528 +0200
+++ texlive-20170524-source/texk/web2c/luatexdir/lua/lepdflib.cc 2018-05-20 22:12:26.608265161 +0200
@@ -521,7 +521,7 @@
uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
if (uin->pd != NULL && uin->pd->pc != uin->pc) \
pdfdoc_changed_error(L); \
- gs = ((in *) uin->d)->function(); \
+ gs = (GooString *)((in *) uin->d)->function(); \
if (gs != NULL) \
lua_pushlstring(L, gs->getCString(), gs->getLength()); \
else \
@@ -1656,7 +1656,7 @@
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
if (((Object *) uin->d)->isString()) {
- gs = ((Object *) uin->d)->getString();
+ gs = (GooString *)((Object *) uin->d)->getString();
lua_pushlstring(L, gs->getCString(), gs->getLength());
} else
lua_pushnil(L);
diff -ruN texlive-20170524-source.orig/texk/web2c/pdftexdir/pdftoepdf.cc texlive-20170524-source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-20170524-source.orig/texk/web2c/pdftexdir/pdftoepdf.cc 2018-05-20 22:11:35.788633528 +0200
+++ texlive-20170524-source/texk/web2c/pdftexdir/pdftoepdf.cc 2018-05-20 22:12:34.398361984 +0200
@@ -284,7 +284,7 @@
static void copyDictEntry(Object * obj, int i)
{
Object obj1;
- copyName(obj->dictGetKey(i));
+ copyName((char *)obj->dictGetKey(i));
pdf_puts(" ");
obj1 = obj->dictGetValNF(i);
copyObject(&obj1);
@@ -349,7 +349,7 @@
if (!procset.isName())
pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
procset.getTypeName());
- copyName(procset.getName());
+ copyName((char *)procset.getName());
pdf_puts(" ");
}
pdf_puts("]\n");
@@ -412,7 +412,7 @@
&& fontdescRef.isRef()
&& fontdesc.isDict()
&& embeddableFont(&fontdesc)
- && (fontmap = lookup_fontmap(basefont.getName())) != NULL) {
+ && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) {
// round /StemV value, since the PDF input is a float
// (see Font Descriptors in PDF reference), but we only store an
// integer, since we don't want to change the struct.
@@ -421,7 +421,7 @@
charset = fontdesc.dictLookup("CharSet");
if (!charset.isNull() &&
charset.isString() && is_subsetable(fontmap))
- epdf_mark_glyphs(fd, charset.getString()->getCString());
+ epdf_mark_glyphs(fd, (char *)charset.getString()->getCString());
else
embed_whole_font(fd);
addFontDesc(fontdescRef.getRef(), fd);
@@ -450,7 +450,7 @@
if (fontRef.isRef())
copyFont(obj->dictGetKey(i), &fontRef);
else if (fontRef.isDict()) { // some programs generate pdf with embedded font object
- copyName(obj->dictGetKey(i));
+ copyName((char *)obj->dictGetKey(i));
pdf_puts(" ");
copyObject(&fontRef);
}
@@ -559,7 +559,7 @@
} else if (obj->isNum()) {
pdf_printf("%s", convertNumToPDF(obj->getNum()));
} else if (obj->isString()) {
- s = obj->getString();
+ s = (GooString *)obj->getString();
p = s->getCString();
l = s->getLength();
if (strlen(p) == (unsigned int) l) {
@@ -583,7 +583,7 @@
pdf_puts(">");
}
} else if (obj->isName()) {
- copyName(obj->getName());
+ copyName((char *)obj->getName());
} else if (obj->isNull()) {
pdf_puts("null");
} else if (obj->isArray()) {
diff -ruN texlive-20170524-source.orig/texk/web2c/pdftexdir/pdftosrc.cc texlive-20170524-source/texk/web2c/pdftexdir/pdftosrc.cc
--- texlive-20170524-source.orig/texk/web2c/pdftexdir/pdftosrc.cc 2018-05-20 22:11:35.788633528 +0200
+++ texlive-20170524-source/texk/web2c/pdftexdir/pdftosrc.cc 2018-05-20 22:12:31.369324336 +0200
@@ -104,7 +104,7 @@
fprintf(stderr, "No SourceName found\n");
exit(1);
}
- outname = srcName.getString()->getCString();
+ outname = (char *)srcName.getString()->getCString();
// We cannot free srcName, as objname shares its string.
// srcName.free();
} else if (objnum > 0) {

@ -1,216 +0,0 @@
From 29f2412e10523158f5e601f32482d3d233a934fc Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Sat, 12 Jan 2019 21:42:09 +0100
Subject: [PATCH 1/2] Fix build with poppler-0.69.0
---
texk/web2c/luatexdir/image/epdf.h | 1 +
texk/web2c/luatexdir/image/pdftoepdf.w | 14 +++++++-------
texk/web2c/luatexdir/lua/lepdflib.cc | 18 +++++++++---------
texk/web2c/luatexdir/lua/lpdfscannerlib.cc | 1 +
texk/web2c/pdftexdir/pdftoepdf.cc | 7 ++++---
texk/web2c/pdftexdir/pdftosrc.cc | 5 +++--
6 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/texk/web2c/luatexdir/image/epdf.h b/texk/web2c/luatexdir/image/epdf.h
index 57bb2e39..ebc83bdb 100644
--- a/texk/web2c/luatexdir/image/epdf.h
+++ b/texk/web2c/luatexdir/image/epdf.h
@@ -39,6 +39,7 @@ extern "C" {
# include <goo/GooString.h>
# include <goo/gmem.h>
# include <goo/gfile.h>
+# include <goo/gdir.h>
# include <Object.h>
# include <Stream.h>
# include <Gfx.h>
diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w
index 3aebf009..0a23b201 100644
--- a/texk/web2c/luatexdir/image/pdftoepdf.w
+++ b/texk/web2c/luatexdir/image/pdftoepdf.w
@@ -31,7 +31,7 @@
extern void md5(Guchar *msg, int msgLen, Guchar *digest);
-static GBool isInit = gFalse;
+static bool isInit = false;
/* Maintain AVL tree of all PDF files for embedding */
@@ -468,7 +468,7 @@ static void copyObject(PDF pdf, PdfDocument * pdf_doc, Object * obj)
break;
/*
case objNum:
- GBool isNum() { return type == objInt || type == objReal; }
+ bool isNum() { return type == objInt || type == objReal; }
break;
*/
case objString:
@@ -587,11 +587,11 @@ void read_pdf_info(image_dict * idict)
PDFRectangle *pagebox;
int pdf_major_version_found, pdf_minor_version_found;
float xsize, ysize, xorig, yorig;
- if (isInit == gFalse) {
+ if (isInit == false) {
if (!(globalParams))
globalParams = new GlobalParams();
- globalParams->setErrQuiet(gFalse);
- isInit = gTrue;
+ globalParams->setErrQuiet(false);
+ isInit = true;
}
if (img_type(idict) == IMG_TYPE_PDF)
pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL);
@@ -960,7 +960,7 @@ void epdf_free()
if (PdfDocumentTree != NULL)
avl_destroy(PdfDocumentTree, destroyPdfDocument);
PdfDocumentTree = NULL;
- if (isInit == gTrue)
+ if (isInit == true)
delete globalParams;
- isInit = gFalse;
+ isInit = false;
}
diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc
index 14558510..d47ec941 100644
--- a/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -1374,9 +1374,9 @@ static int m_Object_initBool(lua_State * L)
pdfdoc_changed_error(L);
luaL_checktype(L, 2, LUA_TBOOLEAN);
if (lua_toboolean(L, 2) != 0)
- *((Object *) uin->d) = Object(gTrue);
+ *((Object *) uin->d) = Object(true);
else
- *((Object *) uin->d) = Object(gFalse);
+ *((Object *) uin->d) = Object(false);
return 0;
}
@@ -2881,12 +2881,12 @@ m_poppler_get_BOOL(Attribute, isHidden);
static int m_Attribute_setHidden(lua_State * L)
{
- GBool i;
+ bool i;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_Attribute);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- i = (GBool) lua_toboolean(L, 2);
+ i = (bool) lua_toboolean(L, 2);
((Attribute *) uin->d)->setHidden(i);
return 0;
}
@@ -3023,7 +3023,7 @@ static int m_StructElement_getParentRef(lua_State * L)
// Ref is false if the C++ functione return false
static int m_StructElement_getPageRef(lua_State * L)
{
- GBool b;
+ bool b;
Ref *r;
udstruct *uin, *uout;
uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
@@ -3069,13 +3069,13 @@ static int m_StructElement_setRevision(lua_State * L)
static int m_StructElement_getText(lua_State * L)
{
- GBool i;
+ bool i;
GooString *gs;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- i = (GBool) lua_toboolean(L, 2);
+ i = (bool) lua_toboolean(L, 2);
gs = ((StructElement *) uin->d)->getText(i);
if (gs != NULL)
lua_pushlstring(L, gs->getCString(), gs->getLength());
@@ -3164,7 +3164,7 @@ static int m_StructElement_findAttribute(lua_State * L)
{
Attribute::Type t;
Attribute::Owner o;
- GBool g;
+ bool g;
udstruct *uin, *uout;
const Attribute *a;
uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
@@ -3172,7 +3172,7 @@ static int m_StructElement_findAttribute(lua_State * L)
pdfdoc_changed_error(L);
t = (Attribute::Type) luaL_checkint(L,1);
o = (Attribute::Owner) luaL_checkint(L,2);
- g = (GBool) lua_toboolean(L, 3);
+ g = (bool) lua_toboolean(L, 3);
a = ((StructElement *) uin->d)->findAttribute(t,g,o);
if (a!=NULL){
diff --git a/texk/web2c/luatexdir/lua/lpdfscannerlib.cc b/texk/web2c/luatexdir/lua/lpdfscannerlib.cc
index eb881b63..a2d39b83 100644
--- a/texk/web2c/luatexdir/lua/lpdfscannerlib.cc
+++ b/texk/web2c/luatexdir/lua/lpdfscannerlib.cc
@@ -34,6 +34,7 @@ extern "C" {
# include <goo/GooString.h>
# include <goo/gmem.h>
# include <goo/gfile.h>
+# include <goo/gdir.h>
# include <Object.h>
# include <Stream.h>
# include <Gfx.h>
diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc
index 0ffc3e19..af12c74e 100644
--- a/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -37,6 +37,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <goo/GooString.h>
#include <goo/gmem.h>
#include <goo/gfile.h>
+#include <goo/gdir.h>
#define GString GooString
#else
#include <aconf.h>
@@ -114,7 +115,7 @@ struct UsedEncoding {
static InObj *inObjList;
static UsedEncoding *encodingList;
-static GBool isInit = gFalse;
+static bool isInit = false;
// --------------------------------------------------------------------
// Maintain list of open embedded PDF files
@@ -718,8 +719,8 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
// initialize
if (!isInit) {
globalParams = new GlobalParams();
- globalParams->setErrQuiet(gFalse);
- isInit = gTrue;
+ globalParams->setErrQuiet(false);
+ isInit = true;
}
// open PDF file
pdf_doc = find_add_document(image_name);
diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc
index ead9f209..22ab6bdc 100644
--- a/texk/web2c/pdftexdir/pdftosrc.cc
+++ b/texk/web2c/pdftexdir/pdftosrc.cc
@@ -31,6 +31,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <goo/GooString.h>
#include <goo/gmem.h>
#include <goo/gfile.h>
+#include <goo/gdir.h>
#else
#include <aconf.h>
#include <GString.h>
@@ -167,8 +168,8 @@ int main(int argc, char *argv[])
// parse the header: object numbers and offsets
objStr.streamReset();
- str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first);
- parser = new Parser(xref, new Lexer(xref, str), gFalse);
+ str = new EmbedStream(objStr.getStream(), Object(objNull), true, first);
+ parser = new Parser(xref, new Lexer(xref, str), false);
for (n = 0; n < nObjects; ++n) {
obj1 = parser->getObj();
obj2 = parser->getObj();
--
2.20.1

@ -1,281 +0,0 @@
From 2f77decfd2340c9a241dc508ae984a93dfef2643 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Sat, 12 Jan 2019 21:43:29 +0100
Subject: [PATCH 2/2] Fix build with poppler-0.71.0
Thanks-to: maurerpe <junk4me46806@yahoo.com>
---
texk/web2c/luatexdir/image/pdftoepdf.w | 10 +++++-----
texk/web2c/luatexdir/lua/lepdflib.cc | 18 +++++++++---------
texk/web2c/pdftexdir/pdftex-common.h | 2 +-
texk/web2c/pdftexdir/pdftoepdf.cc | 20 ++++++++++----------
texk/web2c/pdftexdir/writeenc.c | 2 +-
texk/web2c/xetexdir/pdfimage.cpp | 2 +-
6 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w
index 0a23b201..aa1d7f25 100644
--- a/texk/web2c/luatexdir/image/pdftoepdf.w
+++ b/texk/web2c/luatexdir/image/pdftoepdf.w
@@ -363,7 +363,7 @@ void copyReal(PDF pdf, double d)
static void copyString(PDF pdf, GooString * string)
{
- char *p;
+ const char *p;
unsigned char c;
size_t i, l;
p = string->getCString();
@@ -393,7 +393,7 @@ static void copyString(PDF pdf, GooString * string)
pdf->cave = true;
}
-static void copyName(PDF pdf, char *s)
+static void copyName(PDF pdf, const char *s)
{
pdf_out(pdf, '/');
for (; *s != 0; s++) {
@@ -527,7 +527,7 @@ static void writeRefs(PDF pdf, PdfDocument * pdf_doc)
/* get the pagebox coordinates according to the pagebox_spec */
-static PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
+static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
{
switch (pagebox_spec) {
case PDF_BOX_SPEC_MEDIA:
@@ -584,7 +584,7 @@ void read_pdf_info(image_dict * idict)
Catalog *catalog;
Page *page;
int rotate;
- PDFRectangle *pagebox;
+ const PDFRectangle *pagebox;
int pdf_major_version_found, pdf_minor_version_found;
float xsize, ysize, xorig, yorig;
if (isInit == false) {
@@ -721,7 +721,7 @@ void write_epdf(PDF pdf, image_dict * idict, int suppress_optional_info)
Ref *pageref;
Dict *pageDict;
Object obj1, contents, pageobj, pagesobj1, pagesobj2, *op1, *op2, *optmp;
- PDFRectangle *pagebox;
+ const PDFRectangle *pagebox;
int i, l;
double bbox[4];
/* char s[256]; */
diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc
index d47ec941..01f9415c 100644
--- a/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -238,7 +238,7 @@ static int l_new_Attribute(lua_State * L)
if (uobj->pd != NULL && uobj->pd->pc != uobj->pc)
pdfdoc_changed_error(L);
uout = new_Attribute_userdata(L);
- uout->d = new Attribute(n, nlen, (Object *)uobj->d);
+ uout->d = new Attribute(GooString(n, nlen), (Object *)uobj->d);
uout->atype = ALLOC_LEPDF;
uout->pc = uobj->pc;
uout->pd = uobj->pd;
@@ -443,7 +443,7 @@ static int m_##in##_##function(lua_State * L) \
uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
if (uin->pd != NULL && uin->pd->pc != uin->pc) \
pdfdoc_changed_error(L); \
- o = ((in *) uin->d)->function(); \
+ o = (out *) ((in *) uin->d)->function(); \
if (o != NULL) { \
uout = new_##out##_userdata(L); \
uout->d = o; \
@@ -972,12 +972,12 @@ m_poppler_get_INT(Dict, getLength);
static int m_Dict_add(lua_State * L)
{
- char *s;
+ const char *s;
udstruct *uin, *uobj;
uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- s = copyString(luaL_checkstring(L, 2));
+ s = luaL_checkstring(L, 2);
uobj = (udstruct *) luaL_checkudata(L, 3, M_Object);
((Dict *) uin->d)->add(s, std::move(*((Object *) uobj->d)));
return 0;
@@ -1894,7 +1894,7 @@ static int m_Object_dictAdd(lua_State * L)
pdfdoc_changed_error(L);
if (!((Object *) uin->d)->isDict())
luaL_error(L, "Object is not a Dict");
- ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) uobj->d)));
+ ((Object *) uin->d)->dictAdd(s, std::move(*((Object *) uobj->d)));
return 0;
}
@@ -2308,7 +2308,7 @@ m_PDFDoc_INT(getErrorCode);
static int m_PDFDoc_getFileName(lua_State * L)
{
- GooString *gs;
+ const GooString *gs;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
@@ -2396,7 +2396,7 @@ m_PDFDoc_INT(getNumPages);
static int m_PDFDoc_readMetadata(lua_State * L)
{
- GooString *gs;
+ const GooString *gs;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
@@ -2414,7 +2414,7 @@ static int m_PDFDoc_readMetadata(lua_State * L)
static int m_PDFDoc_getStructTreeRoot(lua_State * L)
{
- StructTreeRoot *obj;
+ const StructTreeRoot *obj;
udstruct *uin, *uout;
uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
@@ -2422,7 +2422,7 @@ static int m_PDFDoc_getStructTreeRoot(lua_State * L)
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
obj = ((PdfDocument *) uin->d)->doc->getStructTreeRoot();
uout = new_StructTreeRoot_userdata(L);
- uout->d = obj;
+ uout->d = (StructTreeRoot *) obj;
uout->pc = uin->pc;
uout->pd = uin->pd;
} else
diff --git a/texk/web2c/pdftexdir/pdftex-common.h b/texk/web2c/pdftexdir/pdftex-common.h
index 307ba64a..09741707 100644
--- a/texk/web2c/pdftexdir/pdftex-common.h
+++ b/texk/web2c/pdftexdir/pdftex-common.h
@@ -101,7 +101,7 @@ extern void tex_printf(const char *, ...);
extern void write_epdf(void);
/* writeenc.c */
-extern void epdf_write_enc(char **, int);
+extern void epdf_write_enc(const char **, int);
/* writeimg.c */
extern float epdf_width;
diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc
index af12c74e..e353b652 100644
--- a/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -270,7 +270,7 @@ static int getNewObjectNumber(Ref ref)
static void copyObject(Object *);
-static void copyName(char *s)
+static void copyName(const char *s)
{
pdf_puts("/");
for (; *s != 0; s++) {
@@ -305,7 +305,7 @@ static void copyDict(Object * obj)
static void copyFontDict(Object * obj, InObj * r)
{
int i, l;
- char *key;
+ const char *key;
if (!obj->isDict())
pdftex_fail("PDF inclusion: invalid dict type <%s>",
obj->getTypeName());
@@ -377,7 +377,7 @@ static bool embeddableFont(Object * fontdesc)
return false;
}
-static void copyFont(char *tag, Object * fontRef)
+static void copyFont(const char *tag, Object * fontRef)
{
Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
stemV;
@@ -462,7 +462,7 @@ static void copyFontResources(Object * obj)
pdf_puts(">>\n");
}
-static void copyOtherResources(Object * obj, char *key)
+static void copyOtherResources(Object * obj, const char *key)
{
// copies all other resources (write_epdf handles Fonts and ProcSets),
@@ -549,7 +549,7 @@ static void copyObject(Object * obj)
Object obj1;
int i, l, c;
Ref ref;
- char *p;
+ const char *p;
GString *s;
if (obj->isBool()) {
pdf_printf("%s", obj->getBool()? "true" : "false");
@@ -650,7 +650,7 @@ static void writeRefs()
static void writeEncodings()
{
UsedEncoding *r, *n;
- char *glyphNames[256], *s;
+ const char *glyphNames[256], *s;
int i;
for (r = encodingList; r != 0; r = r->next) {
for (i = 0; i < 256; i++) {
@@ -678,7 +678,7 @@ static void writeEncodings()
}
// get the pagebox according to the pagebox_spec
-static PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
+static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
{
if (pagebox_spec == pdfboxspecmedia)
return page->getMediaBox();
@@ -710,7 +710,7 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
{
PdfDocument *pdf_doc;
Page *page;
- PDFRectangle *pagebox;
+ const PDFRectangle *pagebox;
#ifdef POPPLER_VERSION
int pdf_major_version_found, pdf_minor_version_found;
#else
@@ -829,7 +829,7 @@ void write_epdf(void)
Object groupDict;
bool writeSepGroup = false;
Object info;
- char *key;
+ const char *key;
char s[256];
int i, l;
int rotate;
@@ -856,7 +856,7 @@ void write_epdf(void)
pageObj = xref->fetch(pageRef->num, pageRef->gen);
pageDict = pageObj.getDict();
rotate = page->getRotate();
- PDFRectangle *pagebox;
+ const PDFRectangle *pagebox;
// write the Page header
pdf_puts("/Type /XObject\n");
pdf_puts("/Subtype /Form\n");
diff --git a/texk/web2c/pdftexdir/writeenc.c b/texk/web2c/pdftexdir/writeenc.c
index bd55103f..08f44633 100644
--- a/texk/web2c/pdftexdir/writeenc.c
+++ b/texk/web2c/pdftexdir/writeenc.c
@@ -83,7 +83,7 @@ fe_entry *get_fe_entry(char *s)
/**********************************************************************/
-void epdf_write_enc(char **glyph_names, int fe_objnum)
+void epdf_write_enc(const char **glyph_names, int fe_objnum)
{
int i, i_old;
assert(glyph_names != NULL);
diff --git a/texk/web2c/xetexdir/pdfimage.cpp b/texk/web2c/xetexdir/pdfimage.cpp
index 85389136..ce46cae1 100644
--- a/texk/web2c/xetexdir/pdfimage.cpp
+++ b/texk/web2c/xetexdir/pdfimage.cpp
@@ -78,7 +78,7 @@ pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box)
Page* page = doc->getCatalog()->getPage(page_num);
- PDFRectangle* r;
+ const PDFRectangle* r;
switch (pdf_box) {
default:
case pdfbox_crop:
--
2.20.1

@ -1,157 +0,0 @@
From 19462cf1b5628d7251cde91031a0635e636d890a Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Sat, 12 Jan 2019 21:59:07 +0100
Subject: [PATCH] Fix build with poppler-0.72
---
texk/web2c/luatexdir/image/pdftoepdf.w | 2 +-
texk/web2c/luatexdir/lua/lepdflib.cc | 16 ++++++++--------
texk/web2c/pdftexdir/pdftoepdf.cc | 4 ++--
texk/web2c/pdftexdir/pdftosrc.cc | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w
index aa1d7f25..2f143068 100644
--- a/texk/web2c/luatexdir/image/pdftoepdf.w
+++ b/texk/web2c/luatexdir/image/pdftoepdf.w
@@ -366,7 +366,7 @@ static void copyString(PDF pdf, GooString * string)
const char *p;
unsigned char c;
size_t i, l;
- p = string->getCString();
+ p = string->c_str();
l = (size_t) string->getLength();
if (pdf->cave)
pdf_out(pdf, ' ');
diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc
index 01f9415c..6b24a39b 100644
--- a/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -523,7 +523,7 @@ static int m_##in##_##function(lua_State * L) \
pdfdoc_changed_error(L); \
gs = (GooString *)((in *) uin->d)->function(); \
if (gs != NULL) \
- lua_pushlstring(L, gs->getCString(), gs->getLength()); \
+ lua_pushlstring(L, gs->c_str(), gs->getLength()); \
else \
lua_pushnil(L); \
return 1; \
@@ -758,7 +758,7 @@ static int m_Array_getString(lua_State * L)
if (i > 0 && i <= len) {
gs = new GooString();
if (((Array *) uin->d)->getString(i - 1, gs))
- lua_pushlstring(L, gs->getCString(), gs->getLength());
+ lua_pushlstring(L, gs->c_str(), gs->getLength());
else
lua_pushnil(L);
delete gs;
@@ -910,7 +910,7 @@ static int m_Catalog_getJS(lua_State * L)
if (i > 0 && i <= len) {
gs = ((Catalog *) uin->d)->getJS(i - 1);
if (gs != NULL)
- lua_pushlstring(L, gs->getCString(), gs->getLength());
+ lua_pushlstring(L, gs->c_str(), gs->getLength());
else
lua_pushnil(L);
delete gs;
@@ -1225,7 +1225,7 @@ static int m_GooString__tostring(lua_State * L)
uin = (udstruct *) luaL_checkudata(L, 1, M_GooString);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- lua_pushlstring(L, ((GooString *) uin->d)->getCString(),
+ lua_pushlstring(L, ((GooString *) uin->d)->c_str(),
((GooString *) uin->d)->getLength());
return 1;
}
@@ -1657,7 +1657,7 @@ static int m_Object_getString(lua_State * L)
pdfdoc_changed_error(L);
if (((Object *) uin->d)->isString()) {
gs = (GooString *)((Object *) uin->d)->getString();
- lua_pushlstring(L, gs->getCString(), gs->getLength());
+ lua_pushlstring(L, gs->c_str(), gs->getLength());
} else
lua_pushnil(L);
return 1;
@@ -2315,7 +2315,7 @@ static int m_PDFDoc_getFileName(lua_State * L)
pdfdoc_changed_error(L);
gs = ((PdfDocument *) uin->d)->doc->getFileName();
if (gs != NULL)
- lua_pushlstring(L, gs->getCString(), gs->getLength());
+ lua_pushlstring(L, gs->c_str(), gs->getLength());
else
lua_pushnil(L);
return 1;
@@ -2404,7 +2404,7 @@ static int m_PDFDoc_readMetadata(lua_State * L)
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
gs = ((PdfDocument *) uin->d)->doc->readMetadata();
if (gs != NULL)
- lua_pushlstring(L, gs->getCString(), gs->getLength());
+ lua_pushlstring(L, gs->c_str(), gs->getLength());
else
lua_pushnil(L);
} else
@@ -3078,7 +3078,7 @@ static int m_StructElement_getText(lua_State * L)
i = (bool) lua_toboolean(L, 2);
gs = ((StructElement *) uin->d)->getText(i);
if (gs != NULL)
- lua_pushlstring(L, gs->getCString(), gs->getLength());
+ lua_pushlstring(L, gs->c_str(), gs->getLength());
else
lua_pushnil(L);
return 1;
diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc
index e353b652..84e9f7ce 100644
--- a/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -422,7 +422,7 @@ static void copyFont(const char *tag, Object * fontRef)
charset = fontdesc.dictLookup("CharSet");
if (!charset.isNull() &&
charset.isString() && is_subsetable(fontmap))
- epdf_mark_glyphs(fd, (char *)charset.getString()->getCString());
+ epdf_mark_glyphs(fd, (char *)charset.getString()->c_str());
else
embed_whole_font(fd);
addFontDesc(fontdescRef.getRef(), fd);
@@ -561,7 +561,7 @@ static void copyObject(Object * obj)
pdf_printf("%s", convertNumToPDF(obj->getNum()));
} else if (obj->isString()) {
s = (GooString *)obj->getString();
- p = s->getCString();
+ p = s->c_str();
l = s->getLength();
if (strlen(p) == (unsigned int) l) {
pdf_puts("(");
diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc
index 22ab6bdc..bad1b78f 100644
--- a/texk/web2c/pdftexdir/pdftosrc.cc
+++ b/texk/web2c/pdftexdir/pdftosrc.cc
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "No SourceName found\n");
exit(1);
}
- outname = (char *)srcName.getString()->getCString();
+ outname = (char *)srcName.getString()->c_str();
// We cannot free srcName, as objname shares its string.
// srcName.free();
} else if (objnum > 0) {
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Not a Stream object\n");
exit(1);
}
- sprintf(buf, "%s", fileName->getCString());
+ sprintf(buf, "%s", fileName->c_str());
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
if (objgen == 0)
@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
outname = buf;
} else { // objnum < 0 means we are extracting the XRef table
extract_xref_table = true;
- sprintf(buf, "%s", fileName->getCString());
+ sprintf(buf, "%s", fileName->c_str());
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
sprintf(p, ".xref");
--
2.20.1

@ -1,74 +0,0 @@
From b3df00dcf7332ae9b64f019278af8708c1ced284 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Wed, 16 Jan 2019 21:10:09 +0100
Subject: [PATCH] Fix build with poppler-0.73
---
texk/web2c/luatexdir/image/pdftoepdf.w | 2 +-
texk/web2c/luatexdir/lua/lepdflib.cc | 8 ++++----
texk/web2c/pdftexdir/pdftosrc.cc | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w
index 2f143068..10ed9879 100644
--- a/texk/web2c/luatexdir/image/pdftoepdf.w
+++ b/texk/web2c/luatexdir/image/pdftoepdf.w
@@ -29,7 +29,7 @@
the functions of poppler, which happens to be written in C++.
*/
-extern void md5(Guchar *msg, int msgLen, Guchar *digest);
+extern void md5(unsigned char *msg, int msgLen, unsigned char *digest);
static bool isInit = false;
diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc
index 6b24a39b..87078fc5 100644
--- a/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -2867,12 +2867,12 @@ m_poppler_get_GUINT(Attribute,getRevision);
static int m_Attribute_setRevision(lua_State * L)
{
- Guint i;
+ unsigned int i;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_Attribute);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- i = (Guint) luaL_checkint(L, 2);
+ i = (unsigned int) luaL_checkint(L, 2);
((Attribute *) uin->d)->setRevision(i);
return 0;
}
@@ -3057,12 +3057,12 @@ static int m_StructElement_getTypeName(lua_State * L)
static int m_StructElement_setRevision(lua_State * L)
{
- Guint i;
+ unsigned int i;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- i = (Guint) luaL_checkint(L, 2);
+ i = (unsigned int) luaL_checkint(L, 2);
((StructElement *) uin->d)->setRevision(i);
return 0;
}
diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc
index bad1b78f..295c4e66 100644
--- a/texk/web2c/pdftexdir/pdftosrc.cc
+++ b/texk/web2c/pdftexdir/pdftosrc.cc
@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
Object objStr, obj1, obj2;
int nObjects, first, n;
int localOffset = 0;
- Guint firstOffset;
+ unsigned int firstOffset;
objStr = xref->fetch(e->offset, 0);
assert(objStr.isStream());
--
2.20.1

@ -19,8 +19,10 @@ LICENSE="GPL-2 LPPL-1.3c TeX"
SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
# Fetch patches
POPPLERPATCHES="${P}-poppler076"
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz
https://dev.gentoo.org/~dilfridge/distfiles/${PN%-core}-${TL_SOURCE_VERSION}-source-freetype.patch.xz
https://dev.gentoo.org/~asturm/distfiles/${POPPLERPATCHES}.tar.xz
"
# mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
@ -164,10 +166,15 @@ src_prepare() {
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
# bug ?
epatch "${FILESDIR}/${P}-poppler064.patch"
epatch "${WORKDIR}/${POPPLERPATCHES}/${P}-poppler064.patch"
if has_version ">=app-text/poppler-0.69.0"; then
epatch "${FILESDIR}"/${P}-poppler0{69,71,72,73}.patch # bugs #672854, 675448
epatch "${WORKDIR}"/${POPPLERPATCHES}/${P}-poppler0{69,71,72,73}.patch # bugs #672854, 675448
fi
if has_version ">=app-text/poppler-0.75.0"; then
epatch "${WORKDIR}"/${POPPLERPATCHES}/${P}-pdftexdir-poppler0{75,76}.patch # bugs #681338, 685284
epatch "${WORKDIR}"/${POPPLERPATCHES}/${P}-luatexdir-poppler0{75,76}.patch # bugs #681338, 685284
fi
sed -i \

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Yelp/Tools"
LICENSE="|| ( GPL-2+ freedist ) GPL-2+" # yelp.m4 is GPL2 || freely distributable
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="

Binary file not shown.

@ -1,2 +1 @@
DIST languagetool-1.29.tar.bz2 8059 BLAKE2B 0779ada2bfa80de9ca6e8237d5fc1891d2b99b06a438d16290cd2c6cc8c88a5202fe66f9754e98bc6519e6c24a2264e8bad7510dc43d53ae703c7e659c82c3bd SHA512 09b5bdc1d3590afe26578f687064a7a62493a11fafca903759dc1e9048cb22a04c6352127b13e4a63acb867d73d943b56fcae7f733350626f05b66a6d1f1626d
DIST languagetool-1.30.tar.bz2 8089 BLAKE2B 518036b68b80bbc083718a23c3aa07e9d118b8c6dc4f69cfa289566924ac2bd218b45ca53e850244676351b1566b580c6fac909376087d8274c289ab20727e49 SHA512 c04115752f8a601e85b718ea8d68cbdaa7628d14c252b4bb5bd11449ae2c5558ddee3d0f3a1bc2db84364e127fc211a0c4fe51e4ff9b442ebe99aa4f9d1db935

@ -1,17 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit vim-plugin
MY_PN=LanguageTool
DESCRIPTION="grammar checker for various languages"
HOMEPAGE="https://www.vim.org/scripts/script.php?script_id=3223"
LICENSE="vim"
KEYWORDS="~amd64 ~x86"
VIM_PLUGIN_HELPFILES="${MY_PN}"
RDEPEND="app-text/languagetool"
PATCHES=( "${FILESDIR}"/${P}-script.patch )

Binary file not shown.

@ -9,7 +9,7 @@ HOMEPAGE="https://www.gtkmm.org"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
IUSE="doc"
COMMON_DEPEND="

@ -9,7 +9,7 @@ HOMEPAGE="https://www.gtkmm.org"
LICENSE="LGPL-2.1+ GPL-2+" # GPL-2+ applies only to the build system
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE="doc debug test"
RDEPEND="

@ -9,7 +9,7 @@ HOMEPAGE="https://www.gtkmm.org"
LICENSE="LGPL-2.1+"
SLOT="3.0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
IUSE="aqua doc test wayland X"
REQUIRED_USE="|| ( aqua wayland X )"

Binary file not shown.

@ -1,11 +1,16 @@
DIST postgresql-10.6.tar.bz2 20350612 BLAKE2B b751085b8fce73efb2531378a553c8c956f5e05a0002de8fdc58c0f2a6cf2b9dfaff6bd621047a094a51e459bc8fc5b1658d6a754a396fa3b7aedc1024ea3b4c SHA512 5d4d5cee2a19ad1820c3411bc4851904e3059cdcacc837350694d54d7d59260b66c565c72cc14a3a10541a8fc49c5185f08f57b7a8c7e4c64ed2614da6e1201f
DIST postgresql-10.7.tar.bz2 18940030 BLAKE2B ce02d2c4ba97c1845b3708941bb7a9f6ee025fc4a881e35790279aadf5e35464d6716cfdeb4ad145ce4549e639ad01d333cff858f956607c0cd583af65f1cd3e SHA512 2fa8194e9ef540930eecc2a43907a77f7f185590046350d48fd625bdb1ab459095c4e2e0d2faac846935d7231ac672ace760633deeee365572768da619458ba9
DIST postgresql-10.8.tar.bz2 18958913 BLAKE2B d2e1664a53c5b2f24b412f497769ffd33e2f48977fa0f4503cb588497b61955a97497c87950ae60d498d75c7385fc63dd832b518174614f695d8882628a4ebb8 SHA512 c9cd0298f553e13e32d4315e17e9e61c1fd011391c5203282d9040f26fd08c85f749e6f2cea3bcc42d1ca153a1272bcd773196ef3bf2bdfb74cd12c5f523b7ca
DIST postgresql-11.1.tar.bz2 21263173 BLAKE2B d762b6e8b0e7b08b16ed252687118a0a4516172e38e8940879fd050f72d19ff045af949e72977a62c2ce0a788af7d42c9bde7748347566bec3694e337bba6f73 SHA512 35d00984e9f5f063a5b96e97aa1b40381ab76d07b2336bda5981fd80bef1324f56eefca5069ae78770ecd6ece5df85264e599fdb3478ecb71d4fdd0d7b6becca
DIST postgresql-11.2.tar.bz2 19714229 BLAKE2B 459674c08a0435363da29428bef7ec49a012b534b390ce6addafac000ce58ad0ad7ba4e1522f5279da29535399836971c61536827d481af766322935d7c6d01b SHA512 dae00a543fdeed36bc338abd4ccfd9fe9a8b6b2b7eaa00b1078e4f27802de75a461c27da2800bc9dd64e658681e5787bd03764bde79940656cae1e8c8716f011
DIST postgresql-11.3.tar.bz2 19718775 BLAKE2B f56686bff4e70c2b6333554a620a5c2d5c226654a1d61de43b4493c44a14e2bcd9c102dba420994878d328af52d933885e4948cd002f14b693aef1416697a0ea SHA512 03269bb88f44f3a81d5e3a8ca2fe59f63f784436840f08870b2e539755629cbde8ac288e0bb4472ee93294a88b37b814ddff48444254c1a3f7a10b4bb64f7133
DIST postgresql-9.3.25.tar.bz2 17067593 BLAKE2B fd9ca5685e5511dcaa72da882b674846dcd5a16227e5b33ae06701fe7881df71847666c37925033c6cb01c916111a8f76df134491645f4d1e1dd48a008bd2831 SHA512 319e12b73853b74f5ef2c520d64795bb586ffd495ceab6518f7844de6e0a054aea821976c470108d346f8090c7d3949920d9c435432e33004b7caa7a77a5cdca
DIST postgresql-9.4.20.tar.bz2 17905682 BLAKE2B cb65228f8e78dc8b6303a06480a68de58ecac1fefa1342e4563f2c4051c9f5506b366b36c2dbd54207d25ae497625f8fc5e3e771174a6b3ec33c3c19d2c9ea08 SHA512 664c6e97979f38d263d1dc75a7db442f193a230435cad43ddfa2afcd42ac0d73b2aef0e846fddcc9008cd6d89cba2d5c0a4db93b111665646d3ff4d8f6fbe1e8
DIST postgresql-9.4.21.tar.bz2 16871522 BLAKE2B e6b8957f52a95d5fa56bc39756f1de83459882e40eee07c3ddf9e33eab39a0d61ee492864a920e7714ca1914a772dcc9048bc34072349197597cfb116aa94422 SHA512 850d1f59369457d9a8a42de8f0e4811f60e9164d2e7d7605fdabc04cc5ba2e3794d51e155d709419d06b8e070f214f7d3ef2328c6d37f125264ea008ca18ff5a
DIST postgresql-9.4.22.tar.bz2 16848787 BLAKE2B 5c2aaef13ef0cf33c421e6839877a8e4e1fc5dbe41d9cabefddd369925869f92f6c6b8a124b5778f9b25359103f0a7ada1eddcaf4bac498709f563928f25e7e3 SHA512 f11623a89b2320616fd53eda52da544bdfcb63bff08cb78fccde134ef628eee7ee90b3de6952f4e08c10297d356624faabf0e5b181b0105f51797796cd04efef
DIST postgresql-9.5.15.tar.bz2 18707696 BLAKE2B f1be26085953d5a15a6545aed3527b9eec6eb57c72f2e05401e43200e628b3a42ee824dd1cb0138556b97fe4922a991489dffa77329b653475874766c1d5b944 SHA512 2ea241b6751a2812c689da9bde40151ebb7cdabdd14e93d92f8bea1e3fcf5bc0d4854834999f33270329e22a09c5aeaf8d59d36ca6e8860704f81f3adcfb30d5
DIST postgresql-9.5.16.tar.bz2 17506874 BLAKE2B ce5c804315ce5d7ac95af2455322801f581c3aa8e943ffae40b7e14a95a4610b71956568a418f2f22b8a9814ff9fd1f9296efc974716c0096aa22dcdb7609ff7 SHA512 4583c825ed00a5ba915863b41c39cd9580492444ff299e44c3856db55fb4f0607d184534fe8977d915fb0730e6d638d8560be11915ce21b9d1f6971e7a285c7c
DIST postgresql-9.5.17.tar.bz2 17563469 BLAKE2B d40b7f95d03db594144b4882f36bbe22f348faab0b8d67eda3f946448bb0e09188eccdeb4d1c92742fb29a920b30ede55e536a863b22d2009283eab66679122d SHA512 bb468528b1f18166cda0be136f31a632859ffe6e6800233b1cb0e91ce11d2d00d3dc108a74580b5552a4d30b9f1b6849c91576cd497beac788c429815c66eac5
DIST postgresql-9.6.11.tar.bz2 20009048 BLAKE2B aa3e5b1e63c983226ea71737982e62eaff655af7e0f55f20ec886f5d7406b1e30e2fe5378b0dd1ef59e777f862ccc2386121653853d4c186a1b4853a9bbb1591 SHA512 a4314f92d1a661af4076d8c120533ecae76d91461043b8a6ad22dd6e5b562e0bf019bc7f3157a26d9666ba5866e254613ae5b690310168b029795dc088f8c060
DIST postgresql-9.6.12.tar.bz2 18759442 BLAKE2B 067b307318f65616651ee4502f420a84df26e906350f07ce5ab4a769608075f0d017b6d84b0ce5045662ab379e236b66cf751f7950d026f011d0915efcdfab3e SHA512 3a7a96caf682461f1f9bffdbe2b72b1ce00cc6680145e00c139e4af8b9dc8b8679fda1626de65921d6e187fa9290efc930584b98f1fd2aba1ba3d790a741a415
DIST postgresql-9.6.13.tar.bz2 18767279 BLAKE2B c1ec780a7f938f878425cbd6556145e60a613135129daaacc52e9a699cc448a22481b01fac20d0c09373ea6a026f39bc58234aae4f1126333b94f621981a8135 SHA512 65cc70410ad4a1a738b92855b92eecdbb9efbbca0eb9a45a138d47b696c8f9c9cd19073fbfdf5c80eea7633d0be29b4ed8acbadd38724acf8f18c90bb30f9b26

@ -0,0 +1,460 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 python3_{5,6} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user versionator
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT=$(get_major_version)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
serverman=(
initdb
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
pg_{test_{fsync,timing},upgrade,waldump}
post{gres,master}
)
for m in ${serverman[@]} ; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
use static-libs || find "${ED}" -name '*.a' -delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.6-r1" | \
systemd_newunit - ${PN}-${SLOT}.service
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
if [[ -n ${REPLACING_VERSIONS} ]] ; then
ewarn "If your system is using 'pg_stat_statements' and you are running a"
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
ewarn "the following command after upgrading:"
ewarn
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
fi
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
if ! use systemd; then
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
fi
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
elif use systemd; then
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
einfo "instead of 'pg_ctl'."
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -0,0 +1,460 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 python3_{5,6} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user versionator
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(get_major_version)
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="http://www.postgresql.org/"
IUSE="doc kerberos kernel_linux ldap libressl llvm nls pam perl python +readline
selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
llvm? ( sys-devel/llvm:=
sys-devel/clang:= )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
if use pam ; then
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with llvm) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
serverman=(
initdb
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
pg_{test_{fsync,timing},upgrade,waldump}
post{gres,master}
)
for m in ${serverman[@]} ; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
use static-libs || find "${ED}" -name '*.a' -delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.6-r1" | \
systemd_newunit - ${PN}-${SLOT}.service
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
if [[ -n ${REPLACING_VERSIONS} ]] ; then
ewarn "If your system is using 'pg_stat_statements' and you are running a"
ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
ewarn "the following command after upgrading:"
ewarn
ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
fi
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
if ! use systemd; then
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
fi
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
elif use systemd; then
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
einfo "instead of 'pg_ctl'."
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -0,0 +1,475 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 python3_{5,6} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user versionator
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
python +readline selinux +server systemd ssl static-libs tcl threads uuid
xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !pg_legacytimestamp integer-datetimes) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
use static-libs || find "${ED}" -name '*.a' -delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}tmp"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
docinto sgml
dodoc doc/src/sgml/*.{sgml,dsl}
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.2" | \
systemd_newunit - ${PN}-${SLOT}.service
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_preinst() {
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
# /usr/bin/psql96). They may have been created by the
# postgresql.eselect module, but they're handled within this ebuild
# now. It's alright if we momentarily delete /usr/bin/psql as it
# will be recreated by the eselect module in pkg_ppostinst(). This
# is only necessary for 9.7 and earlier. 10 and later were never
# handled in this manner.
local canonicalise
if type -p realpath > /dev/null; then
canonicalise=realpath
elif type -p readlink > /dev/null; then
canonicalise='readlink -f'
else
# can't die, subshell
die "No readlink nor realpath found, cannot canonicalise"
fi
local l
# First remove any symlinks in /usr/bin that may have been created
# by the old eselect
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
rm "${l}" || ewarn "Couldn't remove ${l}"
fi
done
# Then move the symlinks created by the ebuild to their proper place.
for l in "${ED}"/usr/bin/*tmp ; do
mv "${l}" "${l%tmp}" \
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
done
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -0,0 +1,481 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 python3_{5,6} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user versionator
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
python +readline selinux +server systemd ssl static-libs tcl threads uuid
xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable !pg_legacytimestamp integer-datetimes) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
use static-libs || find "${ED}" -name '*.a' -delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}tmp"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
docinto sgml
dodoc doc/src/sgml/*.{sgml,dsl}
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.2" | \
systemd_newunit - ${PN}-${SLOT}.service
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_preinst() {
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
# /usr/bin/psql96). They may have been created by the
# postgresql.eselect module, but they're handled within this ebuild
# now. It's alright if we momentarily delete /usr/bin/psql as it
# will be recreated by the eselect module in pkg_ppostinst(). This
# is only necessary for 9.7 and earlier. 10 and later were never
# handled in this manner.
local canonicalise
if type -p realpath > /dev/null; then
canonicalise=realpath
elif type -p readlink > /dev/null; then
canonicalise='readlink -f'
else
# can't die, subshell
die "No readlink nor realpath found, cannot canonicalise"
fi
local l
# First remove any symlinks in /usr/bin that may have been created
# by the old eselect
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
rm "${l}" || ewarn "Couldn't remove ${l}"
fi
done
# Then move the symlinks created by the ebuild to their proper place.
for l in "${ED}"/usr/bin/*tmp ; do
mv "${l}" "${l%tmp}" \
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
done
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
if use alpha && use server ; then
ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
ewarn "As a result, performance will be extremely degraded."
fi
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

@ -0,0 +1,486 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python2_7 python3_{5,6} )
PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
zh_TW"
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user versionator
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="$(get_version_component_range 1-2)"
MY_PV=${PV/_/}
S="${WORKDIR}/${PN}-${MY_PV}"
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="https://www.postgresql.org/"
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
python +readline selinux +server systemd ssl static-libs tcl threads uuid
xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
sys-apps/less
virtual/libintl
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
libressl? ( dev-libs/libressl:= )
)
server? ( systemd? ( sys-apps/systemd ) )
tcl? ( >=dev-lang/tcl-8:0= )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
zlib? ( sys-libs/zlib )
"
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
# the libc includes UUID functions.
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
nest_usedep() {
local front back
while [[ ${#} -gt 1 ]]; do
front+="${1}? ( "
back+=" )"
shift
done
echo "${front}${1}${back}"
}
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
CDEPEND+="
uuid? (
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
!!<sys-apps/sandbox-2.0
sys-devel/bison
sys-devel/flex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
RDEPEND="${CDEPEND}
!dev-db/postgresql-docs:${SLOT}
!dev-db/postgresql-base:${SLOT}
!dev-db/postgresql-server:${SLOT}
selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
enewgroup postgres 70
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
use python && python-single-r1_pkg_setup
}
src_prepare() {
# Work around PPC{,64} compilation bug where bool is already defined
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
# Set proper run directory
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
-i src/include/pg_config_manual.h || die
# Rely on $PATH being in the proper order so that the correct
# install program is used for modules utilizing PGXS in both
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
if use pam ; then
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
eapply_user
}
src_configure() {
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
local PO="${EPREFIX%/}"
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
for i in ${BSD_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=bsd"
done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
econf \
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--docdir="${PO}/usr/share/doc/${PF}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable !alpha spinlocks) \
$(use_enable !pg_legacytimestamp integer-datetimes) \
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
$(use_with readline) \
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_enable nls nls "'$(l10n_get_locales)'")
}
src_compile() {
emake
emake -C contrib
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
dodoc README HISTORY doc/{TODO,bug.template}
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
done
fi
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
# Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
;;
*)
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
;;
esac
done
popd > /dev/null
done
insinto /etc/postgresql-${SLOT}
newins src/bin/psql/psqlrc.sample psqlrc
use static-libs || find "${ED}" -name '*.a' -delete
local f bn
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
-mindepth 1 -maxdepth 1)
do
bn=$(basename "${f}")
# Temporarily tack on tmp to workaround a file collision
# issue. This is only necessary for 9.7 and earlier. 10 never
# had this issue.
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
"/usr/bin/${bn}${SLOT/.}tmp"
done
if use doc ; then
docinto html
dodoc doc/src/sgml/html/*
docinto sgml
dodoc doc/src/sgml/*.{sgml,dsl}
fi
if use server; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
if use systemd; then
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
"${FILESDIR}/${PN}.service-9.6-r1" | \
systemd_newunit - ${PN}-${SLOT}.service
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
fi
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
if use prefix ; then
keepdir /run/postgresql
fperms 1775 /run/postgresql
fi
fi
}
pkg_preinst() {
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
# /usr/bin/psql96). They may have been created by the
# postgresql.eselect module, but they're handled within this ebuild
# now. It's alright if we momentarily delete /usr/bin/psql as it
# will be recreated by the eselect module in pkg_ppostinst(). This
# is only necessary for 9.7 and earlier. 10 and later were never
# handled in this manner.
local canonicalise
if type -p realpath > /dev/null; then
canonicalise=realpath
elif type -p readlink > /dev/null; then
canonicalise='readlink -f'
else
# can't die, subshell
die "No readlink nor realpath found, cannot canonicalise"
fi
local l
# First remove any symlinks in /usr/bin that may have been created
# by the old eselect
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
rm "${l}" || ewarn "Couldn't remove ${l}"
fi
done
# Then move the symlinks created by the ebuild to their proper place.
for l in "${ED}"/usr/bin/*tmp ; do
mv "${l}" "${l%tmp}" \
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
done
}
pkg_postinst() {
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
postgresql-config update
elog "If you need a global psqlrc-file, you can place it in:"
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
if use server ; then
elog
elog "Gentoo specific documentation:"
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
elog
elog "Official documentation:"
elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
elog
elog "The default location of the Unix-domain socket is:"
elog " ${EROOT%/}/run/postgresql/"
elog
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
elog "so that it contains your preferred locale in:"
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
elog
elog "Then, execute the following command to setup the initial database"
elog "environment:"
elog " emerge --config =${CATEGORY}/${PF}"
fi
}
pkg_prerm() {
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
sleep 10
eend 0
fi
}
pkg_postrm() {
postgresql-config update
}
pkg_config() {
use server || die "USE flag 'server' not enabled. Nothing to configure."
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
[[ -z "${DATA_DIR}" ]] \
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
# environment.bz2 may not contain the same locale as the current system
# locale. Unset and source from the current system locale.
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
unset LANG
unset LC_CTYPE
unset LC_NUMERIC
unset LC_TIME
unset LC_COLLATE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_ALL
source "${EROOT%/}/etc/env.d/02locale"
[ -n "${LANG}" ] && export LANG
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
[ -n "${LC_TIME}" ] && export LC_TIME
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
[ -n "${LC_ALL}" ] && export LC_ALL
fi
einfo "You can modify the paths and options passed to initdb by editing:"
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
einfo
einfo "Information on options that can be passed to initdb are found at:"
einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
einfo
einfo "PG_INITDB_OPTS is currently set to:"
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
einfo " (none)"
else
einfo " ${PG_INITDB_OPTS}"
fi
einfo
einfo "Configuration files will be installed to:"
einfo " ${PGDATA}"
einfo
einfo "The database cluster will be created in:"
einfo " ${DATA_DIR}"
einfo
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
sleep 5
eend 0
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
fi
einfo "Creating the data directory ..."
if [[ ${EUID} == 0 ]] ; then
mkdir -p "${DATA_DIR}"
chown -Rf postgres:postgres "${DATA_DIR}"
chmod 0700 "${DATA_DIR}"
fi
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
fi
# unix_socket_directory has no effect in postgresql.conf as it's
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
# On the off-chance that you might need to work with UTF-8 encoded
# characters in PL/Perl
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
EOF
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
einfo " ${PGDATA%/}/postgresql.conf"
einfo
if ! use systemd; then
einfo "The PostgreSQL server, by default, will log events to:"
einfo " ${DATA_DIR%/}/postmaster.log"
einfo
fi
if use prefix ; then
einfo "The location of the configuration files have moved to:"
einfo " ${PGDATA}"
einfo "To start the server:"
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
einfo "To stop:"
einfo " pg_ctl stop -D ${DATA_DIR}"
einfo
einfo "Or move the configuration files back:"
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
elif use systemd; then
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
einfo "instead of 'pg_ctl'."
else
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
einfo "instead of 'pg_ctl'."
fi
}
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
emake check
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
use server || \
ewarn 'Tests cannot be run without the "server" use flag enabled.'
[[ ${UID} -eq 0 ]] || \
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
ewarn 'Skipping.'
fi
}

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

Loading…
Cancel
Save