parent
bfc324a269
commit
bd27ca4ff8
@ -1 +1,2 @@
|
||||
DIST glance-2015.1.1.tar.gz 1102359 SHA256 5c5714264c4ad9c3d178b983899b54f69f138505ddd77e13141dc5f3d1598ebe SHA512 d9233b78174ec0f84b317abf7d26153a7e3ead25b4ebc31acbe5d0806b6877da5875de52ee0742dcbdd5fd3d23cb0240208f6fd57fa59cc403ad228ac85f2a0f WHIRLPOOL 69a4cd27b4ac57a47523ceb4b899bbbb3569e7af2bb8f3e64373d98b7c72450bd587c6da96d33903dcbf44e02f89ea563d116d9d2dc90d4a0f472eca89963a87
|
||||
DIST glance-2015.1.2.tar.gz 1108933 SHA256 e46bc6648a74a643cef3825dcd44c7e275ed3385b96cab83ef50c4c514932541 SHA512 0f8b8dbc3c507a47ad0873f35ec2212903d7e419b61c0298f77661f89a9718e3604786d52976860c78841fe0a94ad8fc1fe99514183d2b29ed414efe448e590a WHIRLPOOL df8ba6586b2f71c5d7ecb252b80e6c6de6f08df1029576fc8b2fb2a68633f5ce76de1334949af955e85c39e9f1df25b2f8763837ef8efa228b29559dc34be863
|
||||
|
@ -0,0 +1,192 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit distutils-r1 user
|
||||
|
||||
DESCRIPTION="Provides services for discovering, registering, and retrieving
|
||||
virtual machine images"
|
||||
HOMEPAGE="https://launchpad.net/glance"
|
||||
SRC_URI="https://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc mysql postgres +sqlite +swift test"
|
||||
REQUIRED_USE="|| ( mysql postgres sqlite )"
|
||||
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=dev-python/pbr-0.8.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pbr-1.0[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
${RDEPEND}
|
||||
>=dev-python/Babel-1.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/coverage-3.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/fixtures-0.3.14[${PYTHON_USEDEP}]
|
||||
<dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/mox3-0.7.0[${PYTHON_USEDEP}]
|
||||
<dev-python/mox3-0.8.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-1.0[${PYTHON_USEDEP}]
|
||||
<dev-python/mock-1.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
|
||||
!~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
|
||||
<dev-python/sphinx-1.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.2.0[${PYTHON_USEDEP}]
|
||||
!~dev-python/requests-2.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
|
||||
>=dev-python/testtools-0.9.36[${PYTHON_USEDEP}]
|
||||
!~dev-python/testtools-1.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-1.1.1[${PYTHON_USEDEP}]
|
||||
<dev-python/psutil-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}]
|
||||
<dev-python/oslotest-1.6.0[${PYTHON_USEDEP}]
|
||||
dev-python/mysql-python[${PYTHON_USEDEP}]
|
||||
dev-python/psycopg[${PYTHON_USEDEP}]
|
||||
~dev-python/pysendfile-2.0.1[${PYTHON_USEDEP}]
|
||||
dev-python/qpid-python[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyxattr-0.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/elasticsearch-py-1.3.0[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
#note to self, wsgiref is a python builtin, no need to package it
|
||||
#>=dev-python/wsgiref-0.1.2[${PYTHON_USEDEP}]
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}]
|
||||
sqlite? (
|
||||
>=dev-python/sqlalchemy-0.9.7[sqlite,${PYTHON_USEDEP}]
|
||||
<=dev-python/sqlalchemy-0.9.99[sqlite,${PYTHON_USEDEP}]
|
||||
)
|
||||
mysql? (
|
||||
dev-python/mysql-python
|
||||
>=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
|
||||
<=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
|
||||
)
|
||||
postgres? (
|
||||
dev-python/psycopg:2
|
||||
>=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
|
||||
<=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
|
||||
)
|
||||
>=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}]
|
||||
!~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pastedeploy-1.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/routes-1.12.3[${PYTHON_USEDEP}]
|
||||
!~dev-python/routes-2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/webob-1.2.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sqlalchemy-migrate-0.9.5[${PYTHON_USEDEP}]
|
||||
!~dev-python/sqlalchemy-migrate-0.9.8[${PYTHON_USEDEP}]
|
||||
<dev-python/sqlalchemy-migrate-0.10.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/httplib2-0.7.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/kombu-2.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycrypto-2.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}]
|
||||
dev-python/ordereddict[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-concurrency-1.8.2[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-utils-1.4.0[${PYTHON_USEDEP}]
|
||||
!~dev-python/oslo-utils-1.4.1[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-utils-1.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}]
|
||||
<dev-python/stevedore-1.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/taskflow-0.7.1[${PYTHON_USEDEP}]
|
||||
<dev-python/taskflow-0.8.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}]
|
||||
<dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/WSME-0.6[${PYTHON_USEDEP}]
|
||||
<dev-python/WSME-0.7[${PYTHON_USEDEP}]
|
||||
dev-python/posix_ipc[${PYTHON_USEDEP}]
|
||||
swift? (
|
||||
>=dev-python/python-swiftclient-2.2.0[${PYTHON_USEDEP}]
|
||||
<dev-python/python-swiftclient-2.5.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
>=dev-python/oslo-vmware-0.11.1[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-vmware-0.12.0[${PYTHON_USEDEP}]
|
||||
dev-python/paste[${PYTHON_USEDEP}]
|
||||
>=dev-python/jsonschema-2.0.0[${PYTHON_USEDEP}]
|
||||
<dev-python/jsonschema-3.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-keystoneclient-1.2.0[${PYTHON_USEDEP}]
|
||||
<dev-python/python-keystoneclient-1.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyopenssl-0.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/six-1.9.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-db-1.7.0[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-log-1.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-policy-0.3.1[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-policy-0.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/oslo-serialization-1.4.0[${PYTHON_USEDEP}]
|
||||
<dev-python/oslo-serialization-1.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/retrying-1.2.3[${PYTHON_USEDEP}]
|
||||
!~dev-python/retrying-1.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/osprofiler-0.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/glance_store-0.3.0[${PYTHON_USEDEP}]
|
||||
<dev-python/glance_store-0.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/semantic_version-2.3.1[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup glance
|
||||
enewuser glance -1 -1 /var/lib/glance glance
|
||||
}
|
||||
|
||||
python_prepare_all() {
|
||||
sed -i '/xattr/d' test-requirements.txt || die
|
||||
sed -i '/pysendfile/d' test-requirements.txt || die
|
||||
sed -i '/^hacking/d' test-requirements.txt || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
use doc && "${PYTHON}" setup.py build_sphinx
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# https://bugs.launchpad.net/glance/+bug/1251105
|
||||
# https://bugs.launchpad.net/glance/+bug/1242501
|
||||
testr init
|
||||
testr run --parallel || die "failed testsuite under python2.7"
|
||||
}
|
||||
|
||||
python_install() {
|
||||
distutils-r1_python_install
|
||||
|
||||
for svc in api registry scrubber; do
|
||||
newinitd "${FILESDIR}/glance.initd" glance-${svc}
|
||||
done
|
||||
|
||||
diropts -m 0750 -o glance -g glance
|
||||
dodir /var/log/glance /var/lib/glance/images /var/lib/glance/scrubber
|
||||
keepdir /etc/glance
|
||||
keepdir /var/log/glance
|
||||
keepdir /var/lib/glance/images
|
||||
keepdir /var/lib/glance/scrubber
|
||||
|
||||
insinto /etc/glance
|
||||
insopts -m 0640 -o glance -g glance
|
||||
doins etc/*.ini
|
||||
doins etc/*.conf
|
||||
doins etc/*.sample
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( doc/build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit eutils systemd unpacker
|
||||
|
||||
DESCRIPTION="general puppet client utils along with mcollective hiera and facter"
|
||||
HOMEPAGE="https://puppetlabs.com/"
|
||||
SRC_BASE="http://apt.puppetlabs.com/pool/wheezy/PC1/${PN:0:1}/${PN}/${PN}_${PV}-1wheezy"
|
||||
SRC_URI="
|
||||
amd64? ( ${SRC_BASE}_amd64.deb )
|
||||
x86? ( ${SRC_BASE}_i386.deb )
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="puppetdb selinux"
|
||||
RESTRICT="strip"
|
||||
|
||||
CDEPEND="!app-admin/augeas
|
||||
!app-admin/mcollective
|
||||
!app-admin/puppet
|
||||
!dev-ruby/hiera
|
||||
!dev-ruby/facter
|
||||
!app-emulation/virt-what"
|
||||
|
||||
DEPEND="
|
||||
${CDEPEND}"
|
||||
RDEPEND="${CDEPEND}
|
||||
sys-apps/dmidecode
|
||||
selinux? (
|
||||
sys-libs/libselinux[ruby]
|
||||
sec-policy/selinux-puppet
|
||||
)
|
||||
puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
src_install() {
|
||||
# conf.d
|
||||
doconfd etc/default/puppet
|
||||
doconfd etc/default/mcollective
|
||||
# logrotate.d
|
||||
insinto /etc/logrotate.d
|
||||
doins etc/logrotate.d/mcollective
|
||||
# puppet itself
|
||||
insinto /etc/puppetlabs
|
||||
doins -r etc/puppetlabs/*
|
||||
# logdir for systemd
|
||||
dodir var/log/puppetlabs/puppet/
|
||||
fperms 0750 var/log/puppetlabs/puppet/
|
||||
# the rest
|
||||
insinto /opt
|
||||
dodir opt/puppetlabs/puppet/cache
|
||||
doins -r opt/*
|
||||
fperms 0750 /opt/puppetlabs/puppet/cache
|
||||
# init
|
||||
newinitd "${FILESDIR}/puppet.initd" puppet
|
||||
newinitd "${FILESDIR}/mcollective.initd" mcollective
|
||||
systemd_dounit "${FILESDIR}/puppet.service"
|
||||
systemd_dounit "${FILESDIR}/mcollective.service"
|
||||
systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
|
||||
# symlinks
|
||||
chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
|
||||
chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
|
||||
dosym /opt/puppetlabs/bin/facter /usr/bin/facter
|
||||
dosym /opt/puppetlabs/bin/hiera /usr/bin/hiera
|
||||
dosym /opt/puppetlabs/bin/mco /usr/bin/mco
|
||||
dosym /opt/puppetlabs/bin/puppet /usr/bin/puppet
|
||||
dosym /opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
|
||||
dosym /opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
|
||||
dosym /opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
|
||||
dosym /opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
|
||||
dosym /opt/puppetlabs/puppet/bin/extlookup2hiera /usr/bin/extlookup2hiera
|
||||
}
|
@ -0,0 +1,197 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils pam multilib libtool
|
||||
|
||||
MY_P=${P/_/}
|
||||
MY_P=${MY_P/beta/b}
|
||||
|
||||
uri_prefix=
|
||||
case ${P} in
|
||||
*_beta*|*_rc*) uri_prefix=beta/ ;;
|
||||
esac
|
||||
|
||||
DESCRIPTION="Allows users or groups to run commands as other users"
|
||||
HOMEPAGE="http://www.sudo.ws/"
|
||||
SRC_URI="http://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz
|
||||
ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz"
|
||||
|
||||
# Basic license is ISC-style as-is, some files are released under
|
||||
# 3-clause BSD license
|
||||
LICENSE="ISC BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~sparc-solaris"
|
||||
IUSE="ldap nls pam offensive selinux skey +sendmail"
|
||||
|
||||
DEPEND="pam? ( virtual/pam )
|
||||
skey? ( >=sys-auth/skey-1.1.5-r1 )
|
||||
ldap? (
|
||||
>=net-nds/openldap-2.1.30-r1
|
||||
dev-libs/cyrus-sasl
|
||||
)
|
||||
sys-libs/zlib"
|
||||
RDEPEND="${DEPEND}
|
||||
selinux? ( sec-policy/selinux-sudo )
|
||||
ldap? ( dev-lang/perl )
|
||||
pam? ( sys-auth/pambase )
|
||||
>=app-misc/editor-wrapper-3
|
||||
virtual/editor
|
||||
sendmail? ( virtual/mta )"
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/bison"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
REQUIRED_USE="pam? ( !skey ) skey? ( !pam )"
|
||||
|
||||
MAKEOPTS+=" SAMPLES="
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-include-sys-types-h.patch
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
set_rootpath() {
|
||||
# FIXME: secure_path is a compile time setting. using ROOTPATH
|
||||
# is not perfect, env-update may invalidate this, but until it
|
||||
# is available as a sudoers setting this will have to do.
|
||||
einfo "Setting secure_path ..."
|
||||
|
||||
# first extract the default ROOTPATH from build env
|
||||
ROOTPATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}")
|
||||
if [[ -z ${ROOTPATH} ]] ; then
|
||||
ewarn " Failed to find ROOTPATH, please report this"
|
||||
fi
|
||||
|
||||
# then remove duplicate path entries
|
||||
cleanpath() {
|
||||
local newpath thisp IFS=:
|
||||
for thisp in $1 ; do
|
||||
if [[ :${newpath}: != *:${thisp}:* ]] ; then
|
||||
newpath+=:$thisp
|
||||
else
|
||||
einfo " Duplicate entry ${thisp} removed..."
|
||||
fi
|
||||
done
|
||||
ROOTPATH=${newpath#:}
|
||||
}
|
||||
cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${ROOTPATH:+:${ROOTPATH}}
|
||||
|
||||
# finally, strip gcc paths #136027
|
||||
rmpath() {
|
||||
local e newpath thisp IFS=:
|
||||
for thisp in ${ROOTPATH} ; do
|
||||
for e ; do [[ $thisp == $e ]] && continue 2 ; done
|
||||
newpath+=:$thisp
|
||||
done
|
||||
ROOTPATH=${newpath#:}
|
||||
}
|
||||
rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*'
|
||||
|
||||
einfo "... done"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local ROOTPATH
|
||||
set_rootpath
|
||||
|
||||
# audit: somebody got to explain me how I can test this before I
|
||||
# enable it.. - Diego
|
||||
# plugindir: autoconf code is crappy and does not delay evaluation
|
||||
# until `make` time, so we have to use a full path here rather than
|
||||
# basing off other values.
|
||||
econf \
|
||||
--enable-zlib=system \
|
||||
--with-secure-path="${ROOTPATH}" \
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor \
|
||||
--with-env-editor \
|
||||
$(use_with offensive insults) \
|
||||
$(use_with offensive all-insults) \
|
||||
$(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) \
|
||||
$(use_with ldap) \
|
||||
$(use_enable nls) \
|
||||
$(use_with pam) \
|
||||
$(use_with skey) \
|
||||
$(use_with selinux) \
|
||||
$(use_with sendmail) \
|
||||
--without-opie \
|
||||
--without-linux-audit \
|
||||
--with-rundir="${EPREFIX}"/var/run/sudo \
|
||||
--with-vardir="${EPREFIX}"/var/db/sudo \
|
||||
--with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo \
|
||||
--docdir="${EPREFIX}"/usr/share/doc/${PF}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
if use ldap ; then
|
||||
dodoc README.LDAP doc/schema.OpenLDAP
|
||||
dosbin plugins/sudoers/sudoers2ldif
|
||||
|
||||
cat <<-EOF > "${T}"/ldap.conf.sudo
|
||||
# See ldap.conf(5) and README.LDAP for details
|
||||
# This file should only be readable by root
|
||||
|
||||
# supported directives: host, port, ssl, ldap_version
|
||||
# uri, binddn, bindpw, sudoers_base, sudoers_debug
|
||||
# tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key
|
||||
EOF
|
||||
|
||||
insinto /etc
|
||||
doins "${T}"/ldap.conf.sudo
|
||||
fperms 0440 /etc/ldap.conf.sudo
|
||||
fi
|
||||
|
||||
pamd_mimic system-auth sudo auth account session
|
||||
|
||||
keepdir /var/db/sudo
|
||||
fperms 0700 /var/db/sudo
|
||||
|
||||
# Don't install into /var/run as that is a tmpfs most of the time
|
||||
# (bug #504854)
|
||||
rm -rf "${D}"/var/run
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use ldap ; then
|
||||
ewarn
|
||||
ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration."
|
||||
ewarn
|
||||
if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then
|
||||
ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly"
|
||||
ewarn "configured in /etc/nsswitch.conf."
|
||||
ewarn
|
||||
ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:"
|
||||
ewarn " sudoers: ldap files"
|
||||
ewarn
|
||||
fi
|
||||
fi
|
||||
if use prefix ; then
|
||||
ewarn
|
||||
ewarn "To use sudo, you need to change file ownership and permissions"
|
||||
ewarn "with root privileges, as follows:"
|
||||
ewarn
|
||||
ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo"
|
||||
ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so"
|
||||
ewarn " # chown root:root ${EPREFIX}/etc/sudoers"
|
||||
ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d"
|
||||
ewarn " # chown root:root ${EPREFIX}/var/db/sudo"
|
||||
ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
elog "To use the -A (askpass) option, you need to install a compatible"
|
||||
elog "password program from the following list. Starred packages will"
|
||||
elog "automatically register for the use with sudo (but will not force"
|
||||
elog "the -A option):"
|
||||
elog ""
|
||||
elog " [*] net-misc/ssh-askpass-fullscreen"
|
||||
elog " net-misc/x11-ssh-askpass"
|
||||
elog ""
|
||||
elog "You can override the choice by setting the SUDO_ASKPASS environmnent"
|
||||
elog "variable to the program you want to use."
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST grs-0.1.tar.gz 32017 SHA256 38018649a6c767e3e295a24bec6fd880c63f892dd74a0f34ebc0bdc22c2683a8 SHA512 89f005c520f7ee0db4c57764592fe6555d75e1c78dd3dc0c224bd2197bebfad34a1b1279fbef75411949bfcd430dc3ebf57e929934a193bbc0da9d56a2944f75 WHIRLPOOL 31d612470ecc3b13388ddee1ebac7fb8584f5642491b09cda3ed3575ff303c70da25460b56a9d9595966a681ee21ec0b93f2d0fee91874dd18c7494e74cb384e
|
||||
DIST grs-0.2.tar.gz 34089 SHA256 cf666870d1d856e77da2aa59905eea32cb603673cbeb4a0f487d962321c50006 SHA512 502b8a6d66784b7b0c93b421cc5bc25db320edb555e2b283bf9a0e1edccd67ba8c07bc8cc715824b6c82ce435d2c1f5671b7ea84d2d856beef4f771d65992efb WHIRLPOOL 52e9f4589f01f8352a882d46c85478c8e5dce47390483b4a93958231e3502fd082957f18bf9b5f2d08f04d112e5eede0b5ee140a47852ccacc8acc8723ce4e5f
|
||||
DIST grs-0.3.tar.gz 34173 SHA256 445af2f267df936b4a06fdcb17e2a28dafd6eed8d52a8ff69ada622cedd8699d SHA512 710ea986ab55eabed5b774e850854ee36e600d378dd17a2d62cce67132695ecadea01b15ffaed750bb33a6f31e49989952425b7602808f65574ac506da1773fa WHIRLPOOL f5632d5562d6cb66b8111c35c5d5b57e0710d01d679d9c802182d18e2ddee0af7fe058a1275ca45c097fefdb1419943c638fdfe93110639cf299fd1c0df5b83d
|
||||
|
@ -0,0 +1,45 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python3_4 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
EGIT_REPO_URI="git://anongit.gentoo.org/proj/grss.git"
|
||||
inherit git-2
|
||||
else
|
||||
SRC_URI="https://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Suite to build Gentoo Reference Systems"
|
||||
HOMEPAGE="https://dev.gentoo.org/~blueness/${PN}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
app-arch/tar[xattr]
|
||||
app-crypt/md5deep
|
||||
dev-libs/libcgroup
|
||||
dev-vcs/git
|
||||
net-misc/rsync
|
||||
sys-apps/portage
|
||||
sys-fs/squashfs-tools
|
||||
virtual/cdrtools
|
||||
|| (
|
||||
sys-kernel/genkernel
|
||||
sys-kernel/genkernel-next
|
||||
)"
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install
|
||||
echo "CONFIG_PROTECT=\"/etc/grs/systems.conf\"" > "${T}"/20grs
|
||||
doenvd "${T}"/20grs
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
DIST xapian-omega-1.2.19.tar.xz 419804 SHA256 ca0a9afe2d1ced933408fc0b089c96cd55f90d7b06ae9708eb84294cd77e35ed SHA512 95be43eb25c7da59db7c396879a1bc35df70f0412a66d56c8ef1bc90d7f5930bc8e83fc5e1b3bc8a791fa92ea6e705fb0df5833265f4e95cd8bcce49dda7c976 WHIRLPOOL 101c34c2603d1287685a642b2d9be2aa1eb2779161b1f662f0ba7f91563b319eb0b0dd6def688122df991e56b6fe491cfec5ed93c10ee205948c5885c0d83f2f
|
||||
DIST xapian-omega-1.2.20.tar.xz 420488 SHA256 41f00ef7e650d10702d87b089a0103554ca3f038acc66df1bdbf852bb1d87fb9 SHA512 187b4d3a918f3b02b0a1737baedfff253455b16f3fd1b47ed3d93c4f53b41657d001929efc716467eefeb6daa437d1b530681ed250f8d665e86eedf7d0737756 WHIRLPOOL 65ea58a8743f4472e7242a20e4170782765f60e62ce8157341e7cfbf2ccbabd702262edfdd5cffb0c4562d50703235a7a235a1d03ef62453aae4e6405b69c606
|
||||
DIST xapian-omega-1.2.21.tar.xz 435624 SHA256 862d3a5d7052fc13c16eed51c42d774c4ab1c56967c477d994995b753dc9527e SHA512 8aa669fbf3253b72e742bed93a9ec972e33f49327cf0e912a21b33e3f586cf35041a50f107fe4767f8906996e86f8a6126efc8232e72045e8243b0ab1b30e1e9 WHIRLPOOL 8a6b555ef6eeacbca24b2c80468b3195eacc66084243d0340709a6c556cb03009022b8716b5e2aef0f6c382aaf5dbec8f29a01589808170fa26e73ccc988bdff
|
||||
DIST xapian-omega-1.3.2.tar.xz 449872 SHA256 951434ffa95651607589fcdde6548cbdd1b67dde264aa34234c293690fb7fc0d SHA512 92e9c58206fba424f92d88fa7a36fe21d350de0c0cd71857ff1db3c423dd40b4e7d5e331d13de3b905907b0d9a549d2888cdcd3125ece52452e7c304d2f437a0 WHIRLPOOL 0473913bb8c9752859d15a92159d250e3ef585331ccfb2eaea805670c3629a86e3091849067eeb0541fc1b23be2db5c8a5b7f9c73e49fc2fa35a54f6faa66782
|
||||
DIST xapian-omega-1.3.3.tar.xz 464308 SHA256 d28c05d5c920dae142fe69abec074b7916f027d749d2d0290d04133d2d6ad6f0 SHA512 4ea980b96526e1bc88329991e34b174944c8f87ba1b0d0f199bb2c7545ce80bc5307935d8322b6e8fa48b28dc6ead728fc5bebe7e13758602f952eac60302dd5 WHIRLPOOL b748a27225d097e3dca6d25935cbc40da5905795efc302affe13a3ba015b5fc1c15eef69e4d0ea460378f7aac6cce5896073ebb6856d46d6651a97bd626d3a39
|
||||
|
@ -1,30 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
DESCRIPTION="An application built on Xapian, consisting of indexers and a CGI search frontend"
|
||||
SRC_URI="http://www.oligarchy.co.uk/xapian/${PV}/xapian-omega-${PV}.tar.xz"
|
||||
HOMEPAGE="http://www.xapian.org/"
|
||||
S="${WORKDIR}/xapian-omega-${PV}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-libs/xapian-${PV}
|
||||
dev-lang/perl
|
||||
dev-libs/libpcre
|
||||
sys-libs/zlib"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_install () {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
#move docs to /usr/share/doc/${PF}.
|
||||
mv "${D}/usr/share/doc/xapian-omega" "${D}/usr/share/doc/${PF}"
|
||||
|
||||
dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
DESCRIPTION="An application built on Xapian, consisting of indexers and a CGI search frontend"
|
||||
SRC_URI="http://www.oligarchy.co.uk/xapian/${PV}/xapian-omega-${PV}.tar.xz"
|
||||
HOMEPAGE="http://www.xapian.org/"
|
||||
S="${WORKDIR}/xapian-omega-${PV}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-libs/xapian-${PV}
|
||||
dev-lang/perl
|
||||
dev-libs/libpcre
|
||||
sys-libs/zlib"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_install () {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
#move docs to /usr/share/doc/${PF}.
|
||||
mv "${D}/usr/share/doc/xapian-omega" "${D}/usr/share/doc/${PF}"
|
||||
|
||||
dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
|
||||
}
|
@ -1,11 +1,6 @@
|
||||
DIST postgresql-9.0.22.tar.bz2 15046629 SHA256 94d4b20d854cd7fa4c9c322c0b602751edbc5ca0d4f29fe92f996e28bb32f8a5 SHA512 19e7888f92c0cc6c948dd78831768fd7184fc4bc25ca1950a76f5175ed1763b8a34949e90eebbb063b072fbcac64c9fdf6072f5a22eaaae0c33e93cf6c49955b WHIRLPOOL 8b785c90a40fc32975cb81a9d8bf22bdd8667fd26710a962cecbf81c25f6348b3c49f30a91066ad8bb1bffce55658bab50181a2a82e217a7e71d7d361f2e5d92
|
||||
DIST postgresql-9.0.23.tar.bz2 15045569 SHA256 3dbcbe19c814139a3f4be8bc6b49db804753cbc49979f345083e835c52b4d7de SHA512 db8fe64a5a5a1caae97e792ee5b8bcc375c6d6e10ef9c35f1003f174745568854dc5a7a58dbaf46794dcd35dee5a13f6eb1ba356f9618134b601b7759c753c9f WHIRLPOOL 5177facff628271a0d57d1f2925cfc04796020492c4102f0b0c6fa34149da9ddd9ccb0a38629e320521fe82163bdd4aa56f74af3a887ff4389cd9f62e921c53a
|
||||
DIST postgresql-9.1.18.tar.bz2 15822081 SHA256 2726d526666904b454f87fe2ae54357c2ab9eb8aba299a4c904829b7598584a8 SHA512 ba51e431c947b749c6522fd887ecbf50bf50cc08f2323b122a35fb18fccceb46d50f0e632a5b19df9855b5a29c98534d19f241d31e5bc235b0b06e8fb210210e WHIRLPOOL 59b5e6fb5626d630e41a8c0497480948d5bb0751fffbe1602dc62009948bad047c2ddc805caa3510157924c0fc74ead2fb2a71d0569d5c1b56eae753d9dbcd1a
|
||||
DIST postgresql-9.1.19.tar.bz2 15843978 SHA256 cbd5057451147dd63a1e764176a4e17a7795773be1e4266ea9faa951064c0ec6 SHA512 23dd4108556edcc667f599c5663356a1106bc239a1c5337d153c13a1e1871d52316825b84802bbc1d79612dfa4c9c77f4c4b96d59d23d7338988bdf370e956d4 WHIRLPOOL 6845fd8071032e987ab65a642ca04adbc8b464332bac8c346f01e011411947aa4341ea596fd910342124fcbae4cc25410c25ab695894b0b68d20441df5424722
|
||||
DIST postgresql-9.2.13.tar.bz2 16401289 SHA256 5dcbd6209a8c0f508504fa433486583a42caaa240c823e1b3576db8a72db6a44 SHA512 0bcf8284aad756a70cd5e6d34a9f2cc17825151740da1c90a459edbf188a9a366831b71999803d301f0de35a5778f524b72779818b89599ffeb41cf1c2140077 WHIRLPOOL 3859e3e5c994441bc931ee92042a08eeb7b1196301b603f311372c2c2c65083b38713f4eac3e06c243703c2446a260b1ae861b7690f1fea03184d0518b10b486
|
||||
DIST postgresql-9.2.14.tar.bz2 16451398 SHA256 54c20b3f320a48c38487f2711e98b2fa3f9ce4305905a294ad0449e8b4fb292e SHA512 268015d9e397ee62eebbbc9abf1ee25d0d4aa6bf5943b404009b3aab31f485b8523353c679beed34cc00304b9d4c7aca9de0ba841d9841dbf885d05d1a5692a1 WHIRLPOOL 4f6d5d6989a67d14082ddb215411b55d0dc0be29772e6a593b4df133489ff4a7e6c265d0830adba64d4c6be47e17a949cbc21d6570dceb9362399649af2be88e
|
||||
DIST postgresql-9.3.10.tar.bz2 16995860 SHA256 e5444f0f76aff98a251400b7c28bc361d65e3d72d8d6cb9bb5d8361a69541531 SHA512 6b048fd1d0b38f72bab6ea70e40f10e7b805b94fc4c6fd865e0ec5e86da3c54043f20059dbf716d29eb4ca787dc50da561b1c7b48ab9f3096ebc651300855672 WHIRLPOOL b8ea15a04d18535662832d444b556aedffaa8c954b52dcd42d548f53f93b8a9dbfbe9298f63c26d44c8b757e8c10d76711c303cd83c84d9c86bf23c2837e74ce
|
||||
DIST postgresql-9.3.9.tar.bz2 16959310 SHA256 f73bd0ec2028511732430beb22414a022d2114231366e8cbe78c149793910549 SHA512 c6a9cae07968c99039910bb98d3e365fc285d2cdef02dd594128bd69ae65926392b18b65b0e13c3f17c366413bffbe226b6e8ce3453774b0439745b18ea129a8 WHIRLPOOL bcbc66a7b846b42c2d17d187e8b2c751afda8e5cdc7fa385ba1145f84e34950fad3b82fc1d04ae7ff9b7de01fd5705d9e507aa841880b97df2edb2ac8749a5fd
|
||||
DIST postgresql-9.4.4.tar.bz2 17616272 SHA256 538ed99688d6fdbec6fd166d1779cf4588bf2f16c52304e5ef29f904c43b0013 SHA512 e0f0efc2e3a01c93dad98796476808d60be243841104ceb496d2227214a9b4c5a32c5f550f0a456b0c64f2458aae32026960b63f68188269d367d900683a6061 WHIRLPOOL 9041b4b4e1b53bc97345fe587bc874df1185ef76fe105bfb54e9c882f3fd51841448e92deb12e1415ce76158da0683fcff333e08b9e54a8be565562ebfec6175
|
||||
DIST postgresql-9.4.5.tar.bz2 17660960 SHA256 b87c50c66b6ea42a9712b5f6284794fabad0616e6ae420cf0f10523be6d94a39 SHA512 01ad4b5a097efa70f74a9e96b764c32953a9df57d6bf81b893a1e552475f6aba0381580dcd1f27b2c443ce89fecc429eeeb0219af60a0b2f84798f76eb1757f5 WHIRLPOOL 8ea0e9a40cefa53568071f2137bac996898f9bd486cfb5cfcf8bb49590816833f37878f10caabffb9d3127e047f00c916b8830594a485ebe16fb9fe6fc834c95
|
||||
DIST postgresql-9.5beta1.tar.bz2 18291273 SHA256 b53199e2667982de2039ad7e30467f67c5d7af678e69d6211de8ba1cac75c9f0 SHA512 e8881939bdba346f3770102324d7b011c16e4529603280459e17587e06d933c9f3505b40c5cc82ed3f0410ffd88b5e2f18b2a3272aa4680c3798cf7a0fcc0374 WHIRLPOOL 0cf2c3fd40b2a8d482da5a1597abbc20d239f577c6472a03f8d9795a3e8ef142dfaad7a1eeebf2b2544e34712c243bbd9de63fb4045c4ce15dbde8ec74acb707
|
||||
|
@ -1,374 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
# Testing within Portage's environment is broken, and the patch no
|
||||
# longer applies cleanly.
|
||||
RESTRICT="test"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
epatch "${FILESDIR}/pg_ctl-exit-status.patch"
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
@ -1,371 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
# Testing within Portage's environment is broken, and the patch no
|
||||
# longer applies cleanly.
|
||||
RESTRICT="test"
|
||||
|
||||
PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
epatch "${FILESDIR}/pg_ctl-exit-status.patch"
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
@ -1,378 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
# Testing within Portage's environment is broken, and the patch no
|
||||
# longer applies cleanly.
|
||||
RESTRICT="test"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
epatch "${FILESDIR}/pg_ctl-exit-status.patch"
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.1-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
@ -1,375 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
# Testing within Portage's environment is broken, and the patch no
|
||||
# longer applies cleanly.
|
||||
RESTRICT="test"
|
||||
|
||||
PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
epatch "${FILESDIR}/pg_ctl-exit-status.patch"
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.1-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
@ -1,390 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
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,387 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
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,390 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
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,387 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
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,422 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
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
|
||||
|
||||
# Fix bug 555198: Correct typo in assembly code for alpha architecture
|
||||
epatch "${FILESDIR}/${PN}-${SLOT}-alpha-fix-read-memory-barrier.patch"
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
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,425 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tcl? ( >=dev-lang/tcl-8:0= )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
|
||||
# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
|
||||
# the libc includes UUID functions.
|
||||
UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
|
||||
BSD_LIBC=( elibc_{Free,Net,Open}BSD )
|
||||
|
||||
nest_usedep() {
|
||||
local front back
|
||||
while [[ ${#} -gt 1 ]]; do
|
||||
front+="${1}? ( "
|
||||
back+=" )"
|
||||
shift
|
||||
done
|
||||
echo "${front}${1}${back}"
|
||||
}
|
||||
|
||||
IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
|
||||
CDEPEND+="
|
||||
uuid? (
|
||||
${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
|
||||
$(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
xml? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
!dev-db/postgresql-docs:${SLOT}
|
||||
!dev-db/postgresql-base:${SLOT}
|
||||
!dev-db/postgresql-server:${SLOT}
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
|
||||
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Work around PPC{,64} compilation bug where bool is already defined
|
||||
sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
|
||||
|
||||
# Set proper run directory
|
||||
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
||||
-i src/include/pg_config_manual.h || die
|
||||
|
||||
# Fix bug 555198: Correct typo in assembly code for alpha architecture
|
||||
epatch "${FILESDIR}/${PN}-${SLOT}-alpha-fix-read-memory-barrier.patch"
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
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,419 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} )
|
||||
|
||||
inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
|
||||
systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL RDBMS"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
|
||||
zh_CN zh_TW"
|
||||
IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python
|
||||
+readline selinux +server ssl static-libs tcl threads uuid xml zlib"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
CDEPEND="
|
||||
>=app-eselect/eselect-postgresql-1.2.0
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
|
||||
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
|
||||
|
||||
use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch"
|
||||
|
||||
# Fix bug 486556 where the server would crash at start up because of
|
||||
# an infinite loop caused by a self-referencing symlink.
|
||||
epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch"
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c || \
|
||||
die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
local i uuid_config=""
|
||||
if use uuid; then
|
||||
for i in ${UTIL_LINUX_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=e2fs"
|
||||
done
|
||||
for i in ${BSD_LIBC[@]}; do
|
||||
use ${i} && uuid_config="--with-uuid=bsd"
|
||||
done
|
||||
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/${PF}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
$(use_with pam) \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_with tcl) \
|
||||
${uuid_config} \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with zlib) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C contrib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake DESTDIR="${D}" install -C contrib
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
# man pages are already built, but if we have the target make them,
|
||||
# they'll be generated from source before being installed so we
|
||||
# manually install man pages.
|
||||
# We use ${SLOT} instead of doman for postgresql.eselect
|
||||
insinto /usr/share/postgresql-${SLOT}/man/
|
||||
doins -r doc/src/sgml/man{1,3,7}
|
||||
if ! use server; then
|
||||
# Remove man pages for non-existent binaries
|
||||
for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
|
||||
done
|
||||
fi
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
|
||||
|
||||
insinto /etc/postgresql-${SLOT}
|
||||
newins src/bin/psql/psqlrc.sample psqlrc
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/src/sgml/html/*
|
||||
|
||||
docinto sgml
|
||||
dodoc doc/src/sgml/*.{sgml,dsl}
|
||||
fi
|
||||
|
||||
if use server; then
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
|
||||
"${FILESDIR}/${PN}.service" | \
|
||||
systemd_newunit - ${PN}-${SLOT}.service
|
||||
|
||||
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf
|
||||
|
||||
newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
|
||||
|
||||
use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
|
||||
if use server ; then
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "https://wiki.gentoo.org/wiki/PostgreSQL"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
use server || die "USE flag 'server' not enabled. Nothing to configure."
|
||||
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
|
||||
&& source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] \
|
||||
&& DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
|
||||
mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
|
||||
ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
|
||||
fi
|
||||
|
||||
cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
|
||||
# This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
|
||||
# On the off-chance that you might need to work with UTF-8 encoded
|
||||
# characters in PL/Perl
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
EOF
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
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,44 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit java-pkg-2 java-ant-2
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java"
|
||||
HOMEPAGE="http://asm.objectweb.org"
|
||||
SRC_URI="http://download.forge.objectweb.org/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="1.4"
|
||||
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=virtual/jdk-1.3
|
||||
dev-java/ant-core
|
||||
dev-java/ant-owanttask"
|
||||
RDEPEND=">=virtual/jre-1.3"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
echo "objectweb.ant.tasks.path /usr/share/ant-owanttask/lib/ow_util_ant_tasks.jar" \
|
||||
>> build.properties
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
eant jar $(use_doc jdoc)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for x in output/dist/lib/*.jar ; do
|
||||
java-pkg_newjar ${x} $(basename ${x/-${PV}})
|
||||
done
|
||||
|
||||
use doc && java-pkg_dohtml -r output/dist/doc/javadoc/user/*
|
||||
use source && java-pkg_dosrc src/*
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=4
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit java-pkg-2 java-ant-2
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java"
|
||||
HOMEPAGE="http://asm.objectweb.org"
|
||||
SRC_URI="http://download.forge.objectweb.org/${PN}/${P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT="1.4"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE=""
|
||||
DEPEND=">=virtual/jdk-1.3
|
||||
dev-java/ant-core
|
||||
dev-java/ant-owanttask"
|
||||
RDEPEND=">=virtual/jre-1.3"
|
||||
RESTRICT="test"
|
||||
|
||||
src_prepare() {
|
||||
echo "objectweb.ant.tasks.path ${EPREFIX}/usr/share/ant-owanttask/lib/ow_util_ant_tasks.jar" \
|
||||
>> build.properties
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
eant jar $(use_doc jdoc)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for x in output/dist/lib/*.jar ; do
|
||||
java-pkg_newjar ${x} $(basename ${x/-${PV}})
|
||||
done
|
||||
use doc && java-pkg_dohtml -r output/dist/doc/javadoc/user/*
|
||||
use source && java-pkg_dosrc src/*
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=4
|
||||
inherit java-pkg-2 java-ant-2
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java"
|
||||
HOMEPAGE="http://asm.objectweb.org"
|
||||
SRC_URI="http://download.forge.objectweb.org/${PN}/${P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT="1.5"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc source"
|
||||
DEPEND=">=virtual/jdk-1.3
|
||||
dev-java/ant-core
|
||||
dev-java/ant-owanttask
|
||||
source? ( app-arch/zip )"
|
||||
RDEPEND=">=virtual/jre-1.3"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
src_prepare() {
|
||||
echo "objectweb.ant.tasks.path ${EPREFIX}/usr/share/ant-owanttask/lib/ow_util_ant_tasks.jar" \
|
||||
>> build.properties
|
||||
}
|
||||
|
||||
EANT_DOC_TARGET=jdoc
|
||||
|
||||
src_install() {
|
||||
for x in output/dist/lib/*.jar ; do
|
||||
java-pkg_newjar ${x} $(basename ${x/-${PV}})
|
||||
done
|
||||
use doc && java-pkg_dohtml -r output/dist/doc/javadoc/user/*
|
||||
use source && java-pkg_dosrc src/*
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
inherit java-pkg-2 java-ant-2
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java"
|
||||
HOMEPAGE="http://asm.objectweb.org"
|
||||
SRC_URI="http://download.forge.objectweb.org/${PN}/${P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT="1.5"
|
||||
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc source"
|
||||
DEPEND=">=virtual/jdk-1.3
|
||||
dev-java/ant-core
|
||||
dev-java/ant-owanttask
|
||||
source? ( app-arch/zip )"
|
||||
RDEPEND=">=virtual/jre-1.3"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
echo "objectweb.ant.tasks.path /usr/share/ant-owanttask/lib/ow_util_ant_tasks.jar" \
|
||||
>> build.properties
|
||||
}
|
||||
|
||||
EANT_DOC_TARGET=jdoc
|
||||
|
||||
src_install() {
|
||||
for x in output/dist/lib/*.jar ; do
|
||||
java-pkg_newjar ${x} $(basename ${x/-${PV}})
|
||||
done
|
||||
use doc && java-pkg_dohtml -r output/dist/doc/javadoc/user/*
|
||||
use source && java-pkg_dosrc src/*
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST axis-src-1_4.tar.gz 17041546 SHA256 911b4467f3d6cfe2e50fb7baea7a754e6aa717902d6ed91cef78f8f52bef8572 SHA512 7d08212b04702e76c960ad772a475f5765fef7f9ebe0aea3d4b949c6ba28a62500e8a76a43c7364b7caf36b7f27aee8592744256154670c7a24d29c5c1518258 WHIRLPOOL cf359caa9e645bdefb7c2ff012673dc64af9d4cc4bbe2a082cb64bcb0211d3a844ef797738ae1a3e9f978d0bbd8dc42bac9ecbdf4c734dd30ff52da18bdd7a91
|
||||
DIST jsr101-1.4.tar.bz2 18614 SHA256 2f2e793c0ece7240d7b117e2f05eb4b32d29e7fa7b2fbf85d912fb8693b0a55e SHA512 a29cca7e0ed1eb8aff4b70da6d804cb1cd61cdd9a800f420be6794aa927bca6a4146a95d71c8521d4dc16a0da56419f3e82079d942194380dbddb9d44d773317 WHIRLPOOL ad710d84c000f7711d0bcc3d93071160bb85daa0a854ade778ad3e636b49860a25739bd8e175b7c4a2a1b19f6c59451c0781b6b59f8331ce87cfb1c589d1e8f3
|
||||
|
@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Java(TM) API for XML-Based RPC Specification Interface Classes"
|
||||
HOMEPAGE="http://jcp.org/aboutJava/communityprocess/first/jsr101/"
|
||||
SRC_URI="http://dev.gentoo.org/~monsieurp/packages/${P}.tar.bz2"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
|
||||
IUSE=""
|
||||
|
||||
CDEPEND="
|
||||
java-virtuals/servlet-api:3.0
|
||||
java-virtuals/saaj-api:0"
|
||||
|
||||
RDEPEND=">=virtual/jre-1.6
|
||||
${CDEPEND}"
|
||||
DEPEND=">=virtual/jdk-1.6
|
||||
${CDEPEND}"
|
||||
|
||||
JAVA_SRC_DIR="src"
|
||||
JAVA_GENTOO_CLASSPATH="
|
||||
servlet-api-3.0
|
||||
saaj-api
|
||||
"
|
@ -1,2 +1,2 @@
|
||||
DIST netty-4.0.21.Final.tar.gz 960489 SHA256 e1b5572defaa760dcd8ded4d7691e9daf242b2e1885115b722f2f790d9ef9f75 SHA512 5d432e9e433c22b82e67ed3463c6982ca95c2ad823165e1ca9a5046e598878f06aac4221be235f2bda15edfdb22028f2a4f74fb37d431f24a2636e4ec60fae74 WHIRLPOOL 92e96986def775f26286958a9e2c7fe55ab571ad373f9cc25357db71f85f170d7aba7d7854c130c5788f7332665000cd10f666fff06abd0ce57cf4f95008958a
|
||||
DIST netty-4.0.22.Final.tar.gz 983956 SHA256 d539483235223804d76f8da572b851cd196254f5da7d3ac8e064c626b31748ff SHA512 f216c8431e663533ea5258bc054154d07f791667712c4dd619eae5de55c1b9031cca756a26b49d8a0bb9e3cf61ca5cb295e7a3b3e4e9e98e99cd53963d54912e WHIRLPOOL ca3d9a9b78643414b4361388e8486ab7cbb7d4a479718d89a8f51d90ef7fd580b154f09d1e8014503bececd49fb8841782e933c8cc8f355609ccae1f6510ccc5
|
||||
DIST netty-4.0.32.Final.tar.gz 1188681 SHA256 723d8f3495522ad73528c06a65b9c0b5b5b72db341daacd0d64bdc8df3412d04 SHA512 160006fc014c5211010449ba1aca2f2d20320340a077ea27098f1d94702066450da950f3951b1cbcfebdee7506f7ec715bb8c007fa539c15f803ba24690e77c6 WHIRLPOOL 6a7b90d952acfe558bf36a2d0fd3dce3ba33f3047e5caf97ddfb6d3f1bf2ab26294af375b792e281804fb1b5a696f7e14dd15f7d93e26a8979600ea03eeddb1c
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST netty-4.0.21.Final.tar.gz 960489 SHA256 e1b5572defaa760dcd8ded4d7691e9daf242b2e1885115b722f2f790d9ef9f75 SHA512 5d432e9e433c22b82e67ed3463c6982ca95c2ad823165e1ca9a5046e598878f06aac4221be235f2bda15edfdb22028f2a4f74fb37d431f24a2636e4ec60fae74 WHIRLPOOL 92e96986def775f26286958a9e2c7fe55ab571ad373f9cc25357db71f85f170d7aba7d7854c130c5788f7332665000cd10f666fff06abd0ce57cf4f95008958a
|
||||
DIST netty-4.0.22.Final.tar.gz 983956 SHA256 d539483235223804d76f8da572b851cd196254f5da7d3ac8e064c626b31748ff SHA512 f216c8431e663533ea5258bc054154d07f791667712c4dd619eae5de55c1b9031cca756a26b49d8a0bb9e3cf61ca5cb295e7a3b3e4e9e98e99cd53963d54912e WHIRLPOOL ca3d9a9b78643414b4361388e8486ab7cbb7d4a479718d89a8f51d90ef7fd580b154f09d1e8014503bececd49fb8841782e933c8cc8f355609ccae1f6510ccc5
|
||||
DIST netty-4.0.32.Final.tar.gz 1188681 SHA256 723d8f3495522ad73528c06a65b9c0b5b5b72db341daacd0d64bdc8df3412d04 SHA512 160006fc014c5211010449ba1aca2f2d20320340a077ea27098f1d94702066450da950f3951b1cbcfebdee7506f7ec715bb8c007fa539c15f803ba24690e77c6 WHIRLPOOL 6a7b90d952acfe558bf36a2d0fd3dce3ba33f3047e5caf97ddfb6d3f1bf2ab26294af375b792e281804fb1b5a696f7e14dd15f7d93e26a8979600ea03eeddb1c
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST netty-4.0.21.Final.tar.gz 960489 SHA256 e1b5572defaa760dcd8ded4d7691e9daf242b2e1885115b722f2f790d9ef9f75 SHA512 5d432e9e433c22b82e67ed3463c6982ca95c2ad823165e1ca9a5046e598878f06aac4221be235f2bda15edfdb22028f2a4f74fb37d431f24a2636e4ec60fae74 WHIRLPOOL 92e96986def775f26286958a9e2c7fe55ab571ad373f9cc25357db71f85f170d7aba7d7854c130c5788f7332665000cd10f666fff06abd0ce57cf4f95008958a
|
||||
DIST netty-4.0.22.Final.tar.gz 983956 SHA256 d539483235223804d76f8da572b851cd196254f5da7d3ac8e064c626b31748ff SHA512 f216c8431e663533ea5258bc054154d07f791667712c4dd619eae5de55c1b9031cca756a26b49d8a0bb9e3cf61ca5cb295e7a3b3e4e9e98e99cd53963d54912e WHIRLPOOL ca3d9a9b78643414b4361388e8486ab7cbb7d4a479718d89a8f51d90ef7fd580b154f09d1e8014503bececd49fb8841782e933c8cc8f355609ccae1f6510ccc5
|
||||
DIST netty-4.0.32.Final.tar.gz 1188681 SHA256 723d8f3495522ad73528c06a65b9c0b5b5b72db341daacd0d64bdc8df3412d04 SHA512 160006fc014c5211010449ba1aca2f2d20320340a077ea27098f1d94702066450da950f3951b1cbcfebdee7506f7ec715bb8c007fa539c15f803ba24690e77c6 WHIRLPOOL 6a7b90d952acfe558bf36a2d0fd3dce3ba33f3047e5caf97ddfb6d3f1bf2ab26294af375b792e281804fb1b5a696f7e14dd15f7d93e26a8979600ea03eeddb1c
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST netty-4.0.21.Final.tar.gz 960489 SHA256 e1b5572defaa760dcd8ded4d7691e9daf242b2e1885115b722f2f790d9ef9f75 SHA512 5d432e9e433c22b82e67ed3463c6982ca95c2ad823165e1ca9a5046e598878f06aac4221be235f2bda15edfdb22028f2a4f74fb37d431f24a2636e4ec60fae74 WHIRLPOOL 92e96986def775f26286958a9e2c7fe55ab571ad373f9cc25357db71f85f170d7aba7d7854c130c5788f7332665000cd10f666fff06abd0ce57cf4f95008958a
|
||||
DIST netty-4.0.22.Final.tar.gz 983956 SHA256 d539483235223804d76f8da572b851cd196254f5da7d3ac8e064c626b31748ff SHA512 f216c8431e663533ea5258bc054154d07f791667712c4dd619eae5de55c1b9031cca756a26b49d8a0bb9e3cf61ca5cb295e7a3b3e4e9e98e99cd53963d54912e WHIRLPOOL ca3d9a9b78643414b4361388e8486ab7cbb7d4a479718d89a8f51d90ef7fd580b154f09d1e8014503bececd49fb8841782e933c8cc8f355609ccae1f6510ccc5
|
||||
DIST netty-4.0.32.Final.tar.gz 1188681 SHA256 723d8f3495522ad73528c06a65b9c0b5b5b72db341daacd0d64bdc8df3412d04 SHA512 160006fc014c5211010449ba1aca2f2d20320340a077ea27098f1d94702066450da950f3951b1cbcfebdee7506f7ec715bb8c007fa539c15f803ba24690e77c6 WHIRLPOOL 6a7b90d952acfe558bf36a2d0fd3dce3ba33f3047e5caf97ddfb6d3f1bf2ab26294af375b792e281804fb1b5a696f7e14dd15f7d93e26a8979600ea03eeddb1c
|
||||
|
@ -0,0 +1,24 @@
|
||||
https://bugs.python.org/issue25397
|
||||
|
||||
improve the cross-compile tests to be more focused
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1339,7 +1339,7 @@ if test "$GCC" = "yes"
|
||||
then
|
||||
AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
|
||||
save_CFLAGS=$CFLAGS
|
||||
- CFLAGS="$CFLAGS -Werror -Wformat"
|
||||
+ CFLAGS="$CFLAGS -Werror=format"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
|
||||
],[
|
||||
@@ -4458,7 +4458,7 @@ then
|
||||
[ac_cv_have_long_long_format="cross -- assuming no"
|
||||
if test x$GCC = xyes; then
|
||||
save_CFLAGS=$CFLAGS
|
||||
- CFLAGS="$CFLAGS -Werror -Wformat"
|
||||
+ CFLAGS="$CFLAGS -Werror=format"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
@ -0,0 +1,135 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils flag-o-matic java-pkg-opt-2 multilib
|
||||
|
||||
PATCHSET_VER="0"
|
||||
|
||||
DESCRIPTION="free, small, and standard compliant Prolog compiler"
|
||||
HOMEPAGE="http://www.swi-prolog.org/"
|
||||
SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz
|
||||
mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="archive berkdb debug doc +gmp hardened java minimal odbc +readline ssl static-libs test uuid zlib X"
|
||||
|
||||
RDEPEND="sys-libs/ncurses
|
||||
archive? ( app-arch/libarchive )
|
||||
berkdb? ( >=sys-libs/db-4 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
readline? ( sys-libs/readline )
|
||||
gmp? ( dev-libs/gmp )
|
||||
ssl? ( dev-libs/openssl:0 )
|
||||
java? ( >=virtual/jdk-1.5 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
X? (
|
||||
virtual/jpeg:0
|
||||
x11-libs/libX11
|
||||
x11-libs/libXft
|
||||
x11-libs/libXpm
|
||||
x11-libs/libXt
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
X? ( x11-proto/xproto )
|
||||
java? ( test? ( =dev-java/junit-3.8* ) )"
|
||||
|
||||
S="${WORKDIR}/swipl-${PV}"
|
||||
|
||||
src_prepare() {
|
||||
EPATCH_FORCE=yes
|
||||
EPATCH_SUFFIX=patch
|
||||
epatch "${WORKDIR}"/${PV}
|
||||
|
||||
if ! use uuid; then
|
||||
mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
|
||||
fi
|
||||
|
||||
# OSX/Intel ld doesn't like an archive without table of contents
|
||||
sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-flags -fno-strict-aliasing
|
||||
use ppc && append-flags -mno-altivec
|
||||
use hardened && append-flags -fno-unit-at-a-time
|
||||
use debug && append-flags -DO_DEBUG
|
||||
|
||||
# ARCH is used in the configure script to figure out host and target
|
||||
# specific stuff
|
||||
export ARCH=${CHOST}
|
||||
|
||||
export CC_FOR_BUILD=$(tc-getBUILD_CC)
|
||||
|
||||
cd "${S}"/src || die
|
||||
econf \
|
||||
--libdir="${EPREFIX}"/usr/$(get_libdir) \
|
||||
$(use_enable gmp) \
|
||||
$(use_enable readline) \
|
||||
$(use_enable static-libs static) \
|
||||
--enable-shared \
|
||||
--enable-custom-flags COFLAGS="${CFLAGS}"
|
||||
|
||||
if ! use minimal ; then
|
||||
local jpltestconf
|
||||
if use java && use test ; then
|
||||
jpltestconf="--with-junit=$(java-config --classpath junit)"
|
||||
fi
|
||||
|
||||
cd "${S}/packages" || die
|
||||
econf \
|
||||
--libdir="${EPREFIX}"/usr/$(get_libdir) \
|
||||
$(use_with archive) \
|
||||
$(use_with berkdb bdb ) \
|
||||
$(use_with java jpl) \
|
||||
${jpltestconf} \
|
||||
$(use_with odbc) \
|
||||
$(use_with ssl) \
|
||||
$(use_with X xpce) \
|
||||
$(use_with zlib) \
|
||||
COFLAGS='"${CFLAGS}"'
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${S}"/src || die
|
||||
emake
|
||||
|
||||
if ! use minimal ; then
|
||||
cd "${S}/packages" || die
|
||||
emake
|
||||
./report-failed || die "Cannot report failed packages"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd "${S}/src" || die
|
||||
emake check
|
||||
|
||||
if ! use minimal ; then
|
||||
cd "${S}/packages" || die
|
||||
emake USE_PUBLIC_NETWORK_TESTS=false DISPLAY= check
|
||||
./report-failed || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -C src DESTDIR="${D}" install
|
||||
|
||||
if ! use minimal ; then
|
||||
emake -C packages DESTDIR="${D}" install
|
||||
if use doc ; then
|
||||
emake -C packages DESTDIR="${D}" html-install
|
||||
fi
|
||||
./packages/report-failed || die "Cannot report failed packages"
|
||||
fi
|
||||
|
||||
dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
DIST xapian-bindings-1.2.19.tar.xz 828904 SHA256 3b9434c6144cc347783175c92829f304e86919bbbd44f51b7b4a7148960cde17 SHA512 ac72ec35ae3b767e04e848a9782b41d74e99b6b1f795d5096373911ff549b3bf2e602a91ed0e5f7dce2e43e1dd308af710719e5a80c6a179393aac4af316de30 WHIRLPOOL 33770203390fea6f6048ebdc63cb7031f53a30be3568e3f3f6f8a25f8aa30a284347b402e360c0c2182069e3f6dab067fc5f6cd2b950f45e196afe057e4d80e3
|
||||
DIST xapian-bindings-1.2.20.tar.xz 828864 SHA256 98594534697642dee563c0e7fede43fde256f7e03488ea4922800f56baadc401 SHA512 4797431974442b210bb637e1d307a8c7eafb5f60093aee9d86223bacec7f828bd3d30c2d159d34cc160208cd016be3822acd19f1be9159af8f8871d83e7ec688 WHIRLPOOL 9ebeec220142865b6f983f065cef568623d2fb26e5393c2e8a74fc12c3dbb0fefd5541991beb494179ec4bff402164c9a5edafb520013b89ee3ae8fa73f06686
|
||||
DIST xapian-bindings-1.2.21.tar.xz 842696 SHA256 28a39247ac875be2dc1386c273167aab5c9949227c1070b65ca8de603c06d546 SHA512 bebb4c6fce57f9b54b307bf921e760efe8fbd06d404629cfb80717eed9bfb886c82559c2ba2b333a4e24ce14d389c916ca36924f9d4b2f72fae183d4a00e635b WHIRLPOOL 065efe7c9ad38f8f27a2fb109969b1ec6eb2ef403cb6e194f7c5f4147cb666931f2e70f698f6c974916087489af7ea05e0c8c1a2a39232d1176083b624ff5cf6
|
||||
DIST xapian-bindings-1.3.2.tar.xz 1177620 SHA256 bcf9948cd6e51c4e80ed5c1284b3349e667162dcbd048a4136c380adfe570f92 SHA512 65b8cb9a27b19c04179c6b8147110bcac118b5c41308ad87fef7db2b3b16d2032645f5d010492ebd772cb6bc673228b68837159764cb6d8fc09dde11e81174a7 WHIRLPOOL ffb4709a95d4139b4d9863195ec8ffc23a4936a055424b154e0e1f8c6d00bc81e919246e58fe68b76738bee05941a868b38e87ba1302ac3e392152b4592a1d1a
|
||||
DIST xapian-bindings-1.3.3.tar.xz 1195784 SHA256 a443a16ac8279daa5b50d3308861034f859f71c824ff5fa2d75cfda3cf31858f SHA512 db0f672cdc886b975dcfdec9ec1b30401627fdecdafe5381f0da41da1bebe3c15d80d6126fa443107ba1b7c259f15ff26c08f7b18524f620b2cb8e48f2c4c2d7 WHIRLPOOL beee4de0346bbcb11dd3c5f14b775e61a9cd2dbfc03fd61f12af90e883f09495a2a951543cd001a7e778920901c2a7001cd22d0179c5173f13cf543ce9b60c98
|
||||
|
@ -1,202 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="threads"
|
||||
|
||||
USE_PHP="php5-4 php5-5 php5-6"
|
||||
|
||||
PHP_EXT_NAME="xapian"
|
||||
PHP_EXT_INI="yes"
|
||||
PHP_EXT_OPTIONAL_USE="php"
|
||||
|
||||
#mono violates sandbox, we disable it until we figure this out
|
||||
#inherit java-pkg-opt-2 mono-env php-ext-source-r2 python
|
||||
inherit java-pkg-opt-2 php-ext-source-r2 python-r1
|
||||
|
||||
DESCRIPTION="SWIG and JNI bindings for Xapian"
|
||||
HOMEPAGE="http://www.xapian.org/"
|
||||
SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
#IUSE="java lua mono perl php python ruby tcl"
|
||||
#REQUIRED_USE="|| ( java lua mono perl php python ruby tcl )"
|
||||
IUSE="java lua perl php python ruby tcl"
|
||||
REQUIRED_USE="|| ( java lua perl php python ruby tcl )"
|
||||
|
||||
COMMONDEPEND="=dev-libs/xapian-${PV}*
|
||||
lua? ( dev-lang/lua:= )
|
||||
perl? ( dev-lang/perl:= )
|
||||
ruby? ( dev-lang/ruby:= )
|
||||
tcl? ( >=dev-lang/tcl-8.1:0= )"
|
||||
# mono? ( >=dev-lang/mono-1.0.8 )
|
||||
DEPEND="${COMMONDEPEND}
|
||||
java? ( >=virtual/jdk-1.3 )"
|
||||
RDEPEND="${COMMONDEPEND}
|
||||
java? ( >=virtual/jre-1.3 )"
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
java-pkg-opt-2_src_prepare
|
||||
if use java; then
|
||||
sed \
|
||||
-e 's/$(JAVAC)/$(JAVAC) $(JAVACFLAGS)/' \
|
||||
-i java{/,/org/xapian/errors/,/org/xapian/}Makefile.in || die "sed failed"
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
sed \
|
||||
-e 's:\(^pkgpylib_DATA = xapian/__init__.py\).*:\1:' \
|
||||
-e 's|\(^xapian/__init__.py: modern/xapian.py\)|\1 xapian/_xapian.so|' \
|
||||
-i python/Makefile.in || die "sed failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use java; then
|
||||
CXXFLAGS="${CXXFLAGS} $(java-pkg_get-jni-cflags)"
|
||||
fi
|
||||
|
||||
if use perl; then
|
||||
export PERL_ARCH="$(perl -MConfig -e 'print $Config{installvendorarch}')"
|
||||
export PERL_LIB="$(perl -MConfig -e 'print $Config{installvendorlib}')"
|
||||
fi
|
||||
|
||||
if use lua; then
|
||||
export LUA_LIB="$(pkg-config --variable=INSTALL_CMOD lua)"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_with java) \
|
||||
$(use_with lua) \
|
||||
$(use_with perl) \
|
||||
$(use_with php) \
|
||||
$(use_with python) \
|
||||
$(use_with ruby) \
|
||||
$(use_with tcl)
|
||||
# $(use_with mono csharp) \
|
||||
|
||||
# PHP and Python bindings are built/tested/installed manually.
|
||||
sed -e "/SUBDIRS =/s/ php//" -i Makefile || die "sed Makefile"
|
||||
sed -e "/SUBDIRS =/s/ python//" -i Makefile || die "sed Makefile"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use php; then
|
||||
local php_slot
|
||||
for php_slot in $(php_get_slots); do
|
||||
cp -r php php-${php_slot}
|
||||
emake -C php-${php_slot} \
|
||||
PHP="${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php" \
|
||||
PHP_CONFIG="${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" \
|
||||
PHP_EXTENSION_DIR="$("${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" --extension-dir)" \
|
||||
PHP_INC="$("${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" --includes)"
|
||||
done
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_copy_sources
|
||||
# building() {
|
||||
# emake -C python \
|
||||
# PYTHON="$(PYTHON)" \
|
||||
# PYTHON_INC="$(python_get_includedir)" \
|
||||
# PYTHON_LIB="$(python_get_libdir)" \
|
||||
# PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
|
||||
# pkgpylibdir="$(python_get_sitedir)/xapian"
|
||||
# }
|
||||
building() {
|
||||
emake -C python \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian"
|
||||
VERBOSE="1"
|
||||
}
|
||||
python_foreach_impl building
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
if use php; then
|
||||
local php_slot
|
||||
for php_slot in $(php_get_slots); do
|
||||
emake -C php-${php_slot} \
|
||||
PHP="${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php" \
|
||||
PHP_CONFIG="${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" \
|
||||
PHP_EXTENSION_DIR="$("${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" --extension-dir)" \
|
||||
PHP_INC="$("${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" --includes)" \
|
||||
check
|
||||
done
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
testing() {
|
||||
emake -C python \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian" \
|
||||
VERBOSE="1" \
|
||||
check
|
||||
}
|
||||
python_foreach_impl testing
|
||||
fi
|
||||
}
|
||||
|
||||
src_install () {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
if use java; then
|
||||
java-pkg_dojar java/built/xapian_jni.jar
|
||||
# TODO: make the build system not install this...
|
||||
java-pkg_doso "${D}/${S}/java/built/libxapian_jni.so"
|
||||
rm "${D}/${S}/java/built/libxapian_jni.so"
|
||||
rmdir -p "${D}/${S}/java/built"
|
||||
rmdir -p "${D}/${S}/java/native"
|
||||
fi
|
||||
|
||||
if use php; then
|
||||
local php_slot
|
||||
for php_slot in $(php_get_slots); do
|
||||
emake DESTDIR="${D}" -C php-${php_slot} \
|
||||
PHP="${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php" \
|
||||
PHP_CONFIG="${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" \
|
||||
PHP_EXTENSION_DIR="$("${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" --extension-dir)" \
|
||||
PHP_INC="$("${EPREFIX}/usr/$(get_libdir)/${php_slot}/bin/php-config" --includes)" \
|
||||
install
|
||||
done
|
||||
|
||||
php-ext-source-r2_createinifiles
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
installation() {
|
||||
emake -C python \
|
||||
DESTDIR="${D}" \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian" \
|
||||
VERBOSE="1" \
|
||||
install
|
||||
}
|
||||
python_foreach_impl installation
|
||||
fi
|
||||
|
||||
# For some USE combinations this directory is not created
|
||||
if [[ -d "${D}/usr/share/doc/xapian-bindings" ]]; then
|
||||
mv "${D}/usr/share/doc/xapian-bindings" "${D}/usr/share/doc/${PF}"
|
||||
fi
|
||||
|
||||
dodoc AUTHORS HACKING NEWS TODO README
|
||||
}
|
@ -1,178 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_DEPEND="python? 2"
|
||||
PYTHON_USE_WITH="threads"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
|
||||
|
||||
USE_PHP="php5-4"
|
||||
|
||||
PHP_EXT_NAME="xapian"
|
||||
PHP_EXT_INI="yes"
|
||||
PHP_EXT_OPTIONAL_USE="php"
|
||||
|
||||
inherit java-pkg-opt-2 mono-env php-ext-source-r2 python
|
||||
|
||||
DESCRIPTION="SWIG and JNI bindings for Xapian"
|
||||
HOMEPAGE="http://www.xapian.org/"
|
||||
SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="java lua mono perl php python ruby tcl"
|
||||
REQUIRED_USE="|| ( java lua mono perl php python ruby tcl )"
|
||||
|
||||
COMMONDEPEND="=dev-libs/xapian-${PV}*
|
||||
lua? ( dev-lang/lua:= )
|
||||
mono? ( >=dev-lang/mono-1.0.8 )
|
||||
perl? ( dev-lang/perl:= )
|
||||
ruby? ( dev-lang/ruby:= )
|
||||
tcl? ( >=dev-lang/tcl-8.1:0= )"
|
||||
DEPEND="${COMMONDEPEND}
|
||||
java? ( >=virtual/jdk-1.3 )"
|
||||
RDEPEND="${COMMONDEPEND}
|
||||
java? ( >=virtual/jre-1.3 )"
|
||||
|
||||
pkg_setup() {
|
||||
mono-env_pkg_setup
|
||||
java-pkg-opt-2_pkg_setup
|
||||
|
||||
if use python; then
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
java-pkg-opt-2_src_prepare
|
||||
|
||||
if use python; then
|
||||
sed \
|
||||
-e 's|\(^pkgpylib_DATA = xapian/__init__.py\).*|\1|' \
|
||||
-e '/\s\sxapian\/__init__.pyc/d' \
|
||||
-e '/\s\sxapian\/__init__.pyo/d' \
|
||||
-e 's|\(^xapian/__init__.py: modern/xapian.py\)|\1 xapian/_xapian$(PYTHON_SO)|' \
|
||||
-i python/Makefile.in || die "sed failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use java; then
|
||||
CXXFLAGS="${CXXFLAGS} $(java-pkg_get-jni-cflags)"
|
||||
fi
|
||||
|
||||
if use perl; then
|
||||
export PERL_ARCH="$(perl -MConfig -e 'print $Config{installvendorarch}')"
|
||||
export PERL_LIB="$(perl -MConfig -e 'print $Config{installvendorlib}')"
|
||||
fi
|
||||
|
||||
if use lua; then
|
||||
export LUA_LIB="$(pkg-config --variable=INSTALL_CMOD lua)"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_with java) \
|
||||
$(use_with lua) \
|
||||
$(use_with mono csharp) \
|
||||
$(use_with perl) \
|
||||
$(use_with php) \
|
||||
$(use_with python) \
|
||||
$(use_with ruby) \
|
||||
$(use_with tcl)
|
||||
|
||||
# Python bindings are built/tested/installed manually.
|
||||
sed -e "/SUBDIRS =/s/ python//" -i Makefile || die "sed Makefile"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
python_copy_sources python
|
||||
building() {
|
||||
emake \
|
||||
PYTHON="$(PYTHON)" \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
PYTHON_LIB="$(python_get_libdir)" \
|
||||
PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian"
|
||||
}
|
||||
python_execute_function -s --source-dir python building
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
testing() {
|
||||
emake \
|
||||
PYTHON="$(PYTHON)" \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
PYTHON_LIB="$(python_get_libdir)" \
|
||||
PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian" \
|
||||
VERBOSE="1" \
|
||||
check
|
||||
}
|
||||
python_execute_function -s --source-dir python testing
|
||||
fi
|
||||
}
|
||||
|
||||
src_install () {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
if use java; then
|
||||
java-pkg_dojar java/built/xapian_jni.jar
|
||||
# TODO: make the build system not install this...
|
||||
java-pkg_doso "${D}/${S}/java/built/libxapian_jni.so"
|
||||
rm "${D}/${S}/java/built/libxapian_jni.so"
|
||||
rmdir -p "${D}/${S}/java/built"
|
||||
rmdir -p "${D}/${S}/java/native"
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
installation() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
PYTHON="$(PYTHON)" \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
PYTHON_LIB="$(python_get_libdir)" \
|
||||
PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian" \
|
||||
install
|
||||
}
|
||||
python_execute_function -s --source-dir python installation
|
||||
fi
|
||||
|
||||
if use php; then
|
||||
php-ext-source-r2_createinifiles
|
||||
fi
|
||||
|
||||
# For some USE combinations this directory is not created
|
||||
if [[ -d "${D}/usr/share/doc/xapian-bindings" ]]; then
|
||||
mv "${D}/usr/share/doc/xapian-bindings" "${D}/usr/share/doc/${PF}"
|
||||
fi
|
||||
|
||||
dodoc AUTHORS HACKING NEWS TODO README || die "dodoc failed"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use python; then
|
||||
python_mod_optimize xapian
|
||||
fi
|
||||
|
||||
if use php_targets_php5-4; then
|
||||
ewarn "Note: subclassing Xapian classes in PHP currently doesn't work with PHP 5.4"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use python; then
|
||||
python_mod_cleanup xapian
|
||||
fi
|
||||
}
|
@ -1,178 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_DEPEND="python? 2"
|
||||
PYTHON_USE_WITH="threads"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
|
||||
|
||||
USE_PHP="php5-4"
|
||||
|
||||
PHP_EXT_NAME="xapian"
|
||||
PHP_EXT_INI="yes"
|
||||
PHP_EXT_OPTIONAL_USE="php"
|
||||
|
||||
inherit java-pkg-opt-2 mono-env php-ext-source-r2 python
|
||||
|
||||
DESCRIPTION="SWIG and JNI bindings for Xapian"
|
||||
HOMEPAGE="http://www.xapian.org/"
|
||||
SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="java lua mono perl php python ruby tcl"
|
||||
REQUIRED_USE="|| ( java lua mono perl php python ruby tcl )"
|
||||
|
||||
COMMONDEPEND="=dev-libs/xapian-${PV}*
|
||||
lua? ( dev-lang/lua:= )
|
||||
mono? ( >=dev-lang/mono-1.0.8 )
|
||||
perl? ( dev-lang/perl:= )
|
||||
ruby? ( dev-lang/ruby:= )
|
||||
tcl? ( >=dev-lang/tcl-8.1:0= )"
|
||||
DEPEND="${COMMONDEPEND}
|
||||
java? ( >=virtual/jdk-1.3 )"
|
||||
RDEPEND="${COMMONDEPEND}
|
||||
java? ( >=virtual/jre-1.3 )"
|
||||
|
||||
pkg_setup() {
|
||||
mono-env_pkg_setup
|
||||
java-pkg-opt-2_pkg_setup
|
||||
|
||||
if use python; then
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
java-pkg-opt-2_src_prepare
|
||||
|
||||
if use python; then
|
||||
sed \
|
||||
-e 's|\(^pkgpylib_DATA = xapian/__init__.py\).*|\1|' \
|
||||
-e '/\s\sxapian\/__init__.pyc/d' \
|
||||
-e '/\s\sxapian\/__init__.pyo/d' \
|
||||
-e 's|\(^xapian/__init__.py: modern/xapian.py\)|\1 xapian/_xapian$(PYTHON_SO)|' \
|
||||
-i python/Makefile.in || die "sed failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use java; then
|
||||
CXXFLAGS="${CXXFLAGS} $(java-pkg_get-jni-cflags)"
|
||||
fi
|
||||
|
||||
if use perl; then
|
||||
export PERL_ARCH="$(perl -MConfig -e 'print $Config{installvendorarch}')"
|
||||
export PERL_LIB="$(perl -MConfig -e 'print $Config{installvendorlib}')"
|
||||
fi
|
||||
|
||||
if use lua; then
|
||||
export LUA_LIB="$(pkg-config --variable=INSTALL_CMOD lua)"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_with java) \
|
||||
$(use_with lua) \
|
||||
$(use_with mono csharp) \
|
||||
$(use_with perl) \
|
||||
$(use_with php) \
|
||||
$(use_with python) \
|
||||
$(use_with ruby) \
|
||||
$(use_with tcl)
|
||||
|
||||
# Python bindings are built/tested/installed manually.
|
||||
sed -e "/SUBDIRS =/s/ python//" -i Makefile || die "sed Makefile"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
python_copy_sources python
|
||||
building() {
|
||||
emake \
|
||||
PYTHON="$(PYTHON)" \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
PYTHON_LIB="$(python_get_libdir)" \
|
||||
PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian"
|
||||
}
|
||||
python_execute_function -s --source-dir python building
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
testing() {
|
||||
emake \
|
||||
PYTHON="$(PYTHON)" \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
PYTHON_LIB="$(python_get_libdir)" \
|
||||
PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian" \
|
||||
VERBOSE="1" \
|
||||
check
|
||||
}
|
||||
python_execute_function -s --source-dir python testing
|
||||
fi
|
||||
}
|
||||
|
||||
src_install () {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
if use java; then
|
||||
java-pkg_dojar java/built/xapian_jni.jar
|
||||
# TODO: make the build system not install this...
|
||||
java-pkg_doso "${D}/${S}/java/built/libxapian_jni.so"
|
||||
rm "${D}/${S}/java/built/libxapian_jni.so"
|
||||
rmdir -p "${D}/${S}/java/built"
|
||||
rmdir -p "${D}/${S}/java/native"
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
installation() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
PYTHON="$(PYTHON)" \
|
||||
PYTHON_INC="$(python_get_includedir)" \
|
||||
PYTHON_LIB="$(python_get_libdir)" \
|
||||
PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
|
||||
pkgpylibdir="$(python_get_sitedir)/xapian" \
|
||||
install
|
||||
}
|
||||
python_execute_function -s --source-dir python installation
|
||||
fi
|
||||
|
||||
if use php; then
|
||||
php-ext-source-r2_createinifiles
|
||||
fi
|
||||
|
||||
# For some USE combinations this directory is not created
|
||||
if [[ -d "${D}/usr/share/doc/xapian-bindings" ]]; then
|
||||
mv "${D}/usr/share/doc/xapian-bindings" "${D}/usr/share/doc/${PF}"
|
||||
fi
|
||||
|
||||
dodoc AUTHORS HACKING NEWS TODO README || die "dodoc failed"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use python; then
|
||||
python_mod_optimize xapian
|
||||
fi
|
||||
|
||||
if use php_targets_php5-4; then
|
||||
ewarn "Note: subclassing Xapian classes in PHP currently doesn't work with PHP 5.4"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use python; then
|
||||
python_mod_cleanup xapian
|
||||
fi
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
DIST xapian-core-1.2.19.tar.xz 3175384 SHA256 4a78260388ff1b042f0ab5d18afdd524a530ae609690d0339990ddc147a54785 SHA512 5cd29b8c278b4fa652f947cd6689945bbe239c95425344d0fedb445bf1534198333844d91e6e59cf870043066f4dc511cd0268071916002e96bd38b59aa91c1b WHIRLPOOL 5d65982d47145addc6585b72a99494bf6d14277df2c796925fbe6284ddd08b89fbc147c1a29575d573afebb2e2f6eb6dc73d58161260404be7e5ceefe1371ffb
|
||||
DIST xapian-core-1.2.20.tar.xz 3181788 SHA256 c4f8d5b9e393ea32912955a17e6b6ea3f6c052ae9133ded6fe48582c25b1aa8f SHA512 89b2b4dabd4ef5946a2fab95c0bc3786fe36172f4dc750713aa4f3fa5d9e1716ee598faca1385209c1a669f5b7fed1a88c038d1f9cc47522fa956d04ea86560a WHIRLPOOL ec5145306208ba2fa7b458033573ff526bc2ee12a89dfd8fb81e43d836c2d6ac44a573ccd0c336c358fc55e17c73452929ecef6eb8d8edc1eef2a6f3050008f5
|
||||
DIST xapian-core-1.2.21.tar.xz 3202560 SHA256 63f48758fbd13fa8456dd4cf9bf3ec35a096e4290f14a51ac7df23f78c162d3f SHA512 a821043ea1686a09178bb91b14ed6a8cf00c50dfb0f066e420a40395edd3be085d7f89abb8f6a1151c847272c13601274e645055ede3548b07d5e912f0a70f81 WHIRLPOOL 9de8b2b70252b87da16a2502a831b46857f48cca8623a6ac411291bb6607bd61968ddd64a77c8685f300818abcbf91149a3f43af849a7843f67a5ebcc5130963
|
||||
DIST xapian-core-1.3.2.tar.xz 2490944 SHA256 203624f292fd9a023d51cdba53b01c7132210866a34bdca79ba721a7dd3745e6 SHA512 712c19aa2416d1493dfb601e1abe7242bf8f893197a3d0c229e5cabaac446950dd4c71c23200ce8a568e3bfae60e0d987c0c2d9938b1d185af2d44df3627c1cf WHIRLPOOL a1e4d8840d2d62cc524d287110de2e4370b2f60c614b91bc4cc624f96a73cc6397d5125cdae877b6781df1cc8d4ac9b34ffdeb4892c20aac0099afd5ef28c46c
|
||||
DIST xapian-core-1.3.3.tar.xz 2543260 SHA256 2d273ca0df6af208c4b6904542a9dffed8a9520376522d650e1a2885b476a280 SHA512 8b0d0fce532748efc1c2705e3f6f45ff83ec97be7c1f5b54846a9ff94b9d416b67491262a157afdc40497c52e1c4aa94bd11a78b4494db4a1fb45ba6d18f7099 WHIRLPOOL bf9c2f1606ba72469f2306cc6edfff63834c58831ee75063e39445392460b85478c9c44ef7d2ec1fdfd63bad113544f8c1ba3eb01ee178abf63da3a7ae2d5b3b
|
||||
|
@ -1,63 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
MY_P="${PN}-core-${PV}"
|
||||
|
||||
DESCRIPTION="Xapian Probabilistic Information Retrieval library"
|
||||
HOMEPAGE="http://www.xapian.org/"
|
||||
SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="doc static-libs -cpu_flags_x86_sse +cpu_flags_x86_sse2 +brass +chert +inmemory"
|
||||
|
||||
DEPEND="sys-libs/zlib"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_configure() {
|
||||
local myconf=""
|
||||
|
||||
ewarn
|
||||
if use cpu_flags_x86_sse2; then
|
||||
ewarn "Using sse2"
|
||||
myconf="${myconf} --enable-sse=sse2"
|
||||
else
|
||||
if use cpu_flags_x86_sse; then
|
||||
ewarn "Using sse"
|
||||
myconf="${myconf} --enable-sse=sse"
|
||||
else
|
||||
ewarn "Disabling sse and sse2"
|
||||
myconf="${myconf} --disable-sse"
|
||||
fi
|
||||
fi
|
||||
ewarn
|
||||
|
||||
myconf="${myconf} $(use_enable static-libs static)"
|
||||
|
||||
use brass || myconf="${myconf} --disable-backend-brass"
|
||||
use chert || myconf="${myconf} --disable-backend-chert"
|
||||
use inmemory || myconf="${myconf} --disable-backend-inmemory"
|
||||
|
||||
myconf="${myconf} --enable-backend-flint --enable-backend-remote"
|
||||
|
||||
econf $myconf
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
mv "${D}usr/share/doc/xapian-core" "${D}usr/share/doc/${PF}"
|
||||
use doc || rm -rf "${D}usr/share/doc/${PF}"
|
||||
|
||||
dodoc AUTHORS HACKING PLATFORMS README NEWS
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake check VALGRIND=
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
MY_P="${PN}-core-${PV}"
|
||||
|
||||
DESCRIPTION="Xapian Probabilistic Information Retrieval library"
|
||||
HOMEPAGE="http://www.xapian.org/"
|
||||
SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="doc static-libs -cpu_flags_x86_sse +cpu_flags_x86_sse2 +brass +chert +inmemory"
|
||||
|
||||
DEPEND="sys-libs/zlib"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_configure() {
|
||||
local myconf=""
|
||||
|
||||
ewarn
|
||||
if use cpu_flags_x86_sse2; then
|
||||
ewarn "Using sse2"
|
||||
myconf="${myconf} --enable-sse=sse2"
|
||||
else
|
||||
if use cpu_flags_x86_sse; then
|
||||
ewarn "Using sse"
|
||||
myconf="${myconf} --enable-sse=sse"
|
||||
else
|
||||
ewarn "Disabling sse and sse2"
|
||||
myconf="${myconf} --disable-sse"
|
||||
fi
|
||||
fi
|
||||
ewarn
|
||||
|
||||
myconf="${myconf} $(use_enable static-libs static)"
|
||||
|
||||
use brass || myconf="${myconf} --disable-backend-brass"
|
||||
use chert || myconf="${myconf} --disable-backend-chert"
|
||||
use inmemory || myconf="${myconf} --disable-backend-inmemory"
|
||||
|
||||
myconf="${myconf} --enable-backend-remote --program-suffix="
|
||||
|
||||
econf $myconf
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
mv "${D}usr/share/doc/xapian-core" "${D}usr/share/doc/${PF}"
|
||||
use doc || rm -rf "${D}usr/share/doc/${PF}"
|
||||
|
||||
dodoc AUTHORS HACKING PLATFORMS README NEWS
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake check VALGRIND=
|
||||
}
|
@ -1,3 +1,2 @@
|
||||
DIST Search-Xapian-1.2.19.0.tar.gz 63667 SHA256 d9ff745bb3ace7c1c2dbcf4ad65f3e50b3744d16c0a9ee3a51fe7c6541f639c2 SHA512 78ba36f3b8157ef872330b88992012d3f553abc3f2322bbb1d0f3111681dd530e5b57e4989fef645401d19cb4d95f5d284a305c5470efc2911051d1765551a3f WHIRLPOOL 9f81480e6341f3bd65bfd243d95d5b8ecce30cb4b9c531a3dffac48f1d787259988e51a19a32af73693dbbbbba8e08865e1a116a49f9fe4f0b2fa2e78a22c0e8
|
||||
DIST Search-Xapian-1.2.20.0.tar.gz 67128 SHA256 1be6dc77680ba5597bbb3f1cf7ac9fa61de77e9266be2e6a45a7f913b274c139 SHA512 734ed63dc86f904f5b68c7c8e62780d82c27414625c54d4d14e974aa1b2f0b1f0022f0176da072ff4e6fd2a218586dbfc0f85481df60bb0d231ad978c3ec969b WHIRLPOOL 7b8b5a2e9b572e5dbe7671368c31e6ac0052b8c9cbb3052548ed816e75c55696414c1ef57b9c8040c2c5faf4371afd0272cf57b8557cc028f7f4ca4cdcb825ef
|
||||
DIST Search-Xapian-1.2.21.0.tar.gz 67726 SHA256 34cb6279c3394b763e16ff9ae6b48942bdddb494312548366156cfdb4d8c70b5 SHA512 e2ffbf1a880fbda000020f7d9310b71690b26267d9324dd4ee05268b348ac5e5974c1c1feb097cf6bb3c267e5b440422a0153167b916cd2215749df236c2e883 WHIRLPOOL f34ba0070fb41e0efeb2aff4852ef8717b216184c79878196c50650f009d6e48d216b8dd1f9cd07031fb2be713faf5a3e9c8e1184469fed69fa745f69bb5572a
|
||||
|
@ -1,36 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
MODULE_AUTHOR=OLLY
|
||||
inherit perl-module toolchain-funcs versionator
|
||||
|
||||
VERSION=$(get_version_component_range 1-3)
|
||||
|
||||
SRC_URI+=" http://oligarchy.co.uk/xapian/${VERSION}/${P}.tar.gz"
|
||||
DESCRIPTION="Perl XS frontend to the Xapian C++ search library"
|
||||
|
||||
LICENSE="|| ( Artistic GPL-1 GPL-2 GPL-3 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="examples"
|
||||
|
||||
RDEPEND="~dev-libs/xapian-${VERSION}
|
||||
!dev-libs/xapian-bindings[perl]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-perl/Module-Build"
|
||||
|
||||
SRC_TEST="do"
|
||||
|
||||
myconf="CXX=$(tc-getCXX) CXXFLAGS=${CXXFLAGS}"
|
||||
|
||||
src_install() {
|
||||
perl-module_src_install
|
||||
|
||||
use examples && {
|
||||
docinto examples
|
||||
dodoc "${S}"/examples/*
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
From 66bef80988c9efe60b61c6bc05f3206b4c3df7e8 Mon Sep 17 00:00:00 2001
|
||||
From: hasufell <hasufell@gentoo.org>
|
||||
Date: Mon, 12 Oct 2015 20:43:50 +0200
|
||||
Subject: [PATCH] Add LibreSSL support, patches backported from upstream
|
||||
|
||||
https://bitbucket.org/pypy/pypy/pull-requests/333/deal-with-platforms-without-rand_egd-take/diff
|
||||
---
|
||||
pypy/module/_ssl/interp_ssl.py | 34 +++++++++++++++-----------
|
||||
pypy/module/_ssl/test/test_ssl.py | 8 +++---
|
||||
rpython/rlib/ropenssl.py | 6 ++++-
|
||||
rpython/rtyper/tool/rffi_platform.py | 12 ++++++---
|
||||
rpython/rtyper/tool/test/test_rffi_platform.py | 24 +++++++++++++++++-
|
||||
5 files changed, 61 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
|
||||
index 0cac165..f210167 100644
|
||||
--- a/pypy/module/_ssl/interp_ssl.py
|
||||
+++ b/pypy/module/_ssl/interp_ssl.py
|
||||
@@ -310,20 +310,26 @@ if HAVE_OPENSSL_RAND:
|
||||
res = libssl_RAND_status()
|
||||
return space.wrap(res)
|
||||
|
||||
- @unwrap_spec(path=str)
|
||||
- def RAND_egd(space, path):
|
||||
- """RAND_egd(path) -> bytes
|
||||
-
|
||||
- Queries the entropy gather daemon (EGD) on socket path. Returns number
|
||||
- of bytes read. Raises socket.sslerror if connection to EGD fails or
|
||||
- if it does provide enough data to seed PRNG."""
|
||||
- with rffi.scoped_str2charp(path) as socket_path:
|
||||
- bytes = libssl_RAND_egd(socket_path)
|
||||
- if bytes == -1:
|
||||
- raise ssl_error(space,
|
||||
- "EGD connection failed or EGD did not return "
|
||||
- "enough data to seed the PRNG")
|
||||
- return space.wrap(bytes)
|
||||
+ if HAVE_OPENSSL_RAND_EGD:
|
||||
+ @unwrap_spec(path=str)
|
||||
+ def RAND_egd(space, path):
|
||||
+ """RAND_egd(path) -> bytes
|
||||
+
|
||||
+ Queries the entropy gather daemon (EGD) on socket path. Returns number
|
||||
+ of bytes read. Raises socket.sslerror if connection to EGD fails or
|
||||
+ if it does provide enough data to seed PRNG."""
|
||||
+ with rffi.scoped_str2charp(path) as socket_path:
|
||||
+ bytes = libssl_RAND_egd(socket_path)
|
||||
+ if bytes == -1:
|
||||
+ raise ssl_error(space,
|
||||
+ "EGD connection failed or EGD did not return "
|
||||
+ "enough data to seed the PRNG")
|
||||
+ return space.wrap(bytes)
|
||||
+ else:
|
||||
+ # Dummy func for platforms missing RAND_egd(). Most likely LibreSSL.
|
||||
+ @unwrap_spec(path=str)
|
||||
+ def RAND_egd(space, path):
|
||||
+ raise ssl_error(space, "RAND_egd unavailable")
|
||||
|
||||
|
||||
class SSLSocket(W_Root):
|
||||
diff --git a/pypy/module/_ssl/test/test_ssl.py b/pypy/module/_ssl/test/test_ssl.py
|
||||
index 3204610..9722fd5 100644
|
||||
--- a/pypy/module/_ssl/test/test_ssl.py
|
||||
+++ b/pypy/module/_ssl/test/test_ssl.py
|
||||
@@ -33,7 +33,8 @@ class AppTestSSL:
|
||||
assert isinstance(_ssl.OPENSSL_VERSION_INFO, tuple)
|
||||
assert len(_ssl.OPENSSL_VERSION_INFO) == 5
|
||||
assert isinstance(_ssl.OPENSSL_VERSION, str)
|
||||
- assert 'openssl' in _ssl.OPENSSL_VERSION.lower()
|
||||
+ lower_version = _ssl.OPENSSL_VERSION.lower()
|
||||
+ assert 'openssl' in lower_version or "libressl" in lower_version
|
||||
|
||||
def test_RAND_add(self):
|
||||
import _ssl
|
||||
@@ -64,8 +65,9 @@ class AppTestSSL:
|
||||
|
||||
def test_sslwrap(self):
|
||||
import ssl, _socket, sys, gc
|
||||
- if sys.platform == 'darwin' or 'freebsd' in sys.platform:
|
||||
- skip("hangs indefinitely on OSX & FreeBSD (also on CPython)")
|
||||
+ if sys.platform == 'darwin' or 'freebsd' in sys.platform or \
|
||||
+ 'openbsd' in sys.platform:
|
||||
+ skip("hangs indefinitely on OSX & BSD (also on CPython)")
|
||||
s = _socket.socket()
|
||||
ss = ssl.wrap_socket(s)
|
||||
|
||||
diff --git a/rpython/rlib/ropenssl.py b/rpython/rlib/ropenssl.py
|
||||
index c36779d..6fe45d0 100644
|
||||
--- a/rpython/rlib/ropenssl.py
|
||||
+++ b/rpython/rlib/ropenssl.py
|
||||
@@ -168,6 +168,9 @@ OBJ_NAME = rffi.CArrayPtr(OBJ_NAME_st)
|
||||
|
||||
HAVE_OPENSSL_RAND = OPENSSL_VERSION_NUMBER >= 0x0090500f
|
||||
HAVE_SSL_CTX_CLEAR_OPTIONS = OPENSSL_VERSION_NUMBER >= 0x009080df
|
||||
+HAVE_OPENSSL_RAND_EGD = rffi_platform.has('RAND_egd("/")',
|
||||
+ '#include <openssl/rand.h>',
|
||||
+ libraries=['ssl', 'crypto'])
|
||||
|
||||
def external(name, argtypes, restype, **kw):
|
||||
kw['compilation_info'] = eci
|
||||
@@ -194,7 +197,8 @@ ssl_external('CRYPTO_set_id_callback',
|
||||
if HAVE_OPENSSL_RAND:
|
||||
ssl_external('RAND_add', [rffi.CCHARP, rffi.INT, rffi.DOUBLE], lltype.Void)
|
||||
ssl_external('RAND_status', [], rffi.INT)
|
||||
- ssl_external('RAND_egd', [rffi.CCHARP], rffi.INT)
|
||||
+ if HAVE_OPENSSL_RAND_EGD:
|
||||
+ ssl_external('RAND_egd', [rffi.CCHARP], rffi.INT)
|
||||
ssl_external('SSL_CTX_new', [SSL_METHOD], SSL_CTX)
|
||||
ssl_external('SSL_get_SSL_CTX', [SSL], SSL_CTX)
|
||||
ssl_external('TLSv1_method', [], SSL_METHOD)
|
||||
diff --git a/rpython/rtyper/tool/rffi_platform.py b/rpython/rtyper/tool/rffi_platform.py
|
||||
index 1760877..1d56c20 100755
|
||||
--- a/rpython/rtyper/tool/rffi_platform.py
|
||||
+++ b/rpython/rtyper/tool/rffi_platform.py
|
||||
@@ -17,12 +17,15 @@ from rpython.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong, intmask
|
||||
#
|
||||
# Helpers for simple cases
|
||||
|
||||
-def eci_from_header(c_header_source, include_dirs=None):
|
||||
+def eci_from_header(c_header_source, include_dirs=None, libraries=None):
|
||||
if include_dirs is None:
|
||||
include_dirs = []
|
||||
+ if libraries is None:
|
||||
+ libraries = []
|
||||
return ExternalCompilationInfo(
|
||||
post_include_bits=[c_header_source],
|
||||
- include_dirs=include_dirs
|
||||
+ include_dirs=include_dirs,
|
||||
+ libraries=libraries,
|
||||
)
|
||||
|
||||
def getstruct(name, c_header_source, interesting_fields):
|
||||
@@ -75,9 +78,10 @@ def getintegerfunctionresult(function, args=None, c_header_source='', includes=[
|
||||
CConfig._compilation_info_.includes = includes
|
||||
return configure(CConfig)['RESULT']
|
||||
|
||||
-def has(name, c_header_source, include_dirs=None):
|
||||
+def has(name, c_header_source, include_dirs=None, libraries=None):
|
||||
class CConfig:
|
||||
- _compilation_info_ = eci_from_header(c_header_source, include_dirs)
|
||||
+ _compilation_info_ = \
|
||||
+ eci_from_header(c_header_source, include_dirs, libraries)
|
||||
HAS = Has(name)
|
||||
return configure(CConfig)['HAS']
|
||||
|
||||
diff --git a/rpython/rtyper/tool/test/test_rffi_platform.py b/rpython/rtyper/tool/test/test_rffi_platform.py
|
||||
index bfa069e..4feae87 100644
|
||||
--- a/rpython/rtyper/tool/test/test_rffi_platform.py
|
||||
+++ b/rpython/rtyper/tool/test/test_rffi_platform.py
|
||||
@@ -271,12 +271,34 @@ def test_array():
|
||||
[("d_name", lltype.FixedSizeArray(rffi.CHAR, 1))])
|
||||
assert dirent.c_d_name.length == 32
|
||||
|
||||
-def test_has():
|
||||
+def test_has_0001():
|
||||
assert rffi_platform.has("x", "int x = 3;")
|
||||
assert not rffi_platform.has("x", "")
|
||||
# has() should also not crash if it is given an invalid #include
|
||||
assert not rffi_platform.has("x", "#include <some/path/which/cannot/exist>")
|
||||
|
||||
+def test_has_0002():
|
||||
+ assert rffi_platform.has("pow", "#include <math.h>", libraries=["m"])
|
||||
+
|
||||
+def test_has_0003():
|
||||
+ """multiple libraries"""
|
||||
+ assert rffi_platform.has("pow", "#include <math.h>", libraries=["m", "c"])
|
||||
+
|
||||
+def test_has_0004():
|
||||
+ """bogus symbol name"""
|
||||
+ assert not rffi_platform.has("pow", "#include <math.h>",
|
||||
+ libraries=["boguslibname"])
|
||||
+
|
||||
+def test_has_0005():
|
||||
+ """bogus symbol name and lib name"""
|
||||
+ assert not rffi_platform.has("bogus_symbol_name", "#include <math.h>",
|
||||
+ libraries=["boguslibname"])
|
||||
+
|
||||
+def test_has_0006():
|
||||
+ """missing include"""
|
||||
+ assert not rffi_platform.has("pow", "", libraries=["m"])
|
||||
+
|
||||
+
|
||||
def test_verify_eci():
|
||||
eci = ExternalCompilationInfo()
|
||||
rffi_platform.verify_eci(eci)
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1,3 +1,3 @@
|
||||
DIST torment-2.0.3.tar.gz 23457 SHA256 577fb8227087100ec1e3c29fc422dfab8813f77881f74b7f68b41a7a9abde9ca SHA512 a112fdd20da24ecf2ac0d8acb50e226bdc60cd78ce2b903333cde20fa78c593e31ff5ef9922c0b9f5cd32ac5c910ee287f2534ff5669cd21b12a66a485d0f409 WHIRLPOOL 060fa7ec2200b7fddddd1fd128ca09ad0f30314707da7cf393e30c614f894169f3724c51ab4e2c2627ba51a1345a6079b804c5ce0f02f2dae54090bbd2b20cb9
|
||||
DIST torment-2.0.4.tar.gz 27980 SHA256 1968ffe76f4e759c0857828eff30074fbdcff72c2ff23ef13023c1cdd7608037 SHA512 aa6689387648b0c659487c99dbdfac14e2bdb9dfdaf5d1b777ccb50755bbf5ce0c576ed4682bb9ebcd55ed8babc4c5727e01b9843206bee26561b0b930a0d4c4 WHIRLPOOL 27c50a9dc61108ddc2feaa5c88fbde8a4eb6032b2fdbdf9eb7aaa1b2ad6d7a8c5700e48bba1e5aaa5b2fd679e150881827e4622ce3f65cc601093691a7a2aca0
|
||||
DIST torment-2.1.0.tar.gz 30608 SHA256 d8d21efd1a30c0bb964b43e47b41cc261d4b2417b09fd3945090bf48fd3d0248 SHA512 502a61372f61d653f98ed20e0d074d1c411cc33be08ae91fec4e7606b1d3d3b78fd4fee8b1908b4fc721e7fe6029400063e9a94830a589e572baf824e7e0a261 WHIRLPOOL 7fe54b057ea89823b1b861c61e771f02a8a66a755f5667c89728bfab8e52006524cc960fece75f77d00b1aa894e0f3853df59a79cddf70a28b27b08d31de856b
|
||||
DIST torment-3.0.0.tar.gz 33898 SHA256 ad3ead69f1c9e5ec1dc92a83bceca186f0d6a4544f983222c32c4d0a5e7f3b45 SHA512 1fac30a0e97a6505c7e9cbbfaa141e2378cf26345fd4679d6eff75a4472054771b2421b044f9ff0daa8671e1b27989508e7a9885dfb98e3a07bd3e842d4bbb77 WHIRLPOOL 353cd7a8b66f2936c5476e8e50e2f6428bdc6f4e0bdbb2ea99c93018ebe6587ad4d3c6310fd55fe21cbdefc3174425a34d10aa072cbc27ebcbe3f5f114f4c913
|
||||
|
@ -1,7 +1,5 @@
|
||||
DIST sprockets-2.11.3-git.tgz 195342 SHA256 010a3cfcee4a196552b19d07ad1b00221be9e3d117ad82a977824d3041fec8d5 SHA512 2fd26441089bc5c9474d9b443a9e72febde4566403592180e4e1fa5dce566e2fc37fde88f8cf804e732cbe588ba8347b57f7016124467f826a9de875df67e849 WHIRLPOOL af174e377604697cd746665852ed4b4ed551805c90f0530f92db61114dabf21f81b540c779e9f3a5d27131d52f9455ed09000ea1543392e5fb1df696038178ff
|
||||
DIST sprockets-2.12.3-git.tgz 195647 SHA256 998ed806114a50b9168ad569c67d037fa866c185b2620924abdf4c542123529b SHA512 fd9544ed946bdf95968f198e74a36b682613d68e29a46708fd46c8b58792bf52526936b4c8d9ec3acea8f7cce789a69bcf4da3269741d43e186001061cbed03a WHIRLPOOL 4305464c17b275a6956fde436e1a65004da29580e0cc5f9962af9911778bf54ff303235fcfea85f28b1c7735e6f021fd63b1e719286efbd72a0be3dd95b14210
|
||||
DIST sprockets-2.2.3-git.tgz 185139 SHA256 d8d8c59a4f129357f5d9093db02d8e5df0b2df7aaeee23fc6c5864fdbc29997c SHA512 6850423efbb8521e4f4980e30e1464821be148474b511aca05478078b2601cf569a244cddeb9f164ba759d4207dcc2605c89b4b5b45431ebbee26b56f07b5e01 WHIRLPOOL 5b8eb85651975429c994e3e741d31a7989b031d51c4d9fb3d2a70da700a9187e888e100965b4f034f13d38d9066cb48a8c201841d2d639398c1c4f7c0dc1985e
|
||||
DIST sprockets-3.1.0-git.tgz 290551 SHA256 b49a8f300adb526f9e1fa65e5e648e113885e820f33a63a004afaf3d37e9ea90 SHA512 e74e7ac1e29d92dc6ef064e103c7b2af3cf202ef2bfd5c8ec4215d2ae60cf1283cb53ba2496d1aabae87497dd372a0caf67b8a9be261d9d44b0df35735aaf6ca WHIRLPOOL 28de9f6ffefb959eac4bb845b252e3b138d6e1b6a63b550c8af83d1be9392d2d727d23e243214a92bce5bb118f7f366ad9d5156d21c57b986a93b83fb077d707
|
||||
DIST sprockets-3.2.0-git.tgz 290551 SHA256 231cde13cc79f548d72eb53aef52515aff885461fde6c98281133f973c3fccd8 SHA512 c146ce41518d86754f60478b4501df4fef8f77d3f6210637d460d8d7aad182908d5eea5f6677aac32dab6bf2ced0078d5cb9d00b5a4a51252c1c079041254a3e WHIRLPOOL 79bd194a44475afd8ecafd37179eb6d0fe99d05c4ceb55c7e0b6f3cc558309284c4c030bdc897f8e1f575900abaab42f8e4162cbc3318cdd9153cf61cf40654f
|
||||
DIST sprockets-3.3.4-git.tgz 297110 SHA256 b8059ed5be77a7a9f8aefbf4aef873851e6fd198af454b20f05986e83dd7dff1 SHA512 907e0d24532c37e3085304c13b633467cf2793a2b2b899e270f1022cbcbde3c9979d4bdff6bd20560758c76c214e45b8b174f5992ff767ad499807d9c71721ff WHIRLPOOL 77d97c9e028c136d9b26d17c88b0a8c3bab21c60a9e474710248e5540de4db374434539a82146766704c0dbe79d4270c559d94aee2713889cb4b2cd2eed48ee2
|
||||
DIST sprockets-3.3.5-git.tgz 297306 SHA256 f8cba6b61de022e3ab5d4fc14bcaac487da405251e651234a9c24187bf38cec9 SHA512 d7f850a333cf1930e68d0c630df8afec688dd1f219a8c8d03c1b7f093bc0103044b27272623e70225b0f5334c450e604067b41fbbea6a9b4ddf1922ee280565f WHIRLPOOL 8aa934a435023f4c7ecbcf3d93f2ad7af6bcdb1cbf7f20d128f69dd28bec61e5135968154881c071556d8b9af950f7e08a8ce5ca3e91d9251889a55d015cb658
|
||||
DIST sprockets-3.4.0-git.tgz 297425 SHA256 bb5f3b64a3413596b703bf4cf36644a96db908a1301f89e0e09c2b3fa85ae238 SHA512 a4d1860d91109e2e54323b9bc3432e07f0d48580cfb1d543c2072cb1a144317a0597e1833a731a7555d76658c7110b04f85b5706f91e9ffdf88c9a1df14deb05 WHIRLPOOL efa286c1d73c52798bd4313ba6d4e80d132a2f2ad6af848ea8f80a54c279fcc3f29f6a87646793098033c2f3678562bf63b9fa552d9139872df38ed458ba2b6d
|
||||
|
@ -1,70 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
USE_RUBY="ruby19 ruby20 ruby21"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="sprockets.gemspec"
|
||||
|
||||
inherit ruby-fakegem versionator
|
||||
|
||||
DESCRIPTION="Ruby library for compiling and serving web assets"
|
||||
HOMEPAGE="https://github.com/sstephenson/sprockets"
|
||||
SRC_URI="https://github.com/sstephenson/sprockets/archive/v${PV}.tar.gz -> ${P}-git.tgz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="$(get_version_component_range 1)"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend "
|
||||
=dev-ruby/hike-1* >=dev-ruby/hike-1.2
|
||||
=dev-ruby/multi_json-1*
|
||||
=dev-ruby/rack-1*
|
||||
=dev-ruby/tilt-1* >=dev-ruby/tilt-1.3.1
|
||||
!!<dev-ruby/sprockets-2.2.2-r1:2.2"
|
||||
|
||||
ruby_add_bdepend "test? (
|
||||
dev-ruby/json
|
||||
dev-ruby/rack-test
|
||||
=dev-ruby/coffee-script-2*
|
||||
=dev-ruby/execjs-2*
|
||||
=dev-ruby/sass-3* >=dev-ruby/sass-3.1
|
||||
dev-ruby/uglifier
|
||||
)"
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Avoid tests for template types that we currently don't package:
|
||||
# eco and ejs.
|
||||
sed -i -e '/eco templates/,/end/ s:^:#:' \
|
||||
-e '/ejs templates/,/end/ s:^:#:' test/test_environment.rb || die
|
||||
|
||||
# Add missing 'json' require
|
||||
sed -i -e '4irequire "json"' test/test_manifest.rb || die
|
||||
|
||||
# Avoid test breaking on specific javascript error being thrown,
|
||||
# most likely due to using node instead of v8.
|
||||
sed -i -e '/bundled asset cached if theres an error/,/^ end/ s:^:#:' test/test_environment.rb || die
|
||||
|
||||
# Require a newer version of execjs since we do not have this slotted.
|
||||
sed -i -e '/execjs/ s/1.0/2.0/' ${RUBY_FAKEGEM_GEMSPEC} || die
|
||||
}
|
||||
|
||||
each_ruby_prepare() {
|
||||
sed -i -e "s:ruby:${RUBY}:" test/test_sprocketize.rb || die
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
# Make sure we have completely separate copies. Hardlinks won't work
|
||||
# for this test suite.
|
||||
cp -R test test-new || die
|
||||
rm -rf test || die
|
||||
mv test-new test || die
|
||||
|
||||
each_fakegem_test
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
USE_RUBY="ruby19 ruby20 ruby21"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="sprockets.gemspec"
|
||||
|
||||
inherit ruby-fakegem versionator
|
||||
|
||||
DESCRIPTION="Ruby library for compiling and serving web assets"
|
||||
HOMEPAGE="https://github.com/rails/sprockets"
|
||||
SRC_URI="https://github.com/rails/sprockets/archive/v${PV}.tar.gz -> ${P}-git.tgz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="$(get_version_component_range 1)"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend "
|
||||
=dev-ruby/rack-1*:*
|
||||
!!<dev-ruby/sprockets-2.12.3-r1:2"
|
||||
|
||||
ruby_add_bdepend "test? (
|
||||
dev-ruby/json
|
||||
dev-ruby/rack-test
|
||||
=dev-ruby/coffee-script-2*
|
||||
=dev-ruby/execjs-2*
|
||||
=dev-ruby/sass-3* >=dev-ruby/sass-3.1
|
||||
dev-ruby/uglifier
|
||||
)"
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Avoid tests for template types that we currently don't package:
|
||||
# eco and ejs.
|
||||
sed -i -e '/eco templates/,/end/ s:^:#:' \
|
||||
-e '/ejs templates/,/end/ s:^:#:' test/test_environment.rb || die
|
||||
sed -i -e '/.ejs/ s:^:#:' test/test_asset.rb || die
|
||||
rm -f test/test_require.rb test/test_{closure,eco,ejs,yui}_{compressor,processor}.rb || die
|
||||
}
|
||||
|
||||
each_ruby_prepare() {
|
||||
sed -i -e "s:ruby:${RUBY}:" test/test_sprocketize.rb || die
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
# Make sure we have completely separate copies. Hardlinks won't work
|
||||
# for this test suite.
|
||||
cp -R test test-new || die
|
||||
rm -rf test || die
|
||||
mv test-new test || die
|
||||
|
||||
each_fakegem_test
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
USE_RUBY="ruby19 ruby20 ruby21"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="sprockets.gemspec"
|
||||
|
||||
inherit ruby-fakegem versionator
|
||||
|
||||
DESCRIPTION="Ruby library for compiling and serving web assets"
|
||||
HOMEPAGE="https://github.com/rails/sprockets"
|
||||
SRC_URI="https://github.com/rails/sprockets/archive/v${PV}.tar.gz -> ${P}-git.tgz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="$(get_version_component_range 1)"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend "
|
||||
=dev-ruby/rack-1*:*
|
||||
!!<dev-ruby/sprockets-2.12.3-r1:2"
|
||||
|
||||
ruby_add_bdepend "test? (
|
||||
dev-ruby/json
|
||||
dev-ruby/rack-test
|
||||
=dev-ruby/coffee-script-2*
|
||||
=dev-ruby/execjs-2*
|
||||
=dev-ruby/sass-3* >=dev-ruby/sass-3.1
|
||||
dev-ruby/uglifier
|
||||
)"
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Avoid tests for template types that we currently don't package:
|
||||
# eco and ejs.
|
||||
sed -i -e '/eco templates/,/end/ s:^:#:' \
|
||||
-e '/ejs templates/,/end/ s:^:#:' test/test_environment.rb || die
|
||||
sed -i -e '/.ejs/ s:^:#:' test/test_asset.rb || die
|
||||
rm -f test/test_require.rb test/test_{closure,eco,ejs,yui}_{compressor,processor}.rb || die
|
||||
}
|
||||
|
||||
each_ruby_prepare() {
|
||||
sed -i -e "s:ruby:${RUBY}:" test/test_sprocketize.rb || die
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
# Make sure we have completely separate copies. Hardlinks won't work
|
||||
# for this test suite.
|
||||
cp -R test test-new || die
|
||||
rm -rf test || die
|
||||
mv test-new test || die
|
||||
|
||||
each_fakegem_test
|
||||
}
|
@ -1,4 +1,2 @@
|
||||
DIST typhoeus-0.6.9.gem 49152 SHA256 5979555fd430ebec72ab1f5630e8f7679979fb21984d8d9dfe3008d4f91794c8 SHA512 5063d3217f35db29d216327b6eed10d6613d018c496935e78aa8e2b10ec21f3372df11fe48155b45387767d5572efa93e74afb0bb9b10782d28e87dead0294a4 WHIRLPOOL a20d25696804d2d444fa6df145360056dd6170ace42a8cab0a84aa425ae7306173331db8ace402f4a1c596925ee8d52702bc91c967f943361a2a852170b03917
|
||||
DIST typhoeus-0.7.1.gem 50688 SHA256 e81bb253477dd527733b2b512e4f48f474e63efe0e41bb92b119e1442fdad3c7 SHA512 e88656fa2a89da9eed5364a7f4249729a0a28835606211249413e48c481d58a8ee7a5267ea2c2d4d1b7947bab979c1223c4481d78ed1bfe34ea7e3b074dcbf78 WHIRLPOOL 2df03d6fe150b5b2a4892740f045eb1317d1c7650ad83675a4498470c1f6169f023f831f2501edee1d1b9d55e6ca08af43440fd00a2d4b109a2c794e61dc4606
|
||||
DIST typhoeus-0.7.2.gem 51712 SHA256 073fc5b57a49c17cfa0fda61573a4b590b21bd0c27aed9fb6bee432a024644c3 SHA512 bb672b26aa4639b3b7a7b348a564079211710818a711c58522f94125c92776d398cfd8bde8e519484ac6fe4c7c7a2778d34b8f6579ebff6f842f32caa31e2431 WHIRLPOOL 987cf3ecc6cbbf9a6c9c46580711aa1da9629fa0a22ff3df6d34047a7a83bf0e9a8c0a2ceba816075b27a822d50e8b7be3375ad047b4853a830109bc12844cd7
|
||||
DIST typhoeus-0.7.3.gem 51712 SHA256 13d1b1056fcb559d571da52fb13387797ff7b4f99ea157a7ef80e121e9356061 SHA512 2c837504cc81ee3131e5c0cfdd2da6ef123624ee166063ca749d9e001714aa45514d103229eb1d3c42e756acefa83697cd74d856e07ee584d5b5834d67a173b5 WHIRLPOOL ec10bb9a48428abc7c3afa63fc4f20c98b0eca41ab06dee4b28f9480d677b20e1b78080d349a6fa31717790d884eb19d035184756246fe315eb0e321d81a9011
|
||||
DIST typhoeus-0.8.0.gem 52224 SHA256 28b7cf3c7d915a06d412bddab445df94ab725252009aa409f5ea41ab6577a30f SHA512 e9e65bd1a912ee2c5f0e2026a478ccdbc7f7d34289a24849b23a03b64dea875bc81335a3206d8ee38acc36accaf98bfaf733574768bb54df4a0dd9945d9f1fa8 WHIRLPOOL adfcad38b4f7b35c4001836be05b895cc6e825311aa1119522a111d0acf5f4dbb4ea95619188798ade224013a5b268f2a6bc7642a649e828645ed0818212c9a6
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
USE_RUBY="ruby19 ruby20 ruby21"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md UPGRADE.md"
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Typhoeus runs HTTP requests in parallel while cleanly encapsulating
|
||||
handling logic."
|
||||
HOMEPAGE="http://rubygems.org/gems/typhoeus/"
|
||||
|
||||
LICENSE="Ruby"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend ">=dev-ruby/ethon-0.7.1"
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/json >=dev-ruby/faraday-0.9 >=dev-ruby/sinatra-1.3 )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -e '/bundler/I s:^:#:' -i Rakefile spec/spec_helper.rb || die
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
USE_RUBY="ruby19 ruby20 ruby21"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md UPGRADE.md"
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Runs HTTP requests in parallel while cleanly encapsulating handling logic"
|
||||
HOMEPAGE="http://rubygems.org/gems/typhoeus/"
|
||||
|
||||
LICENSE="Ruby"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend ">=dev-ruby/ethon-0.7.1"
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/json >=dev-ruby/faraday-0.9 >=dev-ruby/sinatra-1.3 )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -e '/bundler/I s:^:#:' -i Rakefile spec/spec_helper.rb || die
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
--- Makefile.orig 2015-10-13 19:24:21.799486000 +0000
|
||||
+++ Makefile 2015-10-13 19:26:05.187486000 +0000
|
||||
@@ -11,7 +11,8 @@
|
||||
|
||||
DESTDIR =
|
||||
BINDIR = $(DESTDIR)/usr/bin
|
||||
-LOCALEDIR = $(DESTDIR)/usr/share/locale
|
||||
+BLOCALEDIR = /usr/share/locale
|
||||
+LOCALEDIR = $(DESTDIR)$(BLOCALEDIR)
|
||||
MANDIR = $(DESTDIR)/usr/share/man/man1
|
||||
|
||||
TARGET=all
|
||||
@@ -89,7 +90,7 @@
|
||||
[ -d $$modir ] || mkdir -p $$modir; \
|
||||
install -m644 $(PODIR)/$$pot $$modir/$(NAME).mo; \
|
||||
done; \
|
||||
- sed -e '/^TEXTDOMAINDIR=/s,=.*,=$(LOCALEDIR),' \
|
||||
+ sed -e '/^TEXTDOMAINDIR=/s,=.*,=$(BLOCALEDIR),' \
|
||||
-e '/^VERSION=/s/=.*/=$(VERSION)/' $(SHSKEL) > $(BINDIR)/$(NAME) && \
|
||||
chmod +x $(BINDIR)/$(NAME) && \
|
||||
echo "program '$(NAME)' installed. just run $(BINDIR)/$(NAME)"
|
@ -1,3 +1,3 @@
|
||||
DIST hts-tvheadend_2.12.tar.gz 1475053 SHA256 c2e33384b24356be036bf8e58a026efeed247b001d3674929dc0016bf2b0e11b SHA512 87808a57454b58f458e8e7db6d381e34917064a0f196ed4e91f2ee912575282e121ada72d11ce6c3f8c5e2913dc4510b0b1e6a7d252b702946c033ef35e85c68 WHIRLPOOL 953735a6796972dbf5a7b2f541fc07c7dc2666e4a15f007fdefd92b7445055c227ce8b570088e4fd0810ffebd3271a19af7fd023eb58dfd046b24d45be5053cc
|
||||
DIST tvheadend-3.2.tar.gz 2155532 SHA256 4bda0da2488c2078c6bd7e92ea5099c7c1e6c52fd361af965c83e82070cfb651 SHA512 f4f87a42c10bf9989606ca932ba916f9c70d0adfc1c0f6ee1f1dd3c23545de8e1699c4f519c56a7f5df0b27521d7f714c02ea5d30432756511baefb00ddd8d22 WHIRLPOOL 8dbf8c7eeff31b132f61d7ff8cf5412659e430e3fe47733ec54e7e804b8be608bd9886d8149975a91653608edeb641781e08c6f3df819dc08a4f7d96abe41dfb
|
||||
DIST dtv-scan-tables-2015-02-08-f2053b3.tar.bz2 123415 SHA256 83ed1b669009ef325e5d9ccb897e48b31e15e71e81bff442b3d0bbd650131c77 SHA512 aedf0429c2ec0a4692e19c0b4ae1e8c063a5a0fb8695359aa8f716a7f40fd88435ed8b1d2aec2461de3f49b533d6cd012c2a54d06058a5291781da4adf82d609 WHIRLPOOL afaef58cdf2ce1ca03c0a695dbf13192b544e3c5a0012cc70a55834d0b1034d509174684fd0fe3f2111becbe32aac16cad5d467adc278a4b6b16c7dbd384757f
|
||||
DIST tvheadend-3.4.27.tar.gz 2201905 SHA256 50438809ff43ab332d255248096e9531ac85e6c51511206a3f68cfc1697f4ead SHA512 fb6dc59fbaf5ea43f69452ff6b034ed80b040bb15f5c43f26a3f8075601066354f82e5cf15f7c5215adf1387edfa57468f71605aacfc0824a996aee108a0f11a WHIRLPOOL b0c92d8368cf7643a238d918752f8b1816ddcfde28372fecad228ab133d4e1dd6219d5b436c396fa4013af5269b2fd05b62bb6ce6180553d835204c8c38029ca
|
||||
DIST tvheadend-4.0.6.tar.gz 15826173 SHA256 348c6890a3721217c159a8cdce746686e7a8c75bc14740ac5a75a82acf6b5116 SHA512 b5b9a39a9b6f4f1aa653b0d58b311d3580d5c10b2185a96bf73619b912385bece76fdd0d1e8327d97a2f5e3888729f10cfbfd395660d12749fb7a5d586fde266 WHIRLPOOL 6584d30b4f8f3a17cd79e74b7dc9a892c27a0c214258ff146247b342a58a8eba52ffc4ded9d35d761434671b600daec09e8df05c3b7f4f54db7116fb3a79946b
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 984bcbb1acadd2957d7fc79dc4ec72e2e07a3572 Mon Sep 17 00:00:00 2001
|
||||
From: Olliver Schinagl <oliver@schinagl.nl>
|
||||
Date: Sat, 26 Sep 2015 22:36:08 +0200
|
||||
Subject: [PATCH] Use glibc version iconv
|
||||
|
||||
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
configure | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 07d6965..0ec0259 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -39,7 +39,7 @@ else
|
||||
LDFLAGS += -ldl -lpthread -lm
|
||||
endif
|
||||
ifeq ($(CONFIG_LIBICONV),yes)
|
||||
-LDFLAGS += -liconv
|
||||
+LDFLAGS +=
|
||||
endif
|
||||
ifeq ($(PLATFORM), darwin)
|
||||
LDFLAGS += -framework CoreServices
|
||||
diff --git a/configure b/configure
|
||||
index 487456b..a6cce11 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -214,7 +214,7 @@ int test(void)
|
||||
iconv_t ic = iconv_open("ASCII", "ASCII");
|
||||
return 0;
|
||||
}
|
||||
-' -liconv
|
||||
+'
|
||||
|
||||
if enabled_or_auto dvben50221; then
|
||||
check_cc_snippet libdvben50221 '
|
||||
--
|
||||
2.4.6
|
||||
|
@ -1,16 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>proxy-maintainers</herd>
|
||||
<maintainer>
|
||||
<email>leho@kraav.com</email>
|
||||
<name>Leho Kraav</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name='xmltv'>Use <pkg>media-tv/xmltv</pkg></flag>
|
||||
<flag name='ccache'>Use <pkg>dev-util/ccache</pkg></flag>
|
||||
<flag name='dvbscan'>Use <pkg>media-tv/linuxtv-dvb-apps</pkg></flag>
|
||||
<flag name='imagecache'>Enable support for image caching</flag>
|
||||
<flag name='uriparser'>Use <pkg>dev-libs/uriparser</pkg></flag>
|
||||
</use>
|
||||
<herd>proxy-maintainers</herd>
|
||||
<maintainer>
|
||||
<email>wraeth@wraeth.id.au</email>
|
||||
<name>Sam Jorna</name>
|
||||
<description>Proxy maintaner, to be assugned to bugs</description>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name='capmt'>Enable support for capmt (dvbapi) protocol</flag>
|
||||
<flag name='constcw'>Enable support for the constcw protocol</flag>
|
||||
<flag name='cwc'>Enable support for the cwc (newcamd) protocol</flag>
|
||||
<flag name='epoll'>Enable epoll Linux system call</flag>
|
||||
<flag name='hdhomerun'>Enable support for the HDHomeRun device</flag>
|
||||
<flag name='iptv'>Enable support for Internet Protocol TV</flag>
|
||||
<flag name='satip'>Enable support for IP-based Satellite TV</flag>
|
||||
<flag name='timeshift'>Enable TimeShift support</flag>
|
||||
<flag name='xmltv'>Use <pkg>media-tv/xmltv</pkg></flag>
|
||||
<flag name='ccache'>Use <pkg>dev-util/ccache</pkg></flag>
|
||||
<flag name='dvbscan'>Use <pkg>media-tv/linuxtv-dvb-apps</pkg></flag>
|
||||
<flag name='imagecache'>Enable support for image caching</flag>
|
||||
<flag name='uriparser'>Use <pkg>dev-libs/uriparser</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
@ -1,73 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils toolchain-funcs user
|
||||
|
||||
MY_PN="hts-${PN}"
|
||||
|
||||
DESCRIPTION="A combined DVB receiver, Digital Video Recorder and Live TV streaming server"
|
||||
HOMEPAGE="http://www.lonelycoder.com/hts/"
|
||||
SRC_URI="http://www.lonelycoder.com/debian/dists/hts/main/source/${MY_PN}_${PV}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="avahi xmltv"
|
||||
|
||||
DEPEND="virtual/linuxtv-dvb-headers"
|
||||
RDEPEND="${DEPEND}
|
||||
avahi? ( net-dns/avahi )
|
||||
xmltv? ( media-tv/xmltv )"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
pkg_setup() {
|
||||
enewuser tvheadend -1 -1 /dev/null video
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# set version number to avoid subversion and git dependencies
|
||||
sed -e 's:\$(shell support/version.sh):${PV}:' \
|
||||
-i Makefile || die "sed failed!"
|
||||
|
||||
# remove stripping
|
||||
sed -e 's:install -s:install:' \
|
||||
-i support/posix.mk || die "sed failed!"
|
||||
|
||||
# remove '-Werror' wrt bug #438424
|
||||
sed -i 's:-Werror::' Makefile || die "sed on removing '-Werror' failed!"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable avahi) --release
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
dodoc ChangeLog README
|
||||
doman man/tvheadend.1
|
||||
|
||||
newinitd "${FILESDIR}/tvheadend.initd" tvheadend
|
||||
newconfd "${FILESDIR}/tvheadend.confd" tvheadend
|
||||
|
||||
dodir /etc/tvheadend
|
||||
fperms 0700 /etc/tvheadend
|
||||
fowners tvheadend:video /etc/tvheadend
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "The Tvheadend web interface can be reached at:"
|
||||
elog "http://localhost:9981/"
|
||||
elog
|
||||
elog "Make sure that you change the default username"
|
||||
elog "and password via the Configuration / Access control"
|
||||
elog "tab in the web interface."
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils toolchain-funcs user
|
||||
|
||||
DESCRIPTION="A combined DVB receiver, Digital Video Recorder and Live TV streaming server"
|
||||
HOMEPAGE="https://www.lonelycoder.com/redmine/projects/tvheadend/"
|
||||
SRC_URI="mirror://github/tvheadend/tvheadend/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="avahi xmltv zlib"
|
||||
|
||||
DEPEND="dev-libs/openssl
|
||||
virtual/linuxtv-dvb-headers
|
||||
avahi? ( net-dns/avahi )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}
|
||||
xmltv? ( media-tv/xmltv )"
|
||||
|
||||
DOCS=( README )
|
||||
|
||||
pkg_setup() {
|
||||
enewuser tvheadend -1 -1 /dev/null video
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# set the correct version number
|
||||
sed -e "s:(3.1.694):(${PV}):" -i debian/changelog || die 'sed failed!'
|
||||
|
||||
# remove '-Werror' wrt bug #438424
|
||||
sed -e 's:-Werror::' -i Makefile || die 'sed failed!'
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf --prefix="${EPREFIX}"/usr \
|
||||
--datadir="${EPREFIX}"/usr/share/"${PN}" \
|
||||
--mandir="${EPREFIX}"/usr/share/man/man1 \
|
||||
--release \
|
||||
--disable-dvbscan \
|
||||
$(use_enable avahi) \
|
||||
$(use_enable zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newinitd "${FILESDIR}/tvheadend.initd" tvheadend
|
||||
newconfd "${FILESDIR}/tvheadend.confd" tvheadend
|
||||
|
||||
dodir /etc/tvheadend
|
||||
fperms 0700 /etc/tvheadend
|
||||
fowners tvheadend:video /etc/tvheadend
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "The Tvheadend web interface can be reached at:"
|
||||
elog "http://localhost:9981/"
|
||||
elog
|
||||
elog "Make sure that you change the default username"
|
||||
elog "and password via the Configuration / Access control"
|
||||
elog "tab in the web interface."
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils linux-info systemd toolchain-funcs user
|
||||
|
||||
DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder"
|
||||
HOMEPAGE="https://tvheadend.org/"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
dvbscan? ( http://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-2015-02-08-f2053b3.tar.bz2 )"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="avahi ccache capmt constcw +cwc dbus +dvb +dvbscan epoll ffmpeg hdhomerun libav iconv imagecache inotify iptv satip +timeshift uriparser xmltv zlib"
|
||||
|
||||
RDEPEND="dev-libs/openssl:=
|
||||
avahi? ( net-dns/avahi )
|
||||
capmt? ( virtual/linuxtv-dvb-headers )
|
||||
ccache? ( dev-util/ccache sys-libs/zlib )
|
||||
dbus? ( sys-apps/dbus )
|
||||
dvb? ( virtual/linuxtv-dvb-headers )
|
||||
ffmpeg? ( virtual/ffmpeg )
|
||||
hdhomerun? ( media-libs/libhdhomerun )
|
||||
iconv? ( virtual/libiconv )
|
||||
libav? ( media-video/libav )
|
||||
imagecache? ( net-misc/curl )
|
||||
uriparser? ( dev-libs/uriparser )
|
||||
zlib? ( sys-libs/zlib )
|
||||
xmltv? ( media-tv/xmltv )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
|
||||
DOCS=( README.md )
|
||||
|
||||
src_unpack() {
|
||||
unpack "${P}.tar.gz"
|
||||
|
||||
if use dvbscan; then
|
||||
mkdir "${S}/data/dvb-scan" || die
|
||||
cd "${T}" || die
|
||||
unpack dtv-scan-tables-2015-02-08-f2053b3.tar.bz2
|
||||
rmdir "${S}/data/dvb-scan" || die
|
||||
mv "${T}/usr/share/dvb" "${S}/data/dvb-scan" || die
|
||||
|
||||
# This is needed to prevent make from removing files
|
||||
touch "${S}/data/dvb-scan/.stamp" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewuser tvheadend -1 -1 /dev/null video
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# remove '-Werror' wrt bug #438424
|
||||
sed -e 's:-Werror::' -i Makefile || die 'sed failed!'
|
||||
epatch "${FILESDIR}/${PV}-use-glibc-version-iconv.patch"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf --prefix="${EPREFIX}"/usr \
|
||||
--datadir="${EPREFIX}"/usr/share \
|
||||
--mandir="${EPREFIX}"/usr/share/man/man1 \
|
||||
$(use_enable avahi) \
|
||||
$(use_enable ccache) \
|
||||
$(use_enable capmt) \
|
||||
$(use_enable constcw) \
|
||||
$(use_enable cwc) \
|
||||
$(use_enable dbus) \
|
||||
$(use_enable dvb linuxdvb) \
|
||||
$(use_enable dvbscan) \
|
||||
$(use_enable epoll) \
|
||||
--disable-kqueue \
|
||||
$(use_enable ffmpeg libav) \
|
||||
$(use_enable hdhomerun hdhomerun_client) \
|
||||
$(use_enable libav) \
|
||||
$(use_enable imagecache) \
|
||||
$(use_enable inotify) \
|
||||
$(use_enable iptv) \
|
||||
$(use_enable satip satip_server) \
|
||||
$(use_enable satip satip_client) \
|
||||
$(use_enable timeshift) \
|
||||
$(use_enable uriparser) \
|
||||
$(use_enable zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newinitd "${FILESDIR}/tvheadend.initd" tvheadend
|
||||
newconfd "${FILESDIR}/tvheadend.confd" tvheadend
|
||||
|
||||
systemd_dounit "${FILESDIR}/tvheadend.service"
|
||||
|
||||
dodir /etc/tvheadend
|
||||
fperms 0700 /etc/tvheadend
|
||||
fowners tvheadend:video /etc/tvheadend
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "The Tvheadend web interface can be reached at:"
|
||||
elog "http://localhost:9981/"
|
||||
elog
|
||||
elog "Make sure that you change the default username"
|
||||
elog "and password via the Configuration / Access control"
|
||||
elog "tab in the web interface."
|
||||
}
|
@ -1 +1 @@
|
||||
Tue, 13 Oct 2015 10:11:26 +0000
|
||||
Wed, 14 Oct 2015 06:11:27 +0000
|
||||
|
@ -1 +1 @@
|
||||
Tue, 13 Oct 2015 10:11:26 +0000
|
||||
Wed, 14 Oct 2015 06:11:27 +0000
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,14 @@
|
||||
DEFINED_PHASES=install unpack
|
||||
DEPEND=!app-admin/augeas !app-admin/mcollective !app-admin/puppet !dev-ruby/hiera !dev-ruby/facter !app-emulation/virt-what virtual/pkgconfig
|
||||
DESCRIPTION=general puppet client utils along with mcollective hiera and facter
|
||||
EAPI=5
|
||||
HOMEPAGE=https://puppetlabs.com/
|
||||
IUSE=puppetdb selinux
|
||||
KEYWORDS=~amd64 ~x86
|
||||
LICENSE=Apache-2.0
|
||||
RDEPEND=!app-admin/augeas !app-admin/mcollective !app-admin/puppet !dev-ruby/hiera !dev-ruby/facter !app-emulation/virt-what sys-apps/dmidecode selinux? ( sys-libs/libselinux[ruby] sec-policy/selinux-puppet ) puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )
|
||||
RESTRICT=strip
|
||||
SLOT=0
|
||||
SRC_URI=amd64? ( http://apt.puppetlabs.com/pool/wheezy/PC1/p/puppet-agent/puppet-agent_1.2.6-1wheezy_amd64.deb ) x86? ( http://apt.puppetlabs.com/pool/wheezy/PC1/p/puppet-agent/puppet-agent_1.2.6-1wheezy_i386.deb )
|
||||
_eclasses_=eutils 43da5163ba106e87d22d2e7d6d67537f multilib df4e4d5cfd3d137d0c248e1991c0e4d6 systemd 6b4f0cefa642270eded7e6ca816fd181 toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85 unpacker 1d149d9bda7723e740cfd28118f27813
|
||||
_md5_=f6f4d2113243c00c226572c14e5a7e43
|
@ -0,0 +1,14 @@
|
||||
DEFINED_PHASES=configure install postinst prepare
|
||||
DEPEND=pam? ( virtual/pam ) skey? ( >=sys-auth/skey-1.1.5-r1 ) ldap? ( >=net-nds/openldap-2.1.30-r1 dev-libs/cyrus-sasl ) sys-libs/zlib sys-devel/bison
|
||||
DESCRIPTION=Allows users or groups to run commands as other users
|
||||
EAPI=5
|
||||
HOMEPAGE=http://www.sudo.ws/
|
||||
IUSE=ldap nls pam offensive selinux skey +sendmail
|
||||
KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~sparc-solaris
|
||||
LICENSE=ISC BSD
|
||||
RDEPEND=pam? ( virtual/pam ) skey? ( >=sys-auth/skey-1.1.5-r1 ) ldap? ( >=net-nds/openldap-2.1.30-r1 dev-libs/cyrus-sasl ) sys-libs/zlib selinux? ( sec-policy/selinux-sudo ) ldap? ( dev-lang/perl ) pam? ( sys-auth/pambase ) >=app-misc/editor-wrapper-3 virtual/editor sendmail? ( virtual/mta )
|
||||
REQUIRED_USE=pam? ( !skey ) skey? ( !pam )
|
||||
SLOT=0
|
||||
SRC_URI=http://www.sudo.ws/sudo/dist/sudo-1.8.12.tar.gz ftp://ftp.sudo.ws/pub/sudo/sudo-1.8.12.tar.gz
|
||||
_eclasses_=eutils 43da5163ba106e87d22d2e7d6d67537f flag-o-matic 85dc1eac3c64d8141374490ed64122e5 libtool 7f78cd7d403808a350c9ae23f5821fb4 multilib df4e4d5cfd3d137d0c248e1991c0e4d6 pam 3ecd5b75e39b0bb05a3183c08fcdfdb4 toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85
|
||||
_md5_=1543f6499f33d22fd9ccb3ccb955719a
|
@ -1,14 +1,14 @@
|
||||
DEFINED_PHASES=compile configure install postinst postrm preinst prepare pretend setup test unpack
|
||||
DEPEND=python_single_target_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3[threads,xml] ) python_single_target_python3_4? ( dev-lang/python:3.4[threads,xml] ) python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[threads,xml] ) >=dev-lang/python-exec-2:=[python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_python2_7(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_5(-),python_single_target_python3_3(+)?,python_single_target_python3_4(+)?,python_single_target_python2_7(+)?] app-arch/zip app-arch/unzip >=app-text/hunspell-1.3.2-r3 app-text/mythes >=app-text/libabw-0.1.0 >=app-text/libexttextcat-3.2 >=app-text/libebook-0.1.1 >=app-text/libetonyek-0.1.1 app-text/liblangtag >=app-text/libmspub-0.1.0 >=app-text/libmwaw-0.3.4 >=app-text/libodfgen-0.1.0 app-text/libwpd:0.10[tools] app-text/libwpg:0.3 =app-text/libwps-0.3* >=app-text/poppler-0.16:=[xpdf-headers(+),cxx] >=dev-cpp/clucene-2.3.3.4-r2 =dev-cpp/libcmis-0.5* dev-db/unixODBC >=dev-libs/boost-1.55:= dev-libs/expat >=dev-libs/hyphen-2.7.1 >=dev-libs/icu-4.8.1.1:= =dev-libs/liborcus-0.7* >=dev-libs/librevenge-0.0.1 >=dev-libs/nspr-4.8.8 >=dev-libs/nss-3.12.9 >=dev-lang/perl-5.0 >=dev-libs/openssl-1.0.0d:0 >=dev-libs/redland-1.0.16 media-gfx/graphite2 >=media-libs/fontconfig-2.8.0 media-libs/freetype:2 >=media-libs/glew-1.10 >=media-libs/harfbuzz-0.9.18:=[icu(+)] media-libs/lcms:2 >=media-libs/libpng-1.4:0= >=media-libs/libcdr-0.1.0 >=media-libs/libfreehand-0.1.0 media-libs/libpagemaker >=media-libs/libvisio-0.1.0 >=net-misc/curl-7.21.4 net-libs/neon net-nds/openldap sci-mathematics/lpsolve virtual/jpeg:0 >=x11-libs/cairo-1.10.0[X] x11-libs/libXinerama x11-libs/libXrandr x11-libs/libXrender virtual/glu virtual/opengl bluetooth? ( net-wireless/bluez ) coinmp? ( sci-libs/coinor-mp ) collada? ( >=media-libs/opencollada-1.2.2_p20150207 ) cups? ( net-print/cups ) dbus? ( >=dev-libs/dbus-glib-0.92 ) eds? ( gnome-extra/evolution-data-server ) firebird? ( >=dev-db/firebird-2.5 ) gltf? ( media-libs/libgltf ) gnome? ( gnome-base/gconf:2 ) gtk? ( x11-libs/gdk-pixbuf[X] >=x11-libs/gtk+-2.24:2 ) gtk3? ( >=x11-libs/gtk+-3.2:3 ) gstreamer? ( media-libs/gstreamer:1.0 media-libs/gst-plugins-base:1.0 ) jemalloc? ( dev-libs/jemalloc ) libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 ) libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 ) libreoffice_extensions_wiki-publisher? ( dev-java/commons-codec:0 dev-java/commons-httpclient:3 dev-java/commons-lang:2.1 dev-java/commons-logging:0 dev-java/tomcat-servlet-api:3.0 ) mysql? ( >=dev-db/mysql-connector-c++-1.1.0 ) postgres? ( >=dev-db/postgresql-9.0:*[kerberos] ) telepathy? ( dev-libs/glib:2 >=net-libs/telepathy-glib-0.18.0 >=x11-libs/gtk+-2.24:2 ) >=dev-libs/libatomic_ops-7.2d >=dev-libs/libxml2-2.7.8 dev-libs/libxslt dev-perl/Archive-Zip dev-util/cppunit >=dev-util/gperf-3 dev-util/intltool >=dev-util/mdds-0.11.2:= media-libs/glm net-misc/npapi-sdk >=sys-apps/findutils-4.4.2 sys-devel/bison sys-apps/coreutils sys-devel/flex sys-devel/gettext >=sys-devel/make-3.82 sys-devel/ucpp sys-libs/zlib virtual/pkgconfig x11-libs/libXt x11-libs/libXtst x11-proto/randrproto x11-proto/xextproto x11-proto/xineramaproto x11-proto/xproto java? ( >=virtual/jdk-1.6 >=dev-java/ant-core-1.7 ) odk? ( >=app-doc/doxygen-1.8.4 ) test? ( dev-util/cppunit ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.15:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0 ) >=sys-apps/sed-4 >=dev-vcs/git-1.8.2.1 kde? ( dev-util/automoc virtual/pkgconfig !aqua? ( >=x11-libs/libXtst-1.1.0 x11-proto/xf86vidmodeproto ) ) kde? ( dev-lang/perl >=dev-qt/qt3support-4.7.4:4[accessibility] >=dev-qt/qtcore-4.7.4:4[qt3support,ssl] >=dev-qt/qtdbus-4.7.4:4 >=dev-qt/designer-4.7.4:4 >=dev-qt/qtgui-4.7.4:4[accessibility,dbus(+)] >=dev-qt/qtscript-4.7.4:4 >=dev-qt/qtsql-4.7.4:4[qt3support] >=dev-qt/qtsvg-4.7.4:4 >=dev-qt/qttest-4.7.4:4 >=dev-qt/qtwebkit-4.7.4:4 >=kde-base/kdelibs-4.4:4[aqua=] )
|
||||
DESCRIPTION=LibreOffice, a full office productivity suite
|
||||
DEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[threads,xml] ) python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[threads,xml] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python2_7(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_3(-),-python_single_target_python3_5(-),python_single_target_python3_4(+)?,python_single_target_python2_7(+)?] app-arch/zip app-arch/unzip >=app-text/hunspell-1.3.2-r3 app-text/mythes >=app-text/libabw-0.1.0 >=app-text/libexttextcat-3.2 >=app-text/libebook-0.1.1 >=app-text/libetonyek-0.1.1 app-text/liblangtag >=app-text/libmspub-0.1.0 >=app-text/libmwaw-0.3.4 >=app-text/libodfgen-0.1.0 app-text/libwpd:0.10[tools] app-text/libwpg:0.3 =app-text/libwps-0.3* >=app-text/poppler-0.16:=[xpdf-headers(+),cxx] >=dev-cpp/clucene-2.3.3.4-r2 =dev-cpp/libcmis-0.5* dev-db/unixODBC >=dev-libs/boost-1.55:= dev-libs/expat >=dev-libs/hyphen-2.7.1 >=dev-libs/icu-4.8.1.1:= =dev-libs/liborcus-0.7* >=dev-libs/librevenge-0.0.1 >=dev-libs/nspr-4.8.8 >=dev-libs/nss-3.12.9 >=dev-lang/perl-5.0 >=dev-libs/openssl-1.0.0d:0 >=dev-libs/redland-1.0.16 media-gfx/graphite2 >=media-libs/fontconfig-2.8.0 media-libs/freetype:2 >=media-libs/glew-1.10 >=media-libs/harfbuzz-0.9.18:=[icu(+)] media-libs/lcms:2 >=media-libs/libpng-1.4:0= >=media-libs/libcdr-0.1.0 >=media-libs/libfreehand-0.1.0 media-libs/libpagemaker >=media-libs/libvisio-0.1.0 >=net-misc/curl-7.21.4 net-libs/neon net-nds/openldap sci-mathematics/lpsolve virtual/jpeg:0 >=x11-libs/cairo-1.10.0[X] x11-libs/libXinerama x11-libs/libXrandr x11-libs/libXrender virtual/glu virtual/opengl bluetooth? ( net-wireless/bluez ) coinmp? ( sci-libs/coinor-mp ) collada? ( >=media-libs/opencollada-1.2.2_p20150207 ) cups? ( net-print/cups ) dbus? ( >=dev-libs/dbus-glib-0.92 ) eds? ( gnome-extra/evolution-data-server ) firebird? ( >=dev-db/firebird-2.5 ) gltf? ( media-libs/libgltf ) gnome? ( gnome-base/gconf:2 ) gtk? ( x11-libs/gdk-pixbuf[X] >=x11-libs/gtk+-2.24:2 ) gtk3? ( >=x11-libs/gtk+-3.2:3 ) gstreamer? ( media-libs/gstreamer:1.0 media-libs/gst-plugins-base:1.0 ) jemalloc? ( dev-libs/jemalloc ) libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 ) libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 ) libreoffice_extensions_wiki-publisher? ( dev-java/commons-codec:0 dev-java/commons-httpclient:3 dev-java/commons-lang:2.1 dev-java/commons-logging:0 ) mysql? ( >=dev-db/mysql-connector-c++-1.1.0 ) postgres? ( >=dev-db/postgresql-9.0:*[kerberos] ) telepathy? ( dev-libs/glib:2 >=net-libs/telepathy-glib-0.18.0 >=x11-libs/gtk+-2.24:2 ) >=dev-libs/libatomic_ops-7.2d >=dev-libs/libxml2-2.7.8 dev-libs/libxslt dev-perl/Archive-Zip dev-util/cppunit >=dev-util/gperf-3 dev-util/intltool >=dev-util/mdds-0.11.2:= media-libs/glm net-misc/npapi-sdk >=sys-apps/findutils-4.4.2 sys-devel/bison sys-apps/coreutils sys-devel/flex sys-devel/gettext >=sys-devel/make-3.82 sys-devel/ucpp sys-libs/zlib virtual/pkgconfig x11-libs/libXt x11-libs/libXtst x11-proto/randrproto x11-proto/xextproto x11-proto/xineramaproto x11-proto/xproto java? ( >=virtual/jdk-1.6 >=dev-java/ant-core-1.7 ) odk? ( >=app-doc/doxygen-1.8.4 ) test? ( dev-util/cppunit ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.15:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0 ) >=sys-apps/sed-4 >=dev-vcs/git-1.8.2.1 kde? ( dev-util/automoc virtual/pkgconfig !aqua? ( >=x11-libs/libXtst-1.1.0 x11-proto/xf86vidmodeproto ) ) kde? ( dev-lang/perl >=dev-qt/qt3support-4.7.4:4[accessibility] >=dev-qt/qtcore-4.7.4:4[qt3support,ssl] >=dev-qt/qtdbus-4.7.4:4 >=dev-qt/designer-4.7.4:4 >=dev-qt/qtgui-4.7.4:4[accessibility,dbus(+)] >=dev-qt/qtscript-4.7.4:4 >=dev-qt/qtsql-4.7.4:4[qt3support] >=dev-qt/qtsvg-4.7.4:4 >=dev-qt/qttest-4.7.4:4 >=dev-qt/qtwebkit-4.7.4:4 >=kde-base/kdelibs-4.4:4[aqua=] )
|
||||
DESCRIPTION=A full office productivity suite
|
||||
EAPI=5
|
||||
HOMEPAGE=http://www.libreoffice.org
|
||||
IUSE=bluetooth +branding coinmp collada +cups dbus debug eds firebird gltf gnome gstreamer +gtk gtk3 jemalloc kde mysql odk postgres telepathy test vlc libreoffice_extensions_nlpsolver libreoffice_extensions_scripting-beanshell libreoffice_extensions_scripting-javascript libreoffice_extensions_wiki-publisher elibc_FreeBSD java aqua kde python_targets_python3_3 python_targets_python3_4 python_targets_python2_7 python_single_target_python3_3 python_single_target_python3_4 python_single_target_python2_7
|
||||
IUSE=bluetooth +branding coinmp collada +cups dbus debug eds firebird gltf gnome gstreamer +gtk gtk3 jemalloc kde mysql odk postgres telepathy test vlc libreoffice_extensions_nlpsolver libreoffice_extensions_scripting-beanshell libreoffice_extensions_scripting-javascript libreoffice_extensions_wiki-publisher elibc_FreeBSD java aqua kde python_targets_python3_4 python_targets_python2_7 python_single_target_python3_4 python_single_target_python2_7
|
||||
LICENSE=|| ( LGPL-3 MPL-1.1 )
|
||||
PDEPEND=!app-office/libreoffice-l10n
|
||||
RDEPEND=python_single_target_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3[threads,xml] ) python_single_target_python3_4? ( dev-lang/python:3.4[threads,xml] ) python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[threads,xml] ) >=dev-lang/python-exec-2:=[python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_python2_7(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_5(-),python_single_target_python3_3(+)?,python_single_target_python3_4(+)?,python_single_target_python2_7(+)?] app-arch/zip app-arch/unzip >=app-text/hunspell-1.3.2-r3 app-text/mythes >=app-text/libabw-0.1.0 >=app-text/libexttextcat-3.2 >=app-text/libebook-0.1.1 >=app-text/libetonyek-0.1.1 app-text/liblangtag >=app-text/libmspub-0.1.0 >=app-text/libmwaw-0.3.4 >=app-text/libodfgen-0.1.0 app-text/libwpd:0.10[tools] app-text/libwpg:0.3 =app-text/libwps-0.3* >=app-text/poppler-0.16:=[xpdf-headers(+),cxx] >=dev-cpp/clucene-2.3.3.4-r2 =dev-cpp/libcmis-0.5* dev-db/unixODBC >=dev-libs/boost-1.55:= dev-libs/expat >=dev-libs/hyphen-2.7.1 >=dev-libs/icu-4.8.1.1:= =dev-libs/liborcus-0.7* >=dev-libs/librevenge-0.0.1 >=dev-libs/nspr-4.8.8 >=dev-libs/nss-3.12.9 >=dev-lang/perl-5.0 >=dev-libs/openssl-1.0.0d:0 >=dev-libs/redland-1.0.16 media-gfx/graphite2 >=media-libs/fontconfig-2.8.0 media-libs/freetype:2 >=media-libs/glew-1.10 >=media-libs/harfbuzz-0.9.18:=[icu(+)] media-libs/lcms:2 >=media-libs/libpng-1.4:0= >=media-libs/libcdr-0.1.0 >=media-libs/libfreehand-0.1.0 media-libs/libpagemaker >=media-libs/libvisio-0.1.0 >=net-misc/curl-7.21.4 net-libs/neon net-nds/openldap sci-mathematics/lpsolve virtual/jpeg:0 >=x11-libs/cairo-1.10.0[X] x11-libs/libXinerama x11-libs/libXrandr x11-libs/libXrender virtual/glu virtual/opengl bluetooth? ( net-wireless/bluez ) coinmp? ( sci-libs/coinor-mp ) collada? ( >=media-libs/opencollada-1.2.2_p20150207 ) cups? ( net-print/cups ) dbus? ( >=dev-libs/dbus-glib-0.92 ) eds? ( gnome-extra/evolution-data-server ) firebird? ( >=dev-db/firebird-2.5 ) gltf? ( media-libs/libgltf ) gnome? ( gnome-base/gconf:2 ) gtk? ( x11-libs/gdk-pixbuf[X] >=x11-libs/gtk+-2.24:2 ) gtk3? ( >=x11-libs/gtk+-3.2:3 ) gstreamer? ( media-libs/gstreamer:1.0 media-libs/gst-plugins-base:1.0 ) jemalloc? ( dev-libs/jemalloc ) libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 ) libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 ) libreoffice_extensions_wiki-publisher? ( dev-java/commons-codec:0 dev-java/commons-httpclient:3 dev-java/commons-lang:2.1 dev-java/commons-logging:0 dev-java/tomcat-servlet-api:3.0 ) mysql? ( >=dev-db/mysql-connector-c++-1.1.0 ) postgres? ( >=dev-db/postgresql-9.0:*[kerberos] ) telepathy? ( dev-libs/glib:2 >=net-libs/telepathy-glib-0.18.0 >=x11-libs/gtk+-2.24:2 ) !app-office/libreoffice-bin !app-office/libreoffice-bin-debug !<app-office/openoffice-bin-3.4.0-r1 !app-office/openoffice media-fonts/libertine media-fonts/liberation-fonts media-fonts/urw-fonts java? ( >=virtual/jre-1.6 ) kde? ( >=kde-apps/kioclient-4.4:4[aqua=] ) vlc? ( media-video/vlc ) java? ( >=dev-java/java-config-2.2.0 ) kde? ( kde-apps/oxygen-icons ) kde? ( dev-lang/perl >=dev-qt/qt3support-4.7.4:4[accessibility] >=dev-qt/qtcore-4.7.4:4[qt3support,ssl] >=dev-qt/qtdbus-4.7.4:4 >=dev-qt/designer-4.7.4:4 >=dev-qt/qtgui-4.7.4:4[accessibility,dbus(+)] >=dev-qt/qtscript-4.7.4:4 >=dev-qt/qtsql-4.7.4:4[qt3support] >=dev-qt/qtsvg-4.7.4:4 >=dev-qt/qttest-4.7.4:4 >=dev-qt/qtwebkit-4.7.4:4 >=kde-base/kdelibs-4.4:4[aqua=] )
|
||||
REQUIRED_USE=^^ ( python_single_target_python3_3 python_single_target_python3_4 python_single_target_python2_7 ) python_single_target_python3_3? ( python_targets_python3_3 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python2_7? ( python_targets_python2_7 ) bluetooth? ( dbus ) collada? ( gltf ) gnome? ( gtk ) eds? ( gnome ) telepathy? ( gtk ) libreoffice_extensions_nlpsolver? ( java ) libreoffice_extensions_scripting-beanshell? ( java ) libreoffice_extensions_scripting-javascript? ( java ) libreoffice_extensions_wiki-publisher? ( java )
|
||||
RDEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[threads,xml] ) python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[threads,xml] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python2_7(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_3(-),-python_single_target_python3_5(-),python_single_target_python3_4(+)?,python_single_target_python2_7(+)?] app-arch/zip app-arch/unzip >=app-text/hunspell-1.3.2-r3 app-text/mythes >=app-text/libabw-0.1.0 >=app-text/libexttextcat-3.2 >=app-text/libebook-0.1.1 >=app-text/libetonyek-0.1.1 app-text/liblangtag >=app-text/libmspub-0.1.0 >=app-text/libmwaw-0.3.4 >=app-text/libodfgen-0.1.0 app-text/libwpd:0.10[tools] app-text/libwpg:0.3 =app-text/libwps-0.3* >=app-text/poppler-0.16:=[xpdf-headers(+),cxx] >=dev-cpp/clucene-2.3.3.4-r2 =dev-cpp/libcmis-0.5* dev-db/unixODBC >=dev-libs/boost-1.55:= dev-libs/expat >=dev-libs/hyphen-2.7.1 >=dev-libs/icu-4.8.1.1:= =dev-libs/liborcus-0.7* >=dev-libs/librevenge-0.0.1 >=dev-libs/nspr-4.8.8 >=dev-libs/nss-3.12.9 >=dev-lang/perl-5.0 >=dev-libs/openssl-1.0.0d:0 >=dev-libs/redland-1.0.16 media-gfx/graphite2 >=media-libs/fontconfig-2.8.0 media-libs/freetype:2 >=media-libs/glew-1.10 >=media-libs/harfbuzz-0.9.18:=[icu(+)] media-libs/lcms:2 >=media-libs/libpng-1.4:0= >=media-libs/libcdr-0.1.0 >=media-libs/libfreehand-0.1.0 media-libs/libpagemaker >=media-libs/libvisio-0.1.0 >=net-misc/curl-7.21.4 net-libs/neon net-nds/openldap sci-mathematics/lpsolve virtual/jpeg:0 >=x11-libs/cairo-1.10.0[X] x11-libs/libXinerama x11-libs/libXrandr x11-libs/libXrender virtual/glu virtual/opengl bluetooth? ( net-wireless/bluez ) coinmp? ( sci-libs/coinor-mp ) collada? ( >=media-libs/opencollada-1.2.2_p20150207 ) cups? ( net-print/cups ) dbus? ( >=dev-libs/dbus-glib-0.92 ) eds? ( gnome-extra/evolution-data-server ) firebird? ( >=dev-db/firebird-2.5 ) gltf? ( media-libs/libgltf ) gnome? ( gnome-base/gconf:2 ) gtk? ( x11-libs/gdk-pixbuf[X] >=x11-libs/gtk+-2.24:2 ) gtk3? ( >=x11-libs/gtk+-3.2:3 ) gstreamer? ( media-libs/gstreamer:1.0 media-libs/gst-plugins-base:1.0 ) jemalloc? ( dev-libs/jemalloc ) libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 ) libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 ) libreoffice_extensions_wiki-publisher? ( dev-java/commons-codec:0 dev-java/commons-httpclient:3 dev-java/commons-lang:2.1 dev-java/commons-logging:0 ) mysql? ( >=dev-db/mysql-connector-c++-1.1.0 ) postgres? ( >=dev-db/postgresql-9.0:*[kerberos] ) telepathy? ( dev-libs/glib:2 >=net-libs/telepathy-glib-0.18.0 >=x11-libs/gtk+-2.24:2 ) !app-office/libreoffice-bin !app-office/libreoffice-bin-debug !<app-office/openoffice-bin-3.4.0-r1 !app-office/openoffice media-fonts/libertine media-fonts/liberation-fonts media-fonts/urw-fonts java? ( >=virtual/jre-1.6 ) kde? ( >=kde-apps/kioclient-4.4:4[aqua=] ) vlc? ( media-video/vlc ) java? ( >=dev-java/java-config-2.2.0 ) kde? ( kde-apps/oxygen-icons ) kde? ( dev-lang/perl >=dev-qt/qt3support-4.7.4:4[accessibility] >=dev-qt/qtcore-4.7.4:4[qt3support,ssl] >=dev-qt/qtdbus-4.7.4:4 >=dev-qt/designer-4.7.4:4 >=dev-qt/qtgui-4.7.4:4[accessibility,dbus(+)] >=dev-qt/qtscript-4.7.4:4 >=dev-qt/qtsql-4.7.4:4[qt3support] >=dev-qt/qtsvg-4.7.4:4 >=dev-qt/qttest-4.7.4:4 >=dev-qt/qtwebkit-4.7.4:4 >=kde-base/kdelibs-4.4:4[aqua=] )
|
||||
REQUIRED_USE=^^ ( python_single_target_python3_4 python_single_target_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python2_7? ( python_targets_python2_7 ) bluetooth? ( dbus ) collada? ( gltf ) gnome? ( gtk ) eds? ( gnome ) telepathy? ( gtk ) libreoffice_extensions_nlpsolver? ( java ) libreoffice_extensions_scripting-beanshell? ( java ) libreoffice_extensions_scripting-javascript? ( java ) libreoffice_extensions_wiki-publisher? ( java )
|
||||
SLOT=0
|
||||
SRC_URI=branding? ( http://dev.gentoo.org/~dilfridge/distfiles/libreoffice-branding-gentoo-0.8.tar.xz ) http://dev-www.libreoffice.org/src//d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz http://dev-www.libreoffice.org/src//1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz collada? ( http://dev-www.libreoffice.org/src//4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 ) java? ( http://dev-www.libreoffice.org/src//17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip ) libreoffice_extensions_wiki-publisher? ( http://dev-www.libreoffice.org/src//a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip ) libreoffice_extensions_scripting-javascript? ( http://dev-www.libreoffice.org/src//798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip ) libreoffice_extensions_scripting-javascript? ( http://dev-www.libreoffice.org/src//35c94d2df8893241173de1d16b6034c0-swingExSrc.zip ) odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )
|
||||
_eclasses_=autotools 542bf3f83917668f3893f4da1ca238ff base 84d9f879f57a8316ff02be0373a3d6f9 bash-completion-r1 b1fc4d30333bb528c8abb4332bb70ea6 check-reqs 4f43fb72bc73bd58d75ec601713fae20 eutils 43da5163ba106e87d22d2e7d6d67537f fdo-mime 92d07846ea8ea54172f8c0112a47ae3d flag-o-matic 85dc1eac3c64d8141374490ed64122e5 git-r3 1502b9838d043db47700b8120083e637 gnome2-utils 588052cacdf74572e68bdfeaece20534 java-pkg-opt-2 40db73f27fc6458ec2105812a4f261c7 java-utils-2 c059b30d6a4df7cf32e2c98c1da1c9b5 kde4-base 92d1fd59aaaf795c25ee5c76b1dc0854 kde4-functions 3b68b9a6265fb2bd834efa55716107e8 libtool 7f78cd7d403808a350c9ae23f5821fb4 multilib df4e4d5cfd3d137d0c248e1991c0e4d6 multiprocessing d769539d9bace6eaca30af23bc2b4dde pax-utils 4f1280c0d4dcd8340f731827007c0a53 python-single-r1 612c783d1a1a182ad7ea4f2eb0b79e86 python-utils-r1 9c405693f1f355a718700c5cffffd9e5 toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85 versionator 99ae9d758cbe7cfed19170e7d48f5a9c virtualx 7d550983f9b6adb3e7091f4090ddae2f
|
||||
_md5_=aa7e20d6f5582ac5f74c6cf3f9c684c1
|
||||
_eclasses_=autotools 542bf3f83917668f3893f4da1ca238ff bash-completion-r1 b1fc4d30333bb528c8abb4332bb70ea6 check-reqs 4f43fb72bc73bd58d75ec601713fae20 eutils 43da5163ba106e87d22d2e7d6d67537f fdo-mime 92d07846ea8ea54172f8c0112a47ae3d flag-o-matic 85dc1eac3c64d8141374490ed64122e5 git-r3 1502b9838d043db47700b8120083e637 gnome2-utils 588052cacdf74572e68bdfeaece20534 java-pkg-opt-2 40db73f27fc6458ec2105812a4f261c7 java-utils-2 c059b30d6a4df7cf32e2c98c1da1c9b5 kde4-base 92d1fd59aaaf795c25ee5c76b1dc0854 kde4-functions 3b68b9a6265fb2bd834efa55716107e8 libtool 7f78cd7d403808a350c9ae23f5821fb4 multilib df4e4d5cfd3d137d0c248e1991c0e4d6 multiprocessing d769539d9bace6eaca30af23bc2b4dde pax-utils 4f1280c0d4dcd8340f731827007c0a53 python-single-r1 612c783d1a1a182ad7ea4f2eb0b79e86 python-utils-r1 9c405693f1f355a718700c5cffffd9e5 toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85 versionator 99ae9d758cbe7cfed19170e7d48f5a9c virtualx 7d550983f9b6adb3e7091f4090ddae2f
|
||||
_md5_=16fe4a225475d4c183cd4b5b08fedb0e
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue