parent
e020ea9f5d
commit
82989de7b8
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
DIST fluentd-1.2.6.gem 434176 BLAKE2B 05fb0a29def48b673f458a19eb2662b0e447d949284af3a2aa28694e0cef8177c5a584d9f475ff71a548d7acdde504e8843a312ed0dc85e892b0f2dd59cdf8ef SHA512 9faeef818195d0014f9fffc29222d031a819ef8af323700b26290d5b394bec6815e86699ab89ba4e8d428321e10d3463c297d6c9046dbb46fdc061777206f8ae
|
||||
DIST fluentd-1.3.1.gem 437760 BLAKE2B 59afdadc2d67e30d35df2f33c169e9f2cbfd44ac6b7497b025fd9229921f91ac37ce8b6f80f37df26a03e5062ce2f5187156a70302ca11f9a7d9db9cfccebf9c SHA512 84351148809332c9a703243416004f18d0470cafc04cf63de7c52d9b6da18f1c6f2de0682ff1d5283f28013707fcfe24cbcf67aebc3be91090c4d5cca80ec2cc
|
||||
DIST fluentd-1.3.2.gem 438272 BLAKE2B c7a239928e251b84217cba4181e81f58dda42065c07c254ec5ed1012f8ebd98323cfbd671d5e9f940025d049c67b6dedd4f0feb9a079291e83f465e107e105d3 SHA512 8357ae88ed028778f6c7ae3dca051b32840bcf8cd344292e1fd3d203dae85e32d8263dea72d657010d803bb36d78d27a8441a8a7edf49439609041acac39f967
|
||||
DIST fluentd-1.3.3.gem 438784 BLAKE2B 186aa4af59707c6a68a6f82b94b233e3f52eb11745ff4ce7f942a4fb1f8516cc966e14f541a23dfdfda72ddea058e19d1b8184d0c40bf92ce4cd48e5735946a9 SHA512 b3348939d72b07d424a8d98f0d817e72d55918be9ac4ef5f456a3c44ac1ca28944b63c943bf2bb230b58793a33c1ca12304cebed15827a3f6e32f2ae3b68f0dd
|
||||
|
@ -0,0 +1,58 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
|
||||
|
||||
inherit ruby-fakegem user
|
||||
|
||||
DESCRIPTION="data collector and unified logging layer (project under CNCF)"
|
||||
HOMEPAGE="https://www.fluentd.org"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
ruby_add_rdepend "
|
||||
>=dev-ruby/msgpack-0.7.0
|
||||
>=dev-ruby/yajl-ruby-1.0
|
||||
>=dev-ruby/coolio-1.4.5
|
||||
>=dev-ruby/serverengine-2.0.4
|
||||
>=dev-ruby/http_parser_rb-0.5.1
|
||||
>=dev-ruby/sigdump-0.2.2
|
||||
>=dev-ruby/tzinfo-1.0
|
||||
>=dev-ruby/strptime-0.2.2"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${PN}
|
||||
enewuser ${PN} -1 -1 -1 ${PN}
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i \
|
||||
-e '/tzinfo-data/d' \
|
||||
-e '/dig_rb/d' \
|
||||
"${PN}".gemspec || die "'sed failed"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
all_fakegem_install
|
||||
keepdir /var/log/fluentd
|
||||
fowners fluentd:adm /var/log/fluentd
|
||||
insinto /etc/fluent
|
||||
doins fluent.conf
|
||||
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}"/${PN}.logrotate ${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
elog "A default configuration file has been installed in"
|
||||
elog "${EROOT}etc/fluent/fluent.conf. You will need to edit"
|
||||
elog "this file to match your configuration."
|
||||
fi
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST KeePass-2.40-Source.zip 5136918 BLAKE2B 7b5071cbe3bc5f20450a094a4b8969e2e25f6bba27d88ee5c2c25f2706ed3cf18e721ba53ff54c78db6ea1e167cef1108611fc8253a9d6e19eb3f9d1f3317c73 SHA512 222f7e7ef65be8b0d75baa0a6e871d5edad1b570b64f261405b843d7387ec1faeb4138afb8b31934d70eebe0add297681028cb4f3acfcbe4f518c763fe6c0145
|
||||
DIST KeePass-2.41-Source.zip 5141195 BLAKE2B 7f61efa6d73fbfd5de283567a1673f5757619ebb81f3daa3fba82c887874f2cdb15f74221bf389013fe4cf19c83f00f87de2c596d22a22f5f38b5236dab01e44 SHA512 0d9398f529e004df6a4d3e0b8e34a1324b1806bf44987e9cb2d7535eaf02192662e72c89f1e41b7da01d23b0d686fbbca7a956ef7873fd8b1948847fbf5d27a5
|
||||
|
@ -0,0 +1,113 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils gnome2-utils xdg-utils
|
||||
|
||||
MY_PN="KeePass"
|
||||
DESCRIPTION="A free, open source, light-weight and easy-to-use password manager"
|
||||
HOMEPAGE="https://keepass.info/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${PV}-Source.zip"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="aot"
|
||||
|
||||
COMMON_DEPEND="dev-lang/mono"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/unzip
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
dev-dotnet/libgdiplus[cairo]
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
PATCHES=( "${FILESDIR}/${PN}-2.36-xsl-path-detection.patch" )
|
||||
|
||||
src_prepare() {
|
||||
# KeePass looks for some XSL files in the same folder as the executable,
|
||||
# we prefer to have it in /usr/share/KeePass. Apply patch using base function.
|
||||
# This XSL file will not be upstreamed since the KeePass creator said that
|
||||
# including this patch would break the Portable USB version of KeePass
|
||||
# (which keeps/looks for xsl files in its own folder)
|
||||
default
|
||||
|
||||
# Switch into build dir so the mono prepration script works correctly
|
||||
pushd Build || die
|
||||
source PrepMonoDev.sh || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export MONO_REGISTRY_PATH=/dev/null # bug 659808
|
||||
|
||||
# Build with Release target
|
||||
xbuild /target:KeePass /property:Configuration=Release || die
|
||||
|
||||
# Run Ahead Of Time compiler on the binary
|
||||
if use aot; then
|
||||
cp Ext/KeePass.exe.config Build/KeePass/Release/ || die
|
||||
mono --aot -O=all Build/KeePass/Release/KeePass.exe || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Wrapper script to launch mono
|
||||
make_wrapper "${PN}" "mono /usr/$(get_libdir)/${PN}/KeePass.exe"
|
||||
|
||||
# Some XSL files
|
||||
insinto "/usr/share/${PN}/XSL"
|
||||
doins Ext/XSL/*
|
||||
|
||||
insinto "/usr/$(get_libdir)/${PN}"
|
||||
exeinto "/usr/$(get_libdir)/${PN}"
|
||||
|
||||
doins Ext/KeePass.exe.config
|
||||
|
||||
# Default configuration, simply says to use user-specific configuration
|
||||
doins Ext/KeePass.config.xml
|
||||
|
||||
# The actual executable
|
||||
doexe Build/KeePass/Release/KeePass.exe
|
||||
|
||||
# Copy the AOT compilation result
|
||||
if use aot; then
|
||||
doexe Build/KeePass/Release/KeePass.exe.so
|
||||
fi
|
||||
|
||||
# Prepare the icons
|
||||
newicon -s 256 Ext/Icons_04_CB/Finals/plockb.png "${PN}.png"
|
||||
newicon -s 256 -t gnome -c mimetypes Ext/Icons_04_CB/Finals/plockb.png "application-x-${PN}2.png"
|
||||
|
||||
# Create a desktop entry and associate it with the KeePass mime type
|
||||
make_desktop_entry "${PN}" "${MY_PN}" "${PN}" "System;Security" "MimeType=application/x-keepass2;\nStartupWMClass=KeePass2;"
|
||||
|
||||
# MIME descriptor for .kdbx files
|
||||
insinto /usr/share/mime/packages
|
||||
doins "${FILESDIR}/${PN}.xml"
|
||||
|
||||
# sed, because patching this really sucks
|
||||
sed -i 's/mono/mono --verify-all/g' "${D}/usr/bin/keepass" || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
|
||||
if ! has_version x11-misc/xdotool ; then
|
||||
elog "Optional dependencies:"
|
||||
elog " x11-misc/xdotool (enables autotype/autofill)"
|
||||
fi
|
||||
|
||||
elog "Some systems may experience issues with copy and paste operations."
|
||||
elog "If you encounter this, please install x11-misc/xsel."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
DIST vault-0.10.3.tar.gz 15902247 BLAKE2B f69ddbe1309800cfae756f8ca1dd0da3e92ce49a1ec70539dc30785344afb7fe39472dcb2fb5ee4f410c7b52b13b00996b08d89624ef8523adcf4f809601ad5c SHA512 baacf549f9b73d306154dad6cd6efb3fb0eca3280c885cd772dada524cd436c1d5f1f705118274aa7cea6002cd8e0b86f1dfb02c4f5787d08dc535112cb62096
|
||||
DIST vault-0.10.4.tar.gz 19207588 BLAKE2B 035e83c1d119b266817490afd4506fee5e5ceeff8a7c59188c59e28067f06e78f57e06d200026b288908f49a19ed22ebfd67e08c3c70026c7da22d05e33ec343 SHA512 7331e49c2bebbbbcebc74cfc1ce7d6984590fdd39b47f0bbf1b610cfe37b900a86b8ea63bc5d5e28ba34b68433944486979177aee6c10bf188095f5a50a4b61a
|
||||
DIST vault-0.11.0.tar.gz 24430984 BLAKE2B 0c1d40ed9f8dbc19ae7bce38308f7a55e12e8a907798022ce6b5783f2be9b9d7a9a1842683b8df411b3b754c716fd7366a0261d890e2153c64a70df6a3c6b844 SHA512 33e1e76a0e16803a8d0d6ed8ec0b6d1f8876d54ecf35a70bc4969404bd7991ef0cc5986eae958885d288bb316396e0594a5571b7a11f8b052b22b445388f03c7
|
||||
DIST vault-0.11.4.tar.gz 25456828 BLAKE2B 35ed79e8474c4fffb046b5163bfd7115ca4ffe3c3560732d9f73349a1187417a288c30985d7ac450b86f682aa7a1d5318634c1be60e5bffce04137e32f2ad13d SHA512 99e592d679d65d75d62812e2d0ae9a652342a97f4934a2ca00a9ac044cdc92b35e7108296cf1a700ed36818a504fcaf155f8f61d7b10d84933932bdab00a9f7e
|
||||
DIST vault-0.11.5.tar.gz 25459691 BLAKE2B 9f77e90b71629e1ed341d03830a0376b6731d85189dde0205148c7c8002556521538144cbf1b7bc425253cc55de6ab3d48cbcc1d270165e5804f7f632d06523b SHA512 b290523ee94199d241bbd2477ca686076f645804953181996aefe2a425bc5114db3d375fd5c832d1fa257a790947544406f50777317e854ccf2d4d4477ab6ffd
|
||||
DIST vault-1.0.1.tar.gz 25817507 BLAKE2B c4882341fbcea2051c8685dfff85739f11898d0406d12611cdda36f19d7badae69e88060d593ba03c333b151d4402b7bfc520f34c0663fe00a77998aa662f161 SHA512 b644e419faa8dc1f8a347f7b522ccafbdea9f849de9ad1ca085214d21e50bd2ec6eb868b4eb0abff65537abc4fba93c3e4ffd424afa90ca049068e6eccc99999
|
||||
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit fcaps golang-base golang-vcs-snapshot systemd user
|
||||
|
||||
EGO_PN="github.com/hashicorp/${PN}"
|
||||
DESCRIPTION="A tool for managing secrets"
|
||||
HOMEPAGE="https://vaultproject.io/"
|
||||
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SLOT="0"
|
||||
LICENSE="MPL-2.0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.10:=
|
||||
dev-go/gox"
|
||||
|
||||
FILECAPS=(
|
||||
-m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# Avoid the need to have a git checkout
|
||||
sed -e 's:^\(GIT_COMMIT=\).*:\1:' \
|
||||
-e 's:^\(GIT_DIRTY=\).*:\1:' \
|
||||
-e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \
|
||||
-i src/${EGO_PN}/scripts/build.sh || die
|
||||
sed -e "/hooks/d" -i src/${EGO_PN}/Makefile || die
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${PN}
|
||||
enewuser ${PN} -1 -1 -1 ${PN}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
mkdir bin || die
|
||||
export GOPATH=${S}
|
||||
cd src/${EGO_PN} || die
|
||||
XC_ARCH=$(go env GOARCH) \
|
||||
XC_OS=$(go env GOOS) \
|
||||
XC_OSARCH=$(go env GOOS)/$(go env GOARCH) \
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc src/${EGO_PN}/{CHANGELOG.md,CONTRIBUTING.md,README.md}
|
||||
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
|
||||
keepdir /etc/${PN}.d
|
||||
insinto /etc/${PN}.d
|
||||
doins "${FILESDIR}/"*.json.example
|
||||
|
||||
keepdir /var/log/${PN}
|
||||
fowners ${PN}:${PN} /var/log/${PN}
|
||||
|
||||
dobin bin/${PN}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit fcaps golang-base golang-vcs-snapshot systemd user
|
||||
|
||||
EGO_PN="github.com/hashicorp/${PN}"
|
||||
DESCRIPTION="A tool for managing secrets"
|
||||
HOMEPAGE="https://vaultproject.io/"
|
||||
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SLOT="0"
|
||||
LICENSE="MPL-2.0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.10:=
|
||||
dev-go/gox"
|
||||
|
||||
FILECAPS=(
|
||||
-m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# Avoid the need to have a git checkout
|
||||
sed -e 's:^\(GIT_COMMIT=\).*:\1:' \
|
||||
-e 's:^\(GIT_DIRTY=\).*:\1:' \
|
||||
-e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \
|
||||
-i src/${EGO_PN}/scripts/build.sh || die
|
||||
sed -e "/hooks/d" -i src/${EGO_PN}/Makefile || die
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${PN}
|
||||
enewuser ${PN} -1 -1 -1 ${PN}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
mkdir bin || die
|
||||
export GOPATH=${S}
|
||||
cd src/${EGO_PN} || die
|
||||
XC_ARCH=$(go env GOARCH) \
|
||||
XC_OS=$(go env GOOS) \
|
||||
XC_OSARCH=$(go env GOOS)/$(go env GOARCH) \
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc src/${EGO_PN}/{CHANGELOG.md,CONTRIBUTING.md,README.md}
|
||||
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
|
||||
keepdir /etc/${PN}.d
|
||||
insinto /etc/${PN}.d
|
||||
doins "${FILESDIR}/"*.json.example
|
||||
|
||||
keepdir /var/log/${PN}
|
||||
fowners ${PN}:${PN} /var/log/${PN}
|
||||
|
||||
dobin bin/${PN}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
Binary file not shown.
@ -0,0 +1,33 @@
|
||||
From 85c005ee1345c342f707f3c55317daf6cb050603 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
Date: Thu, 10 Jan 2019 18:18:49 +0200
|
||||
Subject: Remove erroneous abort() call
|
||||
|
||||
The call was introduced by commit ccef8581. It caused tar to abort
|
||||
on perfectly normal operations, like untarring archives containing
|
||||
./ with the -U option,
|
||||
|
||||
See http://lists.gnu.org/archive/html/bug-tar/2019-01/msg00019.html
|
||||
for details.
|
||||
|
||||
* src/extract.c (maybe_recoverable): Remove misplaced call to abort().
|
||||
---
|
||||
src/extract.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/extract.c b/src/extract.c
|
||||
index 090b866..8276f8f 100644
|
||||
--- a/src/extract.c
|
||||
+++ b/src/extract.c
|
||||
@@ -787,7 +787,7 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made)
|
||||
case UNLINK_FIRST_OLD_FILES:
|
||||
break;
|
||||
}
|
||||
- abort (); /* notreached */
|
||||
+ FALLTHROUGH;
|
||||
|
||||
case ENOENT:
|
||||
/* Attempt creating missing intermediate directories. */
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST moe-1.6.tar.lz 75108 BLAKE2B 0d675ceecea6670fe24e860d030ef43905add64334d0769d24a57fb3b0cc421e7065c6d36df7e2c154db66936ab8849f9bf42288767810aec34db4261fef23f6 SHA512 0aa717c865d41f73adccddbb158ae67b611a64f24258bcce5a68fea8175d28d6db55a0fb356fb294bfe3106c0973607b1fcc76ceee17d360e30eb80650ec043b
|
||||
DIST moe-1.10.tar.lz 84050 BLAKE2B 2e49aba27cdd603fbc9a4eb0fef5e086a527087d72f30f68beb4e3389de0ccdd85fec5bf753b3187d64cd6549ac5738c89e94c543c141f88896c580e7c33ad42 SHA512 3908d7906aa7dcb8bd4a5d340fe94b06fc91814098c20e8939906c2b0e03e1a8a3c95847b5f8111a5d9f37636a2fafa52f9105e0e8fa0ad8b16c2f9e9dede748
|
||||
DIST moe-1.9.tar.lz 82046 BLAKE2B 9144dfc4ce17bc04f3ad9aa9ec271f173df6c581705e5d922a346f94c086a97af9429478c016d7081c1fd38787055666504f04d25a8b9f5c1020dc147aaafdb0 SHA512 277700e4a796e1a7aee42de55ba4599a350a612f95a1a2eca5078d85f6f9a7db190fb5611eb2f286c98580af847a2934bf38a4bce10176db4c5cddc2d257f929
|
||||
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST diskimage-builder-2.17.0.tar.gz 362965 BLAKE2B 27668c38e480aa14354a7efcb7f3f64b9cfe9f7a61507d2e08809a757aba95f3d51754b35985089c39bc3bca1204e9e2325e19e0d4f77996e22b479e6d804ae2 SHA512 02505823ba48da235127f9bd686bbad3dec32feb2252e5c5b69723a53f6d0926a384c6be5a4055bebf9e0ded82cd9945dab6f26fa7db280722f45d27fef25bc9
|
||||
DIST diskimage-builder-2.18.0.tar.gz 357151 BLAKE2B 0516a7028f3ad3d544f575ba61bf04a79d5227008471e6ce5637b762798d3947cb111312ddfd5ca73d39e6b7e01a98ff34925bb30857581e3c135f3da17a4ecd SHA512 64b329ba9494041cd432fa9ff42e15c4b409ed57edbb3c91b791ff2b0d0fce860c32d2d020c36c23c97d9cd100aa287abd98d5e537a02c38d81cd0f9a2578e02
|
||||
DIST diskimage-builder-2.19.0.tar.gz 359520 BLAKE2B 2ddbee82cc45267faa45e7fa8b80012096676ca792eed6aee766d24fd3a5297f7f21af94c84259308fd0a48b9c913ba94575333d792b7dcd67c09d6493ff3f2b SHA512 57da6f0507a96f873bc034862dd58649d8d9ff65c7ad83f8245658fed5919b47ac29c5f8d1bb9ff2d544304955c48fa1ff3a183d90ba47bcc8d1f88c09e4014c
|
||||
|
@ -1,3 +1,4 @@
|
||||
DIST docker-proxy-0.8.0_p20180411.tar.gz 2695069 BLAKE2B 5205d5700ad116bb457dc7a57f2624f9efa46f1dbf3f5fe9215077655cddba8e1e1301bc555fb43a22cba4d74423123953a67994bf8974b114350e64be601299 SHA512 300e197313017536f91768ba675f2ab773eb1914f8e5908f4ff5b6fc8c4f0fa5ba1653cd9f8ca26e7c466f1623716aa45a2746f862e47ca9fe9136010085f600
|
||||
DIST docker-proxy-0.8.0_p20180626.tar.gz 2718698 BLAKE2B 6214ba714ba8b01214168171f465dfaee4d8ff791db7a219a3fb92fade3e4207d36d90090790c0a3059e6fb209f3cd8bb0082ca75496108ebffb7c9b0c5092a4 SHA512 21d3d1bd8aafeab51a3e0a14ada4d559b5b113a48d315e91f7d70e4fa839f5c92d4068b38c28bf6929da9c11cfc61703bafc7148f64b784208d61fa14ee4545d
|
||||
DIST docker-proxy-0.8.0_p20180907.tar.gz 2711336 BLAKE2B ad1fc76347058610e2cd1659fb89f9990cc704c3a31006b976e44f31a30e754ac86e7b4823c48461cdcba948bb8d320ae25eac1e13b26f1fde072343251a61e0 SHA512 603ad154d0987a021dae69d542fa82a53b8d25ad9b44cf16f0ef551e0b81e0174dcc73b3a8e9ba89ca1d209f0022e767d44a8350b00b9b4e252cfab698b1d5bd
|
||||
DIST docker-proxy-0.8.0_p20181207.tar.gz 2703206 BLAKE2B 46b71a4d6ac9eb0659a45c1956eb967a73b2b73c446d55de3a5b4014149f911daa03c6a914e8d79da53e01892c6592adf0df769b6b5ed3b41f3c4a3c9f979da3 SHA512 9256eedc6ed530506e4e61673a9f45397274093dd61105097d5c650796f0afebc8ad7c550d2dc3cacf94426e3872a2b764906bca46fc907a21b865314c8927d4
|
||||
|
@ -0,0 +1,36 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EGO_PN="github.com/docker/libnetwork"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit golang-vcs
|
||||
else
|
||||
EGIT_COMMIT="2cfbf9b1f98162a55829a21cc603c76072a75382"
|
||||
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
|
||||
inherit golang-vcs-snapshot
|
||||
fi
|
||||
|
||||
DESCRIPTION="Docker container networking"
|
||||
HOMEPAGE="https://github.com/docker/libnetwork"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
S=${WORKDIR}/${P}/src/${EGO_PN}
|
||||
|
||||
RDEPEND="!<app-emulation/docker-1.13.0_rc1"
|
||||
|
||||
RESTRICT="test" # needs dockerd
|
||||
|
||||
src_compile() {
|
||||
GOPATH="${WORKDIR}/${P}" go build -o "bin/docker-proxy" ./cmd/proxy || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc ROADMAP.md README.md CHANGELOG.md
|
||||
dobin bin/docker-proxy
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST docker-18.03.1.tar.gz 12758590 BLAKE2B 98213af07b945fda536e321ef5cc9e272848aab97dcadb7a6b1433b9310fa78015794b5ee4f255448251366a7811e97248b9cc90b0225c528249188768f344ab SHA512 48c4916421cd500ada1bfc2207123a29870939a15a1c7c4a0c082f61c1e3e063381e2345ee9df645dbaca49e002dbfaba70cf6fe233b39a4e1f44fb015807e10
|
||||
DIST docker-18.06.1.tar.gz 13672693 BLAKE2B 7aed2f409914471b3e0eec4f3d024bf59e6505060c1da9c4bb68f0d6efdb5286a8e9e5ee0de19b3f0165c965db27d409f72fceb3f792fc91b9b8dddc8a2b01f0 SHA512 7375452669bf6576e1f8d193cd7f421cf39a26d575351f2b4e433c7fc89384f441547417dbe8c12a12a0937c9fea3800b5c541f0ba8b58ceffe7445183ceeef1
|
||||
DIST docker-18.09.0.tar.gz 15196102 BLAKE2B 99b791da6351268ccd54424f1ec1d0b1246d7283e5bf8f41f604f0437202a0c494f7017d68c58f01782eea8539fcc189c290f494125878eb3ca368f3d8cdd57d SHA512 a6173d9e2dde33c6059b3464720207a3bc0f4d6d79af65ad10cd30b4b437134ad45fc2039cebcaa41b2dfb68a21963010d63a4051ade6a6d25fcd93c8d560c67
|
||||
DIST docker-18.09.1.tar.gz 15247155 BLAKE2B 5c9a6c0d6e383da2b99341812b0cc1d1498e46decc3b3aaa418607d5f4d725a6842a4462c06357685a32312b90978b0349aaceb69907324761589e68cfae7bca SHA512 9813d3bd41eff63a089495a976226b93d5d43544530aea0ebce78b96e6b4b38389fe3ad1117f1ca95c38727047a24211ad2c2b44217935c26ffb5496cf90407e
|
||||
|
@ -0,0 +1,299 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
EGO_PN="github.com/docker/docker-ce"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
# Docker cannot be fetched via "go get", thanks to autogenerated code
|
||||
EGIT_REPO_URI="https://${EGO_PN}.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
|
||||
inherit git-r3
|
||||
else
|
||||
DOCKER_GITCOMMIT="4c52b90"
|
||||
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64"
|
||||
[ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
|
||||
inherit golang-vcs-snapshot
|
||||
fi
|
||||
inherit bash-completion-r1 golang-base linux-info systemd udev user
|
||||
|
||||
DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
|
||||
HOMEPAGE="https://dockerproject.org"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="apparmor aufs btrfs +container-init device-mapper hardened +overlay pkcs11 seccomp"
|
||||
|
||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
|
||||
CDEPEND="
|
||||
>=dev-db/sqlite-3.7.9:3
|
||||
device-mapper? (
|
||||
>=sys-fs/lvm2-2.02.89[thin]
|
||||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.2.1 )
|
||||
apparmor? ( sys-libs/libapparmor )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${CDEPEND}
|
||||
|
||||
dev-go/go-md2man
|
||||
|
||||
btrfs? (
|
||||
>=sys-fs/btrfs-progs-3.16.1
|
||||
)
|
||||
"
|
||||
|
||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
|
||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
>=net-firewall/iptables-1.4
|
||||
sys-process/procps
|
||||
>=dev-vcs/git-1.7
|
||||
>=app-arch/xz-utils-4.9
|
||||
dev-libs/libltdl
|
||||
~app-emulation/containerd-1.2.2
|
||||
~app-emulation/runc-1.0.0_rc6_p20181203[apparmor?,seccomp?]
|
||||
~app-emulation/docker-proxy-0.8.0_p20181207
|
||||
container-init? ( >=sys-process/tini-0.18.0[static] )
|
||||
"
|
||||
|
||||
RESTRICT="installsources strip"
|
||||
|
||||
S="${WORKDIR}/${P}/src/${EGO_PN}"
|
||||
|
||||
# see "contrib/check-config.sh" from upstream's sources
|
||||
CONFIG_CHECK="
|
||||
~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
|
||||
~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
|
||||
~KEYS
|
||||
~VETH ~BRIDGE ~BRIDGE_NETFILTER
|
||||
~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
|
||||
~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS
|
||||
~IP_NF_NAT ~NF_NAT ~NF_NAT_NEEDED
|
||||
~POSIX_MQUEUE
|
||||
|
||||
~USER_NS
|
||||
~SECCOMP
|
||||
~CGROUP_PIDS
|
||||
~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
|
||||
|
||||
~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED
|
||||
~CGROUP_PERF
|
||||
~CGROUP_HUGETLB
|
||||
~NET_CLS_CGROUP
|
||||
~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
|
||||
~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR
|
||||
|
||||
~VXLAN
|
||||
~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER
|
||||
~IPVLAN
|
||||
~MACVLAN ~DUMMY
|
||||
"
|
||||
|
||||
ERROR_KEYS="CONFIG_KEYS: is mandatory"
|
||||
ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
|
||||
ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
|
||||
|
||||
ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
|
||||
ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
|
||||
ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
|
||||
ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
|
||||
ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
|
||||
ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
|
||||
|
||||
pkg_setup() {
|
||||
if kernel_is lt 3 10; then
|
||||
ewarn ""
|
||||
ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
|
||||
ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies"
|
||||
fi
|
||||
|
||||
if kernel_is le 3 18; then
|
||||
CONFIG_CHECK+="
|
||||
~RESOURCE_COUNTERS
|
||||
"
|
||||
fi
|
||||
|
||||
if kernel_is le 3 13; then
|
||||
CONFIG_CHECK+="
|
||||
~NETPRIO_CGROUP
|
||||
"
|
||||
else
|
||||
CONFIG_CHECK+="
|
||||
~CGROUP_NET_PRIO
|
||||
"
|
||||
fi
|
||||
|
||||
if kernel_is lt 4 5; then
|
||||
CONFIG_CHECK+="
|
||||
~MEMCG_KMEM
|
||||
"
|
||||
ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
|
||||
fi
|
||||
|
||||
if kernel_is lt 4 7; then
|
||||
CONFIG_CHECK+="
|
||||
~DEVPTS_MULTIPLE_INSTANCES
|
||||
"
|
||||
fi
|
||||
|
||||
if use aufs; then
|
||||
CONFIG_CHECK+="
|
||||
~AUFS_FS
|
||||
~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
|
||||
"
|
||||
ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
|
||||
fi
|
||||
|
||||
if use btrfs; then
|
||||
CONFIG_CHECK+="
|
||||
~BTRFS_FS
|
||||
~BTRFS_FS_POSIX_ACL
|
||||
"
|
||||
fi
|
||||
|
||||
if use device-mapper; then
|
||||
CONFIG_CHECK+="
|
||||
~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
|
||||
"
|
||||
fi
|
||||
|
||||
if use overlay; then
|
||||
CONFIG_CHECK+="
|
||||
~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
|
||||
"
|
||||
fi
|
||||
|
||||
linux-info_pkg_setup
|
||||
|
||||
# create docker group for the code checking for it in /etc/group
|
||||
enewgroup docker
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export GOPATH="${WORKDIR}/${P}"
|
||||
|
||||
# setup CFLAGS and LDFLAGS for separate build target
|
||||
# see https://github.com/tianon/docker-overlay/pull/10
|
||||
export CGO_CFLAGS="-I${ROOT}/usr/include"
|
||||
export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
|
||||
|
||||
# if we're building from a tarball, we need the GITCOMMIT value
|
||||
[ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
|
||||
|
||||
# fake golang layout
|
||||
ln -s docker-ce/components/engine ../docker || die
|
||||
ln -s docker-ce/components/cli ../cli || die
|
||||
|
||||
# let's set up some optional features :)
|
||||
export DOCKER_BUILDTAGS=''
|
||||
for gd in aufs btrfs device-mapper overlay; do
|
||||
if ! use $gd; then
|
||||
DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
|
||||
fi
|
||||
done
|
||||
|
||||
for tag in apparmor pkcs11 seccomp; do
|
||||
if use $tag; then
|
||||
DOCKER_BUILDTAGS+=" $tag"
|
||||
fi
|
||||
done
|
||||
|
||||
pushd components/engine || die
|
||||
|
||||
if use hardened; then
|
||||
sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
|
||||
grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
|
||||
sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
|
||||
-i hack/make/dynbinary-daemon || die
|
||||
grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
|
||||
fi
|
||||
|
||||
# build daemon
|
||||
VERSION="$(cat ../../VERSION)" \
|
||||
./hack/make.sh dynbinary || die 'dynbinary failed'
|
||||
|
||||
popd || die # components/engine
|
||||
|
||||
pushd components/cli || die
|
||||
|
||||
# build cli
|
||||
emake \
|
||||
LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
|
||||
VERSION="$(cat ../../VERSION)" \
|
||||
GITCOMMIT="${DOCKER_GITCOMMIT}" \
|
||||
DISABLE_WARN_OUTSIDE_CONTAINER=1 \
|
||||
dynbinary || die
|
||||
|
||||
# build man pages
|
||||
go build -o gen-manpages github.com/docker/cli/man || die
|
||||
./gen-manpages --root . --target ./man/man1 || die
|
||||
./man/md2man-all.sh -q || die
|
||||
rm gen-manpages || die
|
||||
# see "components/cli/scripts/docs/generate-man.sh" (which also does "go get" for go-md2man)
|
||||
|
||||
popd || die # components/cli
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosym containerd /usr/bin/docker-containerd
|
||||
dosym containerd-shim /usr/bin/docker-containerd-shim
|
||||
dosym runc /usr/bin/docker-runc
|
||||
use container-init && dosym tini /usr/bin/docker-init
|
||||
|
||||
pushd components/engine || die
|
||||
newbin "$(readlink -f bundles/latest/dynbinary-daemon/dockerd)" dockerd
|
||||
|
||||
newinitd contrib/init/openrc/docker.initd docker
|
||||
newconfd contrib/init/openrc/docker.confd docker
|
||||
|
||||
systemd_dounit contrib/init/systemd/docker.{service,socket}
|
||||
|
||||
udev_dorules contrib/udev/*.rules
|
||||
|
||||
dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
|
||||
dodoc -r docs/*
|
||||
|
||||
insinto /usr/share/vim/vimfiles
|
||||
doins -r contrib/syntax/vim/ftdetect
|
||||
doins -r contrib/syntax/vim/syntax
|
||||
|
||||
# note: intentionally not using "doins" so that we preserve +x bits
|
||||
dodir /usr/share/${PN}/contrib
|
||||
cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
|
||||
popd || die # components/engine
|
||||
|
||||
pushd components/cli || die
|
||||
|
||||
newbin build/docker-* docker
|
||||
|
||||
doman man/man*/*
|
||||
|
||||
dobashcomp contrib/completion/bash/*
|
||||
insinto /usr/share/fish/vendor_completions.d/
|
||||
doins contrib/completion/fish/docker.fish
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins contrib/completion/zsh/_*
|
||||
popd || die # components/cli
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
udev_reload
|
||||
|
||||
elog
|
||||
elog "To use Docker, the Docker daemon must be running as root. To automatically"
|
||||
elog "start the Docker daemon at boot, add Docker to the default runlevel:"
|
||||
elog " rc-update add docker default"
|
||||
elog "Similarly for systemd:"
|
||||
elog " systemctl enable docker.service"
|
||||
elog
|
||||
elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
|
||||
elog " usermod -aG docker youruser"
|
||||
elog
|
||||
|
||||
elog " Devicemapper storage driver has been deprecated"
|
||||
elog " It will be removed in a future release"
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST runc-1.0.0_rc5.tar.gz 1183902 BLAKE2B 46d0ffd9aa79a6f74b3194fa9e1932390115a43c903ae553acb7749d6be41220874a1ff9bae9706b5fecb9495dd6686c38ee1e9baf6118a14990f142baf6f64d SHA512 714230887ff9706c29b0656c5cdb253698bde6252a23e7f48aa690747fb57abd7884c2da1c4d0e314f9f301c5962417351557d15d986e45fcc336e98069aeac6
|
||||
DIST runc-1.0.0_rc5_p20180509.tar.gz 1185576 BLAKE2B b56f9c185c061f51a1fd81c19d378b06c71d06c6eddcbc1c946b234814eb469ea4af37bf42ef3889e4d37bc430e69d0a563281b13055f855f1bc15935531fe28 SHA512 9a55bdb8e39830f46cceff48970b7688139927552e3d268b9ef4a6e640ffc3d95164b99c5b05d07d295bedc2ea22daf6062fd520df1548d78b1d481fd928f1e3
|
||||
DIST runc-1.0.0_rc6.tar.gz 1202212 BLAKE2B 2795b6e88a9587fac61a50bfea52a9df8524eb87aae66129d7ea83e8c3ca586efc60a46d24af857f7ba50f8e4d7021cbd2845d322a8c0ad08be3e0f19d80ba3b SHA512 2f7ed5e835f000d9810a116a27300336f424ac2c370dd1c7d158e26a4997d1e8398612387be27cc22cc25fdd52cc4cff7963ef88ce9c41d337321b75d9be2334
|
||||
DIST runc-1.0.0_rc6_p20181203.tar.gz 1202869 BLAKE2B 5b5808fc65f3725e5cc22794c5ff6c5eba6016110358b0f60dd3378df2e5b64afb5631e5652f45e9721838dd02745b8c5a88abfcd244de202196ac16bfccd5a7 SHA512 ec3d3fec773f2f9df714b0813efb110e21e328634e0b4ae77f323a892d0327aea5d4b6f9ae2a549aa06fda5b27431f4514fd663c7033dc170ca1a03627931f9d
|
||||
|
@ -0,0 +1,61 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EGO_PN="github.com/opencontainers/${PN}"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit golang-build golang-vcs
|
||||
else
|
||||
MY_PV="${PV/_/-}"
|
||||
RUNC_COMMIT="96ec2177ae841256168fcf76954f7177af9446eb" # Change this when you update the ebuild
|
||||
SRC_URI="https://${EGO_PN}/archive/${RUNC_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
|
||||
inherit golang-build golang-vcs-snapshot
|
||||
fi
|
||||
|
||||
DESCRIPTION="runc container cli tools"
|
||||
HOMEPAGE="http://runc.io"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="+ambient apparmor hardened +kmem +seccomp"
|
||||
|
||||
RDEPEND="
|
||||
apparmor? ( sys-libs/libapparmor )
|
||||
seccomp? ( sys-libs/libseccomp )
|
||||
!app-emulation/docker-runc
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "/^GIT_BRANCH/d"\
|
||||
-e "/^GIT_BRANCH_CLEAN/d"\
|
||||
-e "/^COMMIT_NO/d"\
|
||||
-e "s/COMMIT :=.*/COMMIT := ${RUNC_COMMIT}/"\
|
||||
src/${EGO_PN}/Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Taken from app-emulation/docker-1.7.0-r1
|
||||
export CGO_CFLAGS="-I${ROOT}/usr/include"
|
||||
export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')
|
||||
-L${ROOT}/usr/$(get_libdir)"
|
||||
|
||||
# build up optional flags
|
||||
local options=(
|
||||
$(usex ambient 'ambient' '')
|
||||
$(usex apparmor 'apparmor' '')
|
||||
$(usex seccomp 'seccomp' '')
|
||||
$(usex kmem '' 'nokmem')
|
||||
)
|
||||
|
||||
GOPATH="${S}" emake BUILDTAGS="${options[*]}" -C src/${EGO_PN}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
pushd src/${EGO_PN} || die
|
||||
dobin runc
|
||||
dodoc README.md PRINCIPLES.md
|
||||
popd || die
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EGO_PN=github.com/containers/skopeo
|
||||
COMMIT=e96a9b0
|
||||
inherit golang-vcs-snapshot bash-completion-r1
|
||||
|
||||
DESCRIPTION="Command line utility foroperations on container images and image repositories"
|
||||
HOMEPAGE="https://github.com/containers/skopeo"
|
||||
SRC_URI="https://github.com/containers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
COMMON_DEPEND=">=app-crypt/gpgme-1.5.5:=
|
||||
>=dev-libs/libassuan-2.4.3
|
||||
>=sys-fs/btrfs-progs-4.0.1
|
||||
>=sys-fs/lvm2-2.02.145"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
dev-go/go-md2man"
|
||||
RDEPEND="${COMMON_DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${P}/src/${EGO_PN}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
src_compile() {
|
||||
local BUILDTAGS="containers_image_ostree_stub"
|
||||
set -- env GOPATH="${WORKDIR}/${P}" \
|
||||
go build -ldflags "-X main.gitCommit=${COMMIT}" \
|
||||
-gcflags "${GOGCFLAGS}" -tags "${BUILDTAGS}" \
|
||||
-o skopeo ./cmd/skopeo
|
||||
echo "$@"
|
||||
"$@" || die
|
||||
cd docs || die
|
||||
for f in *.1.md; do
|
||||
go-md2man -in ${f} -out ${f%%.md} || die
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin skopeo
|
||||
doman docs/*.1
|
||||
dobashcomp completions/bash/skopeo
|
||||
insinto /etc/containers
|
||||
newins default-policy.json policy.json
|
||||
insinto /etc/containers/registries.d
|
||||
doins default.yaml
|
||||
keepdir /var/lib/atomic/sigstore
|
||||
einstalldocs
|
||||
}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST process-exporter-0.4.0.tar.gz 378006 BLAKE2B 053379e8e0cb95f099cebf53289c48c39d6c8ef22c8b0dcf0bd128453e601da98be9205bb5c7cda8a05d5f50addabbcb46f6ece44926da17c1bd8616e452783a SHA512 88f6f0e07bb7f3ea6c593ba359c09ace47eb0830ff0759b1f4dd64219a6c9069dc2891a328a90bdef13ea02efc576fb71de7ff095788b4dd45c2683c90904363
|
@ -0,0 +1,8 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="Process Exporter for Prometheus"
|
||||
command=/usr/bin/process-exporter
|
||||
command_args="--config.path /etc/process-exporter/all.yaml
|
||||
--web.listen-address=:9256 ${COMMAND_ARGS}"
|
||||
command_background=yes
|
||||
pidfile=/var/run/process-exporter.pid
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>amd64@gentoo.org</email>
|
||||
<name>AMD64 Project</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>williamh@gentoo.org</email>
|
||||
<name>William Hubbs</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,32 @@
|
||||
# Copyright 2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EGO_PN=github.com/ncabatoff/process-exporter
|
||||
|
||||
inherit golang-build golang-vcs-snapshot systemd
|
||||
|
||||
DESCRIPTION="Process exporter for prometheus"
|
||||
HOMEPAGE="https://github.com/ncabatoff/process-exporter"
|
||||
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
src_compile() {
|
||||
pushd "src/${EGO_PN}" || die
|
||||
GOPATH="${S}" emake build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
pushd "src/${EGO_PN}" || die
|
||||
dobin ${PN}
|
||||
dodoc *.md
|
||||
insinto /etc/${PN}
|
||||
doins packaging/conf/all.yaml
|
||||
systemd_dounit packaging/${PN}.service
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
}
|
Binary file not shown.
@ -0,0 +1,92 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit rpm
|
||||
|
||||
BASE_PV=$(ver_cut 1-3)
|
||||
MY_PV="${PV/_alpha/.alpha}"
|
||||
MY_PV="${MY_PV/_beta/.beta}"
|
||||
[[ ${PV} == *alpha* || ${PV} == *beta* ]] && PN_DEV="Dev"
|
||||
|
||||
DESCRIPTION="Translations for the Libreoffice suite"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
BASE_SRC_URI_TESTING="https://download.documentfoundation.org/${PN/-l10n/}/testing/${BASE_PV}/rpm"
|
||||
BASE_SRC_URI_STABLE="https://download.documentfoundation.org/${PN/-l10n/}/stable/${BASE_PV}/rpm"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
#KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~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${PN_DEV}_${BASE_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice${PN_DEV}_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${MY_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${PN_DEV}_${BASE_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice${PN_DEV}_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${MY_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_${MY_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_${MY_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/}$(ver_cut 1-2)/
|
||||
# Condition required for people who do not install anything e.g. 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 l10n for some weird reason
|
||||
rm -rf "${ED}"/usr/$(get_libdir)/${PN/-l10n/}/share/extensions/ || \
|
||||
die "Failed to remove extensions"
|
||||
}
|
@ -0,0 +1,581 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
|
||||
PYTHON_REQ_USE="threads(+),xml"
|
||||
|
||||
MY_PV="${PV/_alpha/.alpha}"
|
||||
MY_PV="${MY_PV/_beta/.beta}"
|
||||
# experimental ; release ; old
|
||||
# Usually the tarballs are moved a lot so this should make everyone happy.
|
||||
DEV_URI="
|
||||
https://dev-builds.libreoffice.org/pre-releases/src
|
||||
https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
|
||||
https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
|
||||
"
|
||||
ADDONS_URI="https://dev-www.libreoffice.org/src/"
|
||||
|
||||
BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
|
||||
# PATCHSET="${P}-patchset-01.tar.xz"
|
||||
|
||||
[[ ${MY_PV} == *9999* ]] && inherit git-r3
|
||||
inherit autotools bash-completion-r1 check-reqs eapi7-ver flag-o-matic gnome2-utils java-pkg-opt-2 multiprocessing pax-utils python-single-r1 qmake-utils toolchain-funcs xdg-utils
|
||||
|
||||
DESCRIPTION="A full office productivity suite"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
|
||||
[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
|
||||
|
||||
# Split modules following git/tarballs; Core MUST be first!
|
||||
# Help is used for the image generator
|
||||
# Only release has the tarballs
|
||||
if [[ ${MY_PV} != *9999* ]]; then
|
||||
for i in ${DEV_URI}; do
|
||||
SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
|
||||
SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz"
|
||||
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=(
|
||||
"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="accessibility bluetooth +branding coinmp +cups dbus debug eds firebird
|
||||
googledrive gstreamer +gtk gtk2 kde mysql odk pdfimport postgres test vlc
|
||||
$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
bluetooth? ( dbus )
|
||||
libreoffice_extensions_nlpsolver? ( java )
|
||||
libreoffice_extensions_scripting-beanshell? ( java )
|
||||
libreoffice_extensions_scripting-javascript? ( java )
|
||||
libreoffice_extensions_wiki-publisher? ( java )
|
||||
"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
[[ ${MY_PV} == *9999* ]] || \
|
||||
KEYWORDS=""
|
||||
# KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
app-crypt/gpgme[cxx]
|
||||
app-text/hunspell:=
|
||||
>=app-text/libabw-0.1.0
|
||||
>=app-text/libebook-0.1
|
||||
app-text/libepubgen
|
||||
>=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/libnumbertext
|
||||
>=app-text/libodfgen-0.1.0
|
||||
app-text/libqxp
|
||||
app-text/libstaroffice
|
||||
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:=[nls]
|
||||
dev-libs/expat
|
||||
dev-libs/hyphen
|
||||
dev-libs/icu:=
|
||||
dev-libs/libassuan
|
||||
dev-libs/libgpg-error
|
||||
>=dev-libs/liborcus-0.14.0
|
||||
dev-libs/librevenge
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
>=dev-libs/redland-1.0.16
|
||||
>=dev-libs/xmlsec-1.2.24[nss]
|
||||
media-gfx/fontforge
|
||||
media-gfx/graphite2
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype:2
|
||||
>=media-libs/harfbuzz-0.9.42:=[graphite,icu]
|
||||
media-libs/lcms:2
|
||||
>=media-libs/libcdr-0.1.0
|
||||
>=media-libs/libepoxy-1.3.1[X]
|
||||
>=media-libs/libfreehand-0.1.0
|
||||
media-libs/libpagemaker
|
||||
>=media-libs/libpng-1.4:0=
|
||||
>=media-libs/libvisio-0.1.0
|
||||
media-libs/libzmf
|
||||
net-libs/neon
|
||||
net-misc/curl
|
||||
net-nds/openldap
|
||||
sci-mathematics/lpsolve
|
||||
sys-libs/zlib
|
||||
virtual/glu
|
||||
virtual/jpeg:0
|
||||
virtual/opengl
|
||||
x11-libs/cairo[X]
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
accessibility? ( dev-python/lxml[${PYTHON_USEDEP}] )
|
||||
bluetooth? (
|
||||
dev-libs/glib:2
|
||||
net-wireless/bluez
|
||||
)
|
||||
coinmp? ( sci-libs/coinor-mp )
|
||||
cups? ( net-print/cups )
|
||||
dbus? ( sys-apps/dbus )
|
||||
eds? (
|
||||
dev-libs/glib:2
|
||||
gnome-base/dconf
|
||||
gnome-extra/evolution-data-server
|
||||
)
|
||||
firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
|
||||
gstreamer? (
|
||||
media-libs/gstreamer:1.0
|
||||
media-libs/gst-plugins-base:1.0
|
||||
)
|
||||
gtk? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
gnome-base/dconf
|
||||
media-libs/mesa[egl]
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/pango
|
||||
)
|
||||
gtk2? (
|
||||
x11-libs/gdk-pixbuf
|
||||
>=x11-libs/gtk+-2.24:2
|
||||
x11-libs/pango
|
||||
)
|
||||
kde? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtx11extras:5
|
||||
dev-qt/qtwidgets:5
|
||||
kde-frameworks/kconfig:5
|
||||
kde-frameworks/kcoreaddons:5
|
||||
kde-frameworks/ki18n:5
|
||||
kde-frameworks/kio:5
|
||||
kde-frameworks/kwindowsystem:5
|
||||
)
|
||||
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] )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!app-office/libreoffice-bin
|
||||
!app-office/libreoffice-bin-debug
|
||||
!app-office/openoffice
|
||||
media-fonts/liberation-fonts
|
||||
|| ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
|
||||
java? ( >=virtual/jre-1.6 )
|
||||
kde? ( kde-frameworks/breeze-icons:* )
|
||||
vlc? ( media-video/vlc )
|
||||
"
|
||||
|
||||
if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
|
||||
PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 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
|
||||
# tests apparently also need google-carlito-fonts (not packaged)
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=dev-libs/libatomic_ops-7.2d
|
||||
dev-perl/Archive-Zip
|
||||
>=dev-util/cppunit-1.14.0
|
||||
>=dev-util/gperf-3
|
||||
dev-util/intltool
|
||||
>=dev-util/mdds-1.4.1:1=
|
||||
media-libs/glm
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
sys-devel/gettext
|
||||
sys-devel/ucpp
|
||||
virtual/pkgconfig
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libXt
|
||||
x11-libs/libXtst
|
||||
java? (
|
||||
dev-java/ant-core
|
||||
>=virtual/jdk-1.6
|
||||
)
|
||||
odk? ( >=app-doc/doxygen-1.8.4 )
|
||||
test? (
|
||||
app-crypt/gnupg
|
||||
dev-util/cppunit
|
||||
media-fonts/dejavu
|
||||
media-fonts/liberation-fonts
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# "${WORKDIR}"/${PATCHSET/.tar.xz/}
|
||||
|
||||
# not upstreamable stuff
|
||||
"${FILESDIR}/${PN}-5.4-system-pyuno.patch"
|
||||
"${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
|
||||
"${FILESDIR}/${PN}-6.1-nomancompress.patch"
|
||||
|
||||
# master branch
|
||||
"${FILESDIR}"/${PN}-6.2.0.1-poppler-0.71-{1,2}.patch
|
||||
"${FILESDIR}"/${PN}-6.2.0.1-poppler-0.72.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
_check_reqs() {
|
||||
CHECKREQS_MEMORY="512M"
|
||||
if is-flagq "-g*" && ! is-flagq "-g*0" ; then
|
||||
CHECKREQS_DISK_BUILD="22G"
|
||||
else
|
||||
CHECKREQS_DISK_BUILD="6G"
|
||||
fi
|
||||
check-reqs_$1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
use java || \
|
||||
ewarn "If you plan to use Base application you should enable java or you will get various crashes."
|
||||
|
||||
if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
|
||||
ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
|
||||
ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
|
||||
ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
|
||||
fi
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
xdg_environment_reset
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if [[ ${MY_PV} = *9999* ]]; then
|
||||
local base_uri branch mypv
|
||||
base_uri="https://anongit.freedesktop.org/git"
|
||||
branch="master"
|
||||
mypv=${MY_PV/.9999}
|
||||
[[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
|
||||
git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
|
||||
git-r3_checkout "${base_uri}/${PN}/core"
|
||||
LOCOREGIT_VERSION=${EGIT_VERSION}
|
||||
|
||||
git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
|
||||
git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# sandbox violations on many systems, we don't need it. Bug #646406
|
||||
sed -i \
|
||||
-e "/KF5_CONFIG/s/kf5-config/no/" \
|
||||
configure.ac || die "Failed to disable kf5-config"
|
||||
|
||||
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
|
||||
|
||||
sed -i \
|
||||
-e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
|
||||
-e "s,\$INSTALLDIRNAME.sh,${PN}," \
|
||||
bin/distro-install-desktop-integration || die
|
||||
|
||||
if use branding; then
|
||||
# hack...
|
||||
mv -v "${WORKDIR}/branding-intro.png" "icon-themes/colibre/brand/intro.png" || die
|
||||
fi
|
||||
|
||||
# Don't list pdfimport support in desktop when built with none, bug # 605464
|
||||
if ! use pdfimport; then
|
||||
sed -i \
|
||||
-e ":MimeType: s:application/pdf;::" \
|
||||
-e ":Keywords: s:pdf;::" \
|
||||
sysui/desktop/menus/draw.desktop || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Set up Google API keys, see https://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 kde; then
|
||||
export QT_SELECT=5 # bug 639620 needs proper fix though
|
||||
export QT5DIR="$(qt5_get_bindir)/../"
|
||||
export MOC5="$(qt5_get_bindir)/moc"
|
||||
fi
|
||||
|
||||
local gentoo_buildid="Gentoo official package"
|
||||
if [[ -n ${LOCOREGIT_VERSION} ]]; then
|
||||
gentoo_buildid+=" (from git: ${LOCOREGIT_VERSION})"
|
||||
fi
|
||||
|
||||
# system headers/libs/...: enforce using system packages
|
||||
# --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
|
||||
# --enable-cairo: ensure that cairo is always required
|
||||
# --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
|
||||
# --disable-pdfium: not yet packaged
|
||||
local myeconfargs=(
|
||||
--with-system-dicts
|
||||
--with-system-epoxy
|
||||
--with-system-headers
|
||||
--with-system-jars
|
||||
--with-system-libs
|
||||
--enable-build-opensymbol
|
||||
--enable-cairo-canvas
|
||||
--enable-largefile
|
||||
--enable-mergelibs
|
||||
--enable-neon
|
||||
--enable-python=system
|
||||
--enable-randr
|
||||
--enable-release-build
|
||||
--disable-breakpad
|
||||
--disable-ccache
|
||||
--disable-dependency-tracking
|
||||
--disable-epm
|
||||
--disable-fetch-external
|
||||
--disable-gstreamer-0-10
|
||||
--disable-online-update
|
||||
--disable-openssl
|
||||
--disable-pdfium
|
||||
--disable-report-builder
|
||||
--with-build-version="${gentoo_buildid}"
|
||||
--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-tls=nss
|
||||
--with-vendor="Gentoo Foundation"
|
||||
--with-x
|
||||
--without-fonts
|
||||
--without-myspell-dicts
|
||||
--without-help
|
||||
--with-helppack-integration
|
||||
--with-system-gpgmepp
|
||||
--without-system-sane
|
||||
$(use_enable bluetooth sdremote-bluetooth)
|
||||
$(use_enable coinmp)
|
||||
$(use_enable cups)
|
||||
$(use_enable dbus)
|
||||
$(use_enable debug)
|
||||
$(use_enable eds evolution2)
|
||||
$(use_enable firebird firebird-sdbc)
|
||||
$(use_enable gstreamer gstreamer-1-0)
|
||||
$(use_enable gtk gtk3)
|
||||
$(use_enable gtk2 gtk)
|
||||
$(use_enable kde kde5)
|
||||
$(use_enable kde qt5)
|
||||
$(use_enable mysql bundle-mariadb)
|
||||
$(use_enable odk)
|
||||
$(use_enable pdfimport)
|
||||
$(use_enable postgres postgresql-sdbc)
|
||||
$(use_enable vlc)
|
||||
$(use_with accessibility lxml)
|
||||
$(use_with coinmp system-coinmp)
|
||||
$(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 odk doxygen)
|
||||
)
|
||||
|
||||
if use gtk && use kde; then
|
||||
myeconfargs+=( --enable-gtk3-kde5 )
|
||||
fi
|
||||
|
||||
if use eds || use gtk; then
|
||||
myeconfargs+=( --enable-dconf --enable-gio )
|
||||
else
|
||||
myeconfargs+=( --disable-dconf --disable-gio )
|
||||
fi
|
||||
|
||||
# libreoffice extensions handling
|
||||
for lo_xt in ${LO_EXTS}; do
|
||||
if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
|
||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
|
||||
else
|
||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
|
||||
fi
|
||||
done
|
||||
|
||||
if use java; then
|
||||
# hsqldb: system one is too new
|
||||
myeconfargs+=(
|
||||
--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 && \
|
||||
myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
|
||||
|
||||
use libreoffice_extensions_scripting-javascript && \
|
||||
myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) )
|
||||
fi
|
||||
|
||||
is-flagq "-flto*" && myeconfargs+=( --enable-lto )
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
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=helpcontent2/source/media/helpimg > \"${path}/helpimg.ilst\""
|
||||
perl "${S}/helpcontent2/helpers/create_ilst.pl" \
|
||||
-dir=helpcontent2/source/media/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
|
||||
|
||||
# bug 593514
|
||||
if use gtk; then
|
||||
dosym libreoffice/program/liblibreofficekitgtk.so \
|
||||
/usr/$(get_libdir)/liblibreofficekitgtk.so
|
||||
fi
|
||||
|
||||
# bash completion aliases
|
||||
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
|
||||
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST scribus-1.5.4-poppler-0.64.0.patch.tar.xz 3020 BLAKE2B 3388efe6498545ffef6604a41b9e697a0cb6cd053c4893f9d64349bb2251400aca7a4f7dd193eb94cf69ca3f4ae1a3ba3ed106127c4fa680f396940d8056e669 SHA512 4577b4b737948a2b41dc0cec90ec95ba260959343e4953929696ceab518a2723a28a891b189caf79435e7fc8f8fc0a1012e7079e890d10549cb2ba426d15b568
|
||||
DIST scribus-1.5.4.tar.xz 72832248 BLAKE2B 64797e865ce44fb01f1e29823e3cb46b2b8f1501e8d07e8b265e93a37961582ec4118d0f32d460bc044e32cf7fa6069732f6b9ce60e4dc4b0b42f914b280e637 SHA512 7875ea5f3db5fb116856cf4cf56b4cce2d0b00d9c4820969f52b89e9bf2b36f96eb9e15b368d392be74d4c6d32e971fc28f6ecbf6661fce5e3b9cb61c4d02403
|
||||
DIST scribus-1.5.5_pre20181227.tar.gz 84926534 BLAKE2B 1fa392a8a196aac028ad4f1b913f31c5655a191d5ff3db26f16b4b181885bb1035ca95d11b100ad1b6cc7aea0ea21677a211c83dbd94bfe730a94ed4feaaf6bc SHA512 53a9494dca4520ec89b4b4487c09683da00876088ed2750fd80bca6cbc96536c0bcfb8c96d671d9ca0ed0b74cbd8f75382298e3d20285d52cec52951807f4797
|
||||
|
@ -0,0 +1,240 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="tk?"
|
||||
CMAKE_MAKEFILE_GENERATOR=ninja
|
||||
COMMIT=d857c1a3430acf207cdde2512db6822c45e98732
|
||||
inherit cmake-utils desktop flag-o-matic gnome2-utils python-single-r1 xdg-utils
|
||||
|
||||
DESCRIPTION="Desktop publishing (DTP) and layout program"
|
||||
HOMEPAGE="https://www.scribus.net/"
|
||||
SRC_URI="https://github.com/${PN}project/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts templates tk"
|
||||
|
||||
#a=$((ls resources/translations/scribus.*ts | sed -e 's:\.: :g' | awk '{print $2}'; ls resources/loremipsum/*xml | sed -e 's:\.: :g' -e 's:loremipsum\/: :g'| awk '{print $2}'; ls resources/dicts/hyph*dic | sed -e 's:\.: :g' -e 's:hyph_: :g' | awk '{print $2}'; ls resources/dicts/README_*txt | sed -e 's:_hyph::g' -e 's:\.: :g' -e 's:README_: :g' | awk '{print $2}') | sort | uniq); echo $a
|
||||
# Keep this sorted, otherwise eliminating of duplicates below won't work
|
||||
IUSE_L10N=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de_1901 de_CH de_DE el en_AU en_GB en_US eo es es_ES et eu fa_IR fi fi_FI fr gl he he_IL hr hu hu_HU ia id id_ID is is_IS it ja kab kn_IN ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU_0 sa sk sk_SK sl sl_SI so sq sr sv sv_SE te th_TH tr uk uk_UA zh_CN zh_TW"
|
||||
|
||||
map_lang() {
|
||||
local lang=${1/_/-}
|
||||
case $1 in
|
||||
# Retain the following, which have a specific subtag
|
||||
de_*|en_*|pt_*|zh_*) ;;
|
||||
# Consider all other xx_XX as duplicates of the generic xx tag
|
||||
*_*) lang=${1%%_*} ;;
|
||||
esac
|
||||
echo ${lang}
|
||||
}
|
||||
|
||||
prev_l=
|
||||
for l in ${IUSE_L10N}; do
|
||||
l=$(map_lang ${l})
|
||||
[[ ${l} != "${prev_l}" ]] && IUSE+=" l10n_${l}"
|
||||
prev_l=${l}
|
||||
done
|
||||
unset l prev_l
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
tk? ( scripts )"
|
||||
|
||||
# osg
|
||||
# couple of third_party libs bundled
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-text/libmspub
|
||||
app-text/libqxp
|
||||
app-text/poppler:=
|
||||
dev-libs/hyphen
|
||||
>=dev-libs/icu-58.2:0=
|
||||
dev-libs/librevenge
|
||||
dev-libs/libxml2
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5[-gles2]
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtopengl:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtxml:5
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype:2
|
||||
>=media-libs/harfbuzz-0.9.42:0=[icu]
|
||||
media-libs/lcms:2
|
||||
media-libs/libcdr
|
||||
media-libs/libfreehand
|
||||
media-libs/libpagemaker
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvisio
|
||||
media-libs/libzmf
|
||||
media-libs/tiff:0
|
||||
net-print/cups
|
||||
sys-libs/zlib[minizip]
|
||||
virtual/jpeg:0=
|
||||
>=x11-libs/cairo-1.10.0[X,svg]
|
||||
boost? ( >=dev-libs/boost-1.62:= )
|
||||
hunspell? ( app-text/hunspell:= )
|
||||
graphicsmagick? ( media-gfx/graphicsmagick:= )
|
||||
osg? ( dev-games/openscenegraph:= )
|
||||
pdf? ( app-text/podofo:0= )
|
||||
scripts? ( dev-python/pillow[tk?,${PYTHON_USEDEP}] )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
app-text/ghostscript-gpl
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
dev-qt/linguist-tools:5
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.5.3-docdir.patch
|
||||
"${FILESDIR}"/${PN}-1.5.3-fpic.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}"/${PN}-${COMMIT}
|
||||
|
||||
src_prepare() {
|
||||
rm -r codegen/cheetah || die
|
||||
cat > cmake/modules/FindZLIB.cmake <<- EOF || die
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(ZLIB minizip zlib)
|
||||
SET( ZLIB_LIBRARY \${ZLIB_LIBRARIES} )
|
||||
SET( ZLIB_INCLUDE_DIR \${ZLIB_INCLUDE_DIRS} )
|
||||
MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
|
||||
EOF
|
||||
|
||||
sed \
|
||||
-e "/^\s*unzip\.[ch]/d" \
|
||||
-e "/^\s*ioapi\.[ch]/d" \
|
||||
-i scribus/CMakeLists.txt Scribus.pro || die
|
||||
rm scribus/ioapi.[ch] || die
|
||||
|
||||
sed \
|
||||
-e 's:\(${CMAKE_INSTALL_PREFIX}\):./\1:g' \
|
||||
-i resources/templates/CMakeLists.txt || die
|
||||
|
||||
sed \
|
||||
-e "/^add_subdirectory(ui\/qml)/s/^/#DONT/" \
|
||||
-i scribus/CMakeLists.txt || die # nothing but a bogus Hello World test
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# bug #550818
|
||||
append-cppflags -DHAVE_MEMRCHR
|
||||
|
||||
local _lang lang langs
|
||||
for _lang in ${IUSE_L10N}; do
|
||||
lang=$(map_lang ${_lang})
|
||||
if use l10n_${lang}; then
|
||||
# From the CMakeLists.txt
|
||||
# "#Bit of a hack, preprocess all the filenames to generate our language string, needed for -DWANT_GUI_LANG=en_GB;de_DE , etc"
|
||||
langs+=";${_lang}"
|
||||
else
|
||||
# Don't install localized documentation
|
||||
sed -e "/${_lang}/d" -i doc/CMakeLists.txt || die
|
||||
safe_delete \
|
||||
./resources/dicts/README_${_lang}.txt \
|
||||
./resources/dicts/README_hyph_${_lang}.txt \
|
||||
./resources/dicts/hyph_${_lang}.dic \
|
||||
./resources/loremipsum/${_lang}.xml
|
||||
fi
|
||||
sed -e "/en_EN/d" -i doc/CMakeLists.txt || die
|
||||
safe_delete \
|
||||
./resources/dicts/README_en_EN.txt \
|
||||
./resources/dicts/README_hyph_en_EN.txt \
|
||||
./resources/dicts/hyph_en_EN.dic \
|
||||
./resources/loremipsum/en_EN.xml
|
||||
done
|
||||
|
||||
local mycmakeargs=(
|
||||
-DHAVE_PYTHON=ON
|
||||
-DPYTHON_INCLUDE_PATH="$(python_get_includedir)"
|
||||
-DPYTHON_LIBRARY="$(python_get_library_path)"
|
||||
-DWANT_DISTROBUILD=ON
|
||||
-DDOCDIR="${EPREFIX%/}/usr/share/doc/${PF}/"
|
||||
-DWANT_GUI_LANG="${langs#;};en"
|
||||
-DWITH_PODOFO="$(usex pdf)"
|
||||
-DWITH_BOOST="$(usex boost)"
|
||||
-DWANT_GRAPHICSMAGICK="$(usex graphicsmagick)"
|
||||
-DWANT_NOOSG="$(usex !osg)"
|
||||
-DWANT_DEBUG="$(usex debug)"
|
||||
-DWANT_HEADERINSTALL="$(usex !minimal)"
|
||||
-DWANT_HUNSPELL="$(usex hunspell)"
|
||||
-DWANT_NOEXAMPLES="$(usex !examples)"
|
||||
-DWANT_NOTEMPLATES="$(usex !templates)"
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
local lang _lang
|
||||
# en_EN can be deleted always
|
||||
for _lang in ${IUSE_L10N}; do
|
||||
lang=$(map_lang ${_lang})
|
||||
if ! use l10n_${lang}; then
|
||||
safe_delete "${ED%/}"/usr/share/man/${_lang}
|
||||
fi
|
||||
done
|
||||
|
||||
if ! use scripts; then
|
||||
rm "${ED%/}"/usr/share/scribus/scripts/*.py || die
|
||||
elif ! use tk; then
|
||||
rm "${ED%/}"/usr/share/scribus/scripts/{FontSample,CalendarWizard}.py || die
|
||||
fi
|
||||
|
||||
use scripts && \
|
||||
python_fix_shebang "${ED%/}"/usr/share/scribus/scripts && \
|
||||
python_optimize "${ED%/}"/usr/share/scribus/scripts
|
||||
|
||||
mv "${ED%/}"/usr/share/doc/${PF}/{en,html} || die
|
||||
ln -sf html "${ED%/}"/usr/share/doc/${PF}/en || die
|
||||
cat >> "${T}"/COPYING <<- EOF || die
|
||||
${PN} is licensed under the "${LICENSE}".
|
||||
Please visit https://www.gnu.org/licenses/gpl-2.0.html for the complete license text.
|
||||
EOF
|
||||
dodoc "${T}"/COPYING
|
||||
docompress -x /usr/share/doc/${PF}/en /usr/share/doc/${PF}/{AUTHORS,TRANSLATION,LINKS,COPYING}
|
||||
local size
|
||||
for size in 16 32 128 256; do
|
||||
newicon -s $size resources/iconsets/artwork/icon_${size}x${size}.png scribus.png
|
||||
done
|
||||
newicon -s 64 resources/iconsets/artwork/icon_32x32@2x.png scribus.png
|
||||
doicon resources/iconsets/*/scribus.png
|
||||
domenu scribus.desktop
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
gnome2_icon_cache_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
gnome2_icon_cache_update
|
||||
}
|
||||
|
||||
safe_delete () {
|
||||
local x
|
||||
for x in ${@}; do
|
||||
if [[ -d "${x}" ]]; then
|
||||
ebegin "Deleting ${x} recursively"
|
||||
rm -r "${x}" || die
|
||||
eend $?
|
||||
elif [[ -f "${x}" ]]; then
|
||||
ebegin "Deleting ${x}"
|
||||
rm "${x}" || die
|
||||
eend $?
|
||||
fi
|
||||
done
|
||||
}
|
Binary file not shown.
@ -1,3 +1,2 @@
|
||||
DIST eix-0.33.2.tar.xz 614192 BLAKE2B dcbbdb9b9ccf6f780d89c791c34cc588700720b7f015fb0db7ea86dd78a383892266b0e96c49282fdea58e78293c69e8acc153cea631443c35d3ee29dd4c016f SHA512 28ca4cc57e5c7ef81feb37fa90d598e681e192c442c7446c93a442908d2a9744340f7a93c71135ec3083fb85c48a65638c8929b6e1e632464132f4320225d637
|
||||
DIST eix-0.33.5.tar.xz 626628 BLAKE2B 2bb102279084f6bb6871bb4bbe55100708866337501c6043508ee13bdb92064c3a4a41d067b9d4c03af1a5ffbece53d9c66cf89639adf0c555a9511cae3d702f SHA512 7a71a411d4428ee491b9aee0f414e038a08f2195db58466db9b96f0d80edca7eaa153e63534c832c71e1b488e21fbd869a96bd10a21e06a93ce7eba1f808b684
|
||||
DIST eix-0.33.6.tar.xz 625512 BLAKE2B 3f27e3cfa00dc4979bbebbd3b31dfa29e7dcd527fdf7b3ca3fdc6a4ce45a64d7f07fe20ea4a526533aa506c2d9e7fcbbf7b5e83ad6a2d4bbacd1ce75b6cde4ae SHA512 3f04f06533d4e7a0acd5b6e85d1194c8f9b013595ebe75c3dda06cce42e7721a57393aed17e9dd6437780b48378691d84b6e595999ce4321ad114b239313c7cf
|
||||
|
@ -1,104 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools bash-completion-r1 flag-o-matic tmpfiles
|
||||
|
||||
DESCRIPTION="Search and query ebuilds"
|
||||
HOMEPAGE="https://github.com/vaeth/eix/"
|
||||
SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc nls sqlite"
|
||||
|
||||
BOTHDEPEND="nls? ( virtual/libintl )
|
||||
sqlite? ( >=dev-db/sqlite-3:= )"
|
||||
RDEPEND="${BOTHDEPEND}
|
||||
>=app-shells/push-2.0-r1
|
||||
>=app-shells/quoter-3.0_p2-r1"
|
||||
DEPEND="${BOTHDEPEND}
|
||||
app-arch/xz-utils
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
pkg_setup() {
|
||||
# remove stale cache file to prevent collisions
|
||||
local old_cache=${EROOT%/}/var/cache/${PN}
|
||||
if [[ -f ${old_cache} ]]; then
|
||||
rm "${old_cache}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
|
||||
|
||||
sed -e "/eixf_source=/s:push.sh:cat \"${EROOT}usr/share/push/push.sh\":" \
|
||||
-e "/eixf_source=/s:quoter_pipe.sh:cat \"${EROOT}usr/share/quoter/quoter_pipe.sh\":" \
|
||||
-i src/eix-functions.sh.in || die
|
||||
sed -e "s:'\$(bindir)/eix-functions.sh':cat \\\\\"${EROOT}usr/share/eix/eix-functions\\\\\":" \
|
||||
-i src/Makefile.am || die
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
$(use_enable debug paranoic-asserts)
|
||||
$(use_enable nls)
|
||||
$(use_with doc extra-doc)
|
||||
$(use_with sqlite)
|
||||
|
||||
# default configuration
|
||||
$(use_with prefix always-accept-keywords)
|
||||
--with-dep-default
|
||||
--with-required-use-default
|
||||
|
||||
# paths
|
||||
--with-portage-rootpath="${ROOTPATH}"
|
||||
--with-eprefix-default="${EPREFIX}"
|
||||
|
||||
# build a single executable with symlinks
|
||||
--disable-separate-binaries
|
||||
--disable-separate-tools
|
||||
|
||||
# used purely to control/disrespect *FLAGS
|
||||
--disable-debugging
|
||||
--disable-new_dialect
|
||||
--disable-optimization
|
||||
--disable-strong-optimization
|
||||
--disable-security
|
||||
--disable-nopie-security
|
||||
--disable-strong-security
|
||||
)
|
||||
|
||||
# https://github.com/vaeth/eix/issues/35
|
||||
append-cxxflags -std=c++11
|
||||
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dobashcomp bash/eix
|
||||
dotmpfiles tmpfiles.d/eix.conf
|
||||
|
||||
rm -r "${ED%/}"/usr/bin/eix-functions.sh || die
|
||||
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process eix.conf
|
||||
|
||||
local obs=${EROOT%/}/var/cache/eix.previous
|
||||
if [[ -f ${obs} ]]; then
|
||||
ewarn "Found obsolete ${obs}, please remove it"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
|
||||
rm -rf "${EROOT%/}/var/cache/${PN}" || die
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -0,0 +1,31 @@
|
||||
From 2c01e67a74ca48ca87e2f11f6239d54c35551e7b Mon Sep 17 00:00:00 2001
|
||||
From: David Adam <zanchey@ucc.gu.uwa.edu.au>
|
||||
Date: Sat, 5 Jan 2019 15:59:25 +0800
|
||||
Subject: [PATCH] histfile tests: tweak expect commands to avoid crash on
|
||||
32-bit platforms
|
||||
|
||||
Rather than killing the process with close, read EOF after sending the
|
||||
"exit" command and wait for OS cleanup (per the expect examples).
|
||||
|
||||
Not cleaning up with wait caused expect to crash on all 32-bit platforms
|
||||
including i586 and armv7l with "alloc: invalid block: 0xbf993ccb: 3d 3b".
|
||||
|
||||
64-bit platforms were not affected, for reasons that are not clear.
|
||||
---
|
||||
tests/histfile.expect | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/histfile.expect b/tests/histfile.expect
|
||||
index 81ca11276..7ac056235 100644
|
||||
--- a/tests/histfile.expect
|
||||
+++ b/tests/histfile.expect
|
||||
@@ -92,7 +92,8 @@ expect_prompt -re "\r\n$hist_line\r\n" {
|
||||
# =============
|
||||
# Start by shutting down the previous shell.
|
||||
send "exit\r"
|
||||
-close $spawn_id
|
||||
+expect eof
|
||||
+wait
|
||||
|
||||
# Set the fish_history env var.
|
||||
set ::env(fish_history) env
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST pdf2djvu-0.9.11.tar.xz 291356 BLAKE2B 726d9132c43c7dabdecf1e6174a3f2627db7f6981b3ba1f280ea131272ea0fef38acdaaa0f78ab0c883dd2cd046017edac46bb10d91e10668a6e480322e465fb SHA512 7b47ff4cd3a49f3fa1fec08490a192725899307d9c2a75a65a21d36abcece2f308e56161ec4c4f77f32fbdedcc167520657cad2b06cf178335f7e2169b7ada82
|
||||
DIST pdf2djvu-0.9.12.tar.xz 295088 BLAKE2B 6dd8b04f089e464becd7923c96ac2ca35efc28412c1913270c8c85656b58a74a47777b1b5b932d29e3ee2ad4d75bc6bcb85b835e5aa7e9d9c6a0ef7b242b5c46 SHA512 2a3acd8efa682541f45a0650070c0260903dadbd49ac6d4560e2e5ee3c5a68a1310dcb9d170035ee8fec0e588171f2c402047b3d7dc4e7d4033abe95f2ebde74
|
||||
DIST pdf2djvu-0.9.8.tar.xz 268976 BLAKE2B 318ef4fd5677056d2404d769bf54911c9474d6f0f839ef472e121375ee268db31ddaaad2b8ed791ef093d6cb1c665f6431619918ee852e479b4a11a3d7ae0e23 SHA512 5f5330d3d15808b5b6233a15a984d0ebf28619cfb50807a20c8992fed68d17f73d1edd62b1ad7cd3a09d526f6c9f0827e2c5e03d6d7c8ad92c1f106755025f5e
|
||||
|
@ -0,0 +1,60 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit python-any-r1 toolchain-funcs flag-o-matic
|
||||
|
||||
DESCRIPTION="A tool to create DjVu files from PDF files"
|
||||
HOMEPAGE="http://jwilk.net/software/pdf2djvu"
|
||||
SRC_URI="https://github.com/jwilk/${PN}/releases/download/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+graphicsmagick nls openmp test"
|
||||
|
||||
RDEPEND="
|
||||
>=app-text/djvu-3.5.21:=
|
||||
>=app-text/poppler-0.16.7:=
|
||||
dev-libs/libxml2:=
|
||||
dev-libs/libxslt:=
|
||||
graphicsmagick? ( media-gfx/graphicsmagick:= )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-cpp/pstreams
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_any_dep 'dev-python/nose[${PYTHON_USEDEP}]')
|
||||
)
|
||||
"
|
||||
|
||||
REQUIRED_USE="test? ( graphicsmagick ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
DOCS=(
|
||||
doc/{changelog,credits,djvudigital,README}
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# bug 626874, poppler headers require C++11
|
||||
append-cxxflags -std=c++11
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local openmp=--disable-openmp
|
||||
use openmp && tc-has-openmp && openmp=--enable-openmp
|
||||
|
||||
econf \
|
||||
${openmp} \
|
||||
$(use_enable nls) \
|
||||
$(use_with graphicsmagick)
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,14 +1,18 @@
|
||||
DIST php-5.6-openssl-1.1-compatibility.patch 42559 BLAKE2B b7f13866cd8545543143932930f31bcd928fa0b4b36ef63f04798b9ef4699f12b4f4227772ac9e6e5c498aaeacf7b106abcfa48031a12214e123de4b79d3a4cd SHA512 eed695a3dd7ce27e8651b4a4b96ccd0514f256e7d2f0214fac899e9eeea6412aa24f863f1b5d13305bcac50667ccb62709597fb34da1002b005ebf411dd2f5df
|
||||
DIST php-5.6.38.tar.xz 12467408 BLAKE2B d9ee47e193d80bce8a9ed6ffd3eb13e67ba6d1f597ece2803cd92fddc6245f46cdfe644d6cda12a6bb409b92c1fe748610cc5eb43dea0bf063fda81188ee8b3d SHA512 66c51a8e954b1496c0bad0a2864a2a1537dd1c1c573b553991d6d5bce85fc7bc340e56a21109bc5e9a03799e703204b980b569c95a5c0a1bddb01c8947e7a682
|
||||
DIST php-5.6.39.tar.xz 12467096 BLAKE2B 354b147c0fcc13eeec0ab333bcaa32ad26e2f4eef19a0ee52cf596ff96997eaf32cbb6d980cacf643167ed01b06ee9d27eeb7c00c95c8023d305c967c1ce3539 SHA512 814ea2d74df9c3c7041769803ceb4ba20dbfc18885ff85f91dca0c3ab694e3ebfb6a564427d116b35382fe292583a54d449f2528495032ca9724cfbdea82c226
|
||||
DIST php-5.6.40.tar.xz 12472236 BLAKE2B f41147eaec9b15e965540f9e871691cc88848dd619bae6af85e7bba0130b71ce91bad5cdbbadbb537c42df83369f5c731007339a9d9e21e689e913c135201afc SHA512 997b5a952a60cf9166671cc91fcc34c674dd62bfd5cb0a9cdf3fdf2d088b5d19943d94c1cf193f8ab71fc4957d9a9a4c7c2fb8826f937501c1c0a0858f10e329
|
||||
DIST php-7.0.32.tar.xz 12030780 BLAKE2B 0c277eac4c931a6e30954cceb7feef8dea1c3ef4aebac91779b7e1a6f90f608faa93d1750a2dc8f354c73304e0f7a9b9ac17bb0d1da4768ddb68925752c11aef SHA512 4a7c9a6b91ad7da69303916202062d639e6f02dcd483e851a44d8c7a2efeb5c9a666097935ab60d700c4445f86a0c68df1515300c57af1cdb76528b54b757608
|
||||
DIST php-7.0.33.tar.xz 12033040 BLAKE2B cb7a4eb3ba8ede93ae8e85b6a11664f33654f7e94fa077ac9a33ab95157c0c2b3b05f98413e13e36f710c6d00b35d49d38bf26092a36e508b88805d092764287 SHA512 9298e185702ea801e9243671ecb0b781c2b04181a2f9fd6490bc14897a333a2c0cc88fe27b0c69c6dd0079629a71c330ed1aa337f48cac6cbd624addb8855500
|
||||
DIST php-7.1.22.tar.xz 12227848 BLAKE2B 72fab94b1c7ecfd3479f6d6c9a76a9d8813f7789402664201615d79ab8b5bb26fb1b7273769c4898a36f0336e0ce4d50bf2f17b81ddb54acc9583e39623e3a5b SHA512 0fc0907d303711dbc4ba0a18618e3e73550c73d13988c769f8d50066017b1efe3feb0d22d5539f69271ea4e9532a3d997e22841cb59bdbf96313169e1c03538d
|
||||
DIST php-7.1.23.tar.xz 12227528 BLAKE2B d03470b07ae041c4677e100c1b4f7994d3e15d4830eccba3c654c1f3546345c8205cac057011d2d43ab962ebbc01652f6748270daa40aa1e540453923500288c SHA512 d5a451f1a48415175e3117ffa84ef3504275a407698b59c13eeb403958aa27342e04dc4ffea9791b923ac0cc5d6fdacf2e8672f0e19755bae858707c7fc3627f
|
||||
DIST php-7.1.24.tar.xz 12205112 BLAKE2B d4dd8bdd980cbb2c8cd813cad44da7a322d75641bb5f4eb986f6be44acf61898e64e43a3206da08b6c68fb1213a95cf5c6bf28bc75356d9abd9711330fa04554 SHA512 ee54d04fa1bb049807e7876baf6a4d12ab8360367bb44ac77c71e53ee8ca078342b4a86f2bc4587838ead27fb8204fea8e739bd582a9e146513ae5d465e59202
|
||||
DIST php-7.1.25.tar.xz 12205972 BLAKE2B 3d69cc87d75ee45dc85e5e672ddb6c312fcba12882e227d28e397e1e796e0149588b9519beeb990111315a747a07fa5349ad5f9662c0725b4551478f9e95b51d SHA512 10a75b96d5fa104bc1d5b63f4606d9cfacfc594f7d6ab34f9c5e9e8f209b896516c4121b9cbd323a862724d6dfbd275ef902993cfab619d9a4b9518790b9147c
|
||||
DIST php-7.1.26.tar.xz 12206956 BLAKE2B af78f764349a05905d7db22260c8a6415a2755b29e0dd01225160235b3b38ea76c8910d79c69798aa2de3fc6d4d41e45ab951161b54e62753111f81ac9d85bc2 SHA512 3c80dce2d5dcbf6f253ca4ca4e4ce01fdd3a3d31a6e6045f539fefadc1ea3c391d4d4995600a4ff758ab0361e0ec2244e2eaa6591ecb3e9b8e8a9c44f67a5b32
|
||||
DIST php-7.2.10.tar.xz 12160864 BLAKE2B f1959a00622c1bd11fa87c61d152c802b307f0b9e89b51ed86b40086cda03eeb6652d47b59df8cc7c9b4e79ab687ae1292b978f453e9f07ac352d209b64c62d8 SHA512 aa90fce17034b2649012d66461626ae74c21ea938b1c71c7eb12419e562c641b432df87a7e900c245ad28df39624cf64a1b2f8ffb123608d94cd35e41f09c0fe
|
||||
DIST php-7.2.11.tar.xz 12132268 BLAKE2B 8007f6a8f4236efb796681d25f2066deeba98e6e136def0c323aa13399951d58d7f218b3544b3bd0418dfe220f87a38b6515547c50f65c641bd09a2d440eb4e1 SHA512 0cd8578147d17d612e013dfc22b73977719177058b39c7b61dd0bfdfb8c2441aba78af49f58c824f7e66c89b5ad201c36fafb89ccf1e2d20f19b79d6a8fed7e5
|
||||
DIST php-7.2.12.tar.xz 12141472 BLAKE2B 25d55fcbe63aab64c658e9c4ab52b552831d5c03a8887e1c64f0cadbb8b0d9f3c38cd5d15dac89002c328b737ad864fce392baa0891292ee77d1975562a2bc17 SHA512 bbeaed1278d0d2f1ecb2249dab1ebaab1489ef43be0797dac57d8b523d8e5d284166e6cbf52095f5d34eef447fbdeb0c6916caaa5770221a180ec064f4ffcad8
|
||||
DIST php-7.2.13.tar.xz 12116484 BLAKE2B 00d265c10343e590772a4de103ae885149a56a7c0ef957cb24d5e81f86021231da5e75b655081e9fcba99b83956d55265b6af1d779ee65cebee9a974f936a634 SHA512 9df1d43e9cd701db10281811b328721b85cb90c6c8dae1842b0fd848cb5388328918b3040bbad7634b340550d82b93746ea479ed45f4d8a80e8a316e6324115d
|
||||
DIST php-7.2.14.tar.xz 12156460 BLAKE2B 88727241ca3fd68238ce50dcb4c12868f8e6df54213b04dba7650c5f98c3f18a3d02e0a191c0ebd13d85c83cc686fef60135f69ca7cc3e425bd5d7f80035fdd7 SHA512 13f2c97b730e3e872bd24bcc004c6cff5e2cc633c37a4eb60b8b5d1d4454bc5985f7d52943448d61cf4a227c64be770edc5eadd2c9612b297d71c0840b4b1259
|
||||
DIST php-7.3.0.tar.xz 11928820 BLAKE2B 36fee652cbbc28bbeb1b2df037b4b05084910d94af86c16150d776b82f91fb85691f9846c51538dbf6f3e64ece26894fe9c7a5f272d2848d41cdf8e1338b9805 SHA512 d991101eb833d3a47833aa930341e75c56f26c4cb0249896728ebe209c6c02af1704fccc3052128d8f9fdffc60dcef0ece38a532697131141946898d8b1abcda
|
||||
DIST php-7.3.1.tar.xz 11944376 BLAKE2B 55b3192774c08b1e4c6621e16176a1e352ff6ba5540794a5d769b6416929723638f1409f2f8224c7fe3db99c9b020fa51db7b78d50eaa00e790308562a0a5334 SHA512 0663d90537fe3901cad00ba1056782050b8a61e8edb49f01851add4992df21d23aee3e9468e32b76b7f53ffd513f1ba10c9513c549e247d796416ed176355348
|
||||
|
@ -0,0 +1,785 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit autotools flag-o-matic systemd
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://secure.php.net/"
|
||||
SRC_URI="https://php.net/distributions/${P}.tar.xz
|
||||
https://salsa.debian.org/php-team/php/raw/8149a436/debian/patches/0055-Use-OpenSSL-1.1-compatibility-patch-when-built-with-.patch?inline=false -> php-5.6-openssl-1.1-compatibility.patch"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# 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} acl bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage crypt +ctype curl debug
|
||||
enchant exif +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]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
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:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib:0=
|
||||
) )
|
||||
coverage? ( dev-util/lcov )
|
||||
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:0=
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,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/libmysqlclient:= )
|
||||
mysqli? ( virtual/libmysqlclient:= )
|
||||
)
|
||||
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:0= )
|
||||
)
|
||||
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:0= )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
vpx? ( media-libs/libvpx:0= )
|
||||
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:0=
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib:0= )
|
||||
zlib? ( sys-libs/zlib:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1
|
||||
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 cgi fpm apache2 embed )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
vpx? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
recode? ( !imap !mysql !mysqli !libmysqlclient )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
sharedmem? ( !threads )
|
||||
"
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${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,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() {
|
||||
eapply "${FILESDIR}/php-${SLOT}-no-bison-warnings.patch"
|
||||
eapply "${FILESDIR}/5.6-mbstring-oniguruma-6.8.patch"
|
||||
eapply "${DISTDIR}/php-5.6-openssl-1.1-compatibility.patch"
|
||||
eapply "${FILESDIR}/php-5.6-intl-detect-icu-via-pkg-config.patch"
|
||||
eapply "${FILESDIR}/php-5.6-intl-use-icu-namespace.patch"
|
||||
eapply "${FILESDIR}/php-5.6-intl-icu-memory-corruption.patch"
|
||||
eapply "${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
|
||||
# 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"
|
||||
|
||||
mv configure.in configure.ac || 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 #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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 coverage gcov)
|
||||
$(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 || use elibc_FreeBSD || 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 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"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# 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 -a "${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}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
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 #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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 #nowarn
|
||||
|
||||
# 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
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
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
|
||||
}
|
@ -0,0 +1,736 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic systemd autotools
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://secure.php.net/"
|
||||
SRC_URI="https://secure.php.net/distributions/${P}.tar.xz"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage crypt +ctype curl debug
|
||||
enchant exif +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 mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session session-mm sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sysvipc systemd test tidy +tokenizer truetype unicode wddx webp
|
||||
+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]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
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:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
coverage? ( dev-util/lcov )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( <app-text/enchant-2.0:0 )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,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] )
|
||||
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 )
|
||||
session-mm? ( 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:0= )
|
||||
)
|
||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
||||
truetype? ( =media-libs/freetype-2* )
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
webp? ( media-libs/libwebp:0= )
|
||||
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 )
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib:0= )
|
||||
zlib? ( sys-libs/zlib:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
# Bison isn't actually needed when building from a release tarball
|
||||
# However, the configure script will warn if it's absent or if you
|
||||
# have an incompatible version installed. See bug 593278.
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
webp? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysqli !mysql )
|
||||
session-mm? ( session !threads )
|
||||
mysql? ( hash || ( mysqli pdo ) )
|
||||
mysqli? ( hash )
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
"${FILESDIR}/php-7.1.25-intl-detect-icu-via-pkg-config.patch"
|
||||
"${FILESDIR}/php-7.1.25-intl-use-icu-namespace.patch"
|
||||
)
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${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 files php-fpm.conf and www.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
||||
doins sapi/fpm/www.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,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() {
|
||||
default
|
||||
|
||||
# In php-7.x, the FPM pool configuration files have been split off
|
||||
# of the main config. By default the pool config files go in
|
||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
||||
# we'll install the pool configuration file "www.conf" there.
|
||||
php_set_ini_dir fpm
|
||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
||||
sapi/fpm/php-fpm.conf.in \
|
||||
|| die 'failed to move the include directory in php-fpm.conf'
|
||||
|
||||
# Bug 669566 - necessary so that build tools are updated for commands like pecl
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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 coverage gcov)
|
||||
$(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 || use elibc_FreeBSD || 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 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_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(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_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")
|
||||
)
|
||||
if use webp; then
|
||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
||||
fi
|
||||
# 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"
|
||||
|
||||
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 "${EPREFIX}/usr")
|
||||
$(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 session-mm 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"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# 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 -a "${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|phpdbg)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
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 #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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 #nowarn
|
||||
|
||||
# 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/libphp${PHP_MV}$(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)"
|
||||
;;
|
||||
phpdbg)
|
||||
source="sapi/phpdbg/phpdbg"
|
||||
;;
|
||||
*)
|
||||
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-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
||||
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
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
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
|
||||
}
|
@ -0,0 +1,748 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic systemd autotools
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://secure.php.net/"
|
||||
SRC_URI="https://php.net/distributions/${P}.tar.xz"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage +ctype curl debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
|
||||
mhash mssql mysql mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session session-mm sharedmem
|
||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption 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]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
argon2? ( app-crypt/argon2:= )
|
||||
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:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
coverage? ( dev-util/lcov )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( <app-text/enchant-2.0:0 )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,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 ) )
|
||||
lmdb? ( dev-db/lmdb:= )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
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 )
|
||||
session-mm? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
sodium? ( dev-libs/libsodium:= )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
||||
tokyocabinet? ( dev-db/tokyocabinet )
|
||||
truetype? ( =media-libs/freetype-2* )
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
webp? ( media-libs/libwebp:0= )
|
||||
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 )
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib:0= )
|
||||
zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
|
||||
zlib? ( sys-libs/zlib:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
# Bison isn't actually needed when building from a release tarball
|
||||
# However, the configure script will warn if it's absent or if you
|
||||
# have an incompatible version installed. See bug 593278.
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
webp? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysqli !mysql )
|
||||
session-mm? ( session !threads )
|
||||
mysql? ( hash || ( mysqli pdo ) )
|
||||
mysqli? ( hash )
|
||||
zip-encryption? ( zip )
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
"${FILESDIR}/php-7.1.25-intl-detect-icu-via-pkg-config.patch"
|
||||
"${FILESDIR}/php-7.2.13-intl-use-icu-namespace.patch"
|
||||
)
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${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 files php-fpm.conf and www.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
||||
doins sapi/fpm/www.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,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() {
|
||||
default
|
||||
|
||||
# In php-7.x, the FPM pool configuration files have been split off
|
||||
# of the main config. By default the pool config files go in
|
||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
||||
# we'll install the pool configuration file "www.conf" there.
|
||||
php_set_ini_dir fpm
|
||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
||||
sapi/fpm/php-fpm.conf.in \
|
||||
|| die 'failed to move the include directory in php-fpm.conf'
|
||||
|
||||
# Bug 669566 - necessary so that build tools are updated for commands like pecl
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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_with argon2 password-argon2 "${EPREFIX}/usr")
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable coverage gcov)
|
||||
$(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 || use elibc_FreeBSD || 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 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 sodium sodium "${EPREFIX}/usr")
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(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 zip-encryption libzip "${EPREFIX}/usr")
|
||||
$(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 || use lmdb || use tokyocabinet ; 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")
|
||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${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")
|
||||
)
|
||||
if use webp; then
|
||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
||||
fi
|
||||
# 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"
|
||||
|
||||
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 "${EPREFIX}/usr")
|
||||
$(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 session-mm 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
|
||||
# --with-pcre-valgrind cannot be enabled with system pcre
|
||||
# Many arches don't support pcre-jit
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
--without-pcre-valgrind
|
||||
--without-pcre-jit
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# 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 -a "${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|phpdbg)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
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 #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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 #nowarn
|
||||
|
||||
# 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/libphp${PHP_MV}$(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)"
|
||||
;;
|
||||
phpdbg)
|
||||
source="sapi/phpdbg/phpdbg"
|
||||
;;
|
||||
*)
|
||||
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-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
||||
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
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
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
|
||||
}
|
@ -0,0 +1,748 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic eapi7-ver systemd autotools
|
||||
|
||||
MY_PV=${PV/_rc/RC}
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://secure.php.net/"
|
||||
SRC_URI="https://secure.php.net/distributions/${P}.tar.xz"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage +ctype curl debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
|
||||
mhash mssql mysql mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session session-mm sharedmem
|
||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption 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/libpcre2-10.30[unicode]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
argon2? ( app-crypt/argon2:= )
|
||||
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:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
coverage? ( dev-util/lcov )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( <app-text/enchant-2.0:0 )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,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 ) )
|
||||
lmdb? ( dev-db/lmdb:= )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
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 )
|
||||
session-mm? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
sodium? ( dev-libs/libsodium:= )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
||||
tokyocabinet? ( dev-db/tokyocabinet )
|
||||
truetype? ( =media-libs/freetype-2* )
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
webp? ( media-libs/libwebp:0= )
|
||||
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 )
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( >=sys-libs/zlib-1.2.0.4:0= )
|
||||
zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
|
||||
zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
# Bison isn't actually needed when building from a release tarball
|
||||
# However, the configure script will warn if it's absent or if you
|
||||
# have an incompatible version installed. See bug 593278.
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
webp? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysqli !mysql )
|
||||
session-mm? ( session !threads )
|
||||
mysql? ( || ( mysqli pdo ) )
|
||||
zip-encryption? ( zip )
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
)
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${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 files php-fpm.conf and www.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
||||
doins sapi/fpm/www.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,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() {
|
||||
default
|
||||
|
||||
# In php-7.x, the FPM pool configuration files have been split off
|
||||
# of the main config. By default the pool config files go in
|
||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
||||
# we'll install the pool configuration file "www.conf" there.
|
||||
php_set_ini_dir fpm
|
||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
||||
sapi/fpm/php-fpm.conf.in \
|
||||
|| die 'failed to move the include directory in php-fpm.conf'
|
||||
|
||||
# Bug 669566 - necessary so that build tools are updated for commands like pecl
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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_with argon2 password-argon2 "${EPREFIX}/usr")
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable coverage gcov)
|
||||
$(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 || use elibc_FreeBSD || 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 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 sodium sodium "${EPREFIX}/usr")
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(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 zip-encryption libzip "${EPREFIX}/usr")
|
||||
$(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 || use lmdb || use tokyocabinet ; 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")
|
||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${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")
|
||||
)
|
||||
if use webp; then
|
||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
||||
fi
|
||||
# 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"
|
||||
|
||||
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 "${EPREFIX}/usr")
|
||||
$(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 session-mm 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
|
||||
# --with-pcre-valgrind cannot be enabled with system pcre
|
||||
# Many arches don't support pcre-jit
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
--without-pcre-valgrind
|
||||
--without-pcre-jit
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# 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 -a "${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|phpdbg)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
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 #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
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 #nowarn
|
||||
|
||||
# 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/libphp${PHP_MV}$(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)"
|
||||
;;
|
||||
phpdbg)
|
||||
source="sapi/phpdbg/phpdbg"
|
||||
;;
|
||||
*)
|
||||
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-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
||||
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
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
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,5 +1,4 @@
|
||||
DIST vala-0.32.1.tar.xz 2759528 BLAKE2B cce23844ee5769216ef5cccb20476f4bdd2cb809a226236dd8a6bd533bb8ceb5b87add1d4d1c9eec60e0a94e64cafafcd1f46b2b2ae12fc951515fe8571e2195 SHA512 d59db1bd9132f93f187c30ccabff9d21fe8685293a6494e5b009d883de4f844cc4b8dc5d3b6eb4e026a93490f2e4ff7ba83ff22a093c6f8f85e68d83f5fe1bb0
|
||||
DIST vala-0.34.16.tar.xz 2795676 BLAKE2B 64428099c209e13a6aad09233af650f412efa191ff4873fae1dbfb9bcc252e13d4e152733c9f199cd23323872fd912807a685980f651c1f784bfaffae7bf4162 SHA512 6411d55524a6c717c2eaf5cc1231ac931400e3f66d151a8b8856910258eb5bd7affe3a90946de34feb51aabfafce721b8d57f61e0475095b275d20b73cc4bbec
|
||||
DIST vala-0.34.9.tar.xz 2783952 BLAKE2B e90728075ac546e8abc125886182abd5fc357be5138bfea1ed058f41bf07968e55e032469cc068cefdb6a4d53f1c029ca7e728c57b00f6b9845e32c4410e8258 SHA512 8128dfbb50d0db2317feb4a358310de972ecb6f4dccaceb4d55cf3a024f4d83422e3137c92238e1a0a0b4766367ad307909a1310445017c71944ac30fc68d01f
|
||||
DIST vala-0.36.15.tar.xz 2880300 BLAKE2B ea83bde6396f3be1c96038d63ae30b18fa070a6f7a06b75569bfed9d7792c898201a1f24d000f5b6415bb890cf975758341a97f22db74da02fcbeb3f283e546f SHA512 1c8f888832b2dd4248737a5a27f00f42d8bab2fe0a0790a7df5c426f4e3e1d0919ed0f6f6fd905be758ed477ba840e18f608e67811389c811ba65710094abe61
|
||||
DIST vala-0.36.17.tar.xz 2898524 BLAKE2B 4a5a373bacd4e4a392350c7819e0498054e38f50dce89658412d7aeb5642892ef9f32a7689ebd45f53c41f064e0b6d2f52fb441be67a1dd48e67311a1e764637 SHA512 93d4fa600cd0ef62b71ed056b837f2c0a42c3aba25b021b2bbd2045428550307727827b250dae546926ea3fe2e33a5ac80c9b24b5100f02550ec584dd5da5e92
|
||||
|
@ -1,36 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit gnome2
|
||||
|
||||
DESCRIPTION="Compiler for the GObject type system"
|
||||
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0.34"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/glib-2.32:2
|
||||
>=dev-libs/vala-common-${PV}
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
!${CATEGORY}/${PN}:0
|
||||
dev-libs/libxslt
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
virtual/yacc
|
||||
test? (
|
||||
dev-libs/dbus-glib
|
||||
>=dev-libs/glib-2.26:2
|
||||
dev-libs/gobject-introspection )
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
# bug 483134
|
||||
export GIT_CEILING_DIRECTORIES="${WORKDIR}"
|
||||
|
||||
gnome2_src_configure --disable-unversioned
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST capstone-3.0.5_rc2.tar.gz 2829338 BLAKE2B dd35fc6c31ec008f78840410ea0d20de56ea8f01c3af1d28488beaceee7fa06ce03c8cd0f56d834eb738d23f528d240693586122b9c1e353365f7348fb6f8362 SHA512 31bafdb0b3183d0c054a4244cc135db9a3c3dc5cb2e2af706bfede0d53cca8cba81d74b74ef9a4adbfd6c79cc408864dd80b8203791e17bd6c98bb69ea4f6894
|
||||
DIST capstone-4.0.1.tar.gz 3434276 BLAKE2B 585e0ee19b76d96116c67b021bbe19fd01d8db600b565094ff71a01d8a87b1123a8c5e2f944f1551c411565d5a25dfbfbb3138ca220b1281044a31004002399e SHA512 43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36
|
||||
DIST capstone-4.0.tar.gz 3411532 BLAKE2B 3e60a946e81f6d6ea88c314ad066e1855e2401cd9e8e61a67d48071b0fe4b705b2276b0d2b52d0979f472895a69cbe7609f6a2c60b79be668730f41ea98bf92e SHA512 5a10c67e88b246ad905364c62c56b4741df242c22f1b62bdea171e4d1d43e484f42f30b33e17324be6cff4c6fb10365528a9c3f4b2a5339ad24b0564fdd40bdb
|
||||
|
@ -0,0 +1,84 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DISTUTILS_OPTIONAL=1
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
|
||||
inherit distutils-r1 toolchain-funcs
|
||||
|
||||
DESCRIPTION="disassembly/disassembler framework + bindings"
|
||||
HOMEPAGE="http://www.capstone-engine.org/"
|
||||
SRC_URI="https://github.com/aquynh/${PN}/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/4" # libcapstone.so.4
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
|
||||
IUSE="python"
|
||||
RDEPEND="python? ( ${PYTHON_DEPS} )"
|
||||
DEPEND="${RDEPEND}
|
||||
python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
|
||||
"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.0-FLAGS.patch
|
||||
"${FILESDIR}"/${PN}-4.0-no-fuzz-tests.patch
|
||||
)
|
||||
|
||||
S=${WORKDIR}/${P/_rc/-rc}
|
||||
|
||||
wrap_python() {
|
||||
if use python; then
|
||||
pushd bindings/python >/dev/null || die
|
||||
distutils-r1_${1} "$@"
|
||||
popd >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
{
|
||||
cat <<-EOF
|
||||
# Gentoo overrides:
|
||||
# verbose build
|
||||
V = 1
|
||||
# toolchain
|
||||
AR = $(tc-getAR)
|
||||
CC = $(tc-getCC)
|
||||
RANLIB = $(tc-getRANLIB)
|
||||
# toolchain flags
|
||||
CFLAGS = ${CFLAGS}
|
||||
LDFLAGS = ${LDFLAGS}
|
||||
# libs
|
||||
LIBDIRARCH = $(get_libdir)
|
||||
EOF
|
||||
} >> config.mk || die
|
||||
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
@ -1,5 +1,2 @@
|
||||
DIST leatherman-1.3.0.tar.gz 434229 BLAKE2B e0c19bca2378afc4928554ac0862543504ba725aadc6cffd78220f7f7f1b725cad960fc6d9fdd2d54a43c233b35959ebcb9c71d1191a5535703599fa32e3301e SHA512 5e06be7add652f69b0d4a8d778e33dfb68183c4d598217cc6542d2431f7984f0af989c27bd69e89b77ab03d6dd2adab9d70f68cd87dae20d8e24ae05923fbe9b
|
||||
DIST leatherman-1.4.4.tar.gz 814289 BLAKE2B d53ff660e28eaea1c11f95cc70348a2a5883e0dc5ae56482b0afe96e61938e4d15688f8abf9783976443c00b6a69e9037b5080194babb97200e25e2c548b9153 SHA512 a1955a3f7a7fd190f7d85ad07e30dee74b0f4b7ed670a4a9a7613317d2898faf776cbed0c5c7b6da25ddd5099c9638e9abb2aca16aec61c568fc2f8c9789ffe4
|
||||
DIST leatherman-1.5.2.tar.gz 814349 BLAKE2B 1bc2d85426683e9f82d31ba9e3b63b4c9185b0bfa5ae832ea252ecbd922b44dfa67b6011145489d5c5809a76011aef8b143f6b705ea0436d914fc0d8ca8091a2 SHA512 9cef854fd7a95c54fcfc2e639e469dfaa4625757ea8aceeb9ac2162bfc89cbcbc1d5e8217af5f1fad4f31d98528475e22157ca6b1046a36e0928074f866ddafd
|
||||
DIST leatherman-1.5.3.tar.gz 814340 BLAKE2B 7dec42f1a62511a4f63ca197212f3b81f5baa862b0a7f825c2caa7e9af6bdd15e7b5aad39649d7e5dbb6bd62df19895bbf851421f9aa2795ced785c2e28bcdcf SHA512 e2616a42c6879755f338f9f0291bf28c7465d51caa3326be521ae3e0d5d79e82099c8720dc19223ad9112cde81c4579faf28a2b467f802baefc99dd59212b818
|
||||
DIST leatherman-1.5.4.tar.gz 814395 BLAKE2B 251cacad45e1571d54e7b78201bb0b3578d983022267bfd3438e921f93ba466995629759d9657c71938a5866fc13d1b70dabe2f3a43137ef52164f67da3a8aa5 SHA512 67a3a0a946024d0cee44ccb314d13abb3df83d7c7d0bfe58d5e966d57ef26240dc011a8e6865f017674a00043429379ae9e033a9197c4173c3fa173918d0b0f9
|
||||
|
@ -1,58 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils multilib
|
||||
|
||||
DESCRIPTION="A C++ toolkit"
|
||||
HOMEPAGE="https://github.com/puppetlabs/leatherman"
|
||||
SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
IUSE="debug static-libs test"
|
||||
KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
|
||||
SLOT="0/${PV}"
|
||||
|
||||
RDEPEND="net-misc/curl"
|
||||
DEPEND=">=dev-libs/boost-1.54:=[nls]
|
||||
net-misc/curl
|
||||
>=sys-devel/gcc-4.8:*"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/portage-sandbox-test-fix.patch )
|
||||
|
||||
src_prepare() {
|
||||
sed -i 's/\-Werror\ //g' "cmake/cflags.cmake" || die
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=None
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
)
|
||||
if ! use static-libs; then
|
||||
mycmakeargs+=(
|
||||
-DLEATHERMAN_SHARED=ON
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DLEATHERMAN_SHARED=OFF
|
||||
)
|
||||
fi
|
||||
if use debug; then
|
||||
mycmakeargs+=(
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
)
|
||||
fi
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
"${WORKDIR}/${P}"_build/bin/leatherman_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils multilib
|
||||
|
||||
DESCRIPTION="A C++ toolkit"
|
||||
HOMEPAGE="https://github.com/puppetlabs/leatherman"
|
||||
SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
IUSE="debug static-libs test"
|
||||
KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
|
||||
SLOT="0/${PV}"
|
||||
|
||||
RDEPEND="net-misc/curl"
|
||||
DEPEND=">=dev-libs/boost-1.54:=[nls]
|
||||
net-misc/curl
|
||||
>=sys-devel/gcc-4.8:*"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/portage-sandbox-test-fix.patch )
|
||||
|
||||
src_prepare() {
|
||||
sed -i 's/\-Werror\ //g' "cmake/cflags.cmake" || die
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=None
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
)
|
||||
if ! use static-libs; then
|
||||
mycmakeargs+=(
|
||||
-DLEATHERMAN_SHARED=ON
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DLEATHERMAN_SHARED=OFF
|
||||
)
|
||||
fi
|
||||
if use debug; then
|
||||
mycmakeargs+=(
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
)
|
||||
fi
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
"${WORKDIR}/${P}"_build/bin/leatherman_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils multilib
|
||||
|
||||
DESCRIPTION="A C++ toolkit"
|
||||
HOMEPAGE="https://github.com/puppetlabs/leatherman"
|
||||
SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
IUSE="debug static-libs test"
|
||||
KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
|
||||
SLOT="0/${PV}"
|
||||
|
||||
RDEPEND="net-misc/curl"
|
||||
DEPEND=">=dev-libs/boost-1.54:=[nls]
|
||||
net-misc/curl
|
||||
>=sys-devel/gcc-4.8:*"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/portage-sandbox-test-fix.patch )
|
||||
|
||||
src_prepare() {
|
||||
sed -i 's/\-Werror\ //g' "cmake/cflags.cmake" || die
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=None
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
)
|
||||
if ! use static-libs; then
|
||||
mycmakeargs+=(
|
||||
-DLEATHERMAN_SHARED=ON
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DLEATHERMAN_SHARED=OFF
|
||||
)
|
||||
fi
|
||||
if use debug; then
|
||||
mycmakeargs+=(
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
)
|
||||
fi
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
"${WORKDIR}/${P}"_build/bin/leatherman_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
}
|
Binary file not shown.
@ -0,0 +1,28 @@
|
||||
diff -Naur a/setup.py b/setup.py
|
||||
--- a/setup.py 2019-01-06 12:12:16.000000000 +0000
|
||||
+++ b/setup.py 2019-01-08 23:04:45.574698210 +0000
|
||||
@@ -197,12 +197,13 @@
|
||||
|
||||
def _pkg_config(name):
|
||||
try:
|
||||
+ command = os.environ.get('PKG_CONFIG', 'pkg-config')
|
||||
command_libs = [
|
||||
- 'pkg-config',
|
||||
+ command,
|
||||
'--libs-only-L', name,
|
||||
]
|
||||
command_cflags = [
|
||||
- 'pkg-config',
|
||||
+ command,
|
||||
'--cflags-only-I', name,
|
||||
]
|
||||
if not DEBUG:
|
||||
@@ -298,7 +299,7 @@
|
||||
_add_directory(include_dirs, "src/libImaging")
|
||||
|
||||
pkg_config = None
|
||||
- if _cmd_exists('pkg-config'):
|
||||
+ if _cmd_exists(os.environ.get('PKG_CONFIG', 'pkg-config')):
|
||||
pkg_config = _pkg_config
|
||||
|
||||
#
|
@ -0,0 +1,12 @@
|
||||
diff -Naur a/setup.py b/setup.py
|
||||
--- a/setup.py 2019-01-08 23:06:33.082873069 +0000
|
||||
+++ b/setup.py 2019-01-08 23:06:47.707165225 +0000
|
||||
@@ -356,7 +356,7 @@
|
||||
for d in os.environ[k].split(os.path.pathsep):
|
||||
_add_directory(library_dirs, d)
|
||||
|
||||
- prefix = sysconfig.get_config_var("prefix")
|
||||
+ prefix = None
|
||||
if prefix:
|
||||
_add_directory(library_dirs, os.path.join(prefix, "lib"))
|
||||
_add_directory(include_dirs, os.path.join(prefix, "include"))
|
@ -0,0 +1,43 @@
|
||||
From ced6051f4a4559a725804cc58c079e1efea0a573 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Koschany <apo@debian.org>
|
||||
Date: Sat, 11 Nov 2017 23:00:25 +0100
|
||||
Subject: [PATCH] Fix build failure due to the removal of MIX_INIT_MODPLUG and
|
||||
the replacement of
|
||||
|
||||
MIX_INIT_FLUIDSYNTH with MIX_INIT_MID.
|
||||
---
|
||||
include/sdl2_mixer.pxd | 3 +--
|
||||
src/pygame_sdl2/mixer.pyx | 4 ++--
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/sdl2_mixer.pxd b/include/sdl2_mixer.pxd
|
||||
index 0cea395..4bb0187 100644
|
||||
--- a/include/sdl2_mixer.pxd
|
||||
+++ b/include/sdl2_mixer.pxd
|
||||
@@ -18,10 +18,9 @@ cdef extern from "SDL_mixer.h" nogil:
|
||||
ctypedef enum MIX_InitFlags:
|
||||
MIX_INIT_FLAC
|
||||
MIX_INIT_MOD
|
||||
- MIX_INIT_MODPLUG
|
||||
MIX_INIT_MP3
|
||||
MIX_INIT_OGG
|
||||
- MIX_INIT_FLUIDSYNTH
|
||||
+ MIX_INIT_MID
|
||||
|
||||
int Mix_Init(int flags)
|
||||
void Mix_Quit()
|
||||
diff --git a/src/pygame_sdl2/mixer.pyx b/src/pygame_sdl2/mixer.pyx
|
||||
index 3c5e185..bea5cbf 100644
|
||||
--- a/src/pygame_sdl2/mixer.pyx
|
||||
+++ b/src/pygame_sdl2/mixer.pyx
|
||||
@@ -81,8 +81,8 @@ def init(frequency=22050, size=MIX_DEFAULT_FORMAT, channels=2, buffer=4096):
|
||||
if get_init() is not None:
|
||||
return
|
||||
|
||||
- for flag in (MIX_INIT_FLAC, MIX_INIT_MOD, MIX_INIT_MODPLUG,
|
||||
- MIX_INIT_MP3, MIX_INIT_OGG, MIX_INIT_FLUIDSYNTH):
|
||||
+ for flag in (MIX_INIT_FLAC, MIX_INIT_MOD,
|
||||
+ MIX_INIT_MP3, MIX_INIT_OGG, MIX_INIT_MID):
|
||||
|
||||
if Mix_Init(flag) != flag:
|
||||
errors.append("{}\n".format(SDL_GetError()))
|
@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
inherit distutils-r1
|
||||
|
||||
PYSDL="${PN}-2.1.0"
|
||||
|
||||
DESCRIPTION="Reimplementation of portions of the pygame API using SDL2"
|
||||
HOMEPAGE="https://github.com/renpy/pygame_sdl2"
|
||||
SRC_URI="http://www.renpy.org/dl/${PV}/${PYSDL}-for-renpy-${PV}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1 ZLIB"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
BDEPEND="
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
media-libs/libpng:0
|
||||
media-libs/libsdl2[video]
|
||||
media-libs/sdl2-image[png,jpeg]
|
||||
>=media-libs/sdl2-mixer-2.0.2
|
||||
media-libs/sdl2-ttf
|
||||
virtual/jpeg:62
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S=${WORKDIR}/${PYSDL}-for-renpy-${PV}
|
||||
|
||||
PATCHES=( "${FILESDIR}/pygame_sdl2-6.99.12.4-mixer.patch" )
|
||||
|
||||
# PyGame distribution for this version has some pregenerated files;
|
||||
# we need to remove them
|
||||
python_prepare_all()
|
||||
{
|
||||
rm -r "${S}"/gen{,3} || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST celluloid-0.17.3.gem 61952 BLAKE2B 5b64b67dea84261706acaf2612c23cb0b82d6af7fe0eece9d9e17e5d948d83a81b0de7598a1709fb5e1073f3632c7df6d6730c4797e0a4da593795b85c3bf9e1 SHA512 bb5005452ef7a2da1fb6b6515a6ad9df992dfd043caa605d1282a24b874c1f0798da0d19ee00f434486f9ef2c9467b1d6d2cadaa7883db98b885eeb842f1b94c
|
||||
DIST celluloid-0.17.4.gem 61952 BLAKE2B e6432f76aa2548f9b734502954cae7aaaa2cc6658ae644591fe22bd25e53e4eb88ef81f41416162c7478a77622f400040695861f9557578c029c3860cdb800b5 SHA512 ab876a12db908d0b14b9a701bbf7c2530188559cb60b1832e76642fae843f4eca9f4790a60ff88dda8ff92f7051f2df222c19cdec77666fc2e8d6d15adbba793
|
||||
|
@ -0,0 +1,54 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
# ruby25: fails tests
|
||||
USE_RUBY="ruby23 ruby24"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
# Needed by packages writing specs for celluloid
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="spec"
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Provides a simple and natural way to build fault-tolerant concurrent programs"
|
||||
HOMEPAGE="https://github.com/celluloid/celluloid"
|
||||
IUSE=""
|
||||
SLOT="0"
|
||||
|
||||
LICENSE="MIT"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
ruby_add_rdepend "
|
||||
dev-ruby/celluloid-essentials
|
||||
dev-ruby/celluloid-extras
|
||||
dev-ruby/celluloid-fsm
|
||||
dev-ruby/celluloid-pool
|
||||
dev-ruby/celluloid-supervision
|
||||
>=dev-ruby/timers-4.1.1"
|
||||
|
||||
ruby_add_bdepend "test? (
|
||||
dev-ruby/dotenv
|
||||
dev-ruby/nenv
|
||||
dev-ruby/rspec-retry
|
||||
)"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/[Bb]undler/d' -e '/coveralls/I s:^:#:' spec/spec_helper.rb || die
|
||||
|
||||
sed -i -e '1irequire "spec_helper"' spec/celluloid/actor/system_spec.rb || die
|
||||
|
||||
sed -i -e '1irequire "pathname"' spec/spec_helper.rb || die
|
||||
mkdir log || die
|
||||
}
|
||||
|
||||
each_ruby_prepare() {
|
||||
case ${RUBY} in
|
||||
*ruby24)
|
||||
sed -i -e '/String expected, but Fixnum received/ s/Fixnum/Integer/' spec/shared/actor_examples.rb || die
|
||||
;;
|
||||
esac
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md Changelog.md"
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Loads environment variables from .env into ENV"
|
||||
HOMEPAGE="https://github.com/bkeepers/dotenv"
|
||||
SRC_URI="https://github.com/bkeepers/dotenv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
LICENSE="MIT"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
SLOT="2"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/spring dev-ruby/rails )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/:guard/,/end/ s:^:#:' \
|
||||
-e '5igem "rspec", "~> 3.0"' Gemfile || die
|
||||
|
||||
sed -i -e '/rubocop/ s:^:#:' -e 's/git ls-files/find/' dotenv.gemspec || die
|
||||
}
|
||||
|
||||
each_ruby_prepare() {
|
||||
sed -i -e "s:ruby -v:${RUBY} -v:g" spec/dotenv/parser_spec.rb || die
|
||||
}
|
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue