parent
c208462cb1
commit
d752e85c49
Binary file not shown.
Binary file not shown.
@ -1,86 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit ssl-cert eutils pam autotools
|
||||
|
||||
DESCRIPTION="Serial Console Manager"
|
||||
HOMEPAGE="https://www.conserver.com/"
|
||||
SRC_URI="https://www.conserver.com/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
|
||||
IUSE="kerberos pam ssl tcpd debug"
|
||||
|
||||
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g )
|
||||
pam? ( virtual/pam )
|
||||
tcpd? ( sys-apps/tcp-wrappers )
|
||||
debug? ( dev-libs/dmalloc )
|
||||
kerberos? (
|
||||
virtual/krb5
|
||||
net-libs/libgssglue
|
||||
)"
|
||||
RDEPEND="${DEPEND}
|
||||
pam? ( >=sys-auth/pambase-20080219.1 )"
|
||||
|
||||
src_prepare() {
|
||||
# Apply patch to prevent package from stripping binaries
|
||||
epatch "${FILESDIR}"/${PN}-prestrip.patch
|
||||
|
||||
# Apply patch to use custom dmalloc macro
|
||||
epatch "${FILESDIR}"/${P}-dmalloc.patch
|
||||
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with pam) \
|
||||
$(use_with tcpd libwrap) \
|
||||
$(use_with debug dmalloc) \
|
||||
$(use_with kerberos gssapi) \
|
||||
--with-logfile=/var/log/conserver.log \
|
||||
--with-pidfile=/var/run/conserver.pid \
|
||||
--with-cffile=conserver/conserver.cf \
|
||||
--with-pwdfile=conserver/conserver.passwd \
|
||||
--with-master=localhost \
|
||||
--with-port=7782
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" exampledir="/usr/share/doc/${PF}/examples" install
|
||||
|
||||
## create data directory
|
||||
dodir /var/consoles
|
||||
fowners daemon:daemon /var/consoles
|
||||
fperms 700 /var/consoles
|
||||
|
||||
## add startup and sample config
|
||||
newinitd "${FILESDIR}"/conserver.initd conserver
|
||||
newconfd "${FILESDIR}"/conserver.confd conserver
|
||||
|
||||
dodir /etc/conserver
|
||||
fperms 700 /etc/conserver
|
||||
insinto /etc/conserver
|
||||
newins "${S}"/conserver.cf/conserver.cf conserver.cf.sample
|
||||
newins "${S}"/conserver.cf/conserver.passwd conserver.passwd.sample
|
||||
|
||||
## add docs
|
||||
dohtml conserver.html
|
||||
dodoc CHANGES FAQ PROTOCOL README TODO
|
||||
dodoc conserver/Sun-serial contrib/maketestcerts
|
||||
newdoc conserver.cf/conserver.cf conserver.cf.sample
|
||||
|
||||
# Add pam config
|
||||
newpamd "${FILESDIR}"/conserver.pam-pambase conserver
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Add certs if SSL use flag is enabled
|
||||
if use ssl && [ ! -f "${ROOT}"/etc/ssl/conserver/conserver.key ]; then
|
||||
install_cert /etc/ssl/conserver/conserver
|
||||
fi
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
From c1791ee90fdd8adf219ae3d2b849f5f041284b7c Mon Sep 17 00:00:00 2001
|
||||
From: Rich Megginson <rmeggins@redhat.com>
|
||||
Date: Thu, 17 May 2018 18:38:25 -0600
|
||||
Subject: [PATCH] mmkubernetes test python must encode response
|
||||
|
||||
https://github.com/rsyslog/rsyslog/issues/2721
|
||||
Was not working on python3 - must use `encode()` to convert the
|
||||
string to a `bytes` object.
|
||||
Also run the server with python -u to make sure we get the log
|
||||
output from the kubernetes test server.
|
||||
---
|
||||
tests/mmkubernetes-basic.sh | 2 +-
|
||||
tests/mmkubernetes_test_server.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/mmkubernetes-basic.sh b/tests/mmkubernetes-basic.sh
|
||||
index 0bbfd08ca..d320c343f 100755
|
||||
--- a/tests/mmkubernetes-basic.sh
|
||||
+++ b/tests/mmkubernetes-basic.sh
|
||||
@@ -4,7 +4,7 @@
|
||||
. $srcdir/diag.sh init
|
||||
|
||||
testsrv=mmk8s-test-server
|
||||
-python ./mmkubernetes_test_server.py 18443 rsyslog${testsrv}.pid rsyslogd${testsrv}.started > mmk8s_srv.log 2>&1 &
|
||||
+python -u ./mmkubernetes_test_server.py 18443 rsyslog${testsrv}.pid rsyslogd${testsrv}.started > mmk8s_srv.log 2>&1 &
|
||||
BGPROCESS=$!
|
||||
. $srcdir/diag.sh wait-startup $testsrv
|
||||
echo background mmkubernetes_test_server.py process id is $BGPROCESS
|
||||
diff --git a/tests/mmkubernetes_test_server.py b/tests/mmkubernetes_test_server.py
|
||||
index 0de215603..24f4e1b0e 100644
|
||||
--- a/tests/mmkubernetes_test_server.py
|
||||
+++ b/tests/mmkubernetes_test_server.py
|
||||
@@ -104,7 +104,7 @@ def do_GET(self):
|
||||
self.log_error(resp)
|
||||
self.send_response(status)
|
||||
self.end_headers()
|
||||
- self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')))
|
||||
+ self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')).encode())
|
||||
|
||||
port = int(sys.argv[1])
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="suid, sgid file and directory checking"
|
||||
HOMEPAGE="http://freshmeat.net/projects/sxid"
|
||||
SRC_URI="http://linukz.org/download/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="virtual/mailx"
|
||||
DEPEND=""
|
||||
|
||||
DOCS=( docs/sxid.{conf,cron}.example )
|
||||
|
||||
src_prepare() {
|
||||
# this is an admin application and really requires root to run correctly
|
||||
# we need to move the binary to the sbin directory
|
||||
sed -i s/bindir/sbindir/g source/Makefile.in || die
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "You will need to configure sxid.conf for your system using the manpage and example"
|
||||
}
|
Binary file not shown.
@ -1,85 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit eutils toolchain-funcs flag-o-matic
|
||||
|
||||
MY_PV="${PV//.}"
|
||||
MY_PV="${MY_PV%_p*}"
|
||||
MY_P="${PN}${MY_PV}"
|
||||
|
||||
DESCRIPTION="unzipper for pkzip-compressed files"
|
||||
HOMEPAGE="http://www.info-zip.org/"
|
||||
SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz
|
||||
mirror://debian/pool/main/u/${PN}/${PN}_${PV/_p/-}.debian.tar.xz"
|
||||
|
||||
LICENSE="Info-ZIP"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
|
||||
IUSE="bzip2 natspec unicode"
|
||||
|
||||
DEPEND="bzip2? ( app-arch/bzip2 )
|
||||
natspec? ( dev-libs/libnatspec )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
local deb="${WORKDIR}"/debian/patches
|
||||
rm "${deb}"/02-this-is-debian-unzip.patch || die
|
||||
eapply "${deb}"/*.patch
|
||||
|
||||
eapply "${FILESDIR}"/${PN}-6.0-no-exec-stack.patch
|
||||
use natspec && eapply "${FILESDIR}/${PN}-6.0-natspec.patch" #275244
|
||||
sed -i -r \
|
||||
-e '/^CFLAGS/d' \
|
||||
-e '/CFLAGS/s:-O[0-9]?:$(CFLAGS) $(CPPFLAGS):' \
|
||||
-e '/^STRIP/s:=.*:=true:' \
|
||||
-e "s:\<CC *= *\"?g?cc2?\"?\>:CC=\"$(tc-getCC)\":" \
|
||||
-e "s:\<LD *= *\"?(g?cc2?|ld)\"?\>:LD=\"$(tc-getCC)\":" \
|
||||
-e "s:\<AS *= *\"?(g?cc2?|as)\"?\>:AS=\"$(tc-getCC)\":" \
|
||||
-e 's:LF2 = -s:LF2 = :' \
|
||||
-e 's:LF = :LF = $(LDFLAGS) :' \
|
||||
-e 's:SL = :SL = $(LDFLAGS) :' \
|
||||
-e 's:FL = :FL = $(LDFLAGS) :' \
|
||||
-e "/^#L_BZ2/s:^$(use bzip2 && echo .)::" \
|
||||
-e 's:$(AS) :$(AS) $(ASFLAGS) :g' \
|
||||
unix/Makefile \
|
||||
|| die "sed unix/Makefile failed"
|
||||
|
||||
# Delete bundled code to make sure we don't use it.
|
||||
rm -r bzip2 || die
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
i?86*-*linux*) TARGET="linux_asm" ;;
|
||||
*linux*) TARGET="linux_noasm" ;;
|
||||
i?86*-*bsd* | \
|
||||
i?86*-dragonfly*) TARGET="freebsd" ;; # mislabelled bsd with x86 asm
|
||||
*bsd* | *dragonfly*) TARGET="bsd" ;;
|
||||
*-darwin*) TARGET="macosx" ;;
|
||||
*-cygwin*) TARGET="cygwin" ;;
|
||||
*) die "Unknown target; please update the ebuild to handle ${CHOST} " ;;
|
||||
esac
|
||||
|
||||
[[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD
|
||||
use bzip2 && append-cppflags -DUSE_BZIP2
|
||||
use unicode && append-cppflags -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE
|
||||
append-cppflags -DLARGE_FILE_SUPPORT #281473
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
ASFLAGS="${ASFLAGS} $(get_abi_var CFLAGS)" \
|
||||
emake -f unix/Makefile ${TARGET}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin unzip funzip unzipsfx unix/zipgrep
|
||||
dosym unzip /usr/bin/zipinfo
|
||||
doman man/*.1
|
||||
dodoc BUGS History* README ToDo WHERE
|
||||
}
|
@ -1,3 +1,2 @@
|
||||
DIST xar-1.5.2.tar.gz 137973 BLAKE2B 1bd478134f9de23094cbf6b6c6d15100629ebb3359c39b39eb6a2bfad80fefc74282655ecd2c32ef0140f3d69f5a75c13665c0a5015dc3e278f99bab3c1a9ade SHA512 975861324ee31805eb107f51f2f6c43029b25601d4c1daa2dfee49ec7e25351e94798de9fb5c011b90d93dd6a3bbd3fe15c97ab0fc32f0b36b3000dd48cbf46b
|
||||
DIST xar-1.6.1.tar.gz 180771 BLAKE2B efc15995941b7240486a02cad736981e4881dac8a576cb3188be1bb54aefbb612f374d82af56e1af27301d6d8f00698ad601f8ad4b0ae100107bbcd84cb203e8 SHA512 6ddf83130519006c4d8fe699cdf5a6e5e41b293f3411d4744bf3425fda21556ef54b95e46f60c13f9276070ccda94c8d95a543f1fda4cbd9e3087ab9b5d0b00b
|
||||
DIST xar-400.tar.gz 213319 BLAKE2B 55b8695313a1a5ae778b62791f716af00edba7e7b01500eac4b951e04cf7b18e84e0d508ac5471996796e5ab59e4628a4f85a63a5929b372555e28b222c77ab1 SHA512 c54850d5443c776f18d788bf7d026b3b08274ee71321d1615238c9fa2d20cc0b21f3f298364b0d0eecd98ce2a6efc8d5039cabd5a21c2419c430d90db004d159
|
||||
|
@ -1,46 +0,0 @@
|
||||
diff -ur xar-1.5.2.orig/configure.ac xar-1.5.2/configure.ac
|
||||
--- xar-1.5.2.orig/configure.ac 2007-12-29 20:49:57.000000000 +0200
|
||||
+++ xar-1.5.2/configure.ac 2008-05-19 17:07:23.000000000 +0300
|
||||
@@ -181,8 +181,13 @@
|
||||
)
|
||||
AC_SUBST([enable_autogen])
|
||||
|
||||
+AC_ARG_ENABLE(acl, AC_HELP_STRING([--disable-acl], [disable support for libacl (default=autodetect)]), [ enable_acl=$enableval ], [ enable_acl=yes ])
|
||||
+
|
||||
+if test "x$enable_acl" = "xyes"; then
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/acl.h>], [acl_t a], [AC_DEFINE([HAVE_SYS_ACL_H],[1], [define if you have sys/acl.h and it has a working acl_t type])])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_HEADERS(ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h)
|
||||
AC_CHECK_FUNCS(lgetxattr)
|
||||
AC_CHECK_FUNCS(lsetxattr)
|
||||
@@ -251,7 +256,9 @@
|
||||
AC_ERROR(can not detect the size of your system's dev_t type)
|
||||
fi
|
||||
|
||||
-AC_CHECK_LIB(acl, acl_get_file)
|
||||
+if test "x$enable_acl" = "xyes"; then
|
||||
+ AC_CHECK_LIB(acl, acl_get_file)
|
||||
+fi
|
||||
|
||||
dnl Check for paths
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
@@ -342,9 +349,14 @@
|
||||
dnl
|
||||
dnl Configure libbz2.
|
||||
dnl
|
||||
-have_libbz2="1"
|
||||
-AC_CHECK_HEADERS([bzlib.h], , [have_libbz2="0"])
|
||||
-AC_CHECK_LIB([bz2], [BZ2_bzCompress], , [have_libbz2="0"])
|
||||
+AC_ARG_ENABLE(bzip2, AC_HELP_STRING([--disable-bzip2], [disable support for libbz2 (default=autodetect)]), [ enable_bzip2=$enableval ], [ enable_bzip2=yes ])
|
||||
+
|
||||
+if test "x$enable_bzip2" = "xyes"; then
|
||||
+ have_libbz2="1"
|
||||
+ AC_CHECK_HEADERS([bzlib.h], , [have_libbz2="0"])
|
||||
+ AC_CHECK_LIB([bz2], [BZ2_bzCompress], , [have_libbz2="0"])
|
||||
+fi
|
||||
+
|
||||
if test "x${have_libbz2}" = "x1" ; then
|
||||
AC_DEFINE([HAVE_LIBBZ2])
|
||||
fi
|
@ -1,21 +0,0 @@
|
||||
diff -ur xar-1.5.2.orig/lib/Makefile.inc.in xar-1.5.2/lib/Makefile.inc.in
|
||||
--- xar-1.5.2.orig/lib/Makefile.inc.in 2007-12-29 20:49:57.000000000 +0200
|
||||
+++ xar-1.5.2/lib/Makefile.inc.in 2010-04-07 01:18:59.027890429 +0300
|
||||
@@ -134,7 +134,7 @@
|
||||
$(LIBRXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
|
||||
@mkdir -p $(@D)
|
||||
ifeq (elf, @abi@)
|
||||
- $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
|
||||
+ $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
|
||||
endif
|
||||
ifeq (macho, @abi@)
|
||||
$(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name @abs_objroot@$(LIBRXAR_S) -o $@ $+ $(LDFLAGS) @LIBS@
|
||||
@@ -150,7 +150,7 @@
|
||||
$(LIBXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
|
||||
@mkdir -p $(@D)
|
||||
ifeq (elf, @abi@)
|
||||
- $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
|
||||
+ $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
|
||||
endif
|
||||
ifeq (macho, @abi@)
|
||||
$(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name $(LIBDIR)/$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
|
@ -1,35 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit autotools base eutils
|
||||
|
||||
DESCRIPTION="An easily extensible archive format"
|
||||
HOMEPAGE="https://github.com/mackyle/xar"
|
||||
SRC_URI="https://github.com/mackyle/${PN}/archive/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ~ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="acl +bzip2"
|
||||
|
||||
DEPEND="dev-libs/openssl
|
||||
dev-libs/libxml2
|
||||
sys-libs/zlib
|
||||
acl? ( sys-apps/acl )
|
||||
bzip2? ( app-arch/bzip2 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
DOCS=( TODO )
|
||||
PATCHES=( "${FILESDIR}/${P}-automagic_acl_and_bzip2.patch"
|
||||
"${FILESDIR}/${P}-respect_ldflags.patch" )
|
||||
|
||||
src_prepare() {
|
||||
base_src_prepare
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable acl) $(use_enable bzip2)
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,11 +0,0 @@
|
||||
--- gpgme-1.1.8/src/gpgme-config.in 2009-03-08 10:25:48.000000000 +1100
|
||||
+++ gpgme-1.1.8/src/gpgme-config.in 2009-03-08 10:35:53.000000000 +1100
|
||||
@@ -64,7 +64,7 @@
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*)
|
||||
- optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
|
||||
+ optarg=`echo "$1" | sed 's/[-_[:alnum:]]*=//'`
|
||||
;;
|
||||
*)
|
||||
optarg=
|
@ -1,33 +0,0 @@
|
||||
From 572c1aac107125ce62230251713349348373db5a Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Becker <heirecka@exherbo.org>
|
||||
Date: Wed, 16 Nov 2016 23:09:45 +0100
|
||||
Subject: [PATCH] Remove a forgotten instance of @libsuffix@
|
||||
|
||||
* lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove a forgotten
|
||||
instance of @libsuffix@.
|
||||
--
|
||||
|
||||
b2c07bd47bd608afa5cc819b60a7b5bb8c9dd96a removed @libsuffix@ from
|
||||
cmake config files, but missed one instance.
|
||||
|
||||
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
|
||||
---
|
||||
lang/cpp/src/GpgmeppConfig.cmake.in.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in
|
||||
index 928d19f..cbe9713 100644
|
||||
--- a/lang/cpp/src/GpgmeppConfig.cmake.in.in
|
||||
+++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in
|
||||
@@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED)
|
||||
|
||||
set_target_properties(Gpgmepp PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@"
|
||||
- INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@"
|
||||
+ INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@"
|
||||
IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp.so"
|
||||
)
|
||||
|
||||
--
|
||||
2.8.0.rc3
|
||||
|
@ -1,16 +0,0 @@
|
||||
diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp
|
||||
index eb3af56..af47594 100644
|
||||
--- a/lang/qt/src/qgpgmenewcryptoconfig.cpp
|
||||
+++ b/lang/qt/src/qgpgmenewcryptoconfig.cpp
|
||||
@@ -51,2 +51,3 @@
|
||||
#include <cassert>
|
||||
+#include <functional> /* std::mem_fn */
|
||||
|
||||
diff --git a/lang/qt/src/threadedjobmixin.h b/lang/qt/src/threadedjobmixin.h
|
||||
index 32b23db..c4f85c2 100644
|
||||
--- a/lang/qt/src/threadedjobmixin.h
|
||||
+++ b/lang/qt/src/threadedjobmixin.h
|
||||
@@ -53,2 +53,3 @@
|
||||
#include <cassert>
|
||||
+#include <functional> /* std::function */
|
||||
|
@ -1,104 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5} )
|
||||
DISTUTILS_OPTIONAL=1
|
||||
|
||||
inherit distutils-r1 flag-o-matic ltprune qmake-utils
|
||||
|
||||
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
|
||||
HOMEPAGE="http://www.gnupg.org/related_software/gpgme"
|
||||
SRC_URI="mirror://gnupg/gpgme/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="1/11" # subslot = soname major version
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="common-lisp static-libs cxx python qt5"
|
||||
|
||||
COMMON_DEPEND=">=app-crypt/gnupg-2
|
||||
>=dev-libs/libassuan-2.0.2
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
qt5? ( dev-qt/qtcore:5 )"
|
||||
#doc? ( app-doc/doxygen[dot] )
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
python? ( dev-lang/swig )
|
||||
qt5? ( dev-qt/qttest:5 )"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
cxx? (
|
||||
!kde-apps/gpgmepp
|
||||
!kde-apps/kdepimlibs:4
|
||||
)"
|
||||
|
||||
REQUIRED_USE="qt5? ( cxx ) python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.1.8-et_EE.patch
|
||||
"${FILESDIR}"/${P}-cmake.patch
|
||||
)
|
||||
|
||||
do_python() {
|
||||
if use python; then
|
||||
pushd lang/python > /dev/null || die
|
||||
distutils-r1_src_${EBUILD_PHASE}
|
||||
popd > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
do_python
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local languages=()
|
||||
use common-lisp && languages+=( "cl" )
|
||||
use cxx && languages+=( "cpp" )
|
||||
if use qt5; then
|
||||
languages+=( "qt" )
|
||||
#use doc ||
|
||||
export DOXYGEN=true
|
||||
export MOC="$(qt5_get_bindir)/moc"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# FIXME: I don't know how to select on C++11 (libc++) here, but
|
||||
# I do know all Darwin users are using C++11. This should also
|
||||
# apply to GCC 4.7+ with libc++, and basically anyone targetting
|
||||
# it.
|
||||
|
||||
# The C-standard doesn't define strdup, and C++11 drops it
|
||||
# resulting in an implicit declaration of strdup error. Since
|
||||
# it is in POSIX raise the feature set to that.
|
||||
append-cxxflags -D_POSIX_C_SOURCE=200112L
|
||||
|
||||
# Work around bug 601834
|
||||
use python && append-cflags -D_DARWIN_C_SOURCE
|
||||
fi
|
||||
|
||||
econf \
|
||||
--enable-languages="${languages[*]}" \
|
||||
$(use_enable static-libs static)
|
||||
|
||||
use python && make -C lang/python prepare
|
||||
|
||||
do_python
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
do_python
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
do_python
|
||||
prune_libtool_files
|
||||
|
||||
# backward compatibility for gentoo
|
||||
# in the past we had slots
|
||||
dodir /usr/include/gpgme
|
||||
dosym ../gpgme.h /usr/include/gpgme/gpgme.h
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
DISTUTILS_OPTIONAL=1
|
||||
|
||||
inherit distutils-r1 flag-o-matic ltprune qmake-utils
|
||||
|
||||
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
|
||||
HOMEPAGE="http://www.gnupg.org/related_software/gpgme"
|
||||
SRC_URI="mirror://gnupg/gpgme/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="1/11" # subslot = soname major version
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="common-lisp cxx python qt5 static-libs"
|
||||
|
||||
COMMON_DEPEND=">=app-crypt/gnupg-2
|
||||
>=dev-libs/libassuan-2.0.2
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
qt5? ( dev-qt/qtcore:5 )"
|
||||
#doc? ( app-doc/doxygen[dot] )
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
python? ( dev-lang/swig )
|
||||
qt5? ( dev-qt/qttest:5 )"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
cxx? (
|
||||
!<kde-apps/gpgmepp-4.14.11_pre20160611:4
|
||||
!kde-apps/gpgmepp:5
|
||||
!<kde-apps/kdepimlibs-4.14.10_p20160611:4
|
||||
!=kde-apps/kdepimlibs-4.14.11_pre20160211*:4
|
||||
)"
|
||||
|
||||
REQUIRED_USE="qt5? ( cxx ) python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.1.8-et_EE.patch
|
||||
"${FILESDIR}"/${P}-cmake.patch
|
||||
"${FILESDIR}"/${P}-gcc-7.patch
|
||||
)
|
||||
|
||||
do_python() {
|
||||
if use python; then
|
||||
pushd lang/python > /dev/null || die
|
||||
distutils-r1_src_${EBUILD_PHASE}
|
||||
popd > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
do_python
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local languages=()
|
||||
use common-lisp && languages+=( "cl" )
|
||||
use cxx && languages+=( "cpp" )
|
||||
if use qt5; then
|
||||
languages+=( "qt" )
|
||||
#use doc ||
|
||||
export DOXYGEN=true
|
||||
export MOC="$(qt5_get_bindir)/moc"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# FIXME: I don't know how to select on C++11 (libc++) here, but
|
||||
# I do know all Darwin users are using C++11. This should also
|
||||
# apply to GCC 4.7+ with libc++, and basically anyone targetting
|
||||
# it.
|
||||
|
||||
# The C-standard doesn't define strdup, and C++11 drops it
|
||||
# resulting in an implicit declaration of strdup error. Since
|
||||
# it is in POSIX raise the feature set to that.
|
||||
append-cxxflags -D_POSIX_C_SOURCE=200112L
|
||||
|
||||
# Work around bug 601834
|
||||
use python && append-cflags -D_DARWIN_C_SOURCE
|
||||
fi
|
||||
|
||||
econf \
|
||||
--enable-languages="${languages[*]}" \
|
||||
$(use_enable static-libs static)
|
||||
|
||||
use python && make -C lang/python prepare
|
||||
|
||||
do_python
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
do_python
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
do_python
|
||||
prune_libtool_files
|
||||
|
||||
# backward compatibility for gentoo
|
||||
# in the past we had slots
|
||||
dodir /usr/include/gpgme
|
||||
dosym ../gpgme.h /usr/include/gpgme/gpgme.h
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST eselect-postgresql-2.2.tbz2 4428 BLAKE2B f18b7daaccb9ab2fe08bb6e7f88dd41dcdf69b951a3c20b65ee2955ff33fc614e5740ddbbe8eb8f55d20f5705d47fb2da8c3f3fc89e403ea24eb4b8d912404a0 SHA512 2a0b9b3c8c75792fb6b6f90f034562a3bef7c9391cac0d7c95a6a86db38b4c9840fce2fa0edb32b745905f974920ee1ce5dfb21d33f22c79d1bc776e013edf76
|
||||
DIST eselect-postgresql-2.3.tbz2 4526 BLAKE2B 226f2be462d54d835cc884f6b2c33e0f84d4500e19251fb6794929901ec033e0fa457d8606e36ada462d538674110ba8aab901ca9f86dccd52ccf9c860ba5ce1 SHA512 d7f87aa3e21c5e35f3a6879bdfb9404a2884f761463f77952f21c522b1605f191385ba7b4758548b121ad7eb56d395163e0d6bba57df446be515e6d7163635b4
|
||||
|
@ -1,35 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
DESCRIPTION="Utility to select the default PostgreSQL slot"
|
||||
HOMEPAGE="https://www.gentoo.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~titanofold/${P}.tbz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="app-admin/eselect"
|
||||
|
||||
# All dev-db/postgresql ebuilds from 10.0 on are well supported. Earlier
|
||||
# ebuilds may present some quality of life issues.
|
||||
PDEPEND="
|
||||
!<dev-db/postgresql-9.6.2-r1:9.6
|
||||
!<dev-db/postgresql-9.5.6-r1:9.5
|
||||
!<dev-db/postgresql-9.4.11-r1:9.4
|
||||
!<dev-db/postgresql-9.3.16-r1:9.3
|
||||
!<dev-db/postgresql-9.2.20-r1
|
||||
"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/eselect/modules
|
||||
doins postgresql.eselect
|
||||
|
||||
dosym eselect /usr/bin/postgresql-config
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
}
|
Binary file not shown.
@ -1,141 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools readme.gentoo-r1
|
||||
|
||||
DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker"
|
||||
HOMEPAGE="http://aide.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/aide/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="acl audit curl e2fs mhash postgres prelink selinux static xattr zlib"
|
||||
|
||||
COMMON_DEPEND="
|
||||
!mhash? (
|
||||
dev-libs/libgcrypt:0=
|
||||
dev-libs/libgpg-error
|
||||
)
|
||||
mhash? ( app-crypt/mhash )
|
||||
dev-libs/libpcre
|
||||
acl? ( virtual/acl )
|
||||
audit? ( sys-process/audit )
|
||||
curl? ( net-misc/curl )
|
||||
e2fs? ( sys-fs/e2fsprogs )
|
||||
postgres? ( dev-db/postgresql:= )
|
||||
prelink? ( dev-libs/elfutils )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
xattr? ( sys-apps/attr )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
RDEPEND="
|
||||
!static? ( ${COMMON_DEPEND} )
|
||||
prelink? ( sys-devel/prelink )
|
||||
selinux? ( sec-policy/selinux-aide )
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
static? (
|
||||
!mhash? (
|
||||
dev-libs/libgcrypt:0[static-libs]
|
||||
dev-libs/libgpg-error[static-libs]
|
||||
)
|
||||
mhash? ( app-crypt/mhash[static-libs] )
|
||||
dev-libs/libpcre[static-libs]
|
||||
acl? ( virtual/acl[static-libs] )
|
||||
e2fs? ( sys-fs/e2fsprogs[static-libs] )
|
||||
prelink? ( dev-libs/elfutils[static-libs] )
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
xattr? ( sys-apps/attr[static-libs] )
|
||||
zlib? ( sys-libs/zlib[static-libs] )
|
||||
)
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
postgres? ( !mhash )
|
||||
static? ( !audit !curl !postgres )
|
||||
"
|
||||
|
||||
HTML_DOCS=( doc/manual.html )
|
||||
|
||||
DISABLE_AUTOFORMATTING=1
|
||||
DOC_CONTENTS="
|
||||
Example configuration file was installed at '${EPREFIX}/etc/aide/aide.conf'.
|
||||
Please edit it to meet your needs. Refer to aide.conf(5) manual page
|
||||
for more information.
|
||||
|
||||
A helper script, aideinit, was installed and can be used to make AIDE
|
||||
management easier. Please run 'aideinit --help' for more information.
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-add-missing-include.patch"
|
||||
"${FILESDIR}/${P}-fix-LIBS-LDFLAGS-mixing.patch"
|
||||
"${FILESDIR}/${P}-fix-acl-configure-option.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default_src_prepare
|
||||
sed -i -e 's| -Werror||g' configure.ac || die
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
--sysconfdir="${EPREFIX}/etc/${PN}"
|
||||
--with-confighmactype="sha512" # Override default weak MD5 hash.
|
||||
--with-dbhmackey="sha512" # Override default weak MD5 hash.
|
||||
# Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/
|
||||
# This doesn't affect anything because there are no localizations yet.
|
||||
--without-locale
|
||||
$(use_enable static)
|
||||
$(use_with zlib)
|
||||
$(use_with curl)
|
||||
$(use_with acl posix-acl)
|
||||
$(use_with selinux)
|
||||
$(use_with prelink prelink "${EPREFIX}/usr/sbin/prelink")
|
||||
$(use_with xattr)
|
||||
$(use_with e2fs e2fsattrs)
|
||||
$(use_with mhash mhash)
|
||||
$(use_with !mhash gcrypt)
|
||||
$(use_with postgres psql)
|
||||
$(use_with audit)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default_src_install
|
||||
readme.gentoo_create_doc
|
||||
|
||||
insinto /etc/${PN}
|
||||
doins "${FILESDIR}"/aide.conf
|
||||
|
||||
dosbin "${FILESDIR}"/aideinit
|
||||
dodoc "${FILESDIR}"/aide.cron
|
||||
|
||||
keepdir /var/{lib,log}/${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
readme.gentoo_print_elog
|
||||
|
||||
if use postgres; then
|
||||
elog
|
||||
elog "Due to a bad assumption by aide, you must issue the following"
|
||||
elog "command after the database initialization (aide --init ...):"
|
||||
elog
|
||||
elog 'psql -c "update pg_index set indisunique=false from pg_class \\ '
|
||||
elog " where pg_class.relname='TABLE_pkey' and \ "
|
||||
elog ' pg_class.oid=pg_index.indexrelid" -h HOSTNAME -p PORT DBASE USER'
|
||||
elog
|
||||
elog "where TABLE, HOSTNAME, PORT, DBASE, and USER are the same as"
|
||||
elog "in your aide.conf."
|
||||
elog
|
||||
fi
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
|
||||
DESCRIPTION="A GUI front-end to dd/dc3dd"
|
||||
HOMEPAGE="http://air-imager.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/air-imager/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE="crypt"
|
||||
|
||||
# coreutils are needed for /usr/bin/split binary
|
||||
COMMON_DEPEND="userland_GNU? ( sys-apps/coreutils )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=dev-perl/Tk-804.27.0
|
||||
userland_GNU? ( app-arch/sharutils )"
|
||||
|
||||
# TODO: air can utilize dc3dd, but it is not in portage ATM
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
app-arch/mt-st
|
||||
net-analyzer/netcat
|
||||
crypt? ( net-analyzer/cryptcat )"
|
||||
|
||||
src_install() {
|
||||
export PERLTK_VER=`perl -e 'use Tk;print "$Tk::VERSION";'`
|
||||
|
||||
env INTERACTIVE=no INSTALL_DIR="${D}/usr" TEMP_DIR="${T}" \
|
||||
FINAL_INSTALL_DIR=/usr \
|
||||
./install-${P} \
|
||||
|| die "failed to install - please attach ${T}/air-install.log to a bug report at https://bugs.gentoo.org"
|
||||
|
||||
dodoc README
|
||||
|
||||
dodoc "${T}/air-install.log"
|
||||
|
||||
fowners root:users /usr/share/air/logs
|
||||
fperms ug+rwx /usr/share/air/logs
|
||||
fperms a+x /usr/bin/air
|
||||
|
||||
mkfifo "${D}usr/share/air/air-fifo" || die "pipe creation failed"
|
||||
fperms ug+rw /usr/share/air/air-fifo
|
||||
fowners root:users /usr/share/air/air-fifo
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "The author, steve@unixgurus.com, would appreciate an email of the install file /usr/share/doc/${PF}/air-install.log"
|
||||
}
|
Binary file not shown.
@ -1,3 +1 @@
|
||||
DIST ibus-tutcode-1.0.0.tar.bz2 216599 BLAKE2B 9243b5e68b7f0e5beeea196b1f296acaf62895d197128ec47f98b747adcea7f2666cee0e5fe486a6086e5116a0607d04fcd315dce626c5bdcce7f4b77ebeed6d SHA512 36c5e0b74c5cefa221fc9c15ba3b334638044324730887a4c1b70a8c013d7b7651832503339edb28a15929e052d833a6b3f9cdc104a47b80ec62a38413d411f2
|
||||
DIST ibus-tutcode-1.0.1.tar.bz2 217017 BLAKE2B 2ab1c554ca431c25ee6a2436d3e97e36da058b23588cb2750ce003935edfa3054afeed408f60f3f9f0a3aad8b57c9f262892ec7c56c0593e92f997c4291ab0ee SHA512 2b0245f5188b91d668ea503793acbad149471300e593e13eef6f433bdc3e5ba89dca52cc843751c5be1bdfdede390c9b35ed8370d4246e06f3261b1fed31f0e2
|
||||
DIST ibus-tutcode-1.0.2.tar.bz2 217894 BLAKE2B b1140e14845e99b1b6a908c7783eef210f928c9281fa924acebef80677ea2b0f6947015aa7c5d64f94ca0147737cb42dbc2c09e61df904505444da8cf93c50d9 SHA512 f7845323396d24a3097cf475c8fa40890b923434e551b8941a6f4cb4d84a4aed7d7b293295ba515603131a8e03a99d58b19dc3d81a7ee13d8d7d904edb5ece02
|
||||
|
@ -1,23 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="a Japanese TUT-Code input engine for IBus"
|
||||
HOMEPAGE="https://github.com/deton/ibus-tutcode/"
|
||||
SRC_URI="mirror://github/deton/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-lang/python-2.5
|
||||
>=sys-devel/gettext-0.16.1"
|
||||
RDEPEND="${DEPEND}
|
||||
app-i18n/ibus"
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dodoc ${PN}.json.example
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="a Japanese TUT-Code input engine for IBus"
|
||||
HOMEPAGE="https://github.com/deton/ibus-tutcode/"
|
||||
SRC_URI="mirror://github/deton/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-lang/python-2.5
|
||||
>=sys-devel/gettext-0.16.1"
|
||||
RDEPEND="${DEPEND}
|
||||
app-i18n/ibus"
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dodoc ${PN}.json.example
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="a Japanese TUT-Code input engine for IBus"
|
||||
HOMEPAGE="https://github.com/deton/ibus-tutcode/"
|
||||
SRC_URI="mirror://github/deton/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="test"
|
||||
|
||||
CDEPEND=">=dev-lang/python-2.5
|
||||
>=sys-devel/gettext-0.16.1"
|
||||
DEPEND="${CDEPEND}
|
||||
test? ( app-i18n/ibus )"
|
||||
RDEPEND="${CDEPEND}
|
||||
app-i18n/ibus"
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dodoc ${PN}.json.example
|
||||
}
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST collectd-5.7.2.tar.bz2 1798777 BLAKE2B 4af359a773457bb9c05b6a301d7728eea7598c200f7ca534875b07d1d011b280ab138f680d9607723f14523dd71dcbec3a41e0d8d183848c8ef809cef86c2b8f SHA512 8844b67159f8da2203b5ac57ef19fce0a01050a016174d196b48b5fb24925ad2935af9bdd9af06097ff663499abc496cdcc2d9e9a10f403f8d707c465c1a88f3
|
||||
DIST collectd-5.8.0.tar.bz2 1686017 BLAKE2B 26d995cdb9c25869bf96a056e6ba879de9f009fd4bbf1364a7dedba93b822e57c4b606ca8c84da68cc29db8e77333047695e85d7eb101080de9cee783240f5ea SHA512 1b3d0cc44e2ca54e13eebf292074f1efa8b33d6800d04405e0eaaa2dd1cb2416c6eae580729fb5aead23a5039f41ffe8a9989a907a8c18be8f867f1099fc0008
|
||||
|
@ -0,0 +1,534 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
JAVA_PKG_OPT_USE="collectd_plugins_java"
|
||||
|
||||
inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd tmpfiles user
|
||||
|
||||
DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
|
||||
|
||||
HOMEPAGE="https://collectd.org/"
|
||||
SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
|
||||
|
||||
LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~x86"
|
||||
IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs"
|
||||
|
||||
# The plugin lists have to follow here since they extend IUSE
|
||||
|
||||
# Plugins that don't build (e.g. dependencies not in Gentoo)
|
||||
# apple_sensors: Requires libIOKit
|
||||
# aquaero: Requires aerotools-ng/libaquaero5
|
||||
# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data)
|
||||
# dpdkevents: Requires dpdk
|
||||
# dpdkstat: Requires dpdk
|
||||
# grpc: Requires libgrpc
|
||||
# intel_pmu: Requires libjevents (pmu-tools)
|
||||
# intel_rdt: Requires libpqos from intel-cmt-cat project
|
||||
# lpar: Requires libperfstat (AIX only)
|
||||
# mic: Requires Intel Many Integrated Core Architecture API
|
||||
# (part of Intel's Xeon Phi software)
|
||||
# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
|
||||
# pf: Requires BSD packet filter
|
||||
# pinba: Requires MySQL Pinba engine (http://pinba.org/)
|
||||
# tape: Requires libkstat (Solaris only)
|
||||
# write_riemann: Requires riemann-c-client
|
||||
# xmms: Requires libxmms (v1)
|
||||
# zone: Solaris only...
|
||||
COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer dpdkstat grpc
|
||||
intel_pmu intel_rdt lpar mic netapp pf pinba tape write_riemann
|
||||
xmms zone"
|
||||
|
||||
# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
|
||||
COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind
|
||||
ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep
|
||||
csv curl curl_json curl_xml dbi df disk dns drbd email
|
||||
entropy ethstat exec fhcount filecount fscache gmond gps hddtemp
|
||||
hugepages interface ipc ipmi iptables ipvs irq java lua
|
||||
load logfile log_logstash lvm madwifi match_empty_counter
|
||||
match_hashed match_regex match_timediff match_value mbmon mcelog md
|
||||
memcachec memcached memory modbus mqtt multimeter mysql netlink
|
||||
network network nfs nginx notify_desktop notify_email notify_nagios
|
||||
ntpd numa nut olsrd onewire openldap openvpn oracle ovs_events
|
||||
ovs_stats perl ping postgresql powerdns processes protocols python
|
||||
python redis routeros rrdcached rrdtool sensors serial sigrok smart
|
||||
snmp snmp_agent statsd swap syslog table tail tail_csv
|
||||
target_notification target_replace target_scale target_set tcpconns
|
||||
teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock
|
||||
uptime users uuid varnish virt vmem vserver wireless write_graphite
|
||||
write_http write_kafka write_log write_mongodb write_prometheus
|
||||
write_redis write_sensu write_tsdb xencpu zfs_arc zookeeper"
|
||||
|
||||
COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
|
||||
|
||||
COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
|
||||
|
||||
for plugin in ${COLLECTD_ALL_PLUGINS}; do
|
||||
IUSE="${IUSE} collectd_plugins_${plugin}"
|
||||
done
|
||||
unset plugin
|
||||
|
||||
# Now come the dependencies.
|
||||
|
||||
COMMON_DEPEND="
|
||||
dev-libs/libgcrypt:=
|
||||
dev-libs/libltdl:0=
|
||||
perl? ( dev-lang/perl:=[ithreads] )
|
||||
udev? ( virtual/udev )
|
||||
xfs? ( sys-fs/xfsprogs )
|
||||
collectd_plugins_amqp? ( net-libs/rabbitmq-c )
|
||||
collectd_plugins_apache? ( net-misc/curl:0= )
|
||||
collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= )
|
||||
collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= )
|
||||
collectd_plugins_ceph? ( dev-libs/yajl:= )
|
||||
collectd_plugins_curl? ( net-misc/curl:0= )
|
||||
collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= )
|
||||
collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= )
|
||||
collectd_plugins_dbi? ( dev-db/libdbi )
|
||||
collectd_plugins_dns? ( net-libs/libpcap )
|
||||
collectd_plugins_gmond? ( sys-cluster/ganglia )
|
||||
collectd_plugins_gps? ( sci-geosciences/gpsd:= )
|
||||
collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 )
|
||||
collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= )
|
||||
collectd_plugins_log_logstash? ( dev-libs/yajl:= )
|
||||
collectd_plugins_lua? ( dev-lang/lua:0= )
|
||||
collectd_plugins_lvm? ( sys-fs/lvm2 )
|
||||
collectd_plugins_memcachec? ( dev-libs/libmemcached )
|
||||
collectd_plugins_modbus? ( dev-libs/libmodbus )
|
||||
collectd_plugins_mqtt? ( app-misc/mosquitto )
|
||||
collectd_plugins_mysql? ( virtual/libmysqlclient:= )
|
||||
collectd_plugins_netlink? ( net-libs/libmnl )
|
||||
collectd_plugins_nginx? ( net-misc/curl:0= )
|
||||
collectd_plugins_notify_desktop? ( x11-libs/libnotify )
|
||||
collectd_plugins_notify_email? ( net-libs/libesmtp )
|
||||
collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 )
|
||||
collectd_plugins_openldap? ( net-nds/openldap )
|
||||
collectd_plugins_onewire? ( >=sys-fs/owfs-3.1:= )
|
||||
collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic )
|
||||
collectd_plugins_ovs_events? ( dev-libs/yajl:= )
|
||||
collectd_plugins_ovs_stats? ( dev-libs/yajl:= )
|
||||
collectd_plugins_perl? ( dev-lang/perl:=[ithreads] )
|
||||
collectd_plugins_ping? ( net-libs/liboping )
|
||||
collectd_plugins_postgresql? ( dev-db/postgresql:= )
|
||||
collectd_plugins_python? ( ${PYTHON_DEPS} )
|
||||
collectd_plugins_redis? ( dev-libs/hiredis:= )
|
||||
collectd_plugins_routeros? ( net-libs/librouteros )
|
||||
collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= )
|
||||
collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= )
|
||||
collectd_plugins_sensors? ( sys-apps/lm_sensors )
|
||||
collectd_plugins_sigrok? ( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 )
|
||||
collectd_plugins_smart? ( dev-libs/libatasmart )
|
||||
collectd_plugins_snmp? ( net-analyzer/net-snmp )
|
||||
collectd_plugins_snmp_agent? ( net-analyzer/net-snmp )
|
||||
collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant )
|
||||
collectd_plugins_varnish? ( www-servers/varnish )
|
||||
collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= )
|
||||
collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= )
|
||||
collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= )
|
||||
collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= )
|
||||
collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= )
|
||||
collectd_plugins_write_redis? ( dev-libs/hiredis:= )
|
||||
collectd_plugins_xencpu? ( app-emulation/xen-tools:= )
|
||||
|
||||
kernel_FreeBSD? (
|
||||
collectd_plugins_disk? ( sys-libs/libstatgrab:= )
|
||||
collectd_plugins_interface? ( sys-libs/libstatgrab:= )
|
||||
collectd_plugins_load? ( sys-libs/libstatgrab:= )
|
||||
collectd_plugins_memory? ( sys-libs/libstatgrab:= )
|
||||
collectd_plugins_swap? ( sys-libs/libstatgrab:= )
|
||||
collectd_plugins_users? ( sys-libs/libstatgrab:= )
|
||||
)"
|
||||
|
||||
# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) )
|
||||
collectd_plugins_java? ( >=virtual/jdk-1.6 )
|
||||
virtual/pkgconfig"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
collectd_plugins_java? ( >=virtual/jre-1.6 )
|
||||
collectd_plugins_syslog? ( virtual/logger )
|
||||
selinux? ( sec-policy/selinux-collectd )
|
||||
!<sys-apps/openrc-0.18.2"
|
||||
|
||||
REQUIRED_USE="
|
||||
collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} )
|
||||
collectd_plugins_smart? ( udev )"
|
||||
|
||||
# @FUNCTION: collectd_plugin_kernel_linux
|
||||
# @DESCRIPTION:
|
||||
# USAGE: <plugin name> <kernel_options> <severity>
|
||||
# kernel_options is a list of kernel configurations options; the check tests whether at least
|
||||
# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
|
||||
# is emitted.
|
||||
collectd_plugin_kernel_linux() {
|
||||
local multi_opt opt
|
||||
if has ${1} ${COLLECTD_ALL_PLUGINS}; then
|
||||
if use collectd_plugins_${1}; then
|
||||
for opt in ${2}; do
|
||||
if linux_chkconfig_present ${opt}; then
|
||||
return 0;
|
||||
fi
|
||||
done
|
||||
multi_opt=${2//\ /\ or\ }
|
||||
case ${3} in
|
||||
(info)
|
||||
elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
|
||||
;;
|
||||
(warn)
|
||||
ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
|
||||
;;
|
||||
(error)
|
||||
eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
|
||||
;;
|
||||
(*)
|
||||
die "function collectd_plugin_kernel_linux called with invalid third argument"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
collectd_linux_kernel_checks() {
|
||||
if ! linux_chkconfig_present PROC_FS; then
|
||||
ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel"
|
||||
fi
|
||||
|
||||
if ! linux_chkconfig_present SYSFS; then
|
||||
ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel"
|
||||
fi
|
||||
|
||||
# battery.c: /proc/pmu/battery_%i
|
||||
# battery.c: /proc/acpi/battery
|
||||
collectd_plugin_kernel_linux battery ACPI_BATTERY warn
|
||||
|
||||
# cgroups.c: /sys/fs/cgroup/
|
||||
collectd_plugin_kernel_linux cgroups CGROUPS warn
|
||||
|
||||
# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
|
||||
collectd_plugin_kernel_linux cpufreq SYSFS warn
|
||||
collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
|
||||
|
||||
# drbd.c: /proc/drbd
|
||||
collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
|
||||
|
||||
# conntrack.c: /proc/sys/net/netfilter/*
|
||||
collectd_plugin_kernel_linux conntrack NETFILTER warn
|
||||
|
||||
# fscache.c: /proc/fs/fscache/stats
|
||||
collectd_plugin_kernel_linux fscache FSCACHE warn
|
||||
|
||||
# nfs.c: /proc/net/rpc/nfs
|
||||
# nfs.c: /proc/net/rpc/nfsd
|
||||
collectd_plugin_kernel_linux nfs NFS_COMMON warn
|
||||
|
||||
# serial.c: /proc/tty/driver/serial
|
||||
# serial.c: /proc/tty/driver/ttyS
|
||||
collectd_plugin_kernel_linux serial SERIAL_CORE warn
|
||||
|
||||
# swap.c: /proc/meminfo
|
||||
collectd_plugin_kernel_linux swap SWAP warn
|
||||
|
||||
# thermal.c: /proc/acpi/thermal_zone
|
||||
# thermal.c: /sys/class/thermal
|
||||
collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
|
||||
|
||||
# turbostat.c: /dev/cpu/%d/msr
|
||||
collectd_plugin_kernel_linux turbostat X86_MSR warn
|
||||
|
||||
# vmem.c: /proc/vmstat
|
||||
collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
|
||||
|
||||
# vserver.c: /proc/virtual
|
||||
collectd_plugin_kernel_linux vserver VSERVER warn
|
||||
|
||||
# uuid.c: /sys/hypervisor/uuid
|
||||
collectd_plugin_kernel_linux uuid SYSFS info
|
||||
|
||||
# wireless.c: /proc/net/wireless
|
||||
collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
|
||||
|
||||
# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
|
||||
collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use kernel_linux; then
|
||||
linux-info_pkg_setup
|
||||
|
||||
if linux_config_exists; then
|
||||
einfo "Checking your linux kernel configuration:"
|
||||
collectd_linux_kernel_checks
|
||||
else
|
||||
elog "Cannot find a linux kernel configuration. Continuing anyway."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use collectd_plugins_java; then
|
||||
java-pkg-opt-2_pkg_setup
|
||||
fi
|
||||
|
||||
use collectd_plugins_python && python-single-r1_pkg_setup
|
||||
|
||||
enewgroup collectd
|
||||
enewuser collectd -1 -1 /var/lib/collectd collectd
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# There's some strange prefix handling in the default config file, resulting in
|
||||
# paths like "/usr/var/..."
|
||||
sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
|
||||
|
||||
# Adjust upstream's systemd unit
|
||||
# - Get rid of EnvironmentFile directive; These files don't exist on Gentoo!
|
||||
# - Add User=collectd to run collectd as user "collectd" per default
|
||||
sed -i \
|
||||
-e '/^EnvironmentFile=.*/d' \
|
||||
-e '/^\[Service\]/aUser=collectd' \
|
||||
contrib/systemd.${PN}.service || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
|
||||
# should work independent of the operating system.
|
||||
|
||||
local linux_plugins="barometer battery cpu cpufreq disk
|
||||
drbd entropy ethstat hugepages interface iptables
|
||||
ipvs irq ipc load memory md netlink nfs numa processes
|
||||
serial swap tcpconns thermal turbostat users vmem wireless
|
||||
zfc_arc"
|
||||
|
||||
local need_libstatgrab=0
|
||||
local libstatgrab_plugins="cpu disk interface load memory swap users"
|
||||
local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
|
||||
|
||||
local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
|
||||
|
||||
local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
|
||||
local myos_plugins=""
|
||||
if use kernel_linux; then
|
||||
einfo "Enabling Linux plugins."
|
||||
myos_plugins=${linux_plugins}
|
||||
elif use kernel_FreeBSD; then
|
||||
einfo "Enabling FreeBSD plugins."
|
||||
myos_plugins=${bsd_plugins}
|
||||
elif use kernel_Darwin; then
|
||||
einfo "Enabling Darwin plugins."
|
||||
myos_plugins=${darwin_plugins}
|
||||
fi
|
||||
|
||||
local myconf="--disable-werror"
|
||||
|
||||
# Do we debug?
|
||||
myconf+=" $(use_enable debug)"
|
||||
|
||||
# udev support?
|
||||
# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
|
||||
if use udev; then
|
||||
myconf+=" --with-libudev"
|
||||
else
|
||||
myconf+=" --without-libudev"
|
||||
fi
|
||||
|
||||
local plugin
|
||||
|
||||
# Disable what needs to be disabled.
|
||||
for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
|
||||
myconf+=" --disable-${plugin}"
|
||||
done
|
||||
|
||||
# Set enable/disable for each single plugin.
|
||||
for plugin in ${COLLECTD_ALL_PLUGINS}; do
|
||||
if has ${plugin} ${osdependent_plugins}; then
|
||||
# plugin is os-dependent ...
|
||||
if has ${plugin} ${myos_plugins}; then
|
||||
# ... and available in this os
|
||||
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
|
||||
# ... must we link against libstatgrab? Bug #541518
|
||||
if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
|
||||
einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
|
||||
need_libstatgrab=1
|
||||
fi
|
||||
else
|
||||
# ... and NOT available in this os
|
||||
if use collectd_plugins_${plugin}; then
|
||||
ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
|
||||
ewarn "kernel. Disabling it automatically."
|
||||
fi
|
||||
myconf+=" --disable-${plugin}"
|
||||
fi
|
||||
elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
|
||||
if use collectd_plugins_perl && ! use perl; then
|
||||
ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
|
||||
myconf+= --disable-perl
|
||||
else
|
||||
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
|
||||
fi
|
||||
else
|
||||
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${need_libstatgrab}" -eq 1 ]; then
|
||||
myconf+=" --with-libstatgrab"
|
||||
else
|
||||
myconf+=" --without-libstatgrab"
|
||||
fi
|
||||
|
||||
# JAVA_HOME is set by eclasses.
|
||||
if use collectd_plugins_java; then
|
||||
myconf+=" --with-java"
|
||||
fi
|
||||
|
||||
# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
|
||||
# lots of libs are only needed for plugins, if they are disabled, also disable the lib
|
||||
use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
|
||||
use collectd_plugins_openldap || myconf+=" --with-libldap=no"
|
||||
use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
|
||||
use collectd_plugins_smart || myconf+=" --with-libatasmart=no"
|
||||
use collectd_plugins_gps || myconf+=" --with-libgps=no"
|
||||
|
||||
if use perl; then
|
||||
myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
|
||||
else
|
||||
myconf+=" --without-perl-bindings"
|
||||
fi
|
||||
|
||||
# No need for v5upgrade
|
||||
myconf+=" --disable-target_v5upgrade"
|
||||
|
||||
# Python
|
||||
if use collectd_plugins_python; then
|
||||
myconf+=" --with-libpython=yes"
|
||||
export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG)
|
||||
else
|
||||
myconf+=" --with-libpython=no"
|
||||
fi
|
||||
|
||||
# XFS support
|
||||
myconf+=" $(use_enable xfs)"
|
||||
|
||||
# Finally, run econf.
|
||||
KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \
|
||||
$(use_enable static-libs static) \
|
||||
--localstatedir=/var ${myconf}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D%/}" install
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
find "${ED}"usr/ -name "*.la" -delete || die
|
||||
|
||||
if use collectd_plugins_java; then
|
||||
java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
|
||||
fi
|
||||
|
||||
fowners root:collectd /etc/collectd.conf
|
||||
fperms u=rw,g=r,o= /etc/collectd.conf
|
||||
|
||||
dodoc AUTHORS ChangeLog README
|
||||
|
||||
if use contrib ; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r contrib
|
||||
fi
|
||||
|
||||
keepdir /var/lib/${PN}
|
||||
fowners collectd:collectd /var/lib/${PN}
|
||||
|
||||
newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
|
||||
newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
|
||||
systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
|
||||
|
||||
sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"etc/collectd.conf || die
|
||||
sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
|
||||
sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
||||
sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process "${PN}.conf"
|
||||
|
||||
if use filecaps; then
|
||||
local caps=()
|
||||
use collectd_plugins_ceph && caps+=('CAP_DAC_OVERRIDE')
|
||||
use collectd_plugins_exec && caps+=('CAP_SETUID' 'CAP_SETGID')
|
||||
use collectd_plugins_iptables && caps+=('CAP_NET_ADMIN')
|
||||
use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH')
|
||||
|
||||
if use collectd_plugins_dns || use collectd_plugins_ping; then
|
||||
caps+=('CAP_NET_RAW')
|
||||
fi
|
||||
|
||||
if use collectd_plugins_turbostat || use collectd_plugins_smart; then
|
||||
caps+=('CAP_SYS_RAWIO')
|
||||
fi
|
||||
|
||||
if [ ${#caps[@]} -gt 0 ]; then
|
||||
local caps_str=$(IFS=","; echo "${caps[*]}")
|
||||
fcaps ${caps_str} usr/sbin/collectd
|
||||
elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
|
||||
elog " ${caps_str}+EP"
|
||||
elog
|
||||
|
||||
local systemd_unit="$(systemd_get_systemunitdir)/collectd.service"
|
||||
if [[ -e "${systemd_unit}" ]]; then
|
||||
caps_str="${caps[*]}"
|
||||
sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \
|
||||
die "Failed to set CapabilityBoundingSet in '${systemd_unit}'"
|
||||
|
||||
elog "CapabilityBoundingSet in '${systemd_unit}'"
|
||||
elog "updated to match capabilities set above."
|
||||
elog
|
||||
else
|
||||
if has_version "sys-apps/systemd"; then
|
||||
# Bug 596852
|
||||
ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'"
|
||||
ewarn "because unit was not found. Please file a bug about this."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
elog "Note: Collectd is only the collector."
|
||||
elog " You need to install 'data' sources (applications) locally or"
|
||||
elog " remotely on your own."
|
||||
|
||||
elog
|
||||
elog "Collectd is configured to run as unprivileged user by default."
|
||||
elog "You may want to revisit the configuration."
|
||||
elog
|
||||
|
||||
if use collectd_plugins_email; then
|
||||
ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
|
||||
fi
|
||||
|
||||
if use collectd_plugins_smart; then
|
||||
elog ""
|
||||
elog "If you are using smart plugin and don't run collectd as root make sure"
|
||||
elog "that the collectd user is allowed to access the disk you want to monitor"
|
||||
elog "(can be done via udev rule for example) and that collectd has the required"
|
||||
elog "capabilities set (which is the default when package was emerged with"
|
||||
elog "'filecaps' USE flag set)."
|
||||
fi
|
||||
|
||||
if use contrib; then
|
||||
elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
|
||||
elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST asciinema-1.4.0.tar.gz 35264 BLAKE2B 7a6eb179206afdcbe8d1a68cc7bdd7246cbb8d5ace870da40db2a1159a71f7cb18133c0bf286f0b0c1a4d2b7779fec9d1af602ca8b14d2fce478b84fe0e8adf4 SHA512 23c67a462acdbbbed495e6cc3e0e22ed028effcc945af30b5925854e216c6f74bb1b416d9b0001726732ae8be510796e996bbca69b225c20422143e5ed1aca5c
|
||||
DIST asciinema-2.0.0.tar.gz 47724 BLAKE2B 28ee2f19bdd7ca27720713af86492d2ac2d3acd53cadfdc82c613e187bcdb4d349c0a7629b7c48630b80c2f62bd20db25ebea43471bd04f205c2afca15b8b9c3 SHA512 af11134af1e69eabbf5a177000026830d418ed5d91e381f27c0631692bbaae04afc3f1086ea2065c54f49f227f7e575938c69d6d3bc8b5f9f06eca3fe084598e
|
||||
DIST asciinema-2.0.1.tar.gz 48597 BLAKE2B 9179d19c3c6980f35004145fc109dfa938fa020e1982389f7309c7716f8e18914fb8db46e74b2d778b043399d00a3348e499e9fc1849f5f02e1a729c8bde6084 SHA512 abc7e2a83032520d42b45524fbd103bd974b6857274fbb923b274d11f0a81a8d06cd1e97f1b7d6432a47e1ded6df5e37e52c69caaf7f15b1bf8b53f17dfc07d1
|
||||
|
@ -1,68 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="A many featured astrology chart calculation program"
|
||||
HOMEPAGE="http://www.astrolog.org/astrolog.htm"
|
||||
SRC_URI="http://www.astrolog.org/ftp/ast54unx.shr"
|
||||
|
||||
LICENSE="astrolog"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc ppc64 x86"
|
||||
IUSE="X"
|
||||
|
||||
DEPEND="X? ( x11-libs/libX11 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_unpack() {
|
||||
sh "${DISTDIR}"/ast54unx.shr || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# remove stripping of created binary, dump hardcoded CFLAGS,
|
||||
# respect CC (bug #243606), and CFLAGS (bug #240057)
|
||||
sed \
|
||||
-e 's:strip:#strip:' -e 's:^CFLAGS = :#CFLAGS = :' \
|
||||
-e 's:\tcc :\t$(CC) $(CFLAGS) $(LDFLAGS) :' \
|
||||
-i Makefile || die
|
||||
|
||||
# we use /usr/share/astrolog for config and (optional) ephemeris-data-files
|
||||
sed -i -e "s:~/astrolog:/usr/share/astrolog:g" astrolog.h || die
|
||||
|
||||
# if we use X, we need to add -L/usr/X11R6/lib to compile succesful
|
||||
#use X && sed -i -e "s:-lm -lX11:-lm -lX11 -L/usr/X11R6/lib:g" Makefile
|
||||
|
||||
# if we do NOT use X, we disable it by removing the -lX11 from the Makefile
|
||||
# and remove the "#define X11" and "#define MOUSE" from astrolog.h
|
||||
use X || ( sed -i -e "s:-lm -lX11:-lm:g" Makefile
|
||||
sed -i -e "s:#define X11:/*#define X11:g" astrolog.h
|
||||
sed -i -e "s:#define MOUSE:/*#define MOUSE:g" astrolog.h )
|
||||
|
||||
# any user may have an own astrolog configfile
|
||||
#sed -i -e "s:astrolog.dat:astrolog.dat:g" astrolog.h
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin astrolog
|
||||
dodoc Helpfile.540 README.1ST README.540 Update.540
|
||||
insinto /usr/share/astrolog
|
||||
doins astrolog.dat
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "There is a sample config file /usr/share/astrolog/astrolog.dat"
|
||||
ewarn "astrolog looks in current dir for a file astrolog.dat before"
|
||||
ewarn "using the file in /usr/share/astrolog"
|
||||
ewarn "If you want extended accuracy of astrolog's calculations you"
|
||||
ewarn "can emerge the optional package \"astrolog-ephemeris\" which"
|
||||
ewarn "needs ~4.7 MB additional diskspace for the ephemeris-files"
|
||||
}
|
@ -1,5 +1,2 @@
|
||||
DIST colemak.typ 8922 BLAKE2B e3c422e9172e215406a5165a44c51c38f3372c9988f1bafdb537463a9a3209f1759a312c2a5d316ec3a2a0b39563521b87aa6944cdd0b4cf94c960cbe70c7ca3 SHA512 f2c2816836c83d7b640f7f703a4924c62ff0746e0d4cf2a2ca36d434017770272518b835ea273815c93ab9df1c0e4d142f5fea1e5f0b1484ecdc652a53bdc499
|
||||
DIST gtypist-2.8.5.tar.gz 1148279 BLAKE2B 47b4b9ddcc21c285cb6ac7d63dc9a92bbf2fb4d04b4a7a84f12943ca0da329d8b480902033fdbf11d839d46daeaaac2c26fc341a5ab4fea161ba508304bec462 SHA512 2671ac0bd5e8681b090911c0d19a439aef2588bbeaa980aed50252a0e8727f4aae0044d1e4d0f7cbbd946881f4a7fa60fda444a668f3c004e64cf4ed6a33eb7e
|
||||
DIST gtypist-2.9.1.tar.xz 954920 BLAKE2B 3d2a110ac45455f893669379dc4527e8e25c16c31825f08e5a80f9833ee42c767e8b1607f168e4a0e1d94f9c7b41b7efda0f9f696a78efc0c0c7f1212bbd1c25 SHA512 dd5d96882c1fa9c786e30d21ab3424be25caecf2850a00edee531ba58aba026efedb12ca8edf34a52033bd0ba28b25ae6a62590e938d7f86124097e7e166e8d9
|
||||
DIST gtypist-2.9.2.tar.xz 956252 BLAKE2B e9b5ff106c9b102a012d5dd9d9f64b64f07c8ef05090732685b277851c76b0eabc9eec38f1021b983cfc790d46e72de4a064f5ea3b956733b0039aaa60eac349 SHA512 6191735c383aeedf3017f9bcd1897d35b2f40ea9de74e94d5c544708e4eca86585ce11984ace75945ac5b61e0f5b73c0f2461c55a6dd3b5d2833b4ceeee90c3f
|
||||
DIST gtypist-2.9.5.tar.xz 929356 BLAKE2B d83506ee8ab26290fae47f98aed4e5e63260f39d5391a9a735d009f34a787cd670b034375c946c7562545b84ed4655d51c385209d676de76cf4891ead9845ea9 SHA512 d6891cd58d23f9b023aec97dc825cb15f7371ab18e82133b9a284d3329b1526bda8e1c5d7225f335c5ec673280cbbe3ad92471eeb15db4ecf29e7feffe27e095
|
||||
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils elisp-common
|
||||
|
||||
DESCRIPTION="Universal typing tutor"
|
||||
HOMEPAGE="https://www.gnu.org/software/gtypist/"
|
||||
SRC_URI="mirror://gnu/gtypist/${P}.tar.gz
|
||||
http://colemak.com/pub/learn/colemak.typ"
|
||||
|
||||
LICENSE="GPL-2 public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86 ~amd64-linux"
|
||||
IUSE="nls emacs xemacs"
|
||||
|
||||
DEPEND=">=sys-libs/ncurses-5.2
|
||||
emacs? ( virtual/emacs )
|
||||
xemacs? ( !emacs? ( app-editors/xemacs app-xemacs/fsf-compat ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
SITEFILE=50${PN}-gentoo.el
|
||||
|
||||
src_unpack() {
|
||||
unpack ${P}.tar.gz
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-2.8.3-xemacs-compat.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local lispdir=""
|
||||
if use emacs; then
|
||||
lispdir="${SITELISP}/${PN}"
|
||||
einfo "Configuring to build with GNU Emacs support"
|
||||
elif use xemacs; then
|
||||
lispdir="${EPREFIX}/usr/lib/xemacs/site-packages/lisp/${PN}"
|
||||
einfo "Configuring to build with XEmacs support"
|
||||
fi
|
||||
|
||||
econf $(use_enable nls) \
|
||||
EMACS=$(usev emacs || usev xemacs || echo no) \
|
||||
--with-lispdir="${lispdir}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
dodoc AUTHORS ChangeLog NEWS README THANKS TODO
|
||||
|
||||
insinto /usr/share/gtypist
|
||||
doins "${DISTDIR}"/colemak.typ
|
||||
|
||||
if use emacs; then
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils elisp-common
|
||||
|
||||
DESCRIPTION="Universal typing tutor"
|
||||
HOMEPAGE="https://www.gnu.org/software/gtypist/"
|
||||
SRC_URI="mirror://gnu/gtypist/${P}.tar.xz
|
||||
http://colemak.com/pub/learn/colemak.typ"
|
||||
|
||||
LICENSE="GPL-2 public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux"
|
||||
IUSE="nls emacs xemacs"
|
||||
|
||||
DEPEND=">=sys-libs/ncurses-5.2
|
||||
emacs? ( virtual/emacs )
|
||||
xemacs? ( !emacs? ( app-editors/xemacs app-xemacs/fsf-compat ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
SITEFILE=50${PN}-gentoo.el
|
||||
|
||||
src_unpack() {
|
||||
unpack ${P}.tar.xz
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-2.8.3-xemacs-compat.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local lispdir=""
|
||||
if use emacs; then
|
||||
lispdir="${SITELISP}/${PN}"
|
||||
einfo "Configuring to build with GNU Emacs support"
|
||||
elif use xemacs; then
|
||||
lispdir="${EPREFIX}/usr/lib/xemacs/site-packages/lisp/${PN}"
|
||||
einfo "Configuring to build with XEmacs support"
|
||||
fi
|
||||
|
||||
econf $(use_enable nls) \
|
||||
EMACS=$(usev emacs || usev xemacs || echo no) \
|
||||
--with-lispdir="${lispdir}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
dodoc AUTHORS ChangeLog NEWS README THANKS TODO
|
||||
|
||||
insinto /usr/share/gtypist
|
||||
doins "${DISTDIR}"/colemak.typ
|
||||
|
||||
if use emacs; then
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils elisp-common
|
||||
|
||||
DESCRIPTION="Universal typing tutor"
|
||||
HOMEPAGE="https://www.gnu.org/software/gtypist/"
|
||||
SRC_URI="mirror://gnu/gtypist/${P}.tar.xz
|
||||
http://colemak.com/pub/learn/colemak.typ"
|
||||
|
||||
LICENSE="GPL-2 public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux"
|
||||
IUSE="nls emacs xemacs"
|
||||
|
||||
DEPEND=">=sys-libs/ncurses-5.2
|
||||
emacs? ( virtual/emacs )
|
||||
xemacs? ( !emacs? ( app-editors/xemacs app-xemacs/fsf-compat ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
SITEFILE=50${PN}-gentoo.el
|
||||
|
||||
src_unpack() {
|
||||
unpack ${P}.tar.xz
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-2.8.3-xemacs-compat.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local lispdir=""
|
||||
if use emacs; then
|
||||
lispdir="${SITELISP}/${PN}"
|
||||
einfo "Configuring to build with GNU Emacs support"
|
||||
elif use xemacs; then
|
||||
lispdir="${EPREFIX}/usr/lib/xemacs/site-packages/lisp/${PN}"
|
||||
einfo "Configuring to build with XEmacs support"
|
||||
fi
|
||||
|
||||
econf $(use_enable nls) \
|
||||
EMACS=$(usev emacs || usev xemacs || echo no) \
|
||||
--with-lispdir="${lispdir}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
dodoc AUTHORS ChangeLog NEWS README THANKS TODO
|
||||
|
||||
insinto /usr/share/gtypist
|
||||
doins "${DISTDIR}"/colemak.typ
|
||||
|
||||
if use emacs; then
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
|
||||
DESCRIPTION="GNU \"Hello, world\" application"
|
||||
HOMEPAGE="https://www.gnu.org/software/hello/"
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="FDL-1.3 GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="nls"
|
||||
|
||||
DOCS=(AUTHORS ChangeLog ChangeLog.O NEWS README THANKS TODO contrib/evolution.txt)
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable nls)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
for x in contrib man doc po tests src; do
|
||||
newdoc $x/ChangeLog ChangeLog.$x || die "newdoc failed"
|
||||
done
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
|
||||
DESCRIPTION="GNU \"Hello, world\" application"
|
||||
HOMEPAGE="https://www.gnu.org/software/hello/"
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="FDL-1.3 GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="nls"
|
||||
|
||||
DOCS=(AUTHORS ChangeLog ChangeLog.O NEWS README THANKS TODO contrib/evolution.txt)
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable nls)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
for x in contrib man doc po tests src; do
|
||||
newdoc $x/ChangeLog ChangeLog.$x || die "newdoc failed"
|
||||
done
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="A modified version of mv, used to convert filenames to lower/upper case"
|
||||
HOMEPAGE="http://www.ibiblio.org/pub/Linux/utils/file"
|
||||
SRC_URI="http://www.ibiblio.org/pub/Linux/utils/file/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-libs/shhopt"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-includes.patch \
|
||||
"${FILESDIR}"/${P}-flags.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export CC
|
||||
emake || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin mvcase || die
|
||||
doman mvcase.1
|
||||
dodoc INSTALL
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST neofetch-3.4.0.tar.gz 82090 BLAKE2B afc00b37d84cdf3ae0fd4037312b1c67fdadcbe99d6d602e8f3b6caa844b3780861c9d2522ec605ba5b7aa08e4e85ef804129da2ce3f6f01ab8b536704cdd182 SHA512 931648e8173eb91fdf5c79b5bb9b6efef132d30cf2f10d6f75dcff42f3661d40ceec712c109e90e2226e1aa85cad7676c438b6cad49e8298a77d990d9a3d197b
|
||||
DIST neofetch-4.0.1.tar.gz 111631 BLAKE2B 457f8d4bb4b2d42bacab5891bd64c6f8b52ee94262258dc4b69b8ebcbae9f06bc7ffabd424a7cae5eee384d52259861f9f2e6b38f3e540b5b805eda48c2d1650 SHA512 b3d89e55d9c056a9e80295f4abcdee96866bcf685dc924f21a8b4c92ddb822b8dafef06d28ac14a3bed9da29bb61219a0d4b82cd7e8da18ce4989d847e4e920d
|
||||
|
@ -0,0 +1,22 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Simple information system script"
|
||||
HOMEPAGE="https://github.com/dylanaraps/neofetch"
|
||||
SRC_URI="https://github.com/dylanaraps/${PN}/archive/${PV}/${P}.tar.gz"
|
||||
LICENSE="MIT-with-advertising"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-fbsd"
|
||||
IUSE="X"
|
||||
|
||||
RDEPEND="sys-apps/pciutils
|
||||
X? (
|
||||
media-gfx/imagemagick
|
||||
media-libs/imlib2
|
||||
www-client/w3m[imlib]
|
||||
x11-apps/xprop
|
||||
x11-apps/xrandr
|
||||
x11-apps/xwininfo
|
||||
)"
|
@ -1,3 +1,2 @@
|
||||
DIST vifm-0.7.2.tar.bz2 468086 BLAKE2B a83b1f43eb3f6e47afd5a7c810741468857c602b80cad5c91d2033eea9e1f1efb09e19ca7b02f39e93f8f7186b4cb6fb0627f98a30c054a0d7d71d1b454698d8 SHA512 24a5ad44cecd01f489b95008f0b98ad6cd63656bc7fe4a888101f369f9b258cb87b8025efac30237fbaebc7aff14d173d02118839312017276f3f6b62ea4a3b9
|
||||
DIST vifm-0.9.1.tar.bz2 1002758 BLAKE2B 8eb9cc4c299877485bb4a44d95fe2412e196686399a6246bc1b5036dbc34ecbcf1cd43d1d55bdacdcc099a65e03f589f360d39ee38da4e12bff0a4bfcbdd180b SHA512 a30457329bf9501efd7e9e0853107b5ecd653ab70e7081764677d035bd0f61876bc96b35bea5258153d68b7be075091168331be79d7398f94353f73bbf78933d
|
||||
DIST vifm-0.9.tar.bz2 971539 BLAKE2B 5d6dd8c399e38886ab3e2d548b93492bf31b464e5661c6f6d54504701bf1eab8338155a9ddc9b220c4cb2a67417d5622094e9ffb717ddf594984fe475214af60 SHA512 5ae2b03e672bd9a7f95a5c59141dabac8bc7946a4e307d6a3df70bdb52e1f7665b960a3d20709c811cbfbcf76f7836d23b5edb191968e5277fb705a291ab3a9a
|
||||
|
@ -1,64 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit base
|
||||
|
||||
DESCRIPTION="Console file manager with vi(m)-like keybindings"
|
||||
HOMEPAGE="http://vifm.info/"
|
||||
SRC_URI="mirror://sourceforge/vifm/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc s390 x86"
|
||||
IUSE="+compatibility +extended-keys +magic vim-plugin vim-syntax"
|
||||
|
||||
DEPEND="
|
||||
>=sys-libs/ncurses-5.7-r7
|
||||
magic? ( sys-apps/file )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
vim-plugin? ( >=app-editors/vim-7.3 )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS FAQ NEWS README TODO )
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable compatibility compatibility-mode) \
|
||||
$(use_enable extended-keys) \
|
||||
$(use_with magic libmagic)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
base_src_install
|
||||
|
||||
if use vim-syntax; then
|
||||
local t
|
||||
for t in ftdetect ftplugin syntax; do
|
||||
insinto /usr/share/vim/vimfiles/"${t}"
|
||||
doins "${S}"/data/vim/"${t}"/"${PN}".vim
|
||||
done
|
||||
fi
|
||||
if use vim-plugin; then
|
||||
local t
|
||||
for t in doc plugin; do
|
||||
insinto /usr/share/vim/vimfiles/"${t}"
|
||||
doins "${S}"/data/vim/"${t}"/"${PN}".*
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To use vim to view the vifm help, copy /usr/share/${P}/vifm.txt"
|
||||
elog " to ~/.vim/doc/ and run ':helptags ~/.vim/doc' in vim,"
|
||||
elog "then edit ~/.vifm/vifmrc${PV/a/} and set USE_VIM_HELP=1"
|
||||
elog ""
|
||||
elog "To use the vifm plugin in vim, copy /usr/share/${P}/vifm.vim to"
|
||||
elog " /usr/share/vim/vimXX/"
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST dash-0.5.10.1.tar.gz 225253 BLAKE2B 55dbdca7f01d19656e002d6e210bcae920619e2e88d4d174a3e08cbbc40bf867ece3f24ce9690ec64f95b1f0995ab35cabc08381ac031a33b55282cec0b09e73 SHA512 7ca3bbcf8bac84d359cde710a9ab393f05cf8522e969a2c110d2e71620e53f349387128045e68738dc621afe0b48f43ae3d32851187f2ae02d49b3e2575ffa6b
|
||||
DIST dash-0.5.10.2.tar.gz 225196 BLAKE2B af48879d29aee8041949b51f08eb89c3938e77b2e05553a3e1a9939da7b00fd80f7b9fb35f33e18b0c11850bfb1b8377e9dc9bcfd80754fd29c9d160e0ce5a4d SHA512 0ae29be77794df0ba254967649b9728611a75fbb3acd32ab6634d76399d1ce97c7d12d31da465482a7e4f3207093415c496c39525cace9b78ab3cb9444dd7640
|
||||
DIST dash-0.5.9.1.tar.gz 225217 BLAKE2B a80aa00ea5418d00b03c9ded21ef5c3a28d599059d1ac2f20082867b71ece6afac2f0bce9bc09946450c7618ad2c7f95df63b3d519a7f56552a291d09e44a71b SHA512 d56a043b8fab4693d3f70cceb531c37174e7ded4acd5549e53048d7ce29125ff21d7e758f51a4a73e06250d051e246467039989275838c19a2579edea3f72b7d
|
||||
|
@ -0,0 +1,78 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic toolchain-funcs versionator
|
||||
|
||||
#MY_PV="$(get_version_component_range 1-3)"
|
||||
DEB_PATCH="" #$(get_version_component_range 4)
|
||||
#MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DESCRIPTION="Debian Almquist Shell"
|
||||
HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/"
|
||||
SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${P}.tar.gz"
|
||||
if [[ -n "${DEB_PATCH}" ]] ; then
|
||||
DEB_PF="${PN}_${MY_PV}-${DEB_PATCH}"
|
||||
SRC_URI+=" mirror://debian/pool/main/d/dash/${DEB_PF}.diff.gz"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="libedit static vanilla"
|
||||
|
||||
RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
libedit? ( static? ( dev-libs/libedit[static-libs] ) )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.5.9.1-format-security.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if [[ -n "${DEB_PATCH}" ]] ; then
|
||||
eapply "${WORKDIR}"/${DEB_PF}.diff
|
||||
eapply */debian/diff/*
|
||||
fi
|
||||
|
||||
#337329 #527848
|
||||
use vanilla || eapply "${FILESDIR}"/${PN}-0.5.10-dumb-echo.patch
|
||||
|
||||
default
|
||||
|
||||
# Fix the invalid sort
|
||||
sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins
|
||||
|
||||
# Use pkg-config for libedit linkage
|
||||
sed -i \
|
||||
-e "/LIBS/s:-ledit:\`$(tc-getPKG_CONFIG) --libs libedit $(usex static --static '')\`:" \
|
||||
configure || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# don't redefine stat on Solaris
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export ac_cv_func_stat64=yes
|
||||
fi
|
||||
append-cppflags -DJOBS=$(usex libedit 1 0)
|
||||
use static && append-ldflags -static
|
||||
# Do not pass --enable-glob due to #443552.
|
||||
# Autotools use $LINENO as a proxy for extended debug support
|
||||
# (i.e. they're running bash), so disable that. #527644
|
||||
local myeconfargs=(
|
||||
--bindir="${EPREFIX}"/bin
|
||||
--enable-fnmatch
|
||||
--disable-lineno
|
||||
$(use_with libedit)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
if [[ -n "${DEB_PATCH}" ]] ; then
|
||||
dodoc */debian/changelog
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,5 +1,2 @@
|
||||
DIST epspdf.0.5.3.tgz 436341 BLAKE2B 3c4802ed80b19b259613cfbb801f714a205b38e5c31246122e0f046a0007adb2bac7b3d99eb0d2b14d16df11693273eb4aa6285e9210ddea823213dad10e59e9 SHA512 fa2a777c0036ba5b1b960064c13ec1dd8f9180258e4f92fd46a5703c90214b154c7e231faada29f6d0da3b02062e8262b20a8a535ccfc702032bf1c07d4131e2
|
||||
DIST epspdf.0.6.0.tgz 352989 BLAKE2B 633e2ed29d8ec28f679b00095d335cea4bd1996cf6fdf3950b97084a73044eca9371ac6964ad48e98ea8ddba38d91acad2137ee8d3122ea03df3ce25f08196ce SHA512 44a7015fa0b7298429567e998068864419fd396f6b0781bf7877c6599d3bb2f254b7a0f976500655851a95d727880d106d9e1df9086306eef74db0b109a63506
|
||||
DIST epspdf.0.6.1.tgz 343913 BLAKE2B 16253e04e2f9b459d2397b1affdfdf820f85580654742fb674328f09116f05c6be1280aaa68d3bf79b62565295ed15fe28faed4fe4b8ca391a72269fa3654b5e SHA512 3efa037e9081d4c4c74ba56e2c7767c8abafb64e5f0a9f73fcf6b1e6ca7e6f68576555aff4031b8cd82ebdf001949a4455648dad3bf79ee6a37be1c73a5b4443
|
||||
DIST epspdf.0.6.2.tgz 348540 BLAKE2B dbb0ca9adfa0859c82aa29a240c473a00ce14f5dd8349f5cfe78b54053826c848077616bd6e7634f6efe59982dc68086b0adcb73a13fcf7ea6d15800815e919b SHA512 c4778683c990a7ead16fc7f266f6f7977f71ad81c4e69abff6c1fbc7cc7250a0f8ba557d4896f4d9f26cc826e5509c0ae4d09c687fea119bc2ed26912b4639e4
|
||||
DIST epspdf.0.6.3.tgz 335975 BLAKE2B aacd6e222bfe74636dba796fd6e878fa9970f469d096eb77acf4a336a0ab5620629de7ba1c763afa62b181887724db55be57d1929a041a945c7d74ea3028d6de SHA512 ddb0d8c17b6b0bbb934312e6253a2b689d2545c892af989efac9782022c501109f2ff57bb2ea7c26d63d7747e2a510c18bd22a6076bb7137fe0252c38b2125ea
|
||||
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit texlive-common eutils
|
||||
|
||||
DESCRIPTION="GUI and command-line converter for [e]ps and pdf"
|
||||
HOMEPAGE="http://tex.aanhet.net/epspdf/"
|
||||
SRC_URI="http://tex.aanhet.net/epspdf/${PN}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~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"
|
||||
IUSE="doc tk"
|
||||
|
||||
DEPEND="sys-apps/texinfo"
|
||||
RDEPEND="!<dev-texlive/texlive-pictures-2011-r1
|
||||
dev-lang/ruby
|
||||
app-text/ghostscript-gpl
|
||||
tk? ( dev-lang/tk )"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
INSTALLDIR=/usr/share/${PN}
|
||||
FILES="epspdf.rb epspdfrc.rb makegray.pro"
|
||||
TKFILES="epspdf.help epspdf.icns epspdf.ico epspdftk.tcl"
|
||||
|
||||
#epspdf.info seems broken, rebuild it
|
||||
src_compile() {
|
||||
cd "${S}/doc"
|
||||
makeinfo epspdf.texi || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir ${INSTALLDIR}
|
||||
cp -p ${FILES} "${ED}/${INSTALLDIR}" || die
|
||||
if use tk ; then
|
||||
cp -p ${TKFILES} "${ED}/${INSTALLDIR}" || die
|
||||
fi
|
||||
dobin_texmf_scripts "${PN}/epspdf.rb"
|
||||
use tk && dobin_texmf_scripts "${PN}/epspdftk.tcl"
|
||||
|
||||
doinfo doc/epspdf.info
|
||||
dodoc doc/Changelog
|
||||
if use doc ; then
|
||||
dodoc doc/epspdf.pdf
|
||||
dohtml -r doc
|
||||
fi
|
||||
|
||||
# give it a .desktop
|
||||
if use tk; then
|
||||
make_desktop_entry epspdftk epspdftk "${INSTALLDIR}/epspdf.ico" "Graphics;ImageProcessing"
|
||||
fi
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit texlive-common eutils
|
||||
|
||||
DESCRIPTION="GUI and command-line converter for [e]ps and pdf"
|
||||
HOMEPAGE="http://tex.aanhet.net/epspdf/"
|
||||
SRC_URI="http://tex.aanhet.net/epspdf/${PN}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~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"
|
||||
IUSE="doc tk"
|
||||
|
||||
DEPEND="sys-apps/texinfo"
|
||||
RDEPEND="!<dev-texlive/texlive-pictures-2011-r1
|
||||
>=dev-texlive/texlive-basic-2011
|
||||
app-text/ghostscript-gpl
|
||||
tk? ( dev-lang/tk )"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
INSTALLDIR=/usr/share/${PN}
|
||||
FILES="epspdf.tlu"
|
||||
TKFILES="epspdf.help doc/images/epspdf.png epspdftk.tcl"
|
||||
|
||||
src_compile() {
|
||||
cd doc
|
||||
makeinfo epspdf || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir ${INSTALLDIR}
|
||||
cp -p ${FILES} "${ED}/${INSTALLDIR}" || die
|
||||
if use tk ; then
|
||||
cp -p ${TKFILES} "${ED}/${INSTALLDIR}" || die
|
||||
fi
|
||||
dobin_texmf_scripts "${PN}/epspdf.tlu"
|
||||
use tk && dobin_texmf_scripts "${PN}/epspdftk.tcl"
|
||||
|
||||
doinfo doc/epspdf.info
|
||||
dodoc doc/Changelog
|
||||
if use doc ; then
|
||||
dodoc doc/epspdf.pdf
|
||||
dohtml -r doc
|
||||
fi
|
||||
|
||||
# give it a .desktop
|
||||
if use tk; then
|
||||
make_desktop_entry epspdftk epspdftk "${INSTALLDIR}/epspdf.png" "Graphics;ImageProcessing"
|
||||
fi
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit texlive-common eutils
|
||||
|
||||
DESCRIPTION="GUI and command-line converter for [e]ps and pdf"
|
||||
HOMEPAGE="http://tex.aanhet.net/epspdf/"
|
||||
SRC_URI="http://tex.aanhet.net/epspdf/${PN}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~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"
|
||||
IUSE="doc tk"
|
||||
|
||||
DEPEND="sys-apps/texinfo"
|
||||
RDEPEND="!<dev-texlive/texlive-pictures-2011-r1
|
||||
>=dev-texlive/texlive-basic-2011
|
||||
app-text/ghostscript-gpl
|
||||
tk? ( dev-lang/tk )"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
INSTALLDIR=/usr/share/${PN}
|
||||
FILES="epspdf.tlu"
|
||||
TKFILES="epspdf.help doc/images/epspdf.png epspdftk.tcl"
|
||||
|
||||
src_compile() {
|
||||
cd doc
|
||||
makeinfo epspdf || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir ${INSTALLDIR}
|
||||
cp -p ${FILES} "${ED}/${INSTALLDIR}" || die
|
||||
if use tk ; then
|
||||
cp -p ${TKFILES} "${ED}/${INSTALLDIR}" || die
|
||||
fi
|
||||
dobin_texmf_scripts "${PN}/epspdf.tlu"
|
||||
use tk && dobin_texmf_scripts "${PN}/epspdftk.tcl"
|
||||
|
||||
doinfo doc/epspdf.info
|
||||
dodoc doc/Changelog
|
||||
if use doc ; then
|
||||
dodoc doc/epspdf.pdf
|
||||
dohtml -r doc
|
||||
fi
|
||||
|
||||
# give it a .desktop
|
||||
if use tk; then
|
||||
make_desktop_entry epspdftk epspdftk "${INSTALLDIR}/epspdf.png" "Graphics;ImageProcessing"
|
||||
fi
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="A precise PDF to HTML converter"
|
||||
HOMEPAGE="http://coolwanglu.github.io/pdf2htmlEX/"
|
||||
SRC_URI="https://github.com/coolwanglu/${PN}/archive/v${PV}.tar.gz -> ${P}.tgz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE=""
|
||||
|
||||
CDEPEND="
|
||||
app-text/poppler:=[jpeg,png]
|
||||
app-text/poppler-data
|
||||
media-gfx/fontforge
|
||||
media-libs/freetype
|
||||
x11-libs/cairo[svg]
|
||||
"
|
||||
RDEPEND="${CDEPEND}
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
@ -0,0 +1,118 @@
|
||||
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) {
|
@ -0,0 +1,366 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
#TL_UPSTREAM_PATCHLEVEL="1"
|
||||
PATCHLEVEL="70"
|
||||
TL_SOURCE_VERSION=20170524
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
|
||||
|
||||
MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
|
||||
|
||||
DESCRIPTION="A complete TeX distribution"
|
||||
HOMEPAGE="http://tug.org/texlive/"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2 LPPL-1.3c TeX"
|
||||
|
||||
SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
|
||||
|
||||
# Fetch patches
|
||||
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
|
||||
"
|
||||
# mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
|
||||
|
||||
TL_CORE_BINEXTRA_MODULES="
|
||||
a2ping adhocfilelist arara asymptote bundledoc checklistings ctan_chk
|
||||
ctanify ctanupload ctie cweb de-macro dtl dtxgen dvi2tty dviasm dvicopy
|
||||
dvidvi dviljk dvipos findhyph fragmaster hook-pre-commit-pkg hyphenex
|
||||
installfont lacheck latex-git-log latex-papersize latex2man latex2nemeth
|
||||
latexfileversion latexpand latexindent ltxfileinfo ltximg listings-ext make4ht
|
||||
match_parens mflua mkjobtexmf patgen pdfbook2 pdfcrop pdflatexpicscale pdftools
|
||||
pdfxup pfarrei pkfix pkfix-helper purifyeps seetexk srcredact sty2dtx
|
||||
synctex tex4ebook texcount texdef texdiff texdirflatten texdoc texfot
|
||||
texliveonfly texloganalyser texosquery texware tie tpic2pdftex typeoutfileinfo
|
||||
web collection-binextra
|
||||
"
|
||||
TL_CORE_BINEXTRA_DOC_MODULES="
|
||||
a2ping.doc adhocfilelist.doc arara.doc asymptote.doc bundledoc.doc
|
||||
checklistings.doc ctan_chk.doc ctanify.doc ctanupload.doc ctie.doc
|
||||
cweb.doc de-macro.doc dtl.doc dtxgen.doc dvi2tty.doc dviasm.doc dvicopy.doc
|
||||
dvidvi.doc dviljk.doc dvipos.doc findhyph.doc fragmaster.doc
|
||||
hook-pre-commit-pkg.doc installfont.doc lacheck.doc latex-git-log.doc
|
||||
latex-papersize.doc latex2man.doc latex2nemeth.doc latexfileversion.doc
|
||||
latexpand.doc latexindent.doc ltxfileinfo.doc ltximg.doc listings-ext.doc
|
||||
make4ht.doc match_parens.doc mkjobtexmf.doc patgen.doc pdfbook2.doc pdfcrop.doc
|
||||
pdflatexpicscale.doc pdftools.doc pdfxup.doc pfarrei.doc pkfix.doc
|
||||
pkfix-helper.doc purifyeps.doc pythontex.doc seetexk.doc srcredact.doc
|
||||
sty2dtx.doc synctex.doc tex4ebook.doc texcount.doc texdef.doc texdiff.doc
|
||||
texdirflatten.doc texdoc.doc texfot.doc texliveonfly.doc texloganalyser.doc
|
||||
texosquery.doc texware.doc tie.doc tpic2pdftex.doc typeoutfileinfo.doc web.doc
|
||||
"
|
||||
TL_CORE_BINEXTRA_SRC_MODULES="
|
||||
adhocfilelist.source arara.source checklistings.source hyphenex.source
|
||||
listings-ext.source mkjobtexmf.source pfarrei.source pythontex.source
|
||||
texdef.source texosquery.source
|
||||
"
|
||||
|
||||
TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk texlive.infra ${TL_CORE_BINEXTRA_MODULES}"
|
||||
TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
|
||||
TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
|
||||
|
||||
for i in ${TL_CORE_EXTRA_MODULES}; do
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
|
||||
done
|
||||
|
||||
SRC_URI="${SRC_URI} doc? ( "
|
||||
for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
|
||||
done
|
||||
SRC_URI="${SRC_URI} )"
|
||||
SRC_URI="${SRC_URI} source? ( "
|
||||
for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
|
||||
done
|
||||
SRC_URI="${SRC_URI} )"
|
||||
|
||||
#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 ~x64-solaris ~x86-solaris"
|
||||
IUSE="cjk X doc source tk +luajittex xetex"
|
||||
|
||||
TEXMF_PATH=/usr/share/texmf-dist
|
||||
|
||||
MODULAR_X_DEPEND="X? (
|
||||
x11-libs/libX11
|
||||
x11-libs/libXmu
|
||||
)"
|
||||
|
||||
COMMON_DEPEND="${MODULAR_X_DEPEND}
|
||||
!app-text/ptex
|
||||
!app-text/tetex
|
||||
!<app-text/texlive-2007
|
||||
!app-text/xetex
|
||||
!<dev-texlive/texlive-basic-2014
|
||||
!<dev-texlive/texlive-metapost-2011
|
||||
!app-text/dvibook
|
||||
!dev-tex/luatex
|
||||
!app-text/dvipdfm
|
||||
!app-text/dvipdfmx
|
||||
!app-text/xdvipdfmx
|
||||
sys-libs/zlib
|
||||
>=media-libs/libpng-1.2.43-r2:0=
|
||||
>=app-text/poppler-0.58.0:=
|
||||
>=x11-libs/cairo-1.12
|
||||
>=x11-libs/pixman-0.18
|
||||
dev-libs/zziplib
|
||||
app-text/libpaper
|
||||
dev-libs/gmp:0
|
||||
dev-libs/mpfr:0=
|
||||
xetex? (
|
||||
>=media-libs/harfbuzz-1.4.5[icu,graphite]
|
||||
>=dev-libs/icu-50:=
|
||||
>=app-text/teckit-2.5.3
|
||||
media-libs/fontconfig
|
||||
media-gfx/graphite2
|
||||
)
|
||||
media-libs/freetype:2
|
||||
>=dev-libs/kpathsea-6.2.3
|
||||
cjk? ( >=dev-libs/ptexenc-1.3.5 )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
virtual/pkgconfig
|
||||
sys-apps/ed
|
||||
sys-devel/flex
|
||||
app-arch/xz-utils"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
>=app-text/ps2pkm-1.8_p20170524
|
||||
>=app-text/dvipsk-5.997
|
||||
>=dev-tex/bibtexu-3.71_p20170524
|
||||
virtual/perl-Getopt-Long
|
||||
tk? ( dev-perl/Tk )"
|
||||
|
||||
S="${WORKDIR}/${P}_build"
|
||||
B="${WORKDIR}/${MY_PV}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
mkdir -p "${S}" || die "failed to create build dir"
|
||||
}
|
||||
|
||||
RELOC_TARGET=texmf-dist
|
||||
|
||||
src_prepare() {
|
||||
cd "${WORKDIR}"
|
||||
# From texlive-module.eclass.
|
||||
grep -H RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
|
||||
{ for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq > "${T}/dirlist"
|
||||
for i in $(<"${T}/dirlist"); do
|
||||
[ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
|
||||
done
|
||||
for i in $(<"${T}/reloclist"); do
|
||||
mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
|
||||
done
|
||||
|
||||
mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
|
||||
|
||||
cd "${B}"
|
||||
|
||||
# bug 655052
|
||||
epatch "${WORKDIR}/${PN%-core}-${TL_SOURCE_VERSION}-source-freetype.patch"
|
||||
|
||||
#EPATCH_MULTI_MSG="Applying patches from upstream bugfix branch..." EPATCH_SUFFIX="patch" epatch "${WORKDIR}/gentoo_branch2011_patches"
|
||||
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
|
||||
|
||||
# bug ?
|
||||
epatch "${FILESDIR}/${P}-poppler064.patch"
|
||||
|
||||
sed -i \
|
||||
-e "s,/usr/include /usr/local/include.*echo \$KPATHSEA_INCLUDES.*,${EPREFIX}/usr/include\"," \
|
||||
texk/web2c/configure || die
|
||||
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# It fails on alpha without this
|
||||
use alpha && append-ldflags "-Wl,--no-relax"
|
||||
|
||||
# Required for newest icu, bug #618732
|
||||
append-cxxflags '-std=c++11'
|
||||
|
||||
# Too many regexps use A-Z a-z constructs, what causes problems with locales
|
||||
# that don't have the same alphabetical order than ascii. Bug #242430
|
||||
# So we set LC_ALL to C in order to avoid problems.
|
||||
export LC_ALL=C
|
||||
tc-export CC CXX AR RANLIB
|
||||
ECONF_SOURCE="${B}" \
|
||||
econf -C \
|
||||
--bindir="${EPREFIX}"/usr/bin \
|
||||
--datadir="${S}" \
|
||||
--with-system-freetype2 \
|
||||
--with-system-zlib \
|
||||
--with-system-libpng \
|
||||
--with-system-xpdf \
|
||||
--with-system-poppler \
|
||||
--with-system-teckit \
|
||||
--with-teckit-includes="${EPREFIX}"/usr/include/teckit \
|
||||
--with-system-kpathsea \
|
||||
--with-kpathsea-includes="${EPREFIX}"/usr/include \
|
||||
--with-system-icu \
|
||||
--with-system-ptexenc \
|
||||
--with-system-harfbuzz \
|
||||
--with-system-icu \
|
||||
--with-system-graphite2 \
|
||||
--with-system-cairo \
|
||||
--with-system-pixman \
|
||||
--with-system-zziplib \
|
||||
--with-system-libpaper \
|
||||
--with-system-gmp \
|
||||
--with-system-mpfr \
|
||||
--without-texinfo \
|
||||
--disable-dialog \
|
||||
--disable-multiplatform \
|
||||
--enable-epsfwin \
|
||||
--enable-mftalkwin \
|
||||
--enable-regiswin \
|
||||
--enable-tektronixwin \
|
||||
--enable-unitermwin \
|
||||
--with-ps=gs \
|
||||
--disable-psutils \
|
||||
--disable-t1utils \
|
||||
--enable-ipc \
|
||||
--disable-biber \
|
||||
--disable-bibtex-x \
|
||||
--disable-dvipng \
|
||||
--disable-dvipsk \
|
||||
--disable-chktex \
|
||||
--disable-lcdf-typetools \
|
||||
--disable-pdfopen \
|
||||
--disable-ps2eps \
|
||||
--disable-ps2pk \
|
||||
--disable-detex \
|
||||
--disable-ttf2pk2 \
|
||||
--disable-tex4htk \
|
||||
--disable-cjkutils \
|
||||
--disable-xdvik \
|
||||
--disable-xindy \
|
||||
--enable-luatex \
|
||||
--disable-dvi2tty \
|
||||
--disable-dvisvgm \
|
||||
--disable-vlna \
|
||||
--enable-shared \
|
||||
--disable-native-texlive-build \
|
||||
--disable-largefile \
|
||||
$(use_enable luajittex) \
|
||||
$(use_enable luajittex mfluajit) \
|
||||
$(use_enable xetex) \
|
||||
$(use_enable cjk ptex) \
|
||||
$(use_enable cjk eptex) \
|
||||
$(use_enable cjk uptex) \
|
||||
$(use_enable cjk euptex) \
|
||||
$(use_enable cjk mendexk) \
|
||||
$(use_enable cjk makejvf) \
|
||||
$(use_enable cjk pmp) \
|
||||
$(use_enable cjk upmp) \
|
||||
$(use_enable tk texdoctk) \
|
||||
$(use_with X x)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export CC CXX AR RANLIB
|
||||
emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist}
|
||||
|
||||
cd "${B}" || die
|
||||
# Mimic updmap --syncwithtrees to enable only fonts installed
|
||||
# Code copied from updmap script
|
||||
for i in `egrep '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | sed 's@.* @@'`; do
|
||||
texlive-common_is_file_present_in_texmf "$i" || echo "$i"
|
||||
done > "${T}/updmap_update"
|
||||
{
|
||||
sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
|
||||
sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
|
||||
sed 's@/@\\/@g; s@^@/^KanjiMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
|
||||
} > "${T}/updmap_update2"
|
||||
sed -f "${T}/updmap_update2" "texmf-dist/web2c/updmap.cfg" > "${T}/updmap_update3"\
|
||||
&& cat "${T}/updmap_update3" > "texmf-dist/web2c/updmap.cfg"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir ${TEXMF_PATH:-/usr/share/texmf-dist}/web2c
|
||||
emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install
|
||||
|
||||
cd "${B}" || die
|
||||
dodir /usr/share # just in case
|
||||
cp -pR texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees"
|
||||
cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
|
||||
|
||||
# When X is disabled mf-nowin doesn't exist but some scripts expect it to
|
||||
# exist. Instead, it is called mf, so we symlink it to please everything.
|
||||
use X || dosym mf /usr/bin/mf-nowin
|
||||
|
||||
docinto texk
|
||||
cd "${B}/texk"
|
||||
dodoc ChangeLog README
|
||||
|
||||
docinto dviljk
|
||||
cd "${B}/texk/dviljk"
|
||||
dodoc ChangeLog README NEWS
|
||||
|
||||
docinto makeindexk
|
||||
cd "${B}/texk/makeindexk"
|
||||
dodoc ChangeLog NOTES README
|
||||
|
||||
docinto web2c
|
||||
cd "${B}/texk/web2c"
|
||||
dodoc ChangeLog NEWS PROJECTS README
|
||||
|
||||
use doc || rm -rf "${ED}/usr/share/texmf-dist/doc"
|
||||
|
||||
dodir /etc/env.d
|
||||
echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${ED}/etc/env.d/98texlive"
|
||||
# populate /etc/texmf
|
||||
keepdir /etc/texmf/web2c
|
||||
|
||||
# take care of updmap.cfg and language.d files
|
||||
keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
|
||||
|
||||
mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
|
||||
|
||||
# Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
|
||||
# by texmf-update
|
||||
rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
|
||||
# Remove bundled and invalid updmap.cfg
|
||||
rm -f "${ED}/usr/share/texmf-dist/web2c/updmap.cfg"
|
||||
|
||||
texlive-common_handle_config_files
|
||||
|
||||
keepdir /usr/share/texmf-site
|
||||
|
||||
# the virtex symlink is not installed
|
||||
# The links has to be relative, since the targets
|
||||
# is not present at this stage and MacOS doesn't
|
||||
# like non-existing targets
|
||||
dosym tex /usr/bin/virtex
|
||||
dosym pdftex /usr/bin/pdfvirtex
|
||||
|
||||
# Rename mpost to leave room for mplib
|
||||
mv "${ED}/usr/bin/mpost" "${ED}/usr/bin/mpost-${P}"
|
||||
dosym "mpost-${P}" /usr/bin/mpost
|
||||
|
||||
# Ditto for pdftex
|
||||
mv "${ED}/usr/bin/pdftex" "${ED}/usr/bin/pdftex-${P}"
|
||||
dosym "pdftex-${P}" /usr/bin/pdftex
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
etexmf-update
|
||||
|
||||
einfo "Regenerating TeX formats"
|
||||
fmtutil-sys --all &> /dev/null
|
||||
|
||||
elog
|
||||
elog "If you have configuration files in ${EPREFIX}/etc/texmf to merge,"
|
||||
elog "please update them and run ${EPREFIX}/usr/sbin/texmf-update."
|
||||
elog
|
||||
ewarn "If you are migrating from an older TeX distribution"
|
||||
ewarn "Please make sure you have read:"
|
||||
ewarn "https://wiki.gentoo.org/wiki/Project:TeX/Tex_Live_Migration_Guide"
|
||||
ewarn "in order to avoid possible problems"
|
||||
elog
|
||||
elog "TeXLive has been split in various ebuilds. If you are missing a"
|
||||
elog "package to process your TeX documents, you can install"
|
||||
elog "dev-tex/texmfind to easily search for them."
|
||||
elog
|
||||
}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST pgmodeler-0.9.1.tar.gz 3569027 BLAKE2B 4d91d430554f739b585ed155aa2d87dc648ea5d2d6a1c22ddd9ae829afb63654fe052091de5dea51b0fee20ef2ccaf5b77587f036c4072bbc623bffba9a67b27 SHA512 bb6f093e00f0e41a9dd2a9b7e3723459af759e79835b73ab67b01c23ae6b29f1453b5cf61e987c6f1a2a3908e700d048f0a7dcbed3ac1636493d6b6e657917ba
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>x11@gentoo.org</email>
|
||||
<name>X11</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>pgsql-bugs@gentoo.org</email>
|
||||
<name>PostgreSQL</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,61 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
POSTGRES_COMPAT=( 9.{3..6} 10 )
|
||||
|
||||
inherit desktop postgres qmake-utils
|
||||
|
||||
MY_PV=${PV/_/-}
|
||||
|
||||
DESCRIPTION="PostgreSQL Database Modeler"
|
||||
HOMEPAGE="https://pgmodeler.io"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="${POSTGRES_DEP}
|
||||
dev-libs/icu:=
|
||||
dev-libs/libxml2:=
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtsvg:5
|
||||
dev-qt/qtwidgets:5
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
DOCS=( CHANGELOG.md README.md RELEASENOTES.md )
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
src_configure() {
|
||||
eqmake5 \
|
||||
PREFIX="${EPREFIX%/}/usr" \
|
||||
PLUGINSDIR="${EPREFIX%/}/usr/$(get_libdir)/${PN}/plugins" \
|
||||
PRIVATEBINDIR="${EPREFIX%/}/usr/$(get_libdir)/${PN}/bin" \
|
||||
PRIVATELIBDIR="${EPREFIX%/}/usr/$(get_libdir)/${PN}" \
|
||||
NO_UPDATE_CHECK=1 \
|
||||
-r ${PN}.pro
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd "${S}/tests" || die
|
||||
eqmake5 tests.pro
|
||||
emake
|
||||
emake check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake INSTALL_ROOT="${D}" install
|
||||
|
||||
rm "${D}"/usr/share/${PN}/{CHANGELOG.md,LICENSE,README.md,RELEASENOTES.md}
|
||||
|
||||
einstalldocs
|
||||
|
||||
doicon conf/${PN}_logo.png
|
||||
make_desktop_entry ${PN} ${PN} ${PN}_logo Development
|
||||
}
|
@ -1,16 +1,10 @@
|
||||
DIST postgresql-10.1.tar.bz2 19669989 BLAKE2B 2fbe782023b6d55c6fadaba38e517c60038b3b7b0a14fa8793043f7b9c4719a692440f286bb1f898045b5f56ef1c064f97f36e821990755077dc8d9bb0dbd639 SHA512 06050d353aa43f32e0de0199d833d8a4652aff893b718b1c40ed31837838f73fe4d977ac0f2164ab97b3eeff4aae3409f440601740898a893877d96bc0ed1882
|
||||
DIST postgresql-10.3.tar.bz2 19959653 BLAKE2B ba3b05f53b0f879b18d6d0649bf819697c77a066b49d941a96d13a4741854b01aeb0c8b868d6550a08ad52572c9463c968660aa83c16cbaa5b4bf7a89387a524 SHA512 05cf82d3483bdf38734e6ff0fef6b80e7f8fd3cb5ea6792ffe222a599d97d1a29638970bf28ebf5bd1f877e8dcd9986d88f5c5e5379e74fe79ce83e20d2babba
|
||||
DIST postgresql-10.4.tar.bz2 20201838 BLAKE2B 6d1cdc44547740c8f9fbc2e989364640409c6d2a365568b75731277dd0fba473ce07e2ee27e8ebfad507a6ce0ab3d3a44156c0e3a069d96d320771d8a97ba82f SHA512 b7c0d2fdc724e2eb1cda9fc1eb01b47352bbe6ba6357b3e898b7f5990fd78499c8c68dcb3aa9bde7821d71b5882d8856131384e899f8055d89d51cdfdbc9e663
|
||||
DIST postgresql-9.3.20.tar.bz2 17197360 BLAKE2B 2b07f6ee78294a490a8902d0129ac6b5e729e2d9a30631becc193cb7561294354a779ffc62bd61e807b1f540f01ce095e8ae4ad77adf2ea135389143809c9d48 SHA512 40098661bf00b64ad2d773b242613c44fe269b5ae984ad8990f85ce705b27138b127493c507103052fb6705d52f2e63a1df6692c7024d43c3c6b18154f2ef407
|
||||
DIST postgresql-9.3.22.tar.bz2 17022938 BLAKE2B 198705e438717d0d9e12c73e0c0e3eff0ba89ea50a1b183de70f065e13c153c164890fe56bc6ec13b0cb9617df4f66894c122eeddaf9303b9a02b8e08b19b085 SHA512 667ff496172626d2fe35c6795935fb07f4f7967a3b0631dd3b96278f8dc00b3d08794f091a5ab060a45d6f2a861e0f10f0e9660f9e343ab34eeabd693104c47f
|
||||
DIST postgresql-9.3.23.tar.bz2 17033683 BLAKE2B f02ad25f6b8755a9a57c3a6dcb63b78672e29473b061ad1616be2fb97fbfd83fe0dc9fc9fda66ac0231fb30fb13f9ef8975ba5a9701d83f33495bcf2c2651b4a SHA512 bb2d54312de728aa0379ea5bc6385036bbe69d3b7f85bbd78c210840eed19ace29840849caf38d0689e21130a0c94818a362b3927805d8eded53b68e240a52b0
|
||||
DIST postgresql-9.4.15.tar.bz2 17921677 BLAKE2B a41c81c7acc92265a6558c26370ff2afd258922a7158bbf40f8b1d6c7a3dbfb548502f42d646c96982dd5a87e5991f9d03046ae91e216704b97691666966d795 SHA512 be69f184cf18fb4c611d31a128f3593dc537551606f1db84a3ce9899b72f546876f05b29792435c3780c6c2b571759f4db2c172d62b2c012bd58574df80b4eb1
|
||||
DIST postgresql-9.4.17.tar.bz2 17807762 BLAKE2B 7640c29a71c6aeff47d9b43dd1e4f52edac4295b646b34da3a0ed9c26a8a826061bfd892e9907b62f31b7f01ee3aaf437c88d79b84d1d786d608dcd088309ecf SHA512 9ac03d460e521dcd142ac463dd5bb0f3e3f47333367bf8d61499ec7e8d0129d338c6f111667d0006df0c8ced9ae8a337d4c1b40eb5f55e6bc8dd5a24dfd376f0
|
||||
DIST postgresql-9.4.18.tar.bz2 17828085 BLAKE2B 346584e7d74264a7d58b3793cfd6247ae3cad3bb946bedec8df8d97278ffe6f8e881d31ad50e9f5d622aa4ae9b9711b36258bb60d520bb9a1d458af63c343e9e SHA512 2e64c3130c3dfc5183a77d72f61714bea34bfe549f55720eee25046e00b913a7effec3d7e43a021766ac957c1fa3c8c5e6c26ccbd8be1b434ae618e1fe9daab6
|
||||
DIST postgresql-9.5.10.tar.bz2 18701419 BLAKE2B bdd9a191f4de2ba1cb501476a5eabb377b60899b524f50e5baa1f47b95ce491634b7e69a9c37017614f48789d2b97fdff98e0b12ea06611d1ca76988a8db62c8 SHA512 24e31adabb0b88be882ab0440c560f0e4d5d69203be0581ca0ce22316555d92219ea0a2fd5254f12b2508bd3e58bbe0f1a7c8837228c96d9d5f00caac45af95a
|
||||
DIST postgresql-9.5.12.tar.bz2 18589538 BLAKE2B 4246eb2bf5fe2e3bb48bdc411ebd3c87015570f0be4d8b1ed2a0f2ed20a8374e3244fa0aa17f9145f4f951c88f5b0717a4dd2186bf1621ce3334789f5f8dd50f SHA512 ab81bc95fd587f76a1986db5616b63d861b84da0eb9e54478f5298248a81d7a608d1bb1a9e30662c8190d05630106ddb3bb6413c34b003de948417214d342654
|
||||
DIST postgresql-9.5.13.tar.bz2 18600185 BLAKE2B 7560f08648ec1417d304aa8c53c3220d7a4b2fdaf2cb4920a0196273466d1dbab4c12dbceb3dc9a136458c0089dd5f5dc595c95353584d49da0d2ab6e7903bba SHA512 807b22aabee38326934213de04b782a6b22cd8fe5c5bfd8b6cfa44281924527a715dcd78adbee276746446a7b05036b4714b00a16c650027543dcbafe1888082
|
||||
DIST postgresql-9.6.6.tar.bz2 19605724 BLAKE2B efdb13a4e32133b31a0ee368aed9bf76f0511596a2d77ade60129c2c76b0ba2c7dafad532cf09ae007d7110175a153968cfa151cf8aa7008b59d36ed00ed18ed SHA512 ac2f0fe6ef7c4e14f85cd7592d1306d9657b7f35efa6f43a089d7785ab970b8c25aa1e66d83df056c23513d6dbac0a9f54717b3d85758560d02e7f8141914ebc
|
||||
DIST postgresql-9.6.7.tar.bz2 19504886 BLAKE2B 04ed26987f3a38826b7e04bf364d8f59fc93aa700fdf74b4fc6afdb2fcf12697945c8354e49507af9c4d48fcc05173182cb164778c97845bf84250fd9e5ad882 SHA512 6a66cdd5b74ea6dc95628b89bb7663555370be56b3e938f635950628ad5d77443ac8f40c747be1fc1cfc19ca8b0a27f41e52fe4db83a43c7a7bab9bb076c7844
|
||||
DIST postgresql-9.6.8.tar.bz2 19528927 BLAKE2B 6aab5dbe4b13e1624befc33c2fa5241804dff71879e2d60c166db19c2fe015cd19cfc35054e6aede82bfe6b83a7146b6d2eedaabb94111c163da732526ff1723 SHA512 6b7595c0046308c725d77360b156e979d6bc469b78ac6500f631112f19b2607ca2d816781f8c5fd3bd835c48e079e79ada7af687fbd306a8fec5e160f20dd211
|
||||
DIST postgresql-9.6.9.tar.bz2 19566222 BLAKE2B e92a5ffaa8f4400364a174fc21ab11bb18c96dce9be721e6073ff7ad21b828859c2ac5fe8da81cad6a3d2a63a62d8fcb067d4bb02a9d23903525ad1f78955470 SHA512 3ce2a8f3a017d9c0bd0f1b475a9ee02bcb6a4119b0d436757911f444f49f5024bb1a1be07ce16a79e71af77799de1bf952b32279b4566bae075f23a50b8545c6
|
||||
|
@ -1,146 +0,0 @@
|
||||
diff -Naruw a/contrib/Makefile b/contrib/Makefile
|
||||
--- a/contrib/Makefile 2017-07-10 16:26:20.000000000 -0400
|
||||
+++ b/contrib/Makefile 2017-07-12 09:35:05.025053646 -0400
|
||||
@@ -5,57 +5,9 @@
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
SUBDIRS = \
|
||||
- adminpack \
|
||||
- amcheck \
|
||||
- auth_delay \
|
||||
- auto_explain \
|
||||
- bloom \
|
||||
- btree_gin \
|
||||
- btree_gist \
|
||||
- chkpass \
|
||||
- citext \
|
||||
- cube \
|
||||
- dblink \
|
||||
- dict_int \
|
||||
- dict_xsyn \
|
||||
- earthdistance \
|
||||
- file_fdw \
|
||||
- fuzzystrmatch \
|
||||
- hstore \
|
||||
- intagg \
|
||||
- intarray \
|
||||
- isn \
|
||||
- lo \
|
||||
- ltree \
|
||||
oid2name \
|
||||
- pageinspect \
|
||||
- passwordcheck \
|
||||
- pg_buffercache \
|
||||
- pg_freespacemap \
|
||||
- pg_prewarm \
|
||||
- pg_standby \
|
||||
- pg_stat_statements \
|
||||
- pg_trgm \
|
||||
- pgcrypto \
|
||||
- pgrowlocks \
|
||||
- pgstattuple \
|
||||
- pg_visibility \
|
||||
- postgres_fdw \
|
||||
- seg \
|
||||
- spi \
|
||||
- tablefunc \
|
||||
- tcn \
|
||||
- test_decoding \
|
||||
- tsm_system_rows \
|
||||
- tsm_system_time \
|
||||
- unaccent \
|
||||
vacuumlo
|
||||
|
||||
-ifeq ($(with_openssl),yes)
|
||||
-SUBDIRS += sslinfo
|
||||
-else
|
||||
-ALWAYS_SUBDIRS += sslinfo
|
||||
-endif
|
||||
|
||||
ifneq ($(with_uuid),no)
|
||||
SUBDIRS += uuid-ossp
|
||||
diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
|
||||
--- a/src/backend/Makefile 2017-07-10 16:26:20.000000000 -0400
|
||||
+++ b/src/backend/Makefile 2017-07-12 10:02:15.890642203 -0400
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
##########################################################################
|
||||
|
||||
-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
|
||||
+all: generated-headers
|
||||
|
||||
ifneq ($(PORTNAME), cygwin)
|
||||
ifneq ($(PORTNAME), win32)
|
||||
@@ -226,23 +226,7 @@
|
||||
|
||||
##########################################################################
|
||||
|
||||
-install: all installdirs install-bin
|
||||
-ifeq ($(PORTNAME), cygwin)
|
||||
-ifeq ($(MAKE_DLL), true)
|
||||
- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
|
||||
-endif
|
||||
-endif
|
||||
-ifeq ($(PORTNAME), win32)
|
||||
-ifeq ($(MAKE_DLL), true)
|
||||
- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
|
||||
-endif
|
||||
-endif
|
||||
- $(MAKE) -C catalog install-data
|
||||
- $(MAKE) -C tsearch install-data
|
||||
- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
|
||||
- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
|
||||
- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
|
||||
- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
|
||||
+install:
|
||||
|
||||
install-bin: postgres $(POSTGRES_IMP) installdirs
|
||||
$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
|
||||
diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
|
||||
--- a/src/bin/Makefile 2017-07-10 16:26:20.000000000 -0400
|
||||
+++ b/src/bin/Makefile 2017-07-12 10:06:45.609174107 -0400
|
||||
@@ -14,19 +14,8 @@
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
SUBDIRS = \
|
||||
- initdb \
|
||||
- pg_archivecleanup \
|
||||
- pg_basebackup \
|
||||
pg_config \
|
||||
- pg_controldata \
|
||||
- pg_ctl \
|
||||
pg_dump \
|
||||
- pg_resetwal \
|
||||
- pg_rewind \
|
||||
- pg_test_fsync \
|
||||
- pg_test_timing \
|
||||
- pg_upgrade \
|
||||
- pg_waldump \
|
||||
pgbench \
|
||||
psql \
|
||||
scripts
|
||||
diff -Naruw a/src/Makefile b/src/Makefile
|
||||
--- a/src/Makefile 2017-07-10 16:26:20.000000000 -0400
|
||||
+++ b/src/Makefile 2017-07-12 10:10:04.128087426 -0400
|
||||
@@ -15,20 +15,12 @@
|
||||
SUBDIRS = \
|
||||
common \
|
||||
port \
|
||||
- timezone \
|
||||
backend \
|
||||
- backend/utils/mb/conversion_procs \
|
||||
- backend/snowball \
|
||||
include \
|
||||
interfaces \
|
||||
- backend/replication/libpqwalreceiver \
|
||||
- backend/replication/pgoutput \
|
||||
fe_utils \
|
||||
bin \
|
||||
- pl \
|
||||
- makefiles \
|
||||
- test/regress \
|
||||
- test/perl
|
||||
+ makefiles
|
||||
|
||||
# There are too many interdependencies between the subdirectories, so
|
||||
# don't attempt parallel make here.
|
@ -1,460 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT=$(get_major_version)
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
|
||||
selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}beta2-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
serverman=(
|
||||
initdb
|
||||
pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
|
||||
pg_{test_{fsync,timing},upgrade,waldump}
|
||||
post{gres,master}
|
||||
)
|
||||
for m in ${serverman[@]} ; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,450 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,482 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,488 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.2" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
if use alpha && use server ; then
|
||||
ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
|
||||
ewarn "As a result, performance will be extremely degraded."
|
||||
fi
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,493 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
@ -1,493 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
wanted_languages() {
|
||||
local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
|
||||
sk sl sv tr zh_CN zh_TW"
|
||||
local enable_langs lingua
|
||||
|
||||
for lingua in ${linguas} ; do
|
||||
has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
server? ( systemd? ( sys-apps/systemd ) )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Rely on $PATH being in the proper order so that the correct
|
||||
# install program is used for modules utilizing PGXS in both
|
||||
# hardened and non-hardened environments. (Bug #528786)
|
||||
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
||||
|
||||
use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !alpha spinlocks) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(usex server "$(use_with systemd)" '--without-systemd') \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
# Create slot specific man pages
|
||||
local bn f mansec slotted_name
|
||||
for mansec in 1 3 7 ; do
|
||||
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
|
||||
|
||||
mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
|
||||
pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
|
||||
|
||||
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
|
||||
bn=$(basename "${f}")
|
||||
slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
|
||||
case ${bn} in
|
||||
TABLE.7|WITH.7)
|
||||
echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
|
||||
;;
|
||||
*)
|
||||
echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
local f bn
|
||||
for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
|
||||
-mindepth 1 -maxdepth 1)
|
||||
do
|
||||
bn=$(basename "${f}")
|
||||
# Temporarily tack on tmp to workaround a file collision
|
||||
# issue. This is only necessary for 9.7 and earlier. 10 never
|
||||
# had this issue.
|
||||
dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
|
||||
"/usr/bin/${bn}${SLOT/.}tmp"
|
||||
done
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
if use systemd; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service-9.6-r1" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
|
||||
fi
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 1775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
|
||||
# /usr/bin/psql96). They may have been created by the
|
||||
# postgresql.eselect module, but they're handled within this ebuild
|
||||
# now. It's alright if we momentarily delete /usr/bin/psql as it
|
||||
# will be recreated by the eselect module in pkg_ppostinst(). This
|
||||
# is only necessary for 9.7 and earlier. 10 and later were never
|
||||
# handled in this manner.
|
||||
local canonicalise
|
||||
if type -p realpath > /dev/null; then
|
||||
canonicalise=realpath
|
||||
elif type -p readlink > /dev/null; then
|
||||
canonicalise='readlink -f'
|
||||
else
|
||||
# can't die, subshell
|
||||
die "No readlink nor realpath found, cannot canonicalise"
|
||||
fi
|
||||
|
||||
local l
|
||||
# First remove any symlinks in /usr/bin that may have been created
|
||||
# by the old eselect
|
||||
for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
|
||||
if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
|
||||
rm "${l}" || ewarn "Couldn't remove ${l}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Then move the symlinks created by the ebuild to their proper place.
|
||||
for l in "${ED}"/usr/bin/*tmp ; do
|
||||
mv "${l}" "${l%tmp}" \
|
||||
|| ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
|
||||
ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
|
||||
sleep 5
|
||||
eend 0
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
# unix_socket_directory has no effect in postgresql.conf as it's
|
||||
# overridden in the initscript
|
||||
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
if ! use systemd; then
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
fi
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
elif use systemd; then
|
||||
einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use server && [[ ${UID} -ne 0 ]] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
use server || \
|
||||
ewarn 'Tests cannot be run without the "server" use flag enabled.'
|
||||
[[ ${UID} -eq 0 ]] || \
|
||||
ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
|
||||
|
||||
ewarn 'Skipping.'
|
||||
fi
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue