parent
42ad5bef0c
commit
93d4ea3d72
@ -1,3 +1,4 @@
|
||||
DIST logstash-2.3.4.tar.gz 79779303 SHA256 7f62a03ddc3972e33c343e982ada1796b18284f43ed9c0089a2efee78b239583 SHA512 cc5d6c04e414daf63c836141df87204e0cbc63f71ee02abb69496e29587d5b0803dd738949de559a597979c9f6c6bf9d11d55f4b084ce875f24fb362f2c9bd3b WHIRLPOOL 71b6d915153d80d9bc81d10454ffd14af4643c61557964d7fd8edf50bf1a5d1c53ce0b09c2aec9b079918df596bbb5b07420b8661572bf7ea659e9703694f07c
|
||||
DIST logstash-2.4.0.tar.gz 83882952 SHA256 622c435c5c0f40e205fd4d9411eb409cc52992cf62dde4c7cd46e480cd8247cc SHA512 27f7e22fcfbeabe58bef1220399a80b32b56b5e2af17c0279e3f583ed5170be649b961b92c3eef33120ce238f126a3cb32e614bd8109bd8c266b538888c5324d WHIRLPOOL 2d1db78ff21d86e22f709600b086dfc253120e6a659d46c1e6ebc6d62dfffd48f0a440c33fa9a1cd7014108f5ae88afa4ccd25211ce57b1a4856f756a855c71e
|
||||
DIST logstash-5.0.0-beta1.zip 110865599 SHA256 c8c15a06f9f05bcc653de68ced36b3516e109781983ff04dd25785f0973402ca SHA512 8bc7932391458ca7c73735024b4f94e00d2b75ed923b5e9b13ed52264dc9b92c9ec2b2add042fd4ac3894ec0ce36bb7f05c54fe7507d656a51c7239ecd95592e WHIRLPOOL 34807bb5bad9207c6f5bb3bd10d3aaf7bd21ba21b4ee67aeca7d3b784718b35652adc0028e876a31886e7c78ca8303a5f05aacd484593148c82b5fa9b9b3f535
|
||||
DIST logstash-all-plugins-2.4.0.tar.gz 139743651 SHA256 b2ffe60745ece2140ebc4610f42543dcf3ff5ead2707f0b36f0b70e8ddf0baff SHA512 9627f6119d129b4dcdc41ff43e49a3880f4ba5fcb3ee11e1ec821929d542c93629b0f58ded6741c96da49cba16b05eca141acdeee0ed060389abc3f467bba593 WHIRLPOOL 49ddc27d6030ae65aaab0acabda478644232f92cbd2bbe3d1b118782c5ce1167edb2a485def982f3b6c8138f084e79a783273dd50519a82085b984259f7e19d4
|
||||
|
@ -0,0 +1,65 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit user
|
||||
|
||||
MY_PN="${PN/-bin}"
|
||||
MY_PV="${PV/_/-}"
|
||||
MY_P="${MY_PN}-${MY_PV}"
|
||||
|
||||
DESCRIPTION="Tool for managing events and logs"
|
||||
HOMEPAGE="https://www.elastic.co/products/logstash"
|
||||
SRC_URI="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}.zip"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE=""
|
||||
|
||||
RESTRICT="strip"
|
||||
QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="virtual/jre:1.8"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_PN}
|
||||
enewuser ${MY_PN} -1 -1 /var/lib/${MY_PN} ${MY_PN}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
|
||||
keepdir "/var/log/${MY_PN}"
|
||||
|
||||
insinto "/usr/share/${MY_PN}"
|
||||
doins "${FILESDIR}/agent.conf.sample"
|
||||
|
||||
insinto "/opt/${MY_PN}"
|
||||
doins -r .
|
||||
fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby"
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${MY_PN}.logrotate" "${MY_PN}"
|
||||
|
||||
newconfd "${FILESDIR}/${MY_PN}.confd" "${MY_PN}"
|
||||
newinitd "${FILESDIR}/${MY_PN}.initd" "${MY_PN}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "The default user changed from root to ${MY_PN}. If you wish to run as root (for"
|
||||
ewarn "example to read local logs), be sure to change LS_USER and LS_GROUP in"
|
||||
ewarn "/etc/conf.d/${MY_PN}"
|
||||
einfo
|
||||
einfo "Getting started with logstash:"
|
||||
einfo " https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html"
|
||||
einfo ""
|
||||
einfo "Packages that might be interesting:"
|
||||
einfo " app-misc/elasticsearch"
|
||||
einfo " dev-python/elasticsearch-curator"
|
||||
einfo " www-apps/kibana-bin"
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 ) # py2 only
|
||||
# xml.etree.ElementTree module required.
|
||||
PYTHON_REQ_USE="xml"
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PV="${PV/_beta/b}"
|
||||
|
||||
DESCRIPTION="A system for controlling process state under UNIX"
|
||||
HOMEPAGE="http://supervisord.org/ https://pypi.python.org/pypi/supervisor"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${PN}-${MY_PV}.tar.gz"
|
||||
|
||||
LICENSE="repoze ZPL BSD HPND GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc test"
|
||||
|
||||
# ALL versions of meld3 match to >=meld3-0.6.5
|
||||
RDEPEND="dev-python/meld3[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-python/mock[${PYTHON_USEDEP}] )
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
python_compile_all() {
|
||||
# Somehow the test phase is called and run on invoking a doc build; harmless
|
||||
use doc && emake -C docs html
|
||||
}
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newinitd "${FILESDIR}/init.d-r1" supervisord
|
||||
newconfd "${FILESDIR}/conf.d" supervisord
|
||||
use doc && local HTML_DOCS=( docs/.build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
DESCRIPTION="The .iso image of SystemRescueCD rescue disk, x86 (+ amd64) variant"
|
||||
HOMEPAGE="http://www.sysresccd.org/"
|
||||
# Large ISO mirroring explicitly approved by infra in bug #588766
|
||||
SRC_URI="mirror://sourceforge/systemrescuecd/sysresccd-${PN#*-}/${PV}/${P}.iso"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+isohybrid"
|
||||
|
||||
DEPEND="isohybrid? ( >=sys-boot/syslinux-4 )"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
src_install() {
|
||||
insinto "/usr/share/${PN%-*}"
|
||||
doins "${DISTDIR}/${P}.iso"
|
||||
|
||||
if use isohybrid; then
|
||||
set -- isohybrid -u "${ED}usr/share/${PN%-*}/${P}.iso"
|
||||
echo "${@}"
|
||||
"${@}" || die "${*} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local f=${EROOT%/}/usr/share/${PN%-*}/${PN}-newest.iso
|
||||
|
||||
# no version newer than ours? we're the newest!
|
||||
if ! has_version ">${CATEGORY}/${PF}"; then
|
||||
ln -f -s -v "${P}.iso" "${f}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
local f=${EROOT%/}/usr/share/${PN%-*}/${PN}-newest.iso
|
||||
|
||||
# if there is no version newer than ours installed
|
||||
if ! has_version ">${CATEGORY}/${PF}"; then
|
||||
# and we are truly and completely uninstalled...
|
||||
if [[ ! ${REPLACED_BY_VERSION} ]]; then
|
||||
# then find an older version to set the symlink to
|
||||
local newest_version=$(best_version "<${CATEGORY}/${PF}")
|
||||
|
||||
if [[ ${newest_version} ]]; then
|
||||
# update the symlink
|
||||
ln -f -s -v "${newest_version%-r*}.iso" "${f}" || die
|
||||
else
|
||||
# last version removed? clean up the symlink
|
||||
rm -v "${f}" || die
|
||||
# and the parent directory
|
||||
rmdir "${f%/*}" || die
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
Fix C++14 compilation errors. Add casting int literals to char in config
|
||||
generator to avoid narrowing conversions.
|
||||
Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=595048
|
||||
|
||||
--- a/src/mkdefcfg.pl
|
||||
+++ b/src/mkdefcfg.pl
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
@c = split(//, $buf);
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
- $out .= sprintf("0x%02X", ord($c[$i]));
|
||||
- if ($n++ % 10) {
|
||||
+ $out .= sprintf("(char)0x%02X", ord($c[$i]));
|
||||
+ if ($n++ % 5) {
|
||||
$out .= ", ";
|
||||
} else {
|
||||
$out .= ",\n";
|
@ -1,3 +1,3 @@
|
||||
DIST docker-compose-1.8.0.tar.gz 149822 SHA256 65f46b2ac836918c68306646206612ecadbb0cf17fae1557f6d565554747a2a9 SHA512 ed7aa5b7f318cd71492ad3da672937619063b824809888928bd64275dbf89ea6152c72d96028ca796d63da7fe028dc164ae871db0fdc531c918ba9f946b0b17d WHIRLPOOL c3cbf631d01d1e96c8e29965d3e493ade80869ad43c31d6ae7129c875d4b7d0856bc6a990f5af46db761dfb1f6a615f1e4056d00b0e423be6e0a41bb6db6a564
|
||||
DIST docker-compose-1.8.0_rc1.tar.gz 145401 SHA256 9c897c6dc99b0cc63b402220e5c3ff530a09c974b965d6a07f050bd7a07ef663 SHA512 75c0ec21e0edbe0086ff5229115f12469996c2a6cb569fe744b381536aa590f0001ccab7aa8f67d052613a8475e4901316c99db4116ccf1e4bc47b0b0ecb016f WHIRLPOOL 32f6f0311adb2ebaec798f1b8f654f16c397e2aa48bb0ec44c1e92c38cea8438a6fbab67b5c9b7db06a89d081675568dcb40214d3d3c9c07aff9d71e2f5f3ce8
|
||||
DIST docker-compose-1.8.0_rc2.tar.gz 148581 SHA256 a2b6ff7c8cc8121567a26e158c4c3a246ab5173fc0ebdb4208923df88b4bd683 SHA512 390f65d6bca940cef8d5bedfbf20d0da4897d06a466c61d419aff6a5458d2982375f948f8a714303e8bdd62298020a506ef1430794a3d3116614f3ae14d3a6f3 WHIRLPOOL 3b874adc90704c6a02c14e8431d6ac425e0ffe3458427ff35df69ba3804aba906ac4c9ca7ef2e33a3c0ac9ff0f466d9c39c886626b37b5d4c465ccb3b3e2b686
|
||||
DIST docker-compose-1.8.1.tar.gz 151478 SHA256 1c72725a0a5cd41f56021cb51c6cba86932fb5b4155378ce883500d2644efc84 SHA512 8b33bf5b1fa3eeb5c5724e7ada8c61cf054a5cc1af68c9c9ab40955958f0f6a537f5bad8d54367dddc5ae66930d0555c83da47a48fc43f623d92fd60ad01cb62 WHIRLPOOL 5dca7ff3303833a45b0e7f462a375c58f68f4a19659e66b93bfc564701df8dfba70311151eb674a84c5a3b81703ddcc8809c6c7b89574c738ac9db96a32c93e6
|
||||
|
@ -0,0 +1,175 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
WANT_LIBTOOL=latest
|
||||
WANT_AUTOMAKE=1.14
|
||||
AUTOTOOLS_IN_SOURCE_BUILD=1
|
||||
PYTHON_COMPAT=( python{2_7,3_{3,4,5}} )
|
||||
|
||||
inherit python-single-r1 autotools-utils autotools versionator eutils \
|
||||
multilib linux-info perl-module base
|
||||
|
||||
MY_PV_1="$(get_version_component_range 1-2)"
|
||||
MY_PV_2="$(get_version_component_range 2)"
|
||||
[[ $(( $(get_version_component_range 2) % 2 )) -eq 0 ]] && SD="stable" || SD="development"
|
||||
|
||||
DESCRIPTION="Tools for accessing, inspect and modifying virtual machine (VM) disk images"
|
||||
HOMEPAGE="http://libguestfs.org/"
|
||||
SRC_URI="http://libguestfs.org/download/${MY_PV_1}-${SD}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2"
|
||||
SLOT="0/"${MY_PV_1}""
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="bash-completion erlang +fuse debug ocaml doc +perl python ruby static-libs
|
||||
selinux systemtap introspection inspect-icons test lua"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
# Failures - doc
|
||||
# Failures - bash-completion, see GBZ #486306
|
||||
|
||||
COMMON_DEPEND="
|
||||
sys-libs/ncurses:0=
|
||||
sys-devel/gettext
|
||||
>=app-misc/hivex-1.3.1
|
||||
dev-libs/libpcre:3
|
||||
app-arch/cpio
|
||||
dev-lang/perl
|
||||
virtual/cdrtools
|
||||
>=app-emulation/qemu-2.0[qemu_softmmu_targets_x86_64,systemtap?,selinux?,filecaps]
|
||||
sys-apps/fakeroot
|
||||
sys-apps/file
|
||||
app-emulation/libvirt
|
||||
dev-libs/libxml2:2
|
||||
>=sys-apps/fakechroot-2.8
|
||||
>=app-admin/augeas-1.0.0
|
||||
sys-fs/squashfs-tools:*
|
||||
dev-libs/libconfig
|
||||
sys-libs/readline:=
|
||||
>=sys-libs/db-4.6:*
|
||||
app-arch/xz-utils
|
||||
app-arch/lzma
|
||||
app-crypt/gnupg
|
||||
app-arch/unzip[natspec]
|
||||
perl? ( virtual/perl-ExtUtils-MakeMaker
|
||||
>=dev-perl/Sys-Virt-0.2.4
|
||||
virtual/perl-Getopt-Long
|
||||
virtual/perl-Data-Dumper
|
||||
dev-perl/libintl-perl
|
||||
>=app-misc/hivex-1.3.1[perl?]
|
||||
dev-perl/String-ShellQuote
|
||||
)
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
fuse? ( sys-fs/fuse )
|
||||
introspection? (
|
||||
>=dev-libs/gobject-introspection-1.30.0:=
|
||||
dev-libs/gjs
|
||||
)
|
||||
selinux? ( sys-libs/libselinux sys-libs/libsemanage )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
ocaml? ( dev-lang/ocaml[ocamlopt]
|
||||
dev-ml/findlib[ocamlopt]
|
||||
dev-ml/ocaml-gettext
|
||||
)
|
||||
erlang? ( dev-lang/erlang )
|
||||
inspect-icons? ( media-libs/netpbm
|
||||
media-gfx/icoutils
|
||||
)
|
||||
virtual/acl
|
||||
sys-libs/libcap
|
||||
lua? ( dev-lang/lua:* )
|
||||
>=app-shells/bash-completion-2.0
|
||||
dev-libs/yajl"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
dev-util/gperf
|
||||
doc? ( app-text/po4a )
|
||||
ruby? ( dev-lang/ruby virtual/rubygems dev-ruby/rake )
|
||||
${AUTOTOOLS_DEPEND}
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
app-emulation/libguestfs-appliance
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${MY_PV_1}"/*.patch )
|
||||
|
||||
DOCS=( AUTHORS BUGS ChangeLog HACKING README TODO )
|
||||
|
||||
pkg_setup () {
|
||||
CONFIG_CHECK="~KVM ~VIRTIO"
|
||||
[ -n "${CONFIG_CHECK}" ] && check_extra_config;
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
base_src_prepare
|
||||
eaclocal
|
||||
eautomake
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
||||
# Disable feature test for kvm for more reason
|
||||
# i.e: not loaded module in __build__ time,
|
||||
# build server not supported kvm, etc. ...
|
||||
#
|
||||
# In fact, this feature is virtio support and requires
|
||||
# configured kernel.
|
||||
export vmchannel_test=no
|
||||
|
||||
local myeconfargs=(
|
||||
$(use_enable test werror)
|
||||
--with-libvirt
|
||||
--with-default-backend=libvirt
|
||||
--disable-appliance
|
||||
--disable-daemon
|
||||
--with-extra="-gentoo"
|
||||
--with-readline
|
||||
--disable-php
|
||||
$(use_enable python)
|
||||
--without-java
|
||||
$(use_enable perl)
|
||||
$(use_enable fuse)
|
||||
$(use_enable ocaml)
|
||||
$(use_enable ruby)
|
||||
--disable-haskell
|
||||
--disable-golang
|
||||
$(use_enable introspection gobject)
|
||||
$(use_enable erlang)
|
||||
$(use_enable systemtap probes)
|
||||
$(use_enable lua)
|
||||
)
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
autotools-utils_src_compile
|
||||
|
||||
}
|
||||
|
||||
src_test() {
|
||||
autotools-utils_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
strip-linguas -i po
|
||||
autotools-utils_src_install "LINGUAS=""${LINGUAS}"""
|
||||
|
||||
use perl && perl_delete_localpod
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Perl based tools NOT build"
|
||||
fi
|
||||
if ! use ocaml ; then
|
||||
einfo "Ocaml based tools ( sysprep , ... ) NOT installed"
|
||||
fi
|
||||
}
|
@ -1,687 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo-r1 pax-utils l10n
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
|
||||
KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt glusterfs \
|
||||
gnutls gtk gtk2 infiniband iscsi +jpeg \
|
||||
kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs
|
||||
+png pulseaudio python \
|
||||
rbd sasl +seccomp sdl sdl2 selinux smartcard snappy spice ssh static static-softmmu
|
||||
static-user systemtap tci test +threads usb usbredir +uuid vde +vhost-net \
|
||||
virgl virtfs +vnc vte xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
|
||||
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
|
||||
x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb tricore xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
|
||||
|
||||
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||
|
||||
# Allow no targets to be built so that people can get a tools-only build.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
gtk2? ( gtk )
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-softmmu static-user )
|
||||
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk !gtk2 )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the extranl library.
|
||||
#
|
||||
# Older versions of gnutls are supported, but it's simpler to just require
|
||||
# the latest versions. This is also why we require nettle.
|
||||
#
|
||||
# TODO: Split out tools deps into another var. e.g. bzip2 is only used by
|
||||
# system binaries and tools, not user binaries.
|
||||
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
|
||||
dev-libs/libpcre[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
accessibility? ( app-accessibility/brltty[static-libs(+)] )
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
gnutls? (
|
||||
dev-libs/nettle:=[static-libs(+)]
|
||||
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||
)
|
||||
gtk? (
|
||||
gtk2? (
|
||||
x11-libs/gtk+:2
|
||||
vte? ( x11-libs/vte:0 )
|
||||
)
|
||||
!gtk2? (
|
||||
x11-libs/gtk+:3
|
||||
vte? ( x11-libs/vte:2.90 )
|
||||
)
|
||||
)
|
||||
infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? ( sys-libs/ncurses:0=[static-libs(+)] )
|
||||
nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
media-libs/libepoxy[static-libs(+)]
|
||||
media-libs/mesa[static-libs(+)]
|
||||
media-libs/mesa[egl,gles2,gbm]
|
||||
)
|
||||
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? (
|
||||
!sdl2? (
|
||||
media-libs/libsdl[X]
|
||||
>=media-libs/libsdl-1.2.11[static-libs(+)]
|
||||
)
|
||||
sdl2? (
|
||||
media-libs/libsdl2[X]
|
||||
media-libs/libsdl2[static-libs(+)]
|
||||
)
|
||||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy[static-libs(+)] )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||
)
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
|
||||
X86_FIRMWARE_DEPEND="
|
||||
>=sys-firmware/ipxe-1.0.0_p20130624
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.8.2
|
||||
~sys-firmware/sgabios-0.1_pre8
|
||||
~sys-firmware/vgabios-0.7a
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/seabios
|
||||
sys-firmware/sgabios
|
||||
sys-firmware/vgabios
|
||||
)"
|
||||
CDEPEND="
|
||||
!static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) " ${use_softmmu_targets}) )
|
||||
!static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) " ${use_user_targets}) )
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
xen? ( app-emulation/xen-tools:= )"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND} ) " ${use_softmmu_targets}) )
|
||||
static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND} ) " ${use_user_targets}) )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )
|
||||
"
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/u-boot.e500
|
||||
"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or32
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
|
||||
you have the kernel module loaded before running kvm. The easiest way to
|
||||
ensure that the kernel module is loaded is to load it on boot.\n
|
||||
For AMD CPUs the module is called 'kvm-amd'.\n
|
||||
For Intel CPUs the module is called 'kvm-intel'.\n
|
||||
Please review /etc/conf.d/modules for how to load these.\n\n
|
||||
Make sure your user is in the 'kvm' group\n
|
||||
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login.\n\n
|
||||
For brand new installs, the default permissions on /dev/kvm might not let you
|
||||
access it. You can tell udev to reset ownership/perms:\n
|
||||
udevadm trigger -c add /dev/kvm"
|
||||
|
||||
qemu_support_kvm() {
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
|
||||
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
|
||||
use qemu_softmmu_targets_s390x; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
# Sanity check to make sure target lists are kept up-to-date.
|
||||
check_targets() {
|
||||
local var=$1 mak=$2
|
||||
local detected sorted
|
||||
|
||||
pushd "${S}"/default-configs >/dev/null || die
|
||||
|
||||
# Force C locale until glibc is updated. #564936
|
||||
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "${var}: ${sorted}"
|
||||
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||
die "sync ${var} to the list of targets"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
handle_locales() {
|
||||
# Make sure locale list is kept up-to-date.
|
||||
local detected sorted
|
||||
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "PLOCALES: ${sorted}"
|
||||
eerror " po/*.po: ${detected}"
|
||||
die "sync PLOCALES"
|
||||
fi
|
||||
|
||||
# Deal with selective install of locales.
|
||||
if use nls ; then
|
||||
# Delete locales the user does not want. #577814
|
||||
rm_loc() { rm po/$1.po || die; }
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
else
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
rm -f po/*.po
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||
check_targets IUSE_USER_TARGETS linux-user
|
||||
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-2.5.0-cflags.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-6836.patch # bug 591242
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-7155.patch # bug 593034
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-7156.patch # bug 593036
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-7157-1.patch # bug 593038
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-7157-2.patch # bug 593038
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-7170.patch # bug 593284
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-7421.patch # bug 593950
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-7422.patch # bug 593956
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
epatch_user
|
||||
|
||||
# Run after we've applied all patches.
|
||||
handle_locales
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir="${S}/${buildtype}-build"
|
||||
local static_flag="static-${buildtype}"
|
||||
|
||||
mkdir "${builddir}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
# We support gnutls/nettle for crypto operations. It is possible
|
||||
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||
# are enabled), but it's not really worth the hassle. Disable it
|
||||
# all the time to avoid automatically detecting it. #568856
|
||||
--disable-gcrypt
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets as the default configure
|
||||
# options will autoprobe and try to link in a bunch of unused junk.
|
||||
conf_softmmu() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_softmmu accessibility brlapi)
|
||||
$(conf_softmmu aio linux-aio)
|
||||
$(conf_softmmu bzip2)
|
||||
$(conf_softmmu bluetooth bluez)
|
||||
$(conf_softmmu caps cap-ng)
|
||||
$(conf_softmmu curl)
|
||||
$(conf_softmmu fdt)
|
||||
$(conf_softmmu glusterfs)
|
||||
$(conf_softmmu gnutls)
|
||||
$(conf_softmmu gnutls nettle)
|
||||
$(conf_softmmu gtk)
|
||||
$(conf_softmmu infiniband rdma)
|
||||
$(conf_softmmu iscsi libiscsi)
|
||||
$(conf_softmmu jpeg vnc-jpeg)
|
||||
$(conf_softmmu kernel_linux kvm)
|
||||
$(conf_softmmu lzo)
|
||||
$(conf_softmmu ncurses curses)
|
||||
$(conf_softmmu nfs libnfs)
|
||||
$(conf_softmmu numa)
|
||||
$(conf_softmmu opengl)
|
||||
$(conf_softmmu png vnc-png)
|
||||
$(conf_softmmu rbd)
|
||||
$(conf_softmmu sasl vnc-sasl)
|
||||
$(conf_softmmu sdl)
|
||||
$(conf_softmmu seccomp)
|
||||
$(conf_softmmu smartcard)
|
||||
$(conf_softmmu snappy)
|
||||
$(conf_softmmu spice)
|
||||
$(conf_softmmu ssh libssh2)
|
||||
$(conf_softmmu usb libusb)
|
||||
$(conf_softmmu usbredir usb-redir)
|
||||
$(conf_softmmu uuid)
|
||||
$(conf_softmmu vde)
|
||||
$(conf_softmmu vhost-net)
|
||||
$(conf_softmmu virgl virglrenderer)
|
||||
$(conf_softmmu virtfs)
|
||||
$(conf_softmmu vnc)
|
||||
$(conf_softmmu vte)
|
||||
$(conf_softmmu xen)
|
||||
$(conf_softmmu xen xen-pci-passthrough)
|
||||
$(conf_softmmu xfs xfsctl)
|
||||
)
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
;;
|
||||
softmmu)
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--with-system-pixman
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
|
||||
use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
|
||||
;;
|
||||
tools)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
$(use_enable bzip2)
|
||||
)
|
||||
static_flag="static"
|
||||
;;
|
||||
esac
|
||||
|
||||
local targets="${buildtype}_targets"
|
||||
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
gcc-specs-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
echo "../configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_setup
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
softmmu_targets=${softmmu_targets#,}
|
||||
user_targets=${user_targets#,}
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||
[[ -z ${softmmu_targets}${user_targets} ]] && qemu_src_configure "tools"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -z ${softmmu_targets}${user_targets} ]]; then
|
||||
cd "${S}/tools-build"
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets
|
||||
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_dorules "${FILESDIR}"/65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z ${softmmu_targets}${user_targets} ]]; then
|
||||
cd "${S}/tools-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
fi
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
# Remove the docdir placed qmp-commands.txt
|
||||
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/" || die
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
dodoc docs/qmp-*.txt
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the vgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
qemu_support_kvm && readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if qemu_support_kvm; then
|
||||
readme.gentoo_print_elog
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version 'sys-firmware/seabios[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/vgabios)"
|
||||
}
|
@ -1,11 +1,8 @@
|
||||
DIST kvmtool-d62653e177597251c24494a6dda60acd6d846671.tar.gz 243930 SHA256 89f4cc94364298aa5b9c39c660ebd82a4beb5351cc838d418e7e21afefb5c1f0 SHA512 70aea2324273603b77aa64c95efd36df35c74514fa820013bfee386332289119cc148aed2983a8c6fd9ddfa5bc3db39c5aa0ee32bfc2077787338a47f2954f2f WHIRLPOOL ee47d7e38509eddf90ef0cf7d0cd3761c623e55a1003e8810e645759dc9615e33fbae22ab5576627f9f86eee8b4ca96c4bdf692b7ab073f1f222734bc378477a
|
||||
DIST linux-4.3.1.tar.xz 86900452 SHA256 11faaff6e7546038b868f524cdf42a5a1b67be9fdfd37d931723a8deb1811b72 SHA512 640db1a15db2e18f912e8ea93b01c784740d1a9957dc1d5580809448adb0713edfb02b7172f61362f0f362800c88f09dcc8165005250a757fbd942b59e36ba16 WHIRLPOOL f5de4ea768ad7a5cad21705c24b79773522207ffbc85209676b1a4ce067e031330ded68e2201953c477c3dae743f95521da230194be90be900afa30f39f943c5
|
||||
DIST qemu-2.6.1.tar.bz2 25762855 SHA256 4942fd1b6ee31f2f55ffc2201dd7397e6b9c55a2ef332e6d660c730d268e08d1 SHA512 adb55d0774618c9cd02d376222814f2047977bfbca73248841275084ae537db583db4ac6cfa5cc65c3182941d5f4b40f2f7f4661b2cd93cbb3796e2f325bc919 WHIRLPOOL 1b9c0de78fcf874fd307ce2ee49448e96140fae0ea5739af28947bf8f241e768b47abe3edd2d798b826d99cfd4ca143cf71192d254b54ab47515ac59327fc172
|
||||
DIST rkt-1.11.0.tar.gz 2767797 SHA256 cd75f1648ae6736da731c14a2102646ee90467efd6d2a32b518fd36b8c9806c5 SHA512 dfc604b50037a5a272e0fe0f438c35e1a010489ee19a426cbad7184a3910a214f4bf659b533f323a2ab742deffe7bba10daee52691ff32e5a35f453b2b0c4bb0 WHIRLPOOL 4caa6be6f5f8c5aeb67c762a2643ffc8579d45f49b5c5e4cb5c16ce5e38cc4db35e9dee7d5df20ef80bf75d64e3cccbcc1521c4ddab18441652d2d383a17368b
|
||||
DIST rkt-1.12.0.tar.gz 2828173 SHA256 310bbadc5128574e0ecbe83f5bd6d7680d5a7c1d43c538888b025743d2667195 SHA512 b472887f232fe386c96f91a2a4f4c0125dba0d40db1468e21bea744699ecaaf31af47e2e23f3cb7c686f05f5aabb984de04c86a7e5bbbd9284769d149259c25f WHIRLPOOL b6f143cc0c3f8fb86f35b0a728e7ebf8fc49da0d58ed1caa4179b5a496cd5c20cb20e412d3895713b0e0d79e9ac773a5e882a186047b3de904ab8232a85d9442
|
||||
DIST rkt-1.14.0.tar.gz 2947502 SHA256 2458783023c561358c59600accb58ccfe335535931a58da988d70893a1c5a5e7 SHA512 4e082f0293047d133b031b6fd95e34fc86b7b2ca133ea56709cded5cd0c454e56bb5dd7209bc7add56812142495430c457d9094a8cda1c0079085822ff6e1c94 WHIRLPOOL 09837fc509cce2609bd87ae1185ce6c1e85e13888ab8106aab1725e8e3232486330e4152db8deb77dbc2c419d176a8f1c6df6d44d9a2808aefd62e58082a0353
|
||||
DIST rkt-1.15.0.tar.gz 3018468 SHA256 3efd0dc96c8783d5b378862c7239f733863a181bb3148f3b2e8e10023df06e01 SHA512 4f35eee5f689c8a36760c784d079751cfd0224c20c60f915ab1a550040739ec9290ba9e481e1679f67044400f8d3a60588b6d6d6cdfbbc1f3093c7010d35d290 WHIRLPOOL a07cbd102280c911ba79748931f841d2d5e28407225f2b1d48604b1d0e1c3d81c6488c40e2ef4ef571b628f1766f9aa1e5208138ca963c06e7b3b9226f5b6b6c
|
||||
DIST rkt-pxe-1097.0.0.img 240454650 SHA256 aa205919c4c733cf4cb7220f038f272f4b3ce6a185e5195945fdc625f506f737 SHA512 7a3cc62b5ae13ed8813effdea6125472982c81fa1fb35df0ac13a233ee352e67167a38cd82a802c0e8da50b2cf4455771441ad5ada186b3e3f2cdade4b1903c7 WHIRLPOOL 067eba2c1ebc546df506a249c0c49ab2ce556869f9455b6b1706e2285111293a4beed0172036df372e7b2e02449d815fb76c361219badcebe3240686be7bcc4c
|
||||
DIST rkt-1.16.0.tar.gz 3028683 SHA256 8c7bb07217b68e153d54e45646072fd267ee1ee88a410887f2d8f75eb4752e89 SHA512 b270c8340ca5a22c48209f9d8fa6c55e8cd1b8e238117c4e3a9e5d4fff04bde194e53d10112dd429f5f1c36e0395ca42ae6bd12fd5ebff68a50d3546a1a8d31d WHIRLPOOL d532cfac6347d675b5cbf96e9c38d4cdbb4f4fbd493474567755ff3560c31b8edc59c2cf83f51953ac56c81f7f1af84c625cf1c7f571a48275b6df3dd8f171f3
|
||||
DIST rkt-pxe-1151.0.0.img 243335216 SHA256 6f08697bea372af916a150f9846110e8855305653e5582b2c2ea04f14253e5c8 SHA512 fe7c4ec8cb4d11ba704b9f78c43557a374fda70dbfd7c3f4f9e768cf5ae365aab7a1fee8d51e19bbad6809ad4cdfe4eed60e5cdb6babd869a3a91b503b7256e8 WHIRLPOOL 92f8a65a9c50c11fa9c56acee53dd5623dd186664f44c6517bac4ee5be6a9dd2a9141ef522d978cc5b282c6638e17bf7b3559d68d6ea6c0752821799c0c88a5c
|
||||
DIST systemd-229.tar.gz 4319173 SHA256 b51b0a48d1beb388d95bd6a98d62be05490335d4bb388aefecdcb576e91e0741 SHA512 d692c0c9fc82f2fce64a5ec1caa4a0f8cf9edaeb1bdaaa1c462669db8f78b3dd6b33c87ef926ff21823582d0460f7b63aa3755792f9ae2cd6fb813ba08a35c39 WHIRLPOOL aa44f7161d80cc680226f19755579ba72c52cfe7bd671aefb09c414981f3a5a5c852f07d3449ac6f96d4ca91120cfb1464225d995b1637f1e2c108baf3c4a392
|
||||
DIST systemd-231.tar.gz 4381464 SHA256 899733ad6c157cedbb89aec4efe3bc824dcfd65a1d6f6bebc7b043f7924e39b4 SHA512 199fa33a0494d1d15f7fe3c796fe14913ad386766571d4d3fbb1cb1c446e04f6d06a965213be4c594a7183e810fc2fd4804fe14f64f21b0a1278b717889811c6 WHIRLPOOL 7779291e9fb9873cb1773b8583cf6d4b7dec837363ea89c4a73c1e397a76752b66f8b57d8fc4d9cef768cc1855b5e325ad88a8a69eb5380aa924e0a6dead41b1
|
||||
|
@ -1,190 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools flag-o-matic systemd toolchain-funcs
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
PXE_VERSION="1097.0.0"
|
||||
PXE_SYSTEMD_VERSION="v229"
|
||||
KVM_LINUX_VERSION="4.3.1"
|
||||
KVMTOOL_VERSION="d62653e177597251c24494a6dda60acd6d846671"
|
||||
PXE_URI="http://alpha.release.core-os.net/amd64-usr/${PXE_VERSION}/coreos_production_pxe_image.cpio.gz"
|
||||
PXE_FILE="${PN}-pxe-${PXE_VERSION}.img"
|
||||
|
||||
SRC_URI="https://github.com/coreos/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE )
|
||||
rkt_stage1_kvm_lkvm? (
|
||||
https://kernel.googlesource.com/pub/scm/linux/kernel/git/will/kvmtool/+archive/${KVMTOOL_VERSION}.tar.gz -> kvmtool-${KVMTOOL_VERSION}.tar.gz
|
||||
mirror://kernel/linux/kernel/v4.x/linux-${KVM_LINUX_VERSION}.tar.xz
|
||||
${PXE_URI} -> ${PXE_FILE}
|
||||
)
|
||||
rkt_stage1_src? ( https://github.com/systemd/systemd/archive/${PXE_SYSTEMD_VERSION}.tar.gz -> systemd-${PXE_SYSTEMD_VERSION#v}.tar.gz )"
|
||||
|
||||
DESCRIPTION="rkt is an App Container runtime for Linux"
|
||||
HOMEPAGE="https://github.com/coreos/rkt"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm rkt_stage1_kvm_lkvm rkt_stage1_src +actool systemd"
|
||||
REQUIRED_USE="|| ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm_lkvm rkt_stage1_src ) rkt_stage1_host? ( systemd ) !rkt_stage1_kvm"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5
|
||||
app-arch/cpio
|
||||
app-crypt/trousers
|
||||
sys-fs/squashfs-tools
|
||||
dev-perl/Capture-Tiny
|
||||
rkt_stage1_src? ( >=sys-apps/util-linux-2.27 )"
|
||||
|
||||
RDEPEND="!app-emulation/rocket
|
||||
rkt_stage1_host? ( systemd? (
|
||||
>=sys-apps/systemd-222
|
||||
app-shells/bash:0
|
||||
) )"
|
||||
|
||||
BUILDDIR="build-${P}"
|
||||
STAGE1_DEFAULT_LOCATION="/usr/share/rkt/stage1.aci"
|
||||
|
||||
src_unpack() {
|
||||
local x
|
||||
for x in ${A}; do
|
||||
case ${x} in
|
||||
*.img|linux-*) continue ;;
|
||||
kvmtool-*)
|
||||
mkdir kvmtool || die
|
||||
pushd kvmtool >/dev/null || die
|
||||
unpack ${x}
|
||||
popd >/dev/null || die
|
||||
;;
|
||||
*)
|
||||
unpack ${x}
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply_user
|
||||
|
||||
# disable git fetch of systemd
|
||||
sed -e 's~^include makelib/git.mk$~'\
|
||||
'ifneq ($(wildcard $(RKT_STAGE1_SYSTEMD_SRC)),)\n\n'\
|
||||
'get_systemd_sources: | $(UFS_SYSTEMDDIR)\n'\
|
||||
'\tmv "$(RKT_STAGE1_SYSTEMD_SRC)" "$(UFS_SYSTEMD_SRCDIR)"\n\n'\
|
||||
'$(UFS_SYSTEMD_CONFIGURE): get_systemd_sources\n\n'\
|
||||
'else ifneq ($(wildcard $(UFS_SYSTEMD_SRCDIR)),)\n\n'\
|
||||
'else\n'\
|
||||
'\t\0\n'\
|
||||
'endif~' -i stage1/usr_from_src/usr_from_src.mk || die
|
||||
|
||||
# disable git fetch of kvmtool
|
||||
sed -e 's~^include makelib/git.mk$~'\
|
||||
'ifneq ($(wildcard $(shell echo "$${WORKDIR}/kvmtool")),)\n\n'\
|
||||
'$(call forward-vars, get_lkvm_sources, LKVM_SRCDIR)\n'\
|
||||
'get_lkvm_sources: | $(LKVM_TMPDIR)\n'\
|
||||
'\tmv "$${WORKDIR}/kvmtool" "$(LKVM_SRCDIR)"\n\n'\
|
||||
'$(LKVM_PATCH_STAMP): get_lkvm_sources\n\n'\
|
||||
'else ifneq ($(wildcard $(LKVM_SRCDIR)),)\n\n'\
|
||||
'else\n'\
|
||||
'\t\0\n'\
|
||||
'endif~' -i stage1/usr_from_kvm/lkvm.mk || die
|
||||
|
||||
# disable fetch of kernel sources
|
||||
sed -e 's|wget .*|ln -s "$${DISTDIR}/linux-'${KVM_LINUX_VERSION}'.tar.xz" "$@"|' \
|
||||
-i stage1/usr_from_kvm/kernel.mk || die
|
||||
|
||||
if use rkt_stage1_host; then
|
||||
# Make systemdUnitsPath consistent with host
|
||||
sed -e 's|\(systemdUnitsPath := \).*|\1"'$(systemd_get_systemunitdir)'"|' \
|
||||
-i stage1/init/init.go || die
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local flavors myeconfargs=(
|
||||
--with-stage1-default-images-directory="/usr/share/rkt"
|
||||
--with-stage1-default-location="${STAGE1_DEFAULT_LOCATION}"
|
||||
)
|
||||
|
||||
use systemd || myeconfargs+=( --enable-sdjournal=no )
|
||||
|
||||
# enable flavors (first is default)
|
||||
use rkt_stage1_host && flavors+=",host"
|
||||
use rkt_stage1_src && flavors+=",src"
|
||||
use rkt_stage1_coreos && flavors+=",coreos"
|
||||
use rkt_stage1_fly && flavors+=",fly"
|
||||
use rkt_stage1_kvm_lkvm && flavors+=",kvm"
|
||||
myeconfargs+=( --with-stage1-flavors="${flavors#,}" )
|
||||
|
||||
if use rkt_stage1_src; then
|
||||
myeconfargs+=(
|
||||
--with-stage1-systemd-version=${PXE_SYSTEMD_VERSION}
|
||||
--with-stage1-systemd-src="${WORKDIR}/systemd-${PXE_SYSTEMD_VERSION#v}"
|
||||
)
|
||||
fi
|
||||
|
||||
if use rkt_stage1_coreos || use rkt_stage1_kvm_lkvm; then
|
||||
myeconfargs+=(
|
||||
--with-coreos-local-pxe-image-path="${DISTDIR}/${PXE_FILE}"
|
||||
--with-coreos-local-pxe-image-systemd-version="${PXE_SYSTEMD_VERSION}"
|
||||
)
|
||||
fi
|
||||
|
||||
# Go's 6l linker does not support PIE, disable so cgo binaries
|
||||
# which use 6l+gcc for linking can be built correctly.
|
||||
if gcc-specs-pie; then
|
||||
append-ldflags -nopie
|
||||
fi
|
||||
|
||||
export CC=$(tc-getCC)
|
||||
export CGO_ENABLED=1
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export BUILDDIR
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local arch=${ARCH}
|
||||
case ${arch} in
|
||||
amd64) arch=x86_64;;
|
||||
esac
|
||||
ARCH=${arch} emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc README.md
|
||||
use doc && dodoc -r Documentation
|
||||
use examples && dodoc -r examples
|
||||
use actool && dobin "${S}/${BUILDDIR}/tools/actool"
|
||||
|
||||
dobin "${S}/${BUILDDIR}/target/bin/rkt"
|
||||
|
||||
insinto /usr/share/rkt
|
||||
doins "${S}/${BUILDDIR}/target/bin/"*.aci
|
||||
|
||||
# create symlink for default stage1 image path
|
||||
if use rkt_stage1_host; then
|
||||
dosym stage1-host.aci "${STAGE1_DEFAULT_LOCATION}"
|
||||
elif use rkt_stage1_src; then
|
||||
dosym stage1-src.aci "${STAGE1_DEFAULT_LOCATION}"
|
||||
elif use rkt_stage1_coreos; then
|
||||
dosym stage1-coreos.aci "${STAGE1_DEFAULT_LOCATION}"
|
||||
elif use rkt_stage1_fly; then
|
||||
dosym stage1-fly.aci "${STAGE1_DEFAULT_LOCATION}"
|
||||
elif use rkt_stage1_kvm_lkvm; then
|
||||
dosym stage1-kvm.aci "${STAGE1_DEFAULT_LOCATION}"
|
||||
fi
|
||||
|
||||
systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.service
|
||||
systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.timer
|
||||
systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.service
|
||||
systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.socket
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils systemd user
|
||||
|
||||
MY_PN="${PN%-bin}"
|
||||
DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
|
||||
HOMEPAGE="https://www.elastic.co/products/elasticsearch"
|
||||
SRC_URI="https://download.elasticsearch.org/${MY_PN}/release/org/${MY_PN}/distribution/tar/${MY_PN}/${PV}/${P}.tar.gz"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
RDEPEND="|| ( virtual/jre:1.8 virtual/jre:1.7 )"
|
||||
|
||||
pkg_preinst() {
|
||||
if has_version '<app-misc/elasticsearch-2.3.2'; then
|
||||
export UPDATE_NOTES=1
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_PN}
|
||||
enewuser ${MY_PN} -1 /bin/bash /usr/share/${MY_PN} ${MY_PN}
|
||||
esethome ${MY_PN} /usr/share/${MY_PN}
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
rm -rf bin/*.{bat,exe}
|
||||
rm LICENSE.txt
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /etc/${MY_PN}
|
||||
dodir /etc/${MY_PN}/scripts
|
||||
|
||||
insinto /etc/${MY_PN}
|
||||
doins config/*
|
||||
rm -rf config
|
||||
|
||||
insinto /usr/share/${MY_PN}
|
||||
doins -r ./*
|
||||
|
||||
insinto /usr/share/${MY_PN}/bin
|
||||
doins "${FILESDIR}/elasticsearch-systemd-pre-exec"
|
||||
|
||||
chmod +x "${D}"/usr/share/${MY_PN}/bin/*
|
||||
|
||||
keepdir /var/{lib,log}/${MY_PN}
|
||||
keepdir /usr/share/${MY_PN}/plugins
|
||||
|
||||
insinto /usr/lib/tmpfiles.d
|
||||
newins "${FILESDIR}/${MY_PN}.tmpfiles.d" "${MY_PN}.conf"
|
||||
|
||||
insinto /etc/sysctl.d
|
||||
newins "${FILESDIR}/${MY_PN}.sysctl.d" "${MY_PN}.conf"
|
||||
|
||||
newinitd "${FILESDIR}/elasticsearch.init6" "${MY_PN}"
|
||||
newconfd "${FILESDIR}/${MY_PN}.conf2" "${MY_PN}"
|
||||
systemd_newunit "${FILESDIR}"/${PN}.service5 "${PN}.service"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "You may create multiple instances of ${MY_PN} by"
|
||||
elog "symlinking the init script:"
|
||||
elog "ln -sf /etc/init.d/${MY_PN} /etc/init.d/${MY_PN}.instance"
|
||||
elog
|
||||
elog "Please make sure you put elasticsearch.yml and logging.yml"
|
||||
elog "into the configuration directory of the instance:"
|
||||
elog "/etc/${MY_PN}/instance"
|
||||
elog
|
||||
if ! [ -z ${UPDATE_NOTES} ]; then
|
||||
elog "This update changes some configuration variables. Please review"
|
||||
elog "/etc/conf.d/elasticsearch before restarting your services."
|
||||
fi
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils systemd user
|
||||
|
||||
MY_PN="${PN%-bin}"
|
||||
MY_PV="${PV/_/-}"
|
||||
DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
|
||||
HOMEPAGE="https://www.elastic.co/products/elasticsearch"
|
||||
SRC_URI="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_PN}-${MY_PV}.tar.gz"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
RDEPEND="|| ( virtual/jre:1.8 virtual/jre:1.7 )"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${MY_PV}"
|
||||
|
||||
pkg_preinst() {
|
||||
if has_version '<app-misc/elasticsearch-2.3.2'; then
|
||||
export UPDATE_NOTES=1
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_PN}
|
||||
enewuser ${MY_PN} -1 /bin/bash /usr/share/${MY_PN} ${MY_PN}
|
||||
esethome ${MY_PN} /usr/share/${MY_PN}
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
rm -rf bin/*.{bat,exe}
|
||||
rm LICENSE.txt
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /etc/${MY_PN}
|
||||
dodir /etc/${MY_PN}/scripts
|
||||
|
||||
insinto /etc/${MY_PN}
|
||||
doins config/*
|
||||
rm -rf config
|
||||
|
||||
insinto /usr/share/${MY_PN}
|
||||
doins -r ./*
|
||||
|
||||
insinto /usr/share/${MY_PN}/bin
|
||||
doins "${FILESDIR}/elasticsearch-systemd-pre-exec"
|
||||
|
||||
chmod +x "${D}"/usr/share/${MY_PN}/bin/*
|
||||
|
||||
keepdir /var/{lib,log}/${MY_PN}
|
||||
keepdir /usr/share/${MY_PN}/plugins
|
||||
|
||||
insinto /usr/lib/tmpfiles.d
|
||||
newins "${FILESDIR}/${MY_PN}.tmpfiles.d" "${MY_PN}.conf"
|
||||
|
||||
insinto /etc/sysctl.d
|
||||
newins "${FILESDIR}/${MY_PN}.sysctl.d" "${MY_PN}.conf"
|
||||
|
||||
newinitd "${FILESDIR}/elasticsearch.init6" "${MY_PN}"
|
||||
newconfd "${FILESDIR}/${MY_PN}.conf2" "${MY_PN}"
|
||||
systemd_newunit "${FILESDIR}"/${PN}.service5 "${PN}.service"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "You may create multiple instances of ${MY_PN} by"
|
||||
elog "symlinking the init script:"
|
||||
elog "ln -sf /etc/init.d/${MY_PN} /etc/init.d/${MY_PN}.instance"
|
||||
elog
|
||||
elog "Please make sure you put elasticsearch.yml and logging.yml"
|
||||
elog "into the configuration directory of the instance:"
|
||||
elog "/etc/${MY_PN}/instance"
|
||||
elog
|
||||
if ! [ -z ${UPDATE_NOTES} ]; then
|
||||
elog "This update changes some configuration variables. Please review"
|
||||
elog "/etc/conf.d/elasticsearch before restarting your services."
|
||||
fi
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools eutils flag-o-matic
|
||||
|
||||
MY_P=${P/_/-}
|
||||
|
||||
DESCRIPTION="GNU Midnight Commander is a text based file manager"
|
||||
HOMEPAGE="http://www.midnight-commander.org"
|
||||
SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
|
||||
IUSE="+edit gpm mclib nls samba sftp +slang spell test X +xdg"
|
||||
|
||||
REQUIRED_USE="spell? ( edit )"
|
||||
|
||||
RDEPEND=">=dev-libs/glib-2.26.0:2
|
||||
gpm? ( sys-libs/gpm )
|
||||
kernel_linux? ( sys-fs/e2fsprogs )
|
||||
samba? ( net-fs/samba )
|
||||
sftp? ( net-libs/libssh2 )
|
||||
slang? ( >=sys-libs/slang-2 )
|
||||
!slang? ( sys-libs/ncurses:0= )
|
||||
spell? ( app-text/aspell )
|
||||
X? ( x11-libs/libX11
|
||||
x11-libs/libICE
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-libs/libSM )"
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/xz-utils
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( dev-libs/check )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.8.13-tinfo.patch
|
||||
)
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
src_prepare() {
|
||||
[[ -n ${LIVE_EBUILD} ]] && ./autogen.sh
|
||||
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myscreen=ncurses
|
||||
use slang && myscreen=slang
|
||||
[[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
|
||||
|
||||
local homedir=".mc"
|
||||
use xdg && homedir="XDG"
|
||||
|
||||
econf \
|
||||
--disable-silent-rules \
|
||||
--disable-dependency-tracking \
|
||||
$(use_enable nls) \
|
||||
--enable-vfs \
|
||||
$(use_enable kernel_linux vfs-undelfs) \
|
||||
--enable-charset \
|
||||
$(use_with X x) \
|
||||
$(use_enable samba vfs-smb) \
|
||||
$(use_enable sftp vfs-sftp) \
|
||||
$(use_enable spell aspell) \
|
||||
$(use_with gpm gpm-mouse) \
|
||||
--with-screen=${myscreen} \
|
||||
$(use_with edit internal-edit) \
|
||||
$(use_enable mclib) \
|
||||
$(use_enable test tests) \
|
||||
--with-homedir=${homedir}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
dodoc AUTHORS README NEWS
|
||||
|
||||
# fix bug #334383
|
||||
if use kernel_linux && [[ ${EUID} == 0 ]] ; then
|
||||
fowners root:tty /usr/libexec/mc/cons.saver
|
||||
fperms g+s /usr/libexec/mc/cons.saver
|
||||
fi
|
||||
|
||||
if ! use xdg ; then
|
||||
sed 's@MC_XDG_OPEN="xdg-open"@MC_XDG_OPEN="/bin/false"@' \
|
||||
-i "${ED}"/usr/libexec/mc/ext.d/*.sh || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To enable exiting to latest working directory,"
|
||||
elog "put this into your ~/.bashrc:"
|
||||
elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST pdfpc-3.1.1.tgz 199004 SHA256 ec5ffb9c2b55d1bac76172a6a13ed527ceed8cf0d659aca5e302f6a7185f00f2 SHA512 554203094b18fe11fd085414961de6644df3c258ad52d46ad171cfd6c2199028bcbaa9560bdaba63d83f858b467407cc276972b34f341cc25260db1d1358e88d WHIRLPOOL bddcba6a4285ea2b58dd01f76b7b050db630eaa97de5bba32a66f7f85563e6a99763a52e82286297f605dfa59d9ff918007baab297e587968ac1c83e3d69e8a8
|
||||
DIST pdfpc-4.0.2.tar.gz 75962 SHA256 591da2f984dd7714b0607aff450b99649f9a8caaf311a38be8f5e2e1e565be96 SHA512 01c957976d69b2e469989bb6b5957fd29b20e3a285c854fd42680f6c790849dfd3b4480c65ad5fcd5bd4106f92494626d46c943f6e9d6c0a0cb88168dc52b89f WHIRLPOOL 94cf57074285a6f25f9292c7b2ea21392b78133ed4e13579e030429af6a179ad5e4e17a1a488fc2e6ff29041101cb140166335e699ba7041a5b992c330ed6311
|
||||
DIST pdfpc-4.0.3.tar.gz 79685 SHA256 50828fb35cb814bb679388c15f36087f4d8ea21e816f732d09bf1252e0f7ae91 SHA512 924a19504f5e47178f3f61dda25c51e9c78011527e58d2acc370c00516787022d3f532a415745f5c806b8cf82f4f3abce035eabc0dcea2ca054550bc84a67d6f WHIRLPOOL 8f41fb159d1dc9c9d2b1d9c4455efcfb0149ce5d57681595f5c53de0180979cf9c4271f1430578cfd9f81c0eaa80440e43304b07e72b1ded46c745c3eec17277
|
||||
|
@ -0,0 +1,42 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
VALA_MIN_API_VERSION="0.26"
|
||||
VALA_MAX_API_VERSION="0.30" # fix sed line if you increase this
|
||||
|
||||
inherit vala cmake-utils
|
||||
|
||||
DESCRIPTION="Presenter console with multi-monitor support for PDF files"
|
||||
HOMEPAGE="http://pdfpc.github.io"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="app-text/poppler:=[cairo]
|
||||
dev-libs/glib:2
|
||||
dev-libs/libgee:0.8
|
||||
gnome-base/librsvg
|
||||
media-libs/gstreamer:1.0
|
||||
media-libs/gst-plugins-base:1.0
|
||||
sys-apps/dbus
|
||||
x11-libs/gtk+:3"
|
||||
DEPEND="${RDEPEND}
|
||||
$(vala_depend)"
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e "s/valac-0.20/valac-0.30 valac-0.28 valac-0.26/" cmake/vala/FindVala.cmake || die
|
||||
vala_src_prepare
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
local mycmakeargs=(
|
||||
-DSYSCONFDIR="${EPREFIX}/etc"
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit rpm eutils multilib versionator
|
||||
|
||||
MY_PV=$(get_version_component_range 1-3)
|
||||
|
||||
DESCRIPTION="Translations for the Libreoffice suite"
|
||||
HOMEPAGE="http://www.libreoffice.org"
|
||||
BASE_SRC_URI_TESTING="http://download.documentfoundation.org/${PN/-l10n/}/testing/${MY_PV}/rpm"
|
||||
BASE_SRC_URI_STABLE="http://download.documentfoundation.org/${PN/-l10n/}/stable/${MY_PV}/rpm"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="offlinehelp"
|
||||
|
||||
#
|
||||
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
|
||||
#
|
||||
# "en:en-US" for mapping from Gentoo "en" to upstream "en-US" etc.
|
||||
LANGUAGES_HELP=" am ast bg bn-IN bn bo bs ca-valencia ca cs da de dz el en-GB en:en-US en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt-BR pt ru si sk sl sq sv tg tr ug uk vi zh-CN zh-TW "
|
||||
LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr-Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa:pa-IN ro rw sa:sa-IN sat sd sid sr-Latn sr ss st sw-TZ ta te th tn ts tt uz ve xh zu "
|
||||
|
||||
for lang in ${LANGUAGES_HELP}; do
|
||||
helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz )"
|
||||
SRC_URI+=" l10n_${lang%:*}? ( ${helppack} )"
|
||||
done
|
||||
for lang in ${LANGUAGES}; do
|
||||
if [[ ${lang%:*} != en ]]; then
|
||||
langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz"
|
||||
SRC_URI+=" l10n_${lang%:*}? ( ${langpack} )"
|
||||
fi
|
||||
IUSE+=" l10n_${lang%:*}"
|
||||
done
|
||||
unset lang helppack langpack
|
||||
|
||||
RDEPEND+="app-text/hunspell"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
local lang dir rpmdir
|
||||
|
||||
# First remove dictionaries, we want to use system ones.
|
||||
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
|
||||
|
||||
for lang in ${LANGUAGES}; do
|
||||
# break away if not enabled
|
||||
use l10n_${lang%:*} || continue
|
||||
|
||||
dir=${lang#*:}
|
||||
|
||||
# for english we provide just helppack, as translation is always there
|
||||
if [[ ${lang%:*} != en ]]; then
|
||||
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
|
||||
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
|
||||
# Condition required for people that do not install anything eg no l10n
|
||||
# or just english with no offlinehelp.
|
||||
if [[ -d "${dir}" ]] ; then
|
||||
insinto /usr/$(get_libdir)/${PN/-l10n/}/
|
||||
doins -r "${dir}"/*
|
||||
fi
|
||||
# remove extensions that are in the l10n for some weird reason
|
||||
rm -rf "${ED}"usr/$(get_libdir)/${PN/-l10n/}/share/extensions/ || \
|
||||
die "Failed to remove extensions"
|
||||
}
|
@ -0,0 +1,558 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
KDE_REQUIRED="optional"
|
||||
KDE_SCM="git"
|
||||
CMAKE_REQUIRED="never"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
|
||||
PYTHON_REQ_USE="threads,xml"
|
||||
|
||||
# experimental ; release ; old
|
||||
# Usually the tarballs are moved a lot so this should make
|
||||
# everyone happy.
|
||||
DEV_URI="
|
||||
http://dev-builds.libreoffice.org/pre-releases/src
|
||||
http://download.documentfoundation.org/libreoffice/src/${PV:0:5}/
|
||||
http://download.documentfoundation.org/libreoffice/old/${PV}/
|
||||
"
|
||||
ADDONS_URI="http://dev-www.libreoffice.org/src/"
|
||||
|
||||
BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
|
||||
# PATCHSET="${P}-patchset-01.tar.xz"
|
||||
|
||||
[[ ${PV} == *9999* ]] && SCM_ECLASS="git-r3"
|
||||
inherit multiprocessing autotools bash-completion-r1 check-reqs eutils java-pkg-opt-2 kde4-base pax-utils python-single-r1 multilib toolchain-funcs flag-o-matic versionator xdg-utils ${SCM_ECLASS}
|
||||
unset SCM_ECLASS
|
||||
|
||||
DESCRIPTION="A full office productivity suite"
|
||||
HOMEPAGE="http://www.libreoffice.org"
|
||||
SRC_URI="branding? ( http://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
|
||||
[[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}"
|
||||
|
||||
# Split modules following git/tarballs
|
||||
# Core MUST be first!
|
||||
# Help is used for the image generator
|
||||
MODULES="core help"
|
||||
# Only release has the tarballs
|
||||
if [[ ${PV} != *9999* ]]; then
|
||||
for i in ${DEV_URI}; do
|
||||
for mod in ${MODULES}; do
|
||||
if [[ ${mod} == core ]]; then
|
||||
SRC_URI+=" ${i}/${P}.tar.xz"
|
||||
else
|
||||
SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.xz"
|
||||
fi
|
||||
done
|
||||
unset mod
|
||||
done
|
||||
unset i
|
||||
fi
|
||||
unset DEV_URI
|
||||
|
||||
# Really required addons
|
||||
# These are bundles that can't be removed for now due to huge patchsets.
|
||||
# If you want them gone, patches are welcome.
|
||||
ADDONS_SRC=(
|
||||
"${ADDONS_URI}/ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz" # modifies source code
|
||||
"collada? ( ${ADDONS_URI}/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 )"
|
||||
"java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
|
||||
# no release for 8 years, should we package it?
|
||||
"libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
|
||||
# Does not build with 1.6 rhino at all
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
|
||||
# requirement of rhino
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
|
||||
# not packageable
|
||||
"odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
|
||||
)
|
||||
SRC_URI+=" ${ADDONS_SRC[*]}"
|
||||
|
||||
unset ADDONS_URI
|
||||
unset ADDONS_SRC
|
||||
|
||||
# Extensions that need extra work:
|
||||
LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
|
||||
|
||||
IUSE="bluetooth +branding coinmp collada +cups dbus debug eds firebird gltf gnome googledrive
|
||||
gstreamer +gtk gtk3 jemalloc kde libressl mysql odk pdfimport postgres quickstarter telepathy test vlc
|
||||
$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
[[ ${PV} == *9999* ]] || \
|
||||
KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
app-text/hunspell
|
||||
>=app-text/libabw-0.1.0
|
||||
>=app-text/libebook-0.1
|
||||
>=app-text/libetonyek-0.1
|
||||
app-text/libexttextcat
|
||||
app-text/liblangtag
|
||||
>=app-text/libmspub-0.1.0
|
||||
>=app-text/libmwaw-0.3.1
|
||||
>=app-text/libodfgen-0.1.0
|
||||
app-text/libwpd:0.10[tools]
|
||||
app-text/libwpg:0.3
|
||||
>=app-text/libwps-0.4
|
||||
app-text/mythes
|
||||
>=dev-cpp/clucene-2.3.3.4-r2
|
||||
=dev-cpp/libcmis-0.5*
|
||||
dev-db/unixODBC
|
||||
dev-lang/perl
|
||||
>=dev-libs/boost-1.55:=
|
||||
dev-libs/expat
|
||||
dev-libs/hyphen
|
||||
dev-libs/icu:=
|
||||
=dev-libs/liborcus-0.11*
|
||||
dev-libs/librevenge
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
!libressl? ( >=dev-libs/openssl-1.0.0d:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
>=dev-libs/redland-1.0.16
|
||||
media-gfx/graphite2
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype:2
|
||||
>=media-libs/glew-1.10:=
|
||||
>=media-libs/harfbuzz-0.9.18:=[icu(+)]
|
||||
media-libs/lcms:2
|
||||
>=media-libs/libcdr-0.1.0
|
||||
>=media-libs/libfreehand-0.1.0
|
||||
media-libs/libpagemaker
|
||||
>=media-libs/libpng-1.4:0=
|
||||
>=media-libs/libvisio-0.1.0
|
||||
net-libs/neon
|
||||
net-misc/curl
|
||||
net-nds/openldap
|
||||
sci-mathematics/lpsolve
|
||||
virtual/jpeg:0
|
||||
x11-libs/cairo[X,-xlib-xcb]
|
||||
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 )
|
||||
eds? (
|
||||
dev-libs/glib:2
|
||||
gnome-extra/evolution-data-server
|
||||
)
|
||||
firebird? ( >=dev-db/firebird-2.5 )
|
||||
gltf? ( media-libs/libgltf )
|
||||
gnome? ( gnome-base/dconf )
|
||||
gstreamer? (
|
||||
media-libs/gstreamer:1.0
|
||||
media-libs/gst-plugins-base:1.0
|
||||
)
|
||||
gtk? (
|
||||
x11-libs/gdk-pixbuf
|
||||
>=x11-libs/gtk+-2.24:2
|
||||
)
|
||||
gtk3? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
>=x11-libs/gtk+-3.8:3
|
||||
)
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
|
||||
libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
|
||||
mysql? ( dev-db/mysql-connector-c++ )
|
||||
pdfimport? ( app-text/poppler:=[cxx] )
|
||||
postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
|
||||
telepathy? ( net-libs/telepathy-glib )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!app-office/libreoffice-bin
|
||||
!app-office/libreoffice-bin-debug
|
||||
!app-office/openoffice
|
||||
media-fonts/liberation-fonts
|
||||
media-fonts/libertine
|
||||
media-fonts/urw-fonts
|
||||
java? ( >=virtual/jre-1.6 )
|
||||
kde? ( $(add_kdeapps_dep kioclient) )
|
||||
vlc? ( media-video/vlc )
|
||||
"
|
||||
|
||||
if [[ ${PV} != *9999* ]]; then
|
||||
PDEPEND="=app-office/libreoffice-l10n-$(get_version_component_range 1-2)*"
|
||||
else
|
||||
# Translations are not reliable on live ebuilds
|
||||
# rather force people to use english only.
|
||||
PDEPEND="!app-office/libreoffice-l10n"
|
||||
fi
|
||||
|
||||
# FIXME: cppunit should be moved to test conditional
|
||||
# after everything upstream is under gbuild
|
||||
# as dmake execute tests right away
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
!<sys-devel/make-3.82
|
||||
>=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-1.2.0:1=
|
||||
media-libs/glm
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
sys-devel/gettext
|
||||
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? (
|
||||
dev-java/ant-core
|
||||
>=virtual/jdk-1.6
|
||||
)
|
||||
odk? ( >=app-doc/doxygen-1.8.4 )
|
||||
test? ( dev-util/cppunit )
|
||||
"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
bluetooth? ( dbus )
|
||||
collada? ( gltf )
|
||||
eds? ( gnome )
|
||||
gnome? ( gtk )
|
||||
telepathy? ( gtk )
|
||||
libreoffice_extensions_nlpsolver? ( java )
|
||||
libreoffice_extensions_scripting-beanshell? ( java )
|
||||
libreoffice_extensions_scripting-javascript? ( java )
|
||||
libreoffice_extensions_wiki-publisher? ( java )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# not upstreamable stuff
|
||||
"${FILESDIR}/${PN}-5.2-system-pyuno.patch"
|
||||
)
|
||||
|
||||
CHECKREQS_MEMORY="512M"
|
||||
|
||||
if [[ ${MERGE_TYPE} != binary ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
|
||||
CHECKREQS_DISK_BUILD="22G"
|
||||
elif [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
CHECKREQS_DISK_BUILD="6G"
|
||||
fi
|
||||
|
||||
pkg_pretend() {
|
||||
use java || \
|
||||
ewarn "If you plan to use lbase application you should enable java or you will get various crashes."
|
||||
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
check-reqs_pkg_pretend
|
||||
|
||||
if ! $(tc-is-clang) && [[ $(gcc-major-version) -lt 4 ]] || {
|
||||
[[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; } then
|
||||
eerror "Compilation with gcc older than 4.7 is not supported"
|
||||
die "Too old gcc found."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure pg version but we have to be sure the pg is installed (first
|
||||
# install on clean system)
|
||||
if use postgres && has_version dev-db/postgresql; then
|
||||
local pgslot=$(postgresql-config show)
|
||||
if [[ ${pgslot//.} -lt 90 ]] ; then
|
||||
eerror "PostgreSQL slot must be set to 9.0 or higher."
|
||||
eerror " postgresql-config set 9.0"
|
||||
die "PostgreSQL slot is not set to 9.0 or higher."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
kde4-base_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
xdg_environment_reset
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local mod
|
||||
|
||||
[[ -n ${PATCHSET} ]] && unpack ${PATCHSET}
|
||||
use branding && unpack "${BRANDING}"
|
||||
|
||||
if [[ ${PV} != *9999* ]]; then
|
||||
unpack "${P}.tar.xz"
|
||||
for mod in ${MODULES}; do
|
||||
[[ ${mod} == core ]] && continue
|
||||
unpack "${PN}-${mod}-${PV}.tar.xz"
|
||||
done
|
||||
else
|
||||
local base_uri branch checkout mypv
|
||||
base_uri="git://anongit.freedesktop.org"
|
||||
for mod in ${MODULES}; do
|
||||
branch="master"
|
||||
mypv=${PV/.9999}
|
||||
[[ ${mypv} != ${PV} ]] && branch="${PN}-${mypv/./-}"
|
||||
git-r3_fetch "${base_uri}/${PN}/${mod}" "refs/heads/${branch}"
|
||||
[[ ${mod} != core ]] && checkout="${S}/${mod}"
|
||||
[[ ${mod} == help ]] && checkout="helpcontent2" # doesn't match on help
|
||||
git-r3_checkout "${base_uri}/${PN}/${mod}" ${checkout}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
[[ -n ${PATCHSET} ]] && eapply "${WORKDIR}/${PATCHSET/.tar.xz/}"
|
||||
eapply "${PATCHES[@]}"
|
||||
eapply_user
|
||||
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
# hack in the autogen.sh
|
||||
touch autogen.lastrun
|
||||
|
||||
# system pyuno mess
|
||||
sed -i \
|
||||
-e "s:%eprefix%:${EPREFIX}:g" \
|
||||
-e "s:%libdir%:$(get_libdir):g" \
|
||||
pyuno/source/module/uno.py \
|
||||
pyuno/source/officehelper.py || die
|
||||
# sed in the tests
|
||||
sed -i \
|
||||
-e "s#all : build unitcheck#all : build#g" \
|
||||
solenv/gbuild/Module.mk || die
|
||||
sed -i \
|
||||
-e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
|
||||
-e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
|
||||
Makefile.in || die
|
||||
|
||||
if use branding; then
|
||||
# hack...
|
||||
mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local java_opts
|
||||
local ext_opts
|
||||
|
||||
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
|
||||
# Note: these are for Gentoo use ONLY. For your own distribution, please get
|
||||
# your own set of keys. Feel free to contact chromium@gentoo.org for more info.
|
||||
local google_default_client_id="329227923882.apps.googleusercontent.com"
|
||||
local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
|
||||
|
||||
# optimization flags
|
||||
export GMAKE_OPTIONS="${MAKEOPTS}"
|
||||
# System python enablement:
|
||||
export PYTHON_CFLAGS=$(python_get_CFLAGS)
|
||||
export PYTHON_LIBS=$(python_get_LIBS)
|
||||
|
||||
if use collada; then
|
||||
export OPENCOLLADA_CFLAGS="-I/usr/include/opencollada/COLLADABaseUtils -I/usr/include/opencollada/COLLADAFramework -I/usr/include/opencollada/COLLADASaxFrameworkLoader -I/usr/include/opencollada/GeneratedSaxParser"
|
||||
export OPENCOLLADA_LIBS="-L /usr/$(get_libdir)/opencollada -lOpenCOLLADABaseUtils -lOpenCOLLADAFramework -lOpenCOLLADASaxFrameworkLoader -lGeneratedSaxParser"
|
||||
fi
|
||||
|
||||
# libreoffice extensions handling
|
||||
for lo_xt in ${LO_EXTS}; do
|
||||
if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
|
||||
ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt})"
|
||||
else
|
||||
ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt})"
|
||||
fi
|
||||
done
|
||||
|
||||
if use java; then
|
||||
# hsqldb: system one is too new
|
||||
java_opts="
|
||||
--without-junit
|
||||
--without-system-hsqldb
|
||||
--with-ant-home="${ANT_HOME}"
|
||||
--with-jdk-home=$(java-config --jdk-home 2>/dev/null)
|
||||
--with-jvm-path="${EPREFIX}/usr/lib/"
|
||||
"
|
||||
|
||||
use libreoffice_extensions_scripting-beanshell && \
|
||||
java_opts+=" --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)"
|
||||
|
||||
use libreoffice_extensions_scripting-javascript && \
|
||||
java_opts+=" --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar)"
|
||||
fi
|
||||
|
||||
# system headers/libs/...: enforce using system packages
|
||||
# --enable-cairo: ensure that cairo is always required
|
||||
# --enable-graphite: disabling causes build breakages
|
||||
# --enable-*-link: link to the library rather than just dlopen on runtime
|
||||
# --enable-release-build: build the libreoffice as release
|
||||
# --disable-fetch-external: prevent dowloading during compile phase
|
||||
# --enable-extension-integration: enable any extension integration support
|
||||
# --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
|
||||
# --disable-report-builder: too much java packages pulled in without pkgs
|
||||
# --without-system-sane: just sane.h header that is used for scan in writer,
|
||||
# not linked or anything else, worthless to depend on
|
||||
econf \
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}/" \
|
||||
--with-system-dicts \
|
||||
--with-system-headers \
|
||||
--with-system-jars \
|
||||
--with-system-libs \
|
||||
--enable-cairo-canvas \
|
||||
--enable-graphite \
|
||||
--enable-largefile \
|
||||
--enable-mergelibs \
|
||||
--enable-neon \
|
||||
--enable-python=system \
|
||||
--enable-randr \
|
||||
--enable-release-build \
|
||||
--disable-ccache \
|
||||
--disable-crashdump \
|
||||
--disable-dependency-tracking \
|
||||
--disable-epm \
|
||||
--disable-fetch-external \
|
||||
--disable-gstreamer-0-10 \
|
||||
--disable-hardlink-deliver \
|
||||
--disable-online-update \
|
||||
--disable-report-builder \
|
||||
--with-alloc=$(use jemalloc && echo "jemalloc" || echo "system") \
|
||||
--with-build-version="Gentoo official package" \
|
||||
--enable-extension-integration \
|
||||
--with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
|
||||
--with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
|
||||
--with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
|
||||
--with-external-tar="${DISTDIR}" \
|
||||
--with-lang="" \
|
||||
--with-parallelism=$(makeopts_jobs) \
|
||||
--with-system-ucpp \
|
||||
--with-vendor="Gentoo Foundation" \
|
||||
--with-x \
|
||||
--without-fonts \
|
||||
--without-myspell-dicts \
|
||||
--without-help \
|
||||
--with-helppack-integration \
|
||||
--without-sun-templates \
|
||||
--without-system-sane \
|
||||
$(use_enable bluetooth sdremote-bluetooth) \
|
||||
$(use_enable coinmp) \
|
||||
$(use_enable collada) \
|
||||
$(use_enable cups) \
|
||||
$(use_enable debug) \
|
||||
$(use_enable dbus) \
|
||||
$(use_enable eds evolution2) \
|
||||
$(use_enable firebird firebird-sdbc) \
|
||||
$(use_enable gltf) \
|
||||
$(use_enable gnome gio) \
|
||||
$(use_enable gnome dconf) \
|
||||
$(use_enable gstreamer gstreamer-1-0) \
|
||||
$(use_enable gtk) \
|
||||
$(use_enable gtk3) \
|
||||
$(use_enable kde kde4) \
|
||||
$(use_enable mysql ext-mariadb-connector) \
|
||||
$(use_enable odk) \
|
||||
$(use_enable pdfimport) \
|
||||
$(use_enable postgres postgresql-sdbc) \
|
||||
$(use_enable quickstarter systray) \
|
||||
$(use_enable telepathy) \
|
||||
$(use_enable vlc) \
|
||||
$(use_with coinmp system-coinmp) \
|
||||
$(use_with collada system-opencollada) \
|
||||
$(use_with gltf system-libgltf) \
|
||||
$(use_with googledrive gdrive-client-id ${google_default_client_id}) \
|
||||
$(use_with googledrive gdrive-client-secret ${google_default_client_secret}) \
|
||||
$(use_with java) \
|
||||
$(use_with mysql system-mysql-cppconn) \
|
||||
$(use_with odk doxygen) \
|
||||
${java_opts} \
|
||||
${ext_opts}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# more and more LO stuff tries to use OpenGL, including tests during build
|
||||
# bug 501508, bug 540624, bug 545974 and probably more
|
||||
addpredict /dev/dri
|
||||
addpredict /dev/ati
|
||||
addpredict /dev/nvidiactl
|
||||
|
||||
# hack for offlinehelp, this needs fixing upstream at some point
|
||||
# it is broken because we send --without-help
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
||||
(
|
||||
grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die
|
||||
source "${T}/config_host.mk" 2&> /dev/null
|
||||
|
||||
local path="${WORKDIR}/helpcontent2/source/auxiliary/"
|
||||
mkdir -p "${path}" || die
|
||||
|
||||
echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \"${path}/helpimg.ilst\""
|
||||
perl "${S}/helpcontent2/helpers/create_ilst.pl" \
|
||||
-dir=icon-themes/galaxy/res/helpimg \
|
||||
> "${path}/helpimg.ilst"
|
||||
[[ -s "${path}/helpimg.ilst" ]] || \
|
||||
ewarn "The help images list is empty, something is fishy, report a bug."
|
||||
)
|
||||
|
||||
local target
|
||||
use test && target="build" || target="build-nocheck"
|
||||
|
||||
# this is not a proper make script
|
||||
make ${target} || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
make unitcheck || die
|
||||
make slowcheck || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This is not Makefile so no buildserver
|
||||
make DESTDIR="${D}" distro-pack-install -o build -o check || die
|
||||
|
||||
# Fix bash completion placement
|
||||
newbashcomp "${ED}"usr/share/bash-completion/completions/libreoffice.sh ${PN}
|
||||
bashcomp_alias \
|
||||
libreoffice \
|
||||
unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
|
||||
|
||||
if use branding; then
|
||||
insinto /usr/$(get_libdir)/${PN}/program
|
||||
newins "${WORKDIR}/branding-sofficerc" sofficerc
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die
|
||||
fi
|
||||
|
||||
# Hack for offlinehelp, this needs fixing upstream at some point.
|
||||
# It is broken because we send --without-help
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
||||
insinto /usr/$(get_libdir)/libreoffice/help
|
||||
doins xmlhelp/util/*.xsl
|
||||
|
||||
# Remove desktop files to support old installs that can't parse mime
|
||||
rm -r "${ED}"usr/share/mimelnk/ || die
|
||||
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Cache updates - all handled by kde eclass for all environments
|
||||
kde4-base_pkg_preinst
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
kde4-base_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
kde4-base_pkg_postrm
|
||||
}
|
@ -0,0 +1 @@
|
||||
DIST unsandbox.c 678 SHA256 806422d7cc96de98a6283ed11efcfe37d6597236d861313849fbd7a6e24e7cfa SHA512 380bb1c59442c1637de0b95450a58be7249b7943e061b3ec18464f5fa04629e27453aaefa85d48f84c4f3a0affaa9302a81d36b33a860d027280e4e9a396fd04 WHIRLPOOL b7dfe56418ec6970cf053454aebd70cf0fcc9bb7eb1f8f0583d1c6b01d6c500327407b4f9e8db118d0552546f4ea0c60ce38f8bd27bdfaeabd8804f958c59262
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>mgorny@gentoo.org</email>
|
||||
<name>Michał Górny</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
DESCRIPTION="The Sandbox escapist tool"
|
||||
HOMEPAGE="http://dev.gentoo.org/~mgorny/dist/unsandbox.c"
|
||||
SRC_URI="http://dev.gentoo.org/~mgorny/dist/unsandbox.c"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
src_unpack() {
|
||||
cp "${DISTDIR}"/unsandbox.c "${WORKDIR}"/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake LDLIBS=-ldl unsandbox
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin unsandbox
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
DIST liblangtag-0.5.6.tar.bz2 668949 SHA256 5cdec61f4ef8d4b1a198682fcdd17e88cb293549af5878d6ee4bdd55d129bd84 SHA512 60297d79b20c72a0ebf5fd685efbcb3eb2d40461cfe532fd5e4f2193c81c9037b8c69f9cb0977f640a7d8f315cb14508de9455334115b152ed30d23f91d75e52 WHIRLPOOL 0805c9dcde9802818ec4e19309eb9b09e4dfe77627fefcb190203110b9ec133083d48c0474171368e1b061612f1e06bc936d1dc1ad1ad551dd276afe3db26fb5
|
||||
DIST liblangtag-0.5.8.tar.bz2 672452 SHA256 08e2f64bfe3f750be7391eb0af53967e164b628c59f02be4d83789eb4f036eaa SHA512 477f74d8b7eab66e5c503942117d8b448dd9d1b13866b3ec48388058bc0e5e4c6215ece88405fd947515cd092853f069d70b3fe2f307a9b41cb697b6b1dc3baf WHIRLPOOL 7036649534870e34dab5f68f1a97c5aee4649df6cc076026795f09775efca7a00b3eb047743aef3efeccd901add3942e6c9f5c097124193cdd57463a250ef133
|
||||
DIST liblangtag-0.6.0.tar.bz2 760974 SHA256 df84efd7e3e67cc8a38ece1e23f080c70ea29b26590ee324d03f1df37bf46576 SHA512 d6a2e38e11a5413408fffc1f8defc2a556a3a4b73538d01592ba7a3cad9768c52a030103893c8924f02328edc3f62a232c5efc1d74ddb41f41b146d8a9f0df27 WHIRLPOOL 72e6cddfe9e49b48dd0db3ef33ef92d087ff56fc7b65aabe6ae9a2f63d89ca98bfb4628c677a01251b4722ee42d9cb236cf4c184c1d7f27c3bcf04a54a4e4dee
|
||||
DIST liblangtag-0.6.1.tar.bz2 765980 SHA256 b3b245b901a9361e51805e196963d208a0b578ec9b3d96b0845931c009c0435f SHA512 0bcd73bd2d2393303043ef788f0d9073f618f29de13ce720765d3b94b1de0a3e585d9eb97653ae7bf741e455afd5bf9746d776e25ecafeb245eef522c4571615 WHIRLPOOL c36012dd1db905d930256a7da55b901fa98f9df6dd39517b23d875c48306da7ce1cc6d711fb89ff48e0d719f6e13b91688a970f81589b5adf5e08c3fc221522d
|
||||
|
@ -1,56 +0,0 @@
|
||||
From 3cc56cf32c006e7e8445c3ba49ffc128c646c88d Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Wed, 23 Mar 2016 14:07:48 +0100
|
||||
Subject: [PATCH] enum must be declared before it's used
|
||||
|
||||
---
|
||||
liblangtag/lt-tag.h | 26 +++++++++++++-------------
|
||||
1 file changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/liblangtag/lt-tag.h b/liblangtag/lt-tag.h
|
||||
index 939acf5..78e3797 100644
|
||||
--- a/liblangtag/lt-tag.h
|
||||
+++ b/liblangtag/lt-tag.h
|
||||
@@ -37,6 +37,19 @@ LT_BEGIN_DECLS
|
||||
*/
|
||||
typedef struct _lt_tag_t lt_tag_t;
|
||||
|
||||
+enum _lt_tag_filter_t {
|
||||
+ LT_TAG_FILTER_NONE = 0,
|
||||
+ LT_TAG_FILTER_LANGUAGE = 1 << 0,
|
||||
+ LT_TAG_FILTER_EXTLANG = 1 << 1,
|
||||
+ LT_TAG_FILTER_SCRIPT = 1 << 2,
|
||||
+ LT_TAG_FILTER_REGION = 1 << 3,
|
||||
+ LT_TAG_FILTER_VARIANT = 1 << 4,
|
||||
+ LT_TAG_FILTER_EXTENSION = 1 << 5,
|
||||
+ LT_TAG_FILTER_PRIVATEUSE = 1 << 6,
|
||||
+ LT_TAG_FILTER_GRANDFATHERED = 1 << 7,
|
||||
+ LT_TAG_FILTER_ALL = -1
|
||||
+};
|
||||
+
|
||||
/**
|
||||
* lt_tag_filter_t:
|
||||
* @LT_TAG_FILTER_NONE: all of objects filtered.
|
||||
@@ -55,19 +68,6 @@ typedef struct _lt_tag_t lt_tag_t;
|
||||
*/
|
||||
typedef enum _lt_tag_filter_t lt_tag_filter_t;
|
||||
|
||||
-enum _lt_tag_filter_t {
|
||||
- LT_TAG_FILTER_NONE = 0,
|
||||
- LT_TAG_FILTER_LANGUAGE = 1 << 0,
|
||||
- LT_TAG_FILTER_EXTLANG = 1 << 1,
|
||||
- LT_TAG_FILTER_SCRIPT = 1 << 2,
|
||||
- LT_TAG_FILTER_REGION = 1 << 3,
|
||||
- LT_TAG_FILTER_VARIANT = 1 << 4,
|
||||
- LT_TAG_FILTER_EXTENSION = 1 << 5,
|
||||
- LT_TAG_FILTER_PRIVATEUSE = 1 << 6,
|
||||
- LT_TAG_FILTER_GRANDFATHERED = 1 << 7,
|
||||
- LT_TAG_FILTER_ALL = -1
|
||||
-};
|
||||
-
|
||||
lt_tag_t *lt_tag_new (void);
|
||||
lt_tag_t *lt_tag_ref (lt_tag_t *tag);
|
||||
void lt_tag_unref (lt_tag_t *tag);
|
||||
--
|
||||
2.7.4.1.g5468f9e
|
||||
|
@ -0,0 +1,48 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
EGIT_REPO_URI="https://github.com/fosnola/libstaroffice.git"
|
||||
|
||||
[[ ${PV} == 9999 ]] && GITECLASS="git-r3 autotools"
|
||||
inherit eutils ${GITECLASS}
|
||||
unset GITECLASS
|
||||
|
||||
DESCRIPTION="Import filter for old StarOffice documents"
|
||||
HOMEPAGE="https://github.com/fosnola/libstaroffice"
|
||||
[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${P}.tar.bz2"
|
||||
|
||||
LICENSE="|| ( LGPL-2.1+ MPL-2.0 )"
|
||||
SLOT="0"
|
||||
[[ ${PV} == 9999 ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="debug doc tools +zlib"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/librevenge
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-doc/doxygen )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
[[ ${PV} == 9999 ]] && eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable debug) \
|
||||
$(use_with doc docs) \
|
||||
$(use_enable tools) \
|
||||
$(use_enable zlib zip)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
prune_libtool_files --all
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>office@gentoo.org</email>
|
||||
<name>Gentoo Office project</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="tools">Build conversion tools</flag>
|
||||
<flag name="zlib">Enable support for compressed data</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">fosnola/libstaroffice</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -1,4 +1,5 @@
|
||||
DIST pytextile-2.3.2.tar.gz 41941 SHA256 de4530f538adf71aaeb4812b998e2097e32326ebb5a3940a7cac7a7c4036ec9e SHA512 eb84140f6518f8875599fa6f99f2dc8aec46abd88ab757cc3c437c86ffb6411ba6d08ccfbf46ef292abe889dcce80676668cbfa54d2ba33bd3d96ce44c88f0f9 WHIRLPOOL ae0e0a51dfdf7fedcf027730c451b352e3df4093ddf91fc9ec5e2c4d83c4ed3dc4297aab379b77544b5d06ac651f724e34a46d2668fcdf975632583f62836ae0
|
||||
DIST pytextile-2.3.3.tar.gz 42277 SHA256 88526eae638751c1ea36855f6299338e6cdde38bb04b8628b87b02b1a698dca6 SHA512 980c872bfdc056753fa5b344cbc828dbdc9ddfc2656f3cfb5c15b3351cfd9e4016f57af14b60af2f2764e556865301d7923a8f0687c5857fc2201bf10f56ab60 WHIRLPOOL be5661dcc13994ec8019e032d2a54dd1d1f0aac61919615a36484f6b1cde3db598644fc3c89f18e01507e0a37d3ae55d25a2953a14e3ecfb94e1a99298f702ef
|
||||
DIST textile-2.1.8.tar.gz 34002 SHA256 c443f4bf0a31df9e707e615f869d4f51b08cdb222d17ca3009eda44f7cfd8629 SHA512 b1675a131b482f4926efb45312b16c722ff158d9296704918b56316d470056f986ce18d495525a8e9f236bdd62e09ca6a17b443a7db8c8c36e5d05fcffce67da WHIRLPOOL fedcd9b9277387604e258fca427e3cd587f3b2ba93e65b39474ce57810fa67dae772241c5cf69dc8aaf89416d6191271f1fece4fa2f2e63f19fec6597b956bd5
|
||||
DIST textile-2.2.1.tar.gz 32631 SHA256 4899f06c63bfdc32a204d4c1c1e9302ddf17f26c20328419747d109348e23afd SHA512 81d044deaa765693078d949672affa787a4e15882cc2928fd19c3abe69256ffbeec1308b303ee694a80787ad7574b57ab4b256f111d9874e72440809236f6b93 WHIRLPOOL 3fda8226310d998b7d40d9fec6398173c8398c44704dd151400d284ba5a897a56bee6d3f17a21ed8fc01e76cea88f41a8372b90a4ad8a7eb6627de550dd0ef89
|
||||
DIST textile-2.2.2.tar.gz 32844 SHA256 dba4f1cb5772b99dbe4d521807a3255ddbbfa971da8b054afa08f0b428bced28 SHA512 19f2ed92199549549b07c2bb3accdf483c409c2dfd17e43ae38ba8babbc2c72d662d78414de0fd1c64b65eae59ce9e591ab9c863d4f806b7c454d8a37567d882 WHIRLPOOL a2cf3f1ef03ccac807582fd9ca44acc7f6bf48d56445a9a73d756400c7b2f7952f3222ce87caa6dfded27c4a4f55feee57f2e3194082b2d44841b4953821ca0f
|
||||
|
@ -0,0 +1,42 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PN="python-textile"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="A Python implementation of Textile, Dean Allen's Human Text Generator for creating (X)HTML"
|
||||
HOMEPAGE="https://github.com/textile/python-textile"
|
||||
SRC_URI="https://github.com/textile/python-textile/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-runner[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-cov[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
python_prepare_all() {
|
||||
# This resolves a nasty race condition, courtesy of Arfrever
|
||||
sed -e 's:with-id = 1::' -i setup.cfg || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
py.test || die "Testsuite failed under ${EPYTHON}"
|
||||
}
|
@ -1,7 +1,4 @@
|
||||
DIST php-5.5.37.tar.bz2 13699851 SHA256 d2380ebe46caf17f2c4cd055867d00a82e6702dc5f62dc29ce864a5742905d88 SHA512 d2da921f3efd858e1cb8004873e377ca9c5821d5269d5b8e7c9be830b183f4d18f737b14653f65a43c0957bdca994e09a476d77e3a29a11e357abc24618c4c0f WHIRLPOOL 8db12b1d090bc1bfb3f5b20c661ba05588b8f988484d1887a959f943dd6f1756cb62bac811c809af516e6c3582b64388443546a3b4a17f0527a69fcbafc0452c
|
||||
DIST php-5.5.38.tar.xz 11077780 SHA256 cb527c44b48343c8557fe2446464ff1d4695155a95601083e5d1f175df95580f SHA512 c2cdb18b2c9edaeff66591e8f58f8ff488260f537cdf9ce09820c163f20ff5209c0def89343d429932c9506ad4ef3daacf224946dac1c59622501092483f30c6 WHIRLPOOL 4380c1daa39f04f90d1457152e366720b295e96aba6859625c6b375a3785b4e0f30fea590c1ee1edb439c2a405446526c702a003d68ea6c817ab8684068a7581
|
||||
DIST php-5.6.23.tar.bz2 14178077 SHA256 facd280896d277e6f7084b60839e693d4db68318bfc92085d3dc0251fd3558c7 SHA512 92be3685926f302223465e9673496971f0ee1b05c7b3a09682d4ef93a27b4c17e5c53c36acab15d26f38508f6d65bebe11a6f0f0fc98b27eafe95b02b4d9897d WHIRLPOOL 71375395742a83ec0f55bd7edf5eeff732e4db24f77f436f519ca81a2ceeb0bac65549ca1ffd34cb7b593771b5f4ccb984900841a20c1620a6121e4fa14ab086
|
||||
DIST php-5.6.24.tar.xz 12394980 SHA256 ed7c38c6dac539ade62e08118258f4dac0c49beca04d8603bee4e0ea6ca8250b SHA512 1849c58a8c6eeb3efc6b43f874314b146b4a32d886086bc1648fc84e6062148a9373dea9c3713587c3980df70a0e51bf6e5ab5a87b9eff57e54670c5c2ded86b WHIRLPOOL 4e6466444824640a246e8cd02f7da7bf72ff55c714729f7ed7581be63b2f1d87a0f5bf5dab5e09499fabc61d32162aa35cfb095f7e478f7454aacdec2465a7f5
|
||||
DIST php-5.6.25.tar.xz 12406072 SHA256 7535cd6e20040ccec4594cc386c6f15c3f2c88f24163294a31068cf7dfe7f644 SHA512 43ab901a69e22ac42b676384c338c3b3a5cc8e8fb52cc85296d6880c4a3d079d9e0de151539d0c8549e8856d611f0d8b40c9cc338167a62560e14c939a409b68 WHIRLPOOL 46e593caeb8d59d29568dfdbf0a2d2ae7080a7d8b3e78a11f4116fa54e64e8cc7d8c93fdb40a63beb3ae0a6bd900b8d0dfd4889b858201717a86bcd45b8aee61
|
||||
DIST php-5.6.26.tar.xz 12412992 SHA256 203a854f0f243cb2810d1c832bc871ff133eccdf1ff69d32846f93bc1bef58a8 SHA512 06ef6990c1ab6ef3c94157b72039ddbc40a8373b8f38c88ec4dfa771fcd422a0673ff5f6cbf3cf67a0fb10bedd8b9fa85aa95e08abb0d74163a90a322a1d8c24 WHIRLPOOL 11b183089a43bfad1ee787bd2512faf8d4611916cdfe348fb8ba3a2c2d35d560dcd38656e3a5b3ee98efb649e9f7ab219a89da7a72c163270760ad44a64bba09
|
||||
DIST php-7.0.11.tar.xz 12258500 SHA256 d4cccea8da1d27c11b89386f8b8e95692ad3356610d571253d00ca67d524c735 SHA512 4d7df513a61489ecb1c3a963fbb76ad8e15b88fa134f52295a5339c900f7b2f98e547a3e479b8061dd4ff3c5f90cd62e3c39ec208d7de03b6146501e60500d5e WHIRLPOOL d9867f282df9a86efecb77c44f22a403598dc950b8ae2343000517fdb69890073bd78fbe7d1ee26be41459aefb3336a6508d6dd75b915859533e124b21b4e453
|
||||
|
@ -1,807 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module libtool systemd
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "https://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
|
||||
mhash mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )"
|
||||
|
||||
# The supported (that is, autodetected) versions of BDB are listed in
|
||||
# the ./configure script. Other versions *work*, but we need to stick to
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
DEPEND="${DEPEND}
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( dev-libs/gmp:0 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0 )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd )
|
||||
vpx? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use_if_iuse opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
|
||||
|| die
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
# Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
||||
local our_conf=(
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}/man"
|
||||
--infodir="${PHP_DESTDIR}/info"
|
||||
--libdir="${PHP_DESTDIR}/lib"
|
||||
--with-libdir="$(get_libdir)"
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${EPREFIX}/usr")
|
||||
$(use_enable xml dom)
|
||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
||||
$(use_enable exif exif)
|
||||
$(use_enable fileinfo fileinfo)
|
||||
$(use_enable filter filter)
|
||||
$(use_enable ftp ftp)
|
||||
$(use_with nls gettext "${EPREFIX}/usr")
|
||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
||||
$(use_enable hash hash)
|
||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
||||
$(use_with iconv iconv \
|
||||
$(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
|
||||
$(use_enable intl intl)
|
||||
$(use_enable ipv6 ipv6)
|
||||
$(use_enable json json)
|
||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
||||
$(use_enable xml libxml)
|
||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
||||
$(use_enable unicode mbstring)
|
||||
$(use_with crypt mcrypt "${EPREFIX}/usr")
|
||||
$(use_with mssql mssql "${EPREFIX}/usr")
|
||||
$(use_with unicode onig "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
||||
$(use_enable pcntl pcntl)
|
||||
$(use_enable phar phar)
|
||||
$(use_enable pdo pdo)
|
||||
$(use_enable opcache opcache)
|
||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
||||
$(use_enable posix posix)
|
||||
$(use_with spell pspell "${EPREFIX}/usr")
|
||||
$(use_with recode recode "${EPREFIX}/usr")
|
||||
$(use_enable simplexml simplexml)
|
||||
$(use_enable sharedmem shmop)
|
||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
||||
$(use_enable soap soap)
|
||||
$(use_enable sockets sockets)
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
||||
$(use_enable tokenizer tokenizer)
|
||||
$(use_enable wddx wddx)
|
||||
$(use_enable xml xml)
|
||||
$(use_enable xmlreader xmlreader)
|
||||
$(use_enable xmlwriter xmlwriter)
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
||||
$(use_enable zip zip)
|
||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
||||
$(use_enable debug debug)
|
||||
)
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
||||
$(use_enable flatfile flatfile)
|
||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
||||
$(use_enable inifile inifile)
|
||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
||||
$(use_with truetype t1lib "${EPREFIX}/usr")
|
||||
$(use_enable cjk gd-jis-conv)
|
||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
||||
$(use_with vpx vpx-dir "${EPREFIX}/usr")
|
||||
)
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
our_conf+=( $(use_with mysql mysql "${mysqllib}") )
|
||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
||||
|
||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
our_conf+=(
|
||||
$(use_with mssql pdo-dblib)
|
||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
||||
$(use_with postgres pdo-pgsql)
|
||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_conf+=( --with-pic )
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_conf+=( ${EXTRA_ECONF:-} )
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
# The BUILD_DIR variable is used to determine where to output
|
||||
# the files that autotools creates. This was all originally
|
||||
# based on the autotools-utils eclass.
|
||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cp -r "${S}" "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local sapi_conf=(
|
||||
--with-config-file-path="${PHP_INI_DIR}"
|
||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
)
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
else
|
||||
sapi_conf+=( "--disable-${sapi}" )
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/sbin/apxs" )
|
||||
else
|
||||
sapi_conf+=( --without-apxs2 )
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Construct the $myeconfargs array by concatenating $our_conf
|
||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
||||
local myeconfargs=( "${our_conf[@]}" )
|
||||
myeconfargs+=( "${sapi_conf[@]}" )
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
econf "${myeconfargs[@]}"
|
||||
popd > /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir "/usr/share/php${PHP_MV}"
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" \
|
||||
"libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}"
|
||||
else
|
||||
dobin "${source}"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
||||
"session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
||||
"session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
APACHE2_MOD_DEFINE="PHP"
|
||||
APACHE2_MOD_CONF="70_mod_php" # Provided by app-eselect/eselect-php
|
||||
apache-module_pkg_postinst
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT} || die
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
||||
# example, if the user has the cgi SAPI enabled, then he has an
|
||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
||||
# USE="-cgi", that symlink will break. This call to eselect is
|
||||
# supposed to remove that dead link per bug 572436.
|
||||
eselect php cleanup || die
|
||||
|
||||
elog "To build extensions for this version of PHP, you will need to"
|
||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on"
|
||||
elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
|
||||
elog "php.ini to install by default by setting PHP_INI_VERSION"
|
||||
elog "to either 'production' or 'development' in your make.conf."
|
||||
elog "Both versions of php.ini can be found with the PHP docs in"
|
||||
elog "${EPREFIX}/usr/share/doc/${PF}"
|
||||
elog
|
||||
elog "For more details on how version slotting works, please see"
|
||||
elog "the wiki:"
|
||||
elog
|
||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# This serves two purposes. First, if we have just removed the last
|
||||
# installed version of PHP, then this will remove any dead symlinks
|
||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
||||
# his existing symlinks to point to the new 7.0 installation. The
|
||||
# latter is bug 432962.
|
||||
#
|
||||
# Note: the eselect-php package may not be installed at this point,
|
||||
# so we can't die() if this command fails.
|
||||
eselect php cleanup
|
||||
}
|
@ -1,814 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator libtool systemd
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "https://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.xz")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
|
||||
mhash mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )"
|
||||
|
||||
# The supported (that is, autodetected) versions of BDB are listed in
|
||||
# the ./configure script. Other versions *work*, but we need to stick to
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
DEPEND="${DEPEND}
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( dev-libs/gmp:0 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0 )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd )
|
||||
vpx? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
if [[ "${PHP_INI_VERSION}" == "production" ]]; then
|
||||
PHP_INI_UPSTREAM="php.ini-production"
|
||||
else
|
||||
PHP_INI_UPSTREAM="php.ini-development"
|
||||
fi
|
||||
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
|
||||
|| die
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
# Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
||||
local our_conf=(
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}/man"
|
||||
--infodir="${PHP_DESTDIR}/info"
|
||||
--libdir="${PHP_DESTDIR}/lib"
|
||||
--with-libdir="$(get_libdir)"
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${EPREFIX}/usr")
|
||||
$(use_enable xml dom)
|
||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
||||
$(use_enable exif exif)
|
||||
$(use_enable fileinfo fileinfo)
|
||||
$(use_enable filter filter)
|
||||
$(use_enable ftp ftp)
|
||||
$(use_with nls gettext "${EPREFIX}/usr")
|
||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
||||
$(use_enable hash hash)
|
||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
||||
$(use_with iconv iconv \
|
||||
$(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
|
||||
$(use_enable intl intl)
|
||||
$(use_enable ipv6 ipv6)
|
||||
$(use_enable json json)
|
||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
||||
$(use_enable xml libxml)
|
||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
||||
$(use_enable unicode mbstring)
|
||||
$(use_with crypt mcrypt "${EPREFIX}/usr")
|
||||
$(use_with mssql mssql "${EPREFIX}/usr")
|
||||
$(use_with unicode onig "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
||||
$(use_enable pcntl pcntl)
|
||||
$(use_enable phar phar)
|
||||
$(use_enable pdo pdo)
|
||||
$(use_enable opcache opcache)
|
||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
||||
$(use_enable posix posix)
|
||||
$(use_with spell pspell "${EPREFIX}/usr")
|
||||
$(use_with recode recode "${EPREFIX}/usr")
|
||||
$(use_enable simplexml simplexml)
|
||||
$(use_enable sharedmem shmop)
|
||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
||||
$(use_enable soap soap)
|
||||
$(use_enable sockets sockets)
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
||||
$(use_enable tokenizer tokenizer)
|
||||
$(use_enable wddx wddx)
|
||||
$(use_enable xml xml)
|
||||
$(use_enable xmlreader xmlreader)
|
||||
$(use_enable xmlwriter xmlwriter)
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
||||
$(use_enable zip zip)
|
||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
||||
$(use_enable debug debug)
|
||||
)
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
||||
$(use_enable flatfile flatfile)
|
||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
||||
$(use_enable inifile inifile)
|
||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
||||
$(use_with truetype t1lib "${EPREFIX}/usr")
|
||||
$(use_enable cjk gd-jis-conv)
|
||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
||||
$(use_with vpx vpx-dir "${EPREFIX}/usr")
|
||||
)
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
our_conf+=( $(use_with mysql mysql "${mysqllib}") )
|
||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
||||
|
||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
our_conf+=(
|
||||
$(use_with mssql pdo-dblib)
|
||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
||||
$(use_with postgres pdo-pgsql)
|
||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_conf+=( --with-pic )
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_conf+=( ${EXTRA_ECONF:-} )
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
# The BUILD_DIR variable is used to determine where to output
|
||||
# the files that autotools creates. This was all originally
|
||||
# based on the autotools-utils eclass.
|
||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cp -r "${S}" "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local sapi_conf=(
|
||||
--with-config-file-path="${PHP_INI_DIR}"
|
||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
)
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
else
|
||||
sapi_conf+=( "--disable-${sapi}" )
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/sbin/apxs" )
|
||||
else
|
||||
sapi_conf+=( --without-apxs2 )
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Construct the $myeconfargs array by concatenating $our_conf
|
||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
||||
local myeconfargs=( "${our_conf[@]}" )
|
||||
myeconfargs+=( "${sapi_conf[@]}" )
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
econf "${myeconfargs[@]}"
|
||||
popd > /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir "/usr/share/php${PHP_MV}"
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" \
|
||||
"libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}"
|
||||
else
|
||||
dobin "${source}"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use opcache ; then
|
||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
||||
dolib.so "modules/opcache$(get_libname)"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
||||
"session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
||||
"session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
elog
|
||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
||||
elog "your apache2 command. OpenRC users can append that string to"
|
||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
||||
elog
|
||||
elog "The apache module configuration file 70_mod_php.conf is"
|
||||
elog "provided (and maintained) by eselect-php."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT} || die
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
||||
# example, if the user has the cgi SAPI enabled, then he has an
|
||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
||||
# USE="-cgi", that symlink will break. This call to eselect is
|
||||
# supposed to remove that dead link per bug 572436.
|
||||
eselect php cleanup || die
|
||||
|
||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
||||
elog "To build extensions for this version of PHP, you will need to"
|
||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Only mention PHP_INI_VERSION if the user doesn't have it set.
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
elog "This ebuild installed a version of php.ini based on"
|
||||
elog "${PHP_INI_UPSTREAM}. You can choose which version of"
|
||||
elog "php.ini to install by default by setting PHP_INI_VERSION"
|
||||
elog "to either 'production' or 'development' in your make.conf."
|
||||
elog "Both versions of php.ini can be found with the PHP docs in"
|
||||
elog "${EPREFIX}/usr/share/doc/${PF}"
|
||||
elog
|
||||
;;
|
||||
esac
|
||||
|
||||
elog "For details on how version slotting works, please see"
|
||||
elog "the wiki:"
|
||||
elog
|
||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# This serves two purposes. First, if we have just removed the last
|
||||
# installed version of PHP, then this will remove any dead symlinks
|
||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
||||
# his existing symlinks to point to the new 7.0 installation. The
|
||||
# latter is bug 432962.
|
||||
#
|
||||
# Note: the eselect-php package may not be installed at this point,
|
||||
# so we can't die() if this command fails.
|
||||
eselect php cleanup
|
||||
}
|
@ -1,766 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools flag-o-matic versionator libtool systemd
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="http://php.net/"
|
||||
SRC_URI="http://php.net/distributions/${P}.tar.xz"
|
||||
LICENSE="PHP-3"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
|
||||
mhash mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
# The supported (that is, autodetected) versions of BDB are listed in
|
||||
# the ./configure script. Other versions *work*, but we need to stick to
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
COMMON_DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( dev-libs/gmp:0 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0 )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd )
|
||||
vpx? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
if [[ "${PHP_INI_VERSION}" == "production" ]]; then
|
||||
PHP_INI_UPSTREAM="php.ini-production"
|
||||
else
|
||||
PHP_INI_UPSTREAM="php.ini-development"
|
||||
fi
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" php.ini
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
|
||||
|| die
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
||||
local our_conf=(
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}/man"
|
||||
--infodir="${PHP_DESTDIR}/info"
|
||||
--libdir="${PHP_DESTDIR}/lib"
|
||||
--with-libdir="$(get_libdir)"
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${EPREFIX}/usr")
|
||||
$(use_enable xml dom)
|
||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
||||
$(use_enable exif exif)
|
||||
$(use_enable fileinfo fileinfo)
|
||||
$(use_enable filter filter)
|
||||
$(use_enable ftp ftp)
|
||||
$(use_with nls gettext "${EPREFIX}/usr")
|
||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
||||
$(use_enable hash hash)
|
||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
||||
$(use_with iconv iconv \
|
||||
$(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
|
||||
$(use_enable intl intl)
|
||||
$(use_enable ipv6 ipv6)
|
||||
$(use_enable json json)
|
||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
||||
$(use_enable xml libxml)
|
||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
||||
$(use_enable unicode mbstring)
|
||||
$(use_with crypt mcrypt "${EPREFIX}/usr")
|
||||
$(use_with mssql mssql "${EPREFIX}/usr")
|
||||
$(use_with unicode onig "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
||||
$(use_enable pcntl pcntl)
|
||||
$(use_enable phar phar)
|
||||
$(use_enable pdo pdo)
|
||||
$(use_enable opcache opcache)
|
||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
||||
$(use_enable posix posix)
|
||||
$(use_with spell pspell "${EPREFIX}/usr")
|
||||
$(use_with recode recode "${EPREFIX}/usr")
|
||||
$(use_enable simplexml simplexml)
|
||||
$(use_enable sharedmem shmop)
|
||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
||||
$(use_enable soap soap)
|
||||
$(use_enable sockets sockets)
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
||||
$(use_enable tokenizer tokenizer)
|
||||
$(use_enable wddx wddx)
|
||||
$(use_enable xml xml)
|
||||
$(use_enable xmlreader xmlreader)
|
||||
$(use_enable xmlwriter xmlwriter)
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
||||
$(use_enable zip zip)
|
||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
||||
$(use_enable debug debug)
|
||||
)
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
||||
$(use_enable flatfile flatfile)
|
||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
||||
$(use_enable inifile inifile)
|
||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
||||
$(use_with truetype t1lib "${EPREFIX}/usr")
|
||||
$(use_enable cjk gd-jis-conv)
|
||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
||||
$(use_with vpx vpx-dir "${EPREFIX}/usr")
|
||||
)
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
our_conf+=( $(use_with mysql mysql "${mysqllib}") )
|
||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
||||
|
||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
our_conf+=(
|
||||
$(use_with mssql pdo-dblib)
|
||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
||||
$(use_with postgres pdo-pgsql)
|
||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_conf+=( --with-pic )
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_conf+=( ${EXTRA_ECONF:-} )
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
# The BUILD_DIR variable is used to determine where to output
|
||||
# the files that autotools creates. This was all originally
|
||||
# based on the autotools-utils eclass.
|
||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cp -r "${S}" "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local sapi_conf=(
|
||||
--with-config-file-path="${PHP_INI_DIR}"
|
||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
)
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
else
|
||||
sapi_conf+=( "--disable-${sapi}" )
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
||||
else
|
||||
sapi_conf+=( --without-apxs2 )
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Construct the $myeconfargs array by concatenating $our_conf
|
||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
||||
local myeconfargs=( "${our_conf[@]}" )
|
||||
myeconfargs+=( "${sapi_conf[@]}" )
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
econf "${myeconfargs[@]}"
|
||||
popd > /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir "/usr/share/php${PHP_MV}"
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" \
|
||||
"libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}"
|
||||
else
|
||||
dobin "${source}"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use opcache ; then
|
||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
||||
dolib.so "modules/opcache$(get_libname)"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
||||
"session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
||||
"session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
elog
|
||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
||||
elog "your apache2 command. OpenRC users can append that string to"
|
||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
||||
elog
|
||||
elog "The apache module configuration file 70_mod_php.conf is"
|
||||
elog "provided (and maintained) by eselect-php."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT} || die
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
||||
# example, if the user has the cgi SAPI enabled, then he has an
|
||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
||||
# USE="-cgi", that symlink will break. This call to eselect is
|
||||
# supposed to remove that dead link per bug 572436.
|
||||
eselect php cleanup || die
|
||||
|
||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
||||
elog "To build extensions for this version of PHP, you will need to"
|
||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Only mention PHP_INI_VERSION if the user doesn't have it set.
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
elog "This ebuild installed a version of php.ini based on"
|
||||
elog "${PHP_INI_UPSTREAM}. You can choose which version of"
|
||||
elog "php.ini to install by default by setting PHP_INI_VERSION"
|
||||
elog "to either 'production' or 'development' in your make.conf."
|
||||
elog "Both versions of php.ini can be found with the PHP docs in"
|
||||
elog "${EPREFIX}/usr/share/doc/${PF}"
|
||||
elog
|
||||
;;
|
||||
esac
|
||||
|
||||
elog "For details on how version slotting works, please see"
|
||||
elog "the wiki:"
|
||||
elog
|
||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# This serves two purposes. First, if we have just removed the last
|
||||
# installed version of PHP, then this will remove any dead symlinks
|
||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
||||
# his existing symlinks to point to the new 7.0 installation. The
|
||||
# latter is bug 432962.
|
||||
#
|
||||
# Note: the eselect-php package may not be installed at this point,
|
||||
# so we can't die() if this command fails.
|
||||
eselect php cleanup
|
||||
}
|
@ -1,241 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
#PATCHSET=1
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib versionator
|
||||
|
||||
MY_P="${PN}-$(get_version_component_range 1-3)"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
SLOT=$(get_version_component_range 1-2)
|
||||
MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
|
||||
RUBYVERSION=2.3.0
|
||||
|
||||
if [[ -n ${PATCHSET} ]]; then
|
||||
if [[ ${PVR} == ${PV} ]]; then
|
||||
PATCHSET="${PV}-r0.${PATCHSET}"
|
||||
else
|
||||
PATCHSET="${PVR}.${PATCHSET}"
|
||||
fi
|
||||
else
|
||||
PATCHSET="${PVR}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="An object-oriented scripting language"
|
||||
HOMEPAGE="http://www.ruby-lang.org/"
|
||||
SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
|
||||
|
||||
LICENSE="|| ( Ruby-BSD BSD-2 )"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
|
||||
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl xemacs ncurses +readline"
|
||||
|
||||
RDEPEND="
|
||||
berkdb? ( sys-libs/db:= )
|
||||
gdbm? ( sys-libs/gdbm )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
socks5? ( >=net-proxy/dante-1.1.13 )
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
dev-libs/libyaml
|
||||
virtual/libffi
|
||||
sys-libs/zlib
|
||||
>=app-eselect/eselect-ruby-20151229
|
||||
!<dev-ruby/rdoc-3.9.4
|
||||
!<dev-ruby/rubygems-1.8.10-r1"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BUNDLED_GEMS="
|
||||
>=dev-ruby/did_you_mean-1.0.0[ruby_targets_ruby23]
|
||||
>=dev-ruby/minitest-5.8.3[ruby_targets_ruby23]
|
||||
>=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby23]
|
||||
>=dev-ruby/power_assert-0.2.6[ruby_targets_ruby23]
|
||||
>=dev-ruby/rake-10.4.2[ruby_targets_ruby23]
|
||||
>=dev-ruby/test-unit-3.1.5[ruby_targets_ruby23]
|
||||
"
|
||||
|
||||
PDEPEND="
|
||||
${BUNDLED_GEMS}
|
||||
virtual/rubygems[ruby_targets_ruby23]
|
||||
>=dev-ruby/json-1.8.3[ruby_targets_ruby23]
|
||||
rdoc? ( >=dev-ruby/rdoc-4.2.1[ruby_targets_ruby23] )
|
||||
xemacs? ( app-xemacs/ruby-modes )"
|
||||
|
||||
src_prepare() {
|
||||
EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
|
||||
epatch "${WORKDIR}/patches"
|
||||
|
||||
einfo "Unbundling gems..."
|
||||
cd "$S"
|
||||
# Remove bundled gems that we will install via PDEPEND, bug
|
||||
# 539700. Use explicit version numbers to ensure rm fails when they
|
||||
# change so we can update dependencies accordingly.
|
||||
rm -f gems/{did_you_mean-1.0.0,minitest-5.8.3,net-telnet-0.1.1,power_assert-0.2.6,rake-10.4.2,test-unit-3.1.5}.gem || die
|
||||
|
||||
# Fix a hardcoded lib path in configure script
|
||||
sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
|
||||
configure.in || die "sed failed"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=
|
||||
|
||||
# The Tk module can no longer be built because the module code is no
|
||||
# longer compatible with newer stable versions.
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=500894
|
||||
local modules="tk"
|
||||
|
||||
# -fomit-frame-pointer makes ruby segfault, see bug #150413.
|
||||
filter-flags -fomit-frame-pointer
|
||||
# In many places aliasing rules are broken; play it safe
|
||||
# as it's risky with newer compilers to leave it as it is.
|
||||
append-flags -fno-strict-aliasing
|
||||
# SuperH needs this
|
||||
use sh && append-flags -mieee
|
||||
|
||||
# Socks support via dante
|
||||
if use socks5 ; then
|
||||
# Socks support can't be disabled as long as SOCKS_SERVER is
|
||||
# set and socks library is present, so need to unset
|
||||
# SOCKS_SERVER in that case.
|
||||
unset SOCKS_SERVER
|
||||
fi
|
||||
|
||||
# Increase GC_MALLOC_LIMIT if set (default is 8000000)
|
||||
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
|
||||
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
|
||||
fi
|
||||
|
||||
# ipv6 hack, bug 168939. Needs --enable-ipv6.
|
||||
use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
|
||||
|
||||
# Determine which modules *not* to build depending in the USE flags.
|
||||
if ! use readline ; then
|
||||
modules="${modules},readline"
|
||||
fi
|
||||
if ! use berkdb ; then
|
||||
modules="${modules},dbm"
|
||||
fi
|
||||
if ! use gdbm ; then
|
||||
modules="${modules},gdbm"
|
||||
fi
|
||||
if ! use ssl ; then
|
||||
modules="${modules},openssl"
|
||||
fi
|
||||
if ! use ncurses ; then
|
||||
modules="${modules},curses"
|
||||
fi
|
||||
|
||||
# Provide an empty LIBPATHENV because we disable rpath but we do not
|
||||
# need LD_LIBRARY_PATH by default since that breaks USE=multitarget
|
||||
# #564272
|
||||
INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
|
||||
--program-suffix=${MY_SUFFIX} \
|
||||
--with-soname=ruby${MY_SUFFIX} \
|
||||
--docdir=${EPREFIX}/usr/share/doc/${P} \
|
||||
--enable-shared \
|
||||
--enable-pthread \
|
||||
--disable-rpath \
|
||||
--with-out-ext="${modules}" \
|
||||
$(use_enable jemalloc jemalloc) \
|
||||
$(use_enable socks5 socks) \
|
||||
$(use_enable doc install-doc) \
|
||||
--enable-ipv6 \
|
||||
$(use_enable debug) \
|
||||
${myconf} \
|
||||
--enable-option-checking=no \
|
||||
|| die "econf failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 V=1 test || die "make test failed"
|
||||
|
||||
elog "Ruby's make test has been run. Ruby also ships with a make check"
|
||||
elog "that cannot be run until after ruby has been installed."
|
||||
elog
|
||||
if use rubytests; then
|
||||
elog "You have enabled rubytests, so they will be installed to"
|
||||
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
|
||||
elog "than root, and you must place them into a writeable directory."
|
||||
elog "Then call: "
|
||||
elog
|
||||
elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
|
||||
else
|
||||
elog "Enable the rubytests USE flag to install the make check tests"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Remove the remaining bundled gems. We do this late in the process
|
||||
# since they are used during the build to e.g. create the
|
||||
# documentation.
|
||||
rm -rf ext/json || die
|
||||
|
||||
# Ruby is involved in the install process, we don't want interference here.
|
||||
unset RUBYOPT
|
||||
|
||||
local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
|
||||
|
||||
LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
|
||||
for d in $(find "${S}/ext" -type d) ; do
|
||||
RUBYLIB="${RUBYLIB}:$d"
|
||||
done
|
||||
export LD_LIBRARY_PATH RUBYLIB
|
||||
|
||||
emake V=1 DESTDIR="${D}" install || die "make install failed"
|
||||
|
||||
# Remove installed rubygems and rdoc copy
|
||||
rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
|
||||
rm -rf "${D}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
|
||||
rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
|
||||
if use doc; then
|
||||
make DESTDIR="${D}" install-doc || die "make install-doc failed"
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r sample
|
||||
fi
|
||||
|
||||
dodoc ChangeLog NEWS doc/NEWS* README* || die
|
||||
|
||||
if use rubytests; then
|
||||
pushd test
|
||||
insinto /usr/share/${PN}-${SLOT}/test
|
||||
doins -r .
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
|
||||
eselect ruby set ruby${MY_SUFFIX}
|
||||
fi
|
||||
|
||||
elog
|
||||
elog "To switch between available Ruby profiles, execute as root:"
|
||||
elog "\teselect ruby set ruby(19|20|...)"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect ruby cleanup
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
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"
|
||||
|
||||
LICENSE="BSD-2 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 libressl 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:0 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
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
|
||||
if [[ -d "${WORKDIR}"/${PV} ]] ; then
|
||||
epatch "${WORKDIR}"/${PV}
|
||||
fi
|
||||
|
||||
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
|
||||
unset DISPLAY
|
||||
cd "${S}/packages" || die
|
||||
emake \
|
||||
USE_PUBLIC_NETWORK_TESTS=false \
|
||||
USE_ODBC_TESTS=false \
|
||||
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.md VERSION
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
--- lib/divine/idivine.h.orig
|
||||
+++ lib/divine/idivine.h
|
||||
@@ -0,0 +1,54 @@
|
||||
+/*
|
||||
+ (c) Copyright 2012-2013 DirectFB integrated media GmbH
|
||||
+ (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org)
|
||||
+ (c) Copyright 2000-2004 Convergence (integrated media) GmbH
|
||||
+
|
||||
+ All rights reserved.
|
||||
+
|
||||
+ Written by Denis Oliver Kropp <dok@directfb.org>,
|
||||
+ Andreas Shimokawa <andi@directfb.org>,
|
||||
+ Marek Pikarski <mass@directfb.org>,
|
||||
+ Sven Neumann <neo@directfb.org>,
|
||||
+ Ville Syrjälä <syrjala@sci.fi> and
|
||||
+ Claudio Ciccani <klan@users.sf.net>.
|
||||
+
|
||||
+ This library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ This library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with this library; if not, write to the
|
||||
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+ Boston, MA 02111-1307, USA.
|
||||
+*/
|
||||
+
|
||||
+
|
||||
+
|
||||
+#ifndef __IDIVINE_H__
|
||||
+#define __IDIVINE_H__
|
||||
+
|
||||
+#include <divine.h>
|
||||
+
|
||||
+/*
|
||||
+ * private data struct of IDiVine
|
||||
+ */
|
||||
+typedef struct {
|
||||
+ int ref; /* reference counter */
|
||||
+
|
||||
+ DiVine *divine;
|
||||
+} IDiVine_data;
|
||||
+
|
||||
+/*
|
||||
+ * IDiVine constructor/destructor
|
||||
+ */
|
||||
+DFBResult IDiVine_Construct( IDiVine *thiz );
|
||||
+
|
||||
+void IDiVine_Destruct ( IDiVine *thiz );
|
||||
+
|
||||
+#endif
|
@ -0,0 +1,436 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
|
||||
|
||||
inherit eutils flag-o-matic multiprocessing python-r1 toolchain-funcs versionator multilib-minimal
|
||||
|
||||
MY_P="${PN}_$(replace_all_version_separators _)"
|
||||
MAJOR_V="$(get_version_component_range 1-2)"
|
||||
|
||||
DESCRIPTION="Boost Libraries for C++"
|
||||
HOMEPAGE="http://www.boost.org/"
|
||||
SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="Boost-1.0"
|
||||
SLOT="0/${PV}" # ${PV} instead ${MAJOR_V} due to bug 486122
|
||||
KEYWORDS=""
|
||||
|
||||
IUSE="context debug doc icu +nls mpi python static-libs +threads tools"
|
||||
|
||||
RDEPEND="icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] )
|
||||
!icu? ( virtual/libiconv[${MULTILIB_USEDEP}] )
|
||||
mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP},cxx,threads] )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
app-arch/bzip2[${MULTILIB_USEDEP}]
|
||||
sys-libs/zlib[${MULTILIB_USEDEP}]
|
||||
!app-admin/eselect-boost"
|
||||
DEPEND="${RDEPEND}
|
||||
=dev-util/boost-build-${MAJOR_V}*"
|
||||
REQUIRED_USE="
|
||||
mpi? ( threads )
|
||||
python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
# the tests will never fail because these are not intended as sanity
|
||||
# tests at all. They are more a way for upstream to check their own code
|
||||
# on new compilers. Since they would either be completely unreliable
|
||||
# (failing for no good reason) or completely useless (never failing)
|
||||
# there is no point in having them in the ebuild to begin with.
|
||||
RESTRICT="test"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.51.0-respect_python-buildid.patch"
|
||||
"${FILESDIR}/${PN}-1.51.0-support_dots_in_python-buildid.patch"
|
||||
"${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch"
|
||||
"${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch"
|
||||
"${FILESDIR}/${PN}-1.48.0-python_linking.patch"
|
||||
"${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch"
|
||||
"${FILESDIR}/${PN}-1.55.0-context-x32.patch"
|
||||
"${FILESDIR}/${PN}-1.56.0-build-auto_index-tool.patch"
|
||||
)
|
||||
|
||||
python_bindings_needed() {
|
||||
multilib_is_native_abi && use python
|
||||
}
|
||||
|
||||
tools_needed() {
|
||||
multilib_is_native_abi && use tools
|
||||
}
|
||||
|
||||
create_user-config.jam() {
|
||||
local compiler compiler_version compiler_executable
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
compiler="darwin"
|
||||
compiler_version="$(gcc-fullversion)"
|
||||
compiler_executable="$(tc-getCXX)"
|
||||
else
|
||||
compiler="gcc"
|
||||
compiler_version="$(gcc-version)"
|
||||
compiler_executable="$(tc-getCXX)"
|
||||
fi
|
||||
local mpi_configuration python_configuration
|
||||
|
||||
if use mpi; then
|
||||
mpi_configuration="using mpi ;"
|
||||
fi
|
||||
|
||||
if python_bindings_needed; then
|
||||
# boost expects libpython$(pyver) and doesn't allow overrides
|
||||
# and the build system is so creepy that it's easier just to
|
||||
# provide a symlink (linker's going to use SONAME anyway)
|
||||
# TODO: replace it with proper override one day
|
||||
ln -f -s "$(python_get_library_path)" "${T}/lib${EPYTHON}$(get_libname)" || die
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
python_configuration="using python : ${EPYTHON#python} : : ${SYSROOT:-${EROOT}}/usr/include/${EPYTHON} : ${SYSROOT:-${EROOT}}/usr/$(get_libdir) ;"
|
||||
else
|
||||
# note: we need to provide version explicitly because of
|
||||
# a bug in the build system:
|
||||
# https://github.com/boostorg/build/pull/104
|
||||
python_configuration="using python : ${EPYTHON#python} : ${PYTHON} : $(python_get_includedir) : ${T} ;"
|
||||
fi
|
||||
fi
|
||||
|
||||
cat > "${BOOST_ROOT}/user-config.jam" << __EOF__ || die
|
||||
using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
|
||||
${mpi_configuration}
|
||||
${python_configuration}
|
||||
__EOF__
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# Bail out on unsupported build configuration, bug #456792
|
||||
if [[ -f "${EROOT}etc/site-config.jam" ]]; then
|
||||
grep -q gentoorelease "${EROOT}etc/site-config.jam" && grep -q gentoodebug "${EROOT}etc/site-config.jam" ||
|
||||
(
|
||||
eerror "You are using custom ${EROOT}etc/site-config.jam without defined gentoorelease/gentoodebug targets."
|
||||
eerror "Boost can not be built in such configuration."
|
||||
eerror "Please, either remove this file or add targets from ${EROOT}usr/share/boost-build/site-config.jam to it."
|
||||
die
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Do not try to build missing 'wave' tool, bug #522682
|
||||
# Upstream bugreport - https://svn.boost.org/trac/boost/ticket/10507
|
||||
sed -i -e 's:wave/build//wave::' tools/Jamfile.v2 || die
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
ejam() {
|
||||
local b2_opts=(
|
||||
"--user-config=${BOOST_ROOT}/user-config.jam"
|
||||
"$@"
|
||||
)
|
||||
echo b2 "${b2_opts[@]}"
|
||||
b2 "${b2_opts[@]}"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Workaround for too many parallel processes requested, bug #506064
|
||||
[ "$(makeopts_jobs)" -gt 64 ] && MAKEOPTS="${MAKEOPTS} -j64"
|
||||
|
||||
OPTIONS=(
|
||||
$(usex debug gentoodebug gentoorelease)
|
||||
"-j$(makeopts_jobs)"
|
||||
-q
|
||||
-d+2
|
||||
)
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
# We need to add the prefix, and in two cases this exceeds, so prepare
|
||||
# for the largest possible space allocation.
|
||||
append-ldflags -Wl,-headerpad_max_install_names
|
||||
elif [[ ${CHOST} == *-winnt* ]]; then
|
||||
compiler=parity
|
||||
if [[ $($(tc-getCXX) -v) == *trunk* ]]; then
|
||||
compilerVersion=trunk
|
||||
else
|
||||
compilerVersion=$($(tc-getCXX) -v | sed '1q' \
|
||||
| sed -e 's,\([a-z]*\) \([0-9]\.[0-9]\.[0-9][^ \t]*\) .*,\2,')
|
||||
fi
|
||||
compilerExecutable=$(tc-getCXX)
|
||||
fi
|
||||
|
||||
# bug 298489
|
||||
if use ppc || use ppc64; then
|
||||
[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
|
||||
fi
|
||||
|
||||
# Use C++14 globally as of 1.62
|
||||
append-cxxflags -std=c++14
|
||||
|
||||
use icu && OPTIONS+=(
|
||||
"-sICU_PATH=${EPREFIX}/usr"
|
||||
)
|
||||
use icu || OPTIONS+=(
|
||||
--disable-icu
|
||||
boost.locale.icu=off
|
||||
)
|
||||
use mpi || OPTIONS+=(
|
||||
--without-mpi
|
||||
)
|
||||
use nls || OPTIONS+=(
|
||||
--without-locale
|
||||
)
|
||||
use context || OPTIONS+=(
|
||||
--without-context
|
||||
--without-coroutine
|
||||
--without-coroutine2
|
||||
)
|
||||
use threads || OPTIONS+=(
|
||||
--without-thread
|
||||
)
|
||||
|
||||
OPTIONS+=(
|
||||
pch=off
|
||||
--boost-build="${EPREFIX}"/usr/share/boost-build
|
||||
--prefix="${ED%/}/usr"
|
||||
--layout=system
|
||||
# building with threading=single is currently not possible
|
||||
# https://svn.boost.org/trac/boost/ticket/7105
|
||||
threading=multi
|
||||
link=$(usex static-libs shared,static shared)
|
||||
)
|
||||
|
||||
[[ ${CHOST} == *-winnt* ]] && OPTIONS+=(
|
||||
-sNO_BZIP2=1
|
||||
)
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
local -x BOOST_ROOT="${BUILD_DIR}"
|
||||
PYTHON_DIRS=""
|
||||
MPI_PYTHON_MODULE=""
|
||||
|
||||
building() {
|
||||
create_user-config.jam
|
||||
|
||||
local PYTHON_OPTIONS
|
||||
if python_bindings_needed; then
|
||||
PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}"
|
||||
else
|
||||
PYTHON_OPTIONS=" --without-python"
|
||||
fi
|
||||
|
||||
ejam \
|
||||
"${OPTIONS[@]}" \
|
||||
${PYTHON_OPTIONS} \
|
||||
|| die "Building of Boost libraries failed"
|
||||
|
||||
if python_bindings_needed; then
|
||||
if [[ -z "${PYTHON_DIRS}" ]]; then
|
||||
PYTHON_DIRS="$(find bin.v2/libs -name python | sort)"
|
||||
else
|
||||
if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then
|
||||
die "Inconsistent structure of build directories"
|
||||
fi
|
||||
fi
|
||||
|
||||
local dir
|
||||
for dir in ${PYTHON_DIRS}; do
|
||||
mv ${dir} ${dir}-${EPYTHON} \
|
||||
|| die "Renaming of '${dir}' to '${dir}-${EPYTHON}' failed"
|
||||
done
|
||||
|
||||
if use mpi; then
|
||||
if [[ -z "${MPI_PYTHON_MODULE}" ]]; then
|
||||
MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)"
|
||||
if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then
|
||||
die "Multiple mpi.so files found"
|
||||
fi
|
||||
else
|
||||
if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" ]]; then
|
||||
die "Inconsistent structure of build directories"
|
||||
fi
|
||||
fi
|
||||
|
||||
mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} \
|
||||
|| die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${EPYTHON}' failed"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
if python_bindings_needed; then
|
||||
python_foreach_impl building
|
||||
else
|
||||
building
|
||||
fi
|
||||
|
||||
if tools_needed; then
|
||||
pushd tools >/dev/null || die
|
||||
|
||||
ejam \
|
||||
"${OPTIONS[@]}" \
|
||||
${PYTHON_OPTIONS} \
|
||||
|| die "Building of Boost tools failed"
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
if ! use python; then
|
||||
rm -r "${ED%/}"/usr/include/boost/python* || die
|
||||
fi
|
||||
|
||||
if ! use nls; then
|
||||
rm -r "${ED%/}"/usr/include/boost/locale || die
|
||||
fi
|
||||
|
||||
if ! use context; then
|
||||
rm -r "${ED%/}"/usr/include/boost/context || die
|
||||
rm -r "${ED%/}"/usr/include/boost/coroutine{,2} || die
|
||||
rm "${ED%/}"/usr/include/boost/asio/spawn.hpp || die
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
find libs/*/* -iname "test" -or -iname "src" -delete || die
|
||||
find doc -name Jamfile.v2 -or -name build -or -name *.manifest -delete || die
|
||||
find tools -name Jamfile.v2 -or -name src -or -name *.cpp -or -name *.hpp -delete || die
|
||||
docinto html
|
||||
dodoc *.{htm,html,png,css}
|
||||
dodoc -r doc libs more tools
|
||||
|
||||
# To avoid broken links
|
||||
dodoc LICENSE_1_0.txt
|
||||
|
||||
dosym /usr/include/boost /usr/share/doc/${PF}/html/boost
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
local -x BOOST_ROOT="${BUILD_DIR}"
|
||||
installation() {
|
||||
create_user-config.jam
|
||||
|
||||
local PYTHON_OPTIONS
|
||||
if python_bindings_needed; then
|
||||
local dir
|
||||
for dir in ${PYTHON_DIRS}; do
|
||||
cp -pr ${dir}-${EPYTHON} ${dir} \
|
||||
|| die "Copying of '${dir}-${EPYTHON}' to '${dir}' failed"
|
||||
done
|
||||
|
||||
if use mpi; then
|
||||
cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" \
|
||||
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to '${MPI_PYTHON_MODULE}' failed"
|
||||
cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so \
|
||||
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to 'stage/lib/mpi.so' failed"
|
||||
fi
|
||||
PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}"
|
||||
else
|
||||
PYTHON_OPTIONS=" --without-python"
|
||||
fi
|
||||
|
||||
ejam \
|
||||
"${OPTIONS[@]}" \
|
||||
${PYTHON_OPTIONS} \
|
||||
--includedir="${ED%/}/usr/include" \
|
||||
--libdir="${ED%/}/usr/$(get_libdir)" \
|
||||
install || die "Installation of Boost libraries failed"
|
||||
|
||||
if python_bindings_needed; then
|
||||
rm -r ${PYTHON_DIRS} || die
|
||||
|
||||
# Move mpi.so Python module to Python site-packages directory.
|
||||
# https://svn.boost.org/trac/boost/ticket/2838
|
||||
if use mpi; then
|
||||
local moddir=$(python_get_sitedir)/boost
|
||||
# moddir already includes eprefix
|
||||
mkdir -p "${D}${moddir}" || die
|
||||
mv "${ED%/}/usr/$(get_libdir)/mpi.so" "${D}${moddir}" || die
|
||||
cat << EOF > "${D}${moddir}/__init__.py" || die
|
||||
import sys
|
||||
if sys.platform.startswith('linux'):
|
||||
import DLFCN
|
||||
flags = sys.getdlopenflags()
|
||||
sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL)
|
||||
from . import mpi
|
||||
sys.setdlopenflags(flags)
|
||||
del DLFCN, flags
|
||||
else:
|
||||
from . import mpi
|
||||
del sys
|
||||
EOF
|
||||
fi
|
||||
|
||||
python_optimize
|
||||
fi
|
||||
}
|
||||
if python_bindings_needed; then
|
||||
python_foreach_impl installation
|
||||
else
|
||||
installation
|
||||
fi
|
||||
|
||||
pushd "${ED%/}/usr/$(get_libdir)" >/dev/null || die
|
||||
|
||||
local ext=$(get_libname)
|
||||
if use threads; then
|
||||
local f
|
||||
for f in *${ext}; do
|
||||
dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}}
|
||||
done
|
||||
fi
|
||||
|
||||
popd >/dev/null || die
|
||||
|
||||
if tools_needed; then
|
||||
dobin dist/bin/*
|
||||
|
||||
insinto /usr/share
|
||||
doins -r dist/share/boostbook
|
||||
fi
|
||||
|
||||
# boost's build system truely sucks for not having a destdir. Because for
|
||||
# this reason we are forced to build with a prefix that includes the
|
||||
# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
|
||||
# DESTROOT instread of the actual EPREFIX. There is no way out of here
|
||||
# but to do it the dirty way of manually setting the right install_names.
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
einfo "Working around completely broken build-system(tm)"
|
||||
local d
|
||||
for d in "${ED%/}"/usr/lib/*.dylib; do
|
||||
if [[ -f ${d} ]]; then
|
||||
# fix the "soname"
|
||||
ebegin " correcting install_name of ${d#${ED}}"
|
||||
install_name_tool -id "/${d#${D}}" "${d}"
|
||||
eend $?
|
||||
# fix references to other libs
|
||||
refs=$(otool -XL "${d}" | \
|
||||
sed -e '1d' -e 's/^\t//' | \
|
||||
grep "^libboost_" | \
|
||||
cut -f1 -d' ')
|
||||
local r
|
||||
for r in ${refs}; do
|
||||
ebegin " correcting reference to ${r}"
|
||||
install_name_tool -change \
|
||||
"${r}" \
|
||||
"${EPREFIX}/usr/lib/${r}" \
|
||||
"${d}"
|
||||
eend $?
|
||||
done
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Yai for having symlinks that are nigh-impossible to remove without
|
||||
# resorting to dirty hacks like these. Removes lingering symlinks
|
||||
# from the slotted versions.
|
||||
local symlink
|
||||
for symlink in "${EROOT%/}/usr/include/boost" "${EROOT%/}/usr/share/boostbook"; do
|
||||
if [[ -L ${symlink} ]]; then
|
||||
rm -f "${symlink}" || die
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST injeqt-1.0.0.tar.gz 63685 SHA256 ae53ac3453803fa0191e93368095029f2eeb35c01e8400d31787e7fe03afee18 SHA512 d5576e07a717085e108ff50ddc45ab26b540110e5753fd573504ed2c93538d947d1d8f2ad256f1ca9dd5d644949ce2528b66214f907229aee47bf7f6944776dc WHIRLPOOL ce17a4c28116e0b5bb4820d7bf6247925ea8e4241f52d4fc81ae8e95ecf4eb52a893e2594e4fcfd962de8c2f4b056dae68e844d6de89a41f4d945cf2373c5fcb
|
||||
DIST injeqt-1.0.1.tar.gz 63748 SHA256 81aafaf990134486331bbb5c362be2b8520a3bec86e82869125c17ec652d686d SHA512 b090c8d5c9fc6091ca55d8b2abe408f10c0c93209755d7fc548723cb5c7fc49e913d4e1360c822b74886df885e08b4d634c53082ce2d8da649e1cc79f6207dc8 WHIRLPOOL 346a81c3866adcf2b466408c8f293d8fa15bd0874b8a07e4fa13d2e03e40bc6c24fb1cd6a077cb854692de9f4f6645c9210bbbf958c8fced3fda429b3592a2a3
|
||||
|
@ -1,35 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="Dependency injection framework for Qt5"
|
||||
HOMEPAGE="https://github.com/vogel/injeqt"
|
||||
SRC_URI="https://github.com/vogel/injeqt/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-qt/qtcore-5.4.2:5
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( >=dev-qt/qttest-5.4.2:5 )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-cmake-preserve-cxxflags.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DDISABLE_EXAMPLES=ON
|
||||
$(cmake-utils_use_disable test TESTS)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="Dependency injection framework for Qt5"
|
||||
HOMEPAGE="https://github.com/vogel/injeqt"
|
||||
SRC_URI="https://github.com/vogel/injeqt/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-qt/qtcore-5.4.2:5
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( >=dev-qt/qttest-5.4.2:5 )
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DDISABLE_EXAMPLES=ON
|
||||
$(cmake-utils_use_disable test TESTS)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST libixion-0.11.1.tar.xz 366660 SHA256 c9e9f52580d618fa969fc0293f55af21a9c74bfb802e655c6bf239202f95bede SHA512 e205a5cf532e0522291f5f2a52c2e2c0cdf8d2ed094e5553943650744359d67adf629229a6ffff3c8fa90b15dde7765fee14d4f147fe51a6cdf79b2855509858 WHIRLPOOL aff1350bd1e3a5fec3f0a0cd3f51a88c873bd28469884b48d3fc316782819465f7d193e019fc753474663326b27680c1d12ce3050e6a082a75073040147dfbd8
|
||||
DIST libixion-0.12.1.tar.xz 406300 SHA256 000820ba51109ec21cbdb7ea83c1fdb0acbcfeb55b4a6a80fe02b71d45c587c2 SHA512 b3ba4c09f3f12df7fe9e6ef19d35e618d0effce2cf0866acdb23c72754ac7168c24cc979d6a49c756cf70b1e4a79e58b33ec6a05b8155b43a1682375eea9d022 WHIRLPOOL 14ae7725312894aca74a8df0a7dcfa6e9800526024d35259cfcf7a6e2cae9aa3564dfe9605ce61ce88972d1436f36e71343c2980c17253c12d603974f26e2249
|
||||
DIST libixion-0.9.0.tar.xz 351388 SHA256 2112b4304667c4c2cdb8f3d331cc4ba696ea581db7d228b5b06ea2559e7531a5 SHA512 da6ca9e79841f1f529328e39a2977d95a261ddaaf4a254bfc46de004d52d4b1e8fc0c8c1cbeb3e8ee18e9a5663b046cf1d3f232f31bdd83db75a766be654f49b WHIRLPOOL f35087fce0a0e53650b988b36ecde8378aa75d2a4b769f6046dce544b9fe89a0025c82a6ab2564b5a12c813e0726875c088d5cc37cfcad055d79d2c5563d53af
|
||||
DIST libixion-0.9.1.tar.xz 356500 SHA256 77e35c163cd27657b83626a6da26c3b90f37ba9089d00aa25f384a9ac4b4e3a1 SHA512 074318c6db01ec13f6cbdfb8d7d04aede9f20cac4c23476b570a37638b0e68170aabf977520b94dfc2dce079314109c2e70d64376f9f314890d4d60854458c03 WHIRLPOOL ed79f0ed5705f8f8c5a24603fa4386b8822b477a21896d13eaf5fbe52d0f12fbf451f68de49314d8736160f82895047ba4d387431f989683553316d523bb0ce4
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue