Sync with portage [Tue Feb 12 08:40:06 MSK 2019].

mhiretskiy 1349
root 5 years ago
parent 191925076c
commit ae6942e4a5

Binary file not shown.

Binary file not shown.

@ -1,3 +1,4 @@
DIST borgbackup-1.1.6.tar.gz 3441523 BLAKE2B 13b1892774e857432a77d1f67d981046a0670b4ba2f3665502f7b729a211fc47e10a87feca308d5089c984cfe4665e7e70ca68bb9aa6e188893a0d088e84df93 SHA512 5741c48bdb70a26d40bd583f207460e35bb7dd560424889d37eb4d90ee96947457faf09bae0fa2b26b42ec71ef6eeaec1b770ba3257223a2637fcb55266e4a17
DIST borgbackup-1.1.7.tar.gz 3446832 BLAKE2B c4e2ce7c08f0df479d3333e5766ea070d0c1e18abc88fc8787e4212eff27e8e4505759f80f3bdda80d2b9a737241b907a41749edca9a6138eae2a5620913908d SHA512 586420b9cad7e731f2f1b8b05f3cd3dc606691c5a5ec307e887035d941ac5ac6d4c988783660969960a1221e4d9f2b865ee5558d4007ea7524632d0a50a8a402
DIST borgbackup-1.1.8.tar.gz 3456058 BLAKE2B cad55216f92025418e1a427f4b578d6b7eafa03f6b3e9c4fccb148dd3856c4f6649928fb4227249c534add125f9b3a2a0b6ed808ae12c5e60a28f9df4fb0031a SHA512 1455e68bcedab8f35f9426dc73958c6a6565ad1f1cc274ce59d34a12e3a7bfa1d12fa2b8e8dd3e71824e1cd0927babf79f4e99d4e516454ed12dbd3970d0e921
DIST borgbackup-1.1.9.tar.gz 3468259 BLAKE2B 91c89304cf22328a0bd74583c22370343915209a204f52c65290dbec0cb688392c2e80b946a55317f8c58ef23099e710c16a34c6bfbbfb547a3e4b38c3c81c37 SHA512 466288258700fb0b3dae936c79fd423d26bea2d721dd70112b3cfd0f8e2bb335144a00de76743c31d336f6c19793775260d154326ec70d6d6d0a4e5ad6a59e59

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -12,7 +12,7 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
fi
DESCRIPTION="Deduplicating backup program with compression and authenticated encryption"

@ -0,0 +1,46 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{4,5,6} )
inherit distutils-r1
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/${PN}/borg.git"
inherit git-r3
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
DESCRIPTION="Deduplicating backup program with compression and authenticated encryption"
HOMEPAGE="https://borgbackup.readthedocs.io/"
LICENSE="BSD"
SLOT="0"
IUSE="libressl"
# Unfortunately we have a file conflict with app-office/borg, bug #580402
RDEPEND="
!!app-office/borg
app-arch/lz4
dev-python/llfuse[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/pyzmq[${PYTHON_USEDEP}]
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
"
DEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
dev-python/cython[${PYTHON_USEDEP}]
${RDEPEND}
"
python_prepare_all() {
# allow use of new (renamed) msgpack
sed -i "s|'msgpack-python.*',||g" setup.py || die
distutils-r1_python_prepare_all
}

@ -1,7 +1,7 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
PYTHON_COMPAT=( python3_{4,5,6} )

@ -1,2 +1,3 @@
DIST snapper-0.5.6.tar.bz2 580047 BLAKE2B 3b945acbf734db1925dad5515323a64a2c08ee8226a593025f9160e0d1b1140734b2b498d036256946159900b50fec8567147dc0a974c281be747e977bcbd05b SHA512 392427d097cbe221bf7ca0ae20bc065dffaa4d0017ed750c41748d71128fc7ce054bb4425d6dbed7308a530df71815f80f56e60d72aab17ef3e0a16f3b3ba47e
DIST snapper-0.8.1.tar.bz2 591061 BLAKE2B 5f9ae50469f43e930de4c4479428c94b24441832bd713847c6792ff583fb79badfa341b53cc63abfedb787367b22b715de9f83f9172dec945f7b3071c06137ba SHA512 9fa20311f346de54c4f5d1cabb42dce5c677eaac03b3fac2a6049f408553911f5a968b1920fd014f3318ebb6911f2e6bce06463e976b468927e250e16fe783a0
DIST snapper-0.8.2.tar.bz2 591558 BLAKE2B 552c07d1d83e6a8db1e1661b523aeb7164335bb6ebbeb07489325b6d23d8a5def730ac1cf0da06ab65b7a9fc1284d0d05ca0f875bc897504c1bbb45698b40294 SHA512 d968490782a47112f7ba2474555cafe450833cf055734186c79991dd836f9c5d8d669a6c65dd29b05da298e46f65e0ac5c4a1dae3b548a01dbf1b11d7e00c462

@ -1,7 +1,7 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit systemd
@ -11,7 +11,7 @@ SRC_URI="ftp://ftp.suse.com/pub/projects/snapper/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="~amd64 ~x86"
IUSE="lvm pam xattr"
RDEPEND="dev-libs/boost:=[threads]

Binary file not shown.

@ -13,7 +13,7 @@ else
EGIT_COMMIT="v${MY_PV}"
CONTAINERD_COMMIT="9754871865f7fe2f4e74d43e2fc7ccd237edcbce"
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64"
inherit golang-vcs-snapshot
fi

@ -9,7 +9,7 @@ if [[ ${PV} == *9999 ]]; then
else
EGIT_COMMIT="2cfbf9b1f98162a55829a21cc603c76072a75382"
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64"
inherit golang-vcs-snapshot
fi

@ -1,3 +1,3 @@
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.1.tar.gz 15247155 BLAKE2B 5c9a6c0d6e383da2b99341812b0cc1d1498e46decc3b3aaa418607d5f4d725a6842a4462c06357685a32312b90978b0349aaceb69907324761589e68cfae7bca SHA512 9813d3bd41eff63a089495a976226b93d5d43544530aea0ebce78b96e6b4b38389fe3ad1117f1ca95c38727047a24211ad2c2b44217935c26ffb5496cf90407e
DIST docker-18.06.2.tar.gz 13675733 BLAKE2B 1b0852851a9c0412d7098b114f8ff62a7fc624f1bd77ba72629009c5b2afbbbacd79f93cdb4287bdb5a58c9b09ff76c9fb5b9ea40933686b62c78ebdc61d1a1b SHA512 78ab030555501071eee47964894798847d7a60ac826479215a2d0a74c75bac88ad212b7f5ab0f29444407456a3914c263c04a1398dc895586026440f203b50a4
DIST docker-18.09.2.tar.gz 15252871 BLAKE2B f87d3a7e6ccb4750eae231b88c686ad9c0be08aa8e0657343c89593d75374dfaeb063f842b8f5cef58e4b64982d3296a6808f076837243e61d75b93ad495fb44 SHA512 eacbeb754cdf2c111a2b72473b437e64cf176a5e93e1a9a0e5ed092d38db5846777d23c4ad51112d8a21317d471e5f1e93f85ae5c0ad1d5d50aea95e226dfa01

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -17,7 +17,7 @@ else
else
MY_PV="$PV-ce"
fi
DOCKER_GITCOMMIT="e68fc7a"
DOCKER_GITCOMMIT="6247962"
EGIT_COMMIT="v${MY_PV}"
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 ~arm ~arm64"
@ -63,6 +63,7 @@ RDEPEND="
dev-libs/libltdl
~app-emulation/containerd-1.1.2
~app-emulation/runc-1.0.0_rc5_p20180509[apparmor?,seccomp?]
>=app-emulation/runc-1.0.0_rc5_p20180509-r1
~app-emulation/docker-proxy-0.8.0_p20180626
container-init? ( >=sys-process/tini-0.18.0[static] )
"

@ -11,9 +11,9 @@ if [[ ${PV} = *9999* ]]; then
EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
inherit git-r3
else
DOCKER_GITCOMMIT="4c52b90"
DOCKER_GITCOMMIT="6247962"
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64"
KEYWORDS="amd64 ~arm ~arm64"
[ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
inherit golang-vcs-snapshot
fi
@ -56,6 +56,7 @@ RDEPEND="
dev-libs/libltdl
~app-emulation/containerd-1.2.2
~app-emulation/runc-1.0.0_rc6_p20181203[apparmor?,seccomp?]
>=app-emulation/runc-1.0.0_rc6_p20181203-r1
~app-emulation/docker-proxy-0.8.0_p20181207
container-init? ( >=sys-process/tini-0.18.0[static] )
"

@ -1,4 +1,3 @@
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,334 @@
From 0a8e4117e7f715d5fbeef398405813ce8e88558b Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <asarai@suse.de>
Date: Wed, 9 Jan 2019 13:40:01 +1100
Subject: [PATCH] nsenter: clone /proc/self/exe to avoid exposing host binary
to container
There are quite a few circumstances where /proc/self/exe pointing to a
pretty important container binary is a _bad_ thing, so to avoid this we
have to make a copy (preferably doing self-clean-up and not being
writeable).
We require memfd_create(2) -- though there is an O_TMPFILE fallback --
but we can always extend this to use a scratch MNT_DETACH overlayfs or
tmpfs. The main downside to this approach is no page-cache sharing for
the runc binary (which overlayfs would give us) but this is far less
complicated.
This is only done during nsenter so that it happens transparently to the
Go code, and any libcontainer users benefit from it. This also makes
ExtraFiles and --preserve-fds handling trivial (because we don't need to
worry about it).
Fixes: CVE-2019-5736
Co-developed-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
---
libcontainer/nsenter/cloned_binary.c | 268 +++++++++++++++++++++++++++
libcontainer/nsenter/nsexec.c | 11 ++
2 files changed, 279 insertions(+)
create mode 100644 libcontainer/nsenter/cloned_binary.c
diff --git a/libcontainer/nsenter/cloned_binary.c b/libcontainer/nsenter/cloned_binary.c
new file mode 100644
index 000000000..c8a42c23f
--- /dev/null
+++ b/libcontainer/nsenter/cloned_binary.c
@@ -0,0 +1,268 @@
+/*
+ * Copyright (C) 2019 Aleksa Sarai <cyphar@cyphar.com>
+ * Copyright (C) 2019 SUSE LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <limits.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/vfs.h>
+#include <sys/mman.h>
+#include <sys/sendfile.h>
+#include <sys/syscall.h>
+
+/* Use our own wrapper for memfd_create. */
+#if !defined(SYS_memfd_create) && defined(__NR_memfd_create)
+# define SYS_memfd_create __NR_memfd_create
+#endif
+#ifdef SYS_memfd_create
+# define HAVE_MEMFD_CREATE
+/* memfd_create(2) flags -- copied from <linux/memfd.h>. */
+# ifndef MFD_CLOEXEC
+# define MFD_CLOEXEC 0x0001U
+# define MFD_ALLOW_SEALING 0x0002U
+# endif
+int memfd_create(const char *name, unsigned int flags)
+{
+ return syscall(SYS_memfd_create, name, flags);
+}
+#endif
+
+/* This comes directly from <linux/fcntl.h>. */
+#ifndef F_LINUX_SPECIFIC_BASE
+# define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#ifndef F_ADD_SEALS
+# define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+# define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#endif
+#ifndef F_SEAL_SEAL
+# define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
+# define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
+# define F_SEAL_GROW 0x0004 /* prevent file from growing */
+# define F_SEAL_WRITE 0x0008 /* prevent writes */
+#endif
+
+#define RUNC_SENDFILE_MAX 0x7FFFF000 /* sendfile(2) is limited to 2GB. */
+#ifdef HAVE_MEMFD_CREATE
+# define RUNC_MEMFD_COMMENT "runc_cloned:/proc/self/exe"
+# define RUNC_MEMFD_SEALS \
+ (F_SEAL_SEAL | F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE)
+#endif
+
+static void *must_realloc(void *ptr, size_t size)
+{
+ void *old = ptr;
+ do {
+ ptr = realloc(old, size);
+ } while(!ptr);
+ return ptr;
+}
+
+/*
+ * Verify whether we are currently in a self-cloned program (namely, is
+ * /proc/self/exe a memfd). F_GET_SEALS will only succeed for memfds (or rather
+ * for shmem files), and we want to be sure it's actually sealed.
+ */
+static int is_self_cloned(void)
+{
+ int fd, ret, is_cloned = 0;
+
+ fd = open("/proc/self/exe", O_RDONLY|O_CLOEXEC);
+ if (fd < 0)
+ return -ENOTRECOVERABLE;
+
+#ifdef HAVE_MEMFD_CREATE
+ ret = fcntl(fd, F_GET_SEALS);
+ is_cloned = (ret == RUNC_MEMFD_SEALS);
+#else
+ struct stat statbuf = {0};
+ ret = fstat(fd, &statbuf);
+ if (ret >= 0)
+ is_cloned = (statbuf.st_nlink == 0);
+#endif
+ close(fd);
+ return is_cloned;
+}
+
+/*
+ * Basic wrapper around mmap(2) that gives you the file length so you can
+ * safely treat it as an ordinary buffer. Only gives you read access.
+ */
+static char *read_file(char *path, size_t *length)
+{
+ int fd;
+ char buf[4096], *copy = NULL;
+
+ if (!length)
+ return NULL;
+
+ fd = open(path, O_RDONLY | O_CLOEXEC);
+ if (fd < 0)
+ return NULL;
+
+ *length = 0;
+ for (;;) {
+ int n;
+
+ n = read(fd, buf, sizeof(buf));
+ if (n < 0)
+ goto error;
+ if (!n)
+ break;
+
+ copy = must_realloc(copy, (*length + n) * sizeof(*copy));
+ memcpy(copy + *length, buf, n);
+ *length += n;
+ }
+ close(fd);
+ return copy;
+
+error:
+ close(fd);
+ free(copy);
+ return NULL;
+}
+
+/*
+ * A poor-man's version of "xargs -0". Basically parses a given block of
+ * NUL-delimited data, within the given length and adds a pointer to each entry
+ * to the array of pointers.
+ */
+static int parse_xargs(char *data, int data_length, char ***output)
+{
+ int num = 0;
+ char *cur = data;
+
+ if (!data || *output != NULL)
+ return -1;
+
+ while (cur < data + data_length) {
+ num++;
+ *output = must_realloc(*output, (num + 1) * sizeof(**output));
+ (*output)[num - 1] = cur;
+ cur += strlen(cur) + 1;
+ }
+ (*output)[num] = NULL;
+ return num;
+}
+
+/*
+ * "Parse" out argv and envp from /proc/self/cmdline and /proc/self/environ.
+ * This is necessary because we are running in a context where we don't have a
+ * main() that we can just get the arguments from.
+ */
+static int fetchve(char ***argv, char ***envp)
+{
+ char *cmdline = NULL, *environ = NULL;
+ size_t cmdline_size, environ_size;
+
+ cmdline = read_file("/proc/self/cmdline", &cmdline_size);
+ if (!cmdline)
+ goto error;
+ environ = read_file("/proc/self/environ", &environ_size);
+ if (!environ)
+ goto error;
+
+ if (parse_xargs(cmdline, cmdline_size, argv) <= 0)
+ goto error;
+ if (parse_xargs(environ, environ_size, envp) <= 0)
+ goto error;
+
+ return 0;
+
+error:
+ free(environ);
+ free(cmdline);
+ return -EINVAL;
+}
+
+static int clone_binary(void)
+{
+ int binfd, memfd;
+ ssize_t sent = 0;
+
+#ifdef HAVE_MEMFD_CREATE
+ memfd = memfd_create(RUNC_MEMFD_COMMENT, MFD_CLOEXEC | MFD_ALLOW_SEALING);
+#else
+ memfd = open("/tmp", O_TMPFILE | O_EXCL | O_RDWR | O_CLOEXEC, 0711);
+#endif
+ if (memfd < 0)
+ return -ENOTRECOVERABLE;
+
+ binfd = open("/proc/self/exe", O_RDONLY | O_CLOEXEC);
+ if (binfd < 0)
+ goto error;
+
+ sent = sendfile(memfd, binfd, NULL, RUNC_SENDFILE_MAX);
+ close(binfd);
+ if (sent < 0)
+ goto error;
+
+#ifdef HAVE_MEMFD_CREATE
+ int err = fcntl(memfd, F_ADD_SEALS, RUNC_MEMFD_SEALS);
+ if (err < 0)
+ goto error;
+#else
+ /* Need to re-open "memfd" as read-only to avoid execve(2) giving -EXTBUSY. */
+ int newfd;
+ char *fdpath = NULL;
+
+ if (asprintf(&fdpath, "/proc/self/fd/%d", memfd) < 0)
+ goto error;
+ newfd = open(fdpath, O_RDONLY | O_CLOEXEC);
+ free(fdpath);
+ if (newfd < 0)
+ goto error;
+
+ close(memfd);
+ memfd = newfd;
+#endif
+ return memfd;
+
+error:
+ close(memfd);
+ return -EIO;
+}
+
+int ensure_cloned_binary(void)
+{
+ int execfd;
+ char **argv = NULL, **envp = NULL;
+
+ /* Check that we're not self-cloned, and if we are then bail. */
+ int cloned = is_self_cloned();
+ if (cloned > 0 || cloned == -ENOTRECOVERABLE)
+ return cloned;
+
+ if (fetchve(&argv, &envp) < 0)
+ return -EINVAL;
+
+ execfd = clone_binary();
+ if (execfd < 0)
+ return -EIO;
+
+ fexecve(execfd, argv, envp);
+ return -ENOEXEC;
+}
diff --git a/libcontainer/nsenter/nsexec.c b/libcontainer/nsenter/nsexec.c
index 28269dfc0..7750af35e 100644
--- a/libcontainer/nsenter/nsexec.c
+++ b/libcontainer/nsenter/nsexec.c
@@ -534,6 +534,9 @@ void join_namespaces(char *nslist)
free(namespaces);
}
+/* Defined in cloned_binary.c. */
+extern int ensure_cloned_binary(void);
+
void nsexec(void)
{
int pipenum;
@@ -549,6 +552,14 @@ void nsexec(void)
if (pipenum == -1)
return;
+ /*
+ * We need to re-exec if we are not in a cloned binary. This is necessary
+ * to ensure that containers won't be able to access the host binary
+ * through /proc/self/exe. See CVE-2019-5736.
+ */
+ if (ensure_cloned_binary() < 0)
+ bail("could not ensure we are a cloned binary");
+
/* Parse all of the netlink configuration. */
nl_parse(pipenum, &config);

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -28,6 +28,14 @@ RDEPEND="
!app-emulation/docker-runc
"
PATCHES=( "${FILESDIR}"/runc-fix-cve.patch )
src_prepare() {
pushd src/${EGO_PN} || die
default
popd || die
}
src_compile() {
# Taken from app-emulation/docker-1.7.0-r1
export CGO_CFLAGS="-I${ROOT}/usr/include"

@ -1,61 +0,0 @@
# Copyright 1999-2018 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="ccb5efd37fb7c86364786e9137e22948751de7ed" # 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
}

@ -10,7 +10,7 @@ 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"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64"
inherit golang-build golang-vcs-snapshot
fi
@ -27,13 +27,17 @@ RDEPEND="
!app-emulation/docker-runc
"
PATCHES=( "${FILESDIR}/${PN}-fix-cve.patch" )
src_prepare() {
pushd src/${EGO_PN}
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
Makefile || die
popd || die
}
src_compile() {

@ -2,4 +2,5 @@ DIST virtio-win-0.1.117.iso 56999936 BLAKE2B 7880ab46d194ed265a2e0b88ea98752be92
DIST virtio-win-0.1.118.iso 56967168 BLAKE2B 6bcabe5384ae297838d289ad6e2a18c08089463f6c5d58de8ace4d0d47396dcab60e0f021ca009d7faa7a81ef3fc855ac1aabefda4a540f9f07b25e12fa46048 SHA512 1a1da7bfbecb1cd02eca780583c486caadd5b76b225a469af0e693f08506bf9b582f57df52b670409a1cf0d887c0ab715ecca0f08802c242a93535d2d58134d9
DIST virtio-win-0.1.126.iso 155856896 BLAKE2B 88ccc79e43f2c9cf8d985b0d0677c76ec7eebc960eb8c6c2906cacb05e05f945a90d549bcab50754930bf43a84cd722034c3a06828622b47dc99d87fc5634528 SHA512 b57810f33746ed90420f12f6267903f595ddd02aecb8d3de58cd2d5c0b39ec2f31e0352c2548344e629827616bf2d3c284e1ff60d2132fdde39f2086b36af2e6
DIST virtio-win-0.1.141.iso 316628992 BLAKE2B 41663ebfd084e9e386eddc3db9ba2c9fe3313260fe3158bbb67c03270c0de37d4ce33e7b6f39ec1b8b5190a9fc8918364d0e9a4ac2a03cdc988e0f26d2062389 SHA512 909f4437b69cba1edfa857326986eb8c4b58835169d70117a5ff57bfa4ebc48f74d6ffa05de50732fb60551166544160fa3b4ec5c59cfb98daeb789902a9b119
DIST virtio-win-0.1.160.iso 322842624 BLAKE2B baa1475055c2df609931e48cc4a18a2e24fcbf07ec9df80a94b1bdb77ca76c1278c5269a95422ea5c2363df424a30b8395b539689982d609096823ebc880afaf SHA512 71c9de9086fa5b5d764d210b5f7d0238c8b294aaf17704eabe16fe65c5649944126924870f0e2eb05d030c2f521770cb5760f4016d29319f5f1bd5deb7955e50
DIST virtio-win-0.1.96.iso 160659456 BLAKE2B 7e7784c7585af899881d44a60167e2cc08d40d5a575fd5b0815e218ddbc5e8ea3b37deda7352688364bc1c6d72186c2e1eecb5a616102576c13d61b890a330bf SHA512 a00311f29937383d0dd538b5156a078fdb0c93d39a91d66376a9567f3d4841eeb0ec2a8bf8b018d089040895c9f720e1b253a5aed8bd337dd8713a47544b2a61

@ -0,0 +1,18 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="VirtIO drivers for Windows virtual machines running on KVM"
HOMEPAGE="https://fedoraproject.org/wiki/Windows_Virtio_Drivers"
SRC_URI="https://fedorapeople.org/groups/virt/${PN}/direct-downloads/archive-virtio/${PN}-${PV}-1/${PN}-${PV}.iso"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
S=${WORKDIR}
src_install() {
insinto /usr/share/drivers/windows
doins "${DISTDIR}/${PN}-${PV}.iso"
}

Binary file not shown.

@ -1,2 +1,3 @@
DIST ibus-rime-1.2.tar.gz 33396 BLAKE2B 39930ea31d40e622cd69d6f5a218729f460161dd9681e49bc35a1eb9b3875b6f5acbdaf36f7cf8200440bc27ed84a2f23ec1578b19a1fe6abbbc54c7078be11c SHA512 e1851781a6d069a79d04890b5b0aa2a706e611c08df3fcb99f883eeedd4dc4eefcac207f35b5cf1d856a41f0153ec3fbb040b4e6f610727384baa19b52a64155
DIST ibus-rime-1.3.0.tar.gz 33930 BLAKE2B 14e086382d89c990ca9f07401b68dbe26d58da061a3e8154232809ff29d766b630dcd06723bb0a8e18ebd089a640b7ab6787f8c70a6405dfa82472c1abfe5d4e SHA512 f0991184805bfe19931e297779179661f98bdfea952e310b2d8618550002cfa5bb08df05d1c5e31b535ad9959a919fdc98fa771a90d4d82b9c50e2f592cb7dfd
DIST ibus-rime-1.4.0.tar.gz 34176 BLAKE2B 69d0392adc78b2b8935f2239c4567d001d3636d0e8ff59aca0b04b3189751a3edd0350eea9e2262b3ae3e639dbd9715c157e44727cc48ba9521801161a1508f4 SHA512 3fc24f4ce390e27d37e41775e4c075c7465cd3e90a9ab61d13ec47c2ca1c2afaafb322f327e18be573aa254a43b8cf6426415500a5d817b835bf4e0615ab9145

@ -0,0 +1,33 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Chinese Rime Input Method Engine for IBus"
HOMEPAGE="https://rime.im/ https://github.com/rime/ibus-rime"
SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
CDEPEND="app-i18n/ibus
app-i18n/librime
x11-libs/libnotify"
RDEPEND="${CDEPEND}
app-i18n/rime-data"
DEPEND="${CDEPEND}
dev-util/cmake
virtual/pkgconfig"
src_prepare() {
sed -i \
-e "/^libexecdir/s:/lib:/libexec:" \
-e "/^[[:space:]]*PREFIX/s:/usr:${EPREFIX}/usr:" \
-e "s/ make/ \$(MAKE)/" \
Makefile
sed -i "/exec>/s:/usr/lib:${EPREFIX}/usr/libexec:" rime.xml
default
}

@ -1,2 +1,3 @@
DIST librime-1.2.9.tar.gz 5516609 BLAKE2B 7b05fedb093f7595c7bf7f4893624b35b0cdde1816c9c99f9ed5d408c8fd21d34a361d16b94c43b3e5e23b10945f075711762f08ca30abee35849a332ecfee2d SHA512 2266ef96ad21ec5981b4ca5371d4e16eefed545ffbde07093ae0d0be070a64f9869baa09b6bdcee2522438e08c72a842a7e0b225a6ca1b661708a80cf3aba83a
DIST librime-1.3.1.tar.gz 8598357 BLAKE2B cd6bc6b63a89f7f11e78ceaf92007c099be34ce38f26d611b67a3d8f868a27a0e4de7b94da44d8483618f37a0c2bcfd3a1bc1c1ecb4f81829f8e12fdd777e283 SHA512 b35d3635fd776ed9be32c0998e4aac441433bc9e624765a57582690108cccf5c3beaedad4f8f1682d99533384cd10996ee8c18fd5adcea70878d6a410124922e
DIST librime-1.4.0.tar.gz 8609316 BLAKE2B cce58c398057ac82f076e3b9e9a25cd6410e738460bd58277a9e3ed6cd11e80922bbb30e8b42828cdd5dd83f6058794b4b32fedb359315186b018ca88161794d SHA512 da68983638c6f25d994060a607f2ccab8917a71dbf10b9c6f1140c87c9ef4124e29a1d0ef16bbd0edc9a3a22bd5845aa894888d678607db372750f300638f562

@ -0,0 +1,37 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit cmake-utils vcs-snapshot
DESCRIPTION="Rime Input Method Engine, the core library"
HOMEPAGE="https://rime.im/ https://github.com/rime/librime"
SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0/1"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE="static-libs test"
RDEPEND="app-i18n/opencc:=
dev-cpp/glog:=
dev-cpp/yaml-cpp:=
dev-libs/boost:=[threads]
dev-libs/leveldb:=
dev-libs/marisa:="
DEPEND="${RDEPEND}
x11-base/xorg-proto
test? ( dev-cpp/gtest )"
DOCS=( {CHANGELOG,README}.md )
src_configure() {
local mycmakeargs=(
-DBUILD_STATIC=$(usex static-libs)
-DBUILD_TEST=$(usex test)
-DBOOST_USE_CXX11=ON
-DLIB_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir)
)
cmake-utils_src_configure
}

Binary file not shown.

@ -12,7 +12,7 @@ SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${MY_PV}/${P}.tar.x
LICENSE="LGPL-2"
SLOT="2.0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ppc64 ~sparc x86 ~amd64-fbsd"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd"
IUSE="+introspection +modemmanager zeroconf"
RDEPEND="

@ -13,7 +13,7 @@ SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 hppa ia64 ~mips ppc ~ppc64 ~s390 ~sh sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
IUSE="+edit gpm mclib nls samba sftp +slang spell test unicode X +xdg"
REQUIRED_USE="spell? ( edit )"

Binary file not shown.

@ -13,7 +13,7 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2
LICENSE="|| ( GPL-2 LGPL-2 )"
SLOT="0"
KEYWORDS="alpha ~amd64 ~arm ~hppa ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="alpha ~amd64 ~arm ~hppa ia64 ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
IUSE="bluetooth debug java perl png python static-libs threads usb"
COMMON_DEPEND="

Binary file not shown.

@ -1,2 +1,3 @@
DIST fish-2.7.1.tar.gz 5760550 BLAKE2B 71568a3a17f4222b05a314464a61fceb241409a7d42c46249486ca742ef0cf990c46d693bcc22521c18f58a558e6aab35759d0da6eb62ee6611a2a7946fe714d SHA512 45ee3453404c5d6c56d307b4cd19197de862f9f42d7fa06461acec56dea7146db5675cf6419dd5f72e939b3e4b1955d3761098df1de89a8cebe47645eb6f7a4b
DIST fish-3.0.0.tar.gz 6472393 BLAKE2B 9a8226ca4dce40a7bbc62ad5791c5238d1257cebea296cd97a195438d771d7394acb012be6af118bf355a9b6e391ddee1061d83298356f664e0d5dbe3d859012 SHA512 e4159821d4263e5afb67adee82e30cfed0ad30f3772dd95beb0df71423ff52c21354970f64967f2de9fd1d31caa702208cfd9f2ce281bbf33114f3aa7cd539a2
DIST fish-3.0.1.tar.gz 6477550 BLAKE2B 31862bee18cc6db9b624850c87816ecc7d2a50671522ecafa887973ff2b9cb890d4880a567570025957064f0c68c4846810373efc03a4c6d616840b553ece625 SHA512 0bbf02d6be658f81e8dbb3a23066878087e1dc9f3abae43ff1c493e1b9d4394944e8fe7d176a3384f290ebd1e0c5325fd78eb7a654bab6b4f21687b24df40ca7

@ -0,0 +1,75 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils readme.gentoo-r1
DESCRIPTION="Friendly Interactive SHell"
HOMEPAGE="http://fishshell.com/"
MY_PV="${PV/_beta/b}"
MY_P="${PN}-${MY_PV}"
if [[ ${PV} == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/${PN}-shell/${PN}-shell.git"
else
SRC_URI="https://github.com/${PN}-shell/${PN}-shell/releases/download/${MY_PV}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="doc nls test"
RDEPEND="
>=dev-libs/libpcre2-10.21[pcre32]
sys-devel/bc
sys-libs/ncurses:0=[unicode]
"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )
nls? ( sys-devel/gettext )
test? ( dev-tcltk/expect )
"
PATCHES=( "${FILESDIR}/fix-histfile-test-on-ppc.patch" )
S="${WORKDIR}/${MY_P}"
src_prepare() {
# workaround for https://github.com/fish-shell/fish-shell/issues/4883
sed -i 's#${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}#${TEST_INSTALL_DIR}#' \
cmake/Tests.cmake || die
cmake-utils_src_prepare
}
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_BINDIR="${EPREFIX}/bin"
-DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
-DCURSES_NEED_NCURSES=ON
-DINTERNAL_WCWIDTH=OFF
-DBUILD_DOCS="$(usex doc)"
-DWITH_GETTEXT="$(usex nls)"
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
keepdir /usr/share/fish/vendor_{completions,conf,functions}.d
readme.gentoo_create_doc
}
src_test() {
cmake-utils_src_make -j1 test
}
pkg_postinst() {
readme.gentoo_print_elog
}

Binary file not shown.

@ -1 +1 @@
DIST blogc-0.14.1.tar.xz 330540 BLAKE2B e8b2f793a1c7f95fde59d7929245cdace95d31f484d62252d00c4fa535c9d4b9d83c6d1828e9197f0fab74473e5a549802ca26aefe2dd441bad03b4f3466c1b4 SHA512 2d393684e8ddb38d720f029c7fe7884a577dc844f8e774a21afedd7519b9aa32a84d2b0e40c7bc565feba5a8e13f83c61692f0d04f20fea44e96f3f66d613a5a
DIST blogc-0.15.0.tar.xz 335996 BLAKE2B c7fff528180c2124ea5c26ddd413f252d00570bcfe35645b8cdc8c7b3e289b52b38bd895e2ae5c2cab88d2a8143fa637118d75c719d69f685cef4c182bd9d6e3 SHA512 57a685938ef644b22b9271a0462260acb8ab8f9e9ff842415069011bb480923b8a4871742640eecc0babc7c65eefec3cab9051170dc6c3e69899e77d366a01c6

Binary file not shown.

@ -1,7 +1,5 @@
DIST php-5.6-openssl-1.1-compatibility.patch 42559 BLAKE2B b7f13866cd8545543143932930f31bcd928fa0b4b36ef63f04798b9ef4699f12b4f4227772ac9e6e5c498aaeacf7b106abcfa48031a12214e123de4b79d3a4cd SHA512 eed695a3dd7ce27e8651b4a4b96ccd0514f256e7d2f0214fac899e9eeea6412aa24f863f1b5d13305bcac50667ccb62709597fb34da1002b005ebf411dd2f5df
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.26.tar.xz 12206956 BLAKE2B af78f764349a05905d7db22260c8a6415a2755b29e0dd01225160235b3b38ea76c8910d79c69798aa2de3fc6d4d41e45ab951161b54e62753111f81ac9d85bc2 SHA512 3c80dce2d5dcbf6f253ca4ca4e4ce01fdd3a3d31a6e6045f539fefadc1ea3c391d4d4995600a4ff758ab0361e0ec2244e2eaa6591ecb3e9b8e8a9c44f67a5b32
DIST php-7.2.14.tar.xz 12156460 BLAKE2B 88727241ca3fd68238ce50dcb4c12868f8e6df54213b04dba7650c5f98c3f18a3d02e0a191c0ebd13d85c83cc686fef60135f69ca7cc3e425bd5d7f80035fdd7 SHA512 13f2c97b730e3e872bd24bcc004c6cff5e2cc633c37a4eb60b8b5d1d4454bc5985f7d52943448d61cf4a227c64be770edc5eadd2c9612b297d71c0840b4b1259
DIST php-7.2.15.tar.xz 12164460 BLAKE2B 16ab89c1deee7fcb1edd49b5227456f6bcf40a43668b5e1ffbab41a9f4c48a24fd318122886521838a687a52e36cb77258f6ca266046605441b835904c2dde23 SHA512 feecabb6ee1ec4bc98cf1aa868190c758ee57e5f2d80c91376a2d91082d01f481b0a2e3d7dbae4822d6cfbafe8bccffed15335ff561f8b239e16028ed6bdbee7

@ -1,65 +0,0 @@
--- a/ext/openssl/openssl.c 2018-04-04 14:26:34.583000000 +0000
+++ b/ext/openssl/openssl.c 2018-04-04 14:20:16.907000000 +0000
@@ -73,7 +73,7 @@
#ifdef HAVE_OPENSSL_MD2_H
#define OPENSSL_ALGO_MD2 4
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
#define OPENSSL_ALGO_DSS1 5
#endif
#define OPENSSL_ALGO_SHA224 6
@@ -560,7 +560,7 @@
#endif
/* {{{ OpenSSL compatibility functions and macros */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
#define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa
#define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh
#define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa
@@ -677,7 +677,7 @@
return M_ASN1_STRING_data(asn1);
}
-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
static int X509_get_signature_nid(const X509 *x)
{
@@ -1324,7 +1324,7 @@
mdtype = (EVP_MD *) EVP_md2();
break;
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
case OPENSSL_ALGO_DSS1:
mdtype = (EVP_MD *) EVP_dss1();
break;
@@ -1450,7 +1450,7 @@
#ifdef HAVE_OPENSSL_MD2_H
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT);
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT);
#endif
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_SHA224", OPENSSL_ALGO_SHA224, CONST_CS|CONST_PERSISTENT);
@@ -3620,7 +3620,7 @@
RETURN_FALSE;
}
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
/* Due to changes in OpenSSL 1.1 related to locking when decoding CSR,
* the pub key is not changed after assigning. It means if we pass
* a private key, it will be returned including the private part.
@@ -3631,7 +3631,7 @@
/* Retrieve the public key from the CSR */
tpubkey = X509_REQ_get_pubkey(csr);
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
/* We need to free the CSR as it was duplicated */
X509_REQ_free(csr);
#endif

@ -1,30 +0,0 @@
From 4072b2787074ee8e247a6639585b49e10c5a55fe Mon Sep 17 00:00:00 2001
From: "Christoph M. Becker" <cmbecker69@gmx.de>
Date: Tue, 20 Mar 2018 16:35:39 +0100
Subject: [PATCH] Fix #76113: mbstring does not build with Oniguruma 6.8.1
As of Oniguruma 6.8.1, the regex structure has been moved from the
public `oniguruma.h` to the private `regint.h`. Thus, it is no longer
possible to directly access the struct's members, and actually, there
is no need to, since there are respective accessor functions available
at least of 2.3.1.
---
ext/mbstring/php_mbregex.c | 2 +-
1 file changed, 1 insertions(+), 1 deletion(-)
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index a5a6cd0..7a70c63 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -452,7 +452,7 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen);
- if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) {
+ if (!rc || onig_get_options(rc) != options || onig_get_encoding(rc) != enc || onig_get_syntax(rc) != syntax) {
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
onig_error_code_to_str(err_str, err_code, &err_info);
php_error_docref(NULL, E_WARNING, "mbregex compile err: %s", err_str);
--
2.1.4

@ -1,159 +0,0 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
https://github.com/php/php-src/pull/3701
https://github.com/php/php-src/commit/2bd299f7318492fd7e5cafffa562d76ba60e69d4
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2205,49 +2205,16 @@ dnl
dnl Common setup macro for ICU
dnl
AC_DEFUN([PHP_SETUP_ICU],[
- PHP_ARG_WITH(icu-dir,,
- [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
+ PKG_CHECK_MODULES([ICU], [icu-io >= 50.1])
- if test "$PHP_ICU_DIR" = "no"; then
- PHP_ICU_DIR=DEFAULT
- fi
-
- if test "$PHP_ICU_DIR" = "DEFAULT"; then
- dnl Try to find icu-config
- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
- else
- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
- fi
-
- AC_MSG_CHECKING([for location of ICU headers and libraries])
-
- dnl Trust icu-config to know better what the install prefix is..
- icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
- if test "$?" != "0" || test -z "$icu_install_prefix"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
- else
- AC_MSG_RESULT([$icu_install_prefix])
-
- dnl Check ICU version
- AC_MSG_CHECKING([for ICU 4.0 or greater])
- icu_version_full=`$ICU_CONFIG --version`
- ac_IFS=$IFS
- IFS="."
- set $icu_version_full
- IFS=$ac_IFS
- icu_version=`expr [$]1 \* 1000 + [$]2`
- AC_MSG_RESULT([found $icu_version_full])
+ PHP_EVAL_INCLINE($ICU_CFLAGS)
+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
- if test "$icu_version" -lt "4000"; then
- AC_MSG_ERROR([ICU version 4.0 or later is required])
- fi
+ ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
- ICU_VERSION=$icu_version
- ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
- ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
- PHP_EVAL_INCLINE($ICU_INCS)
- PHP_EVAL_LIBLINE($ICU_LIBS, $1)
+ if test "$PKG_CONFIG icu-io --atleast-version=60"; then
+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
fi
])
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
@@ -9,18 +9,10 @@ if test "$PHP_INTL" != "no"; then
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
PHP_SUBST(INTL_SHARED_LIBADD)
PHP_REQUIRE_CXX()
- if test "$icu_version" -ge "4002"; then
- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
- spoofchecker/spoofchecker.c\
- spoofchecker/spoofchecker_create.c\
- spoofchecker/spoofchecker_main.c"
- else
- icu_spoof_src=""
- fi
+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_NEW_EXTENSION(intl, php_intl.c \
intl_error.c \
intl_convert.c \
- intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -32,8 +24,6 @@ if test "$PHP_INTL" != "no"; then
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
- common/common_enum.cpp \
- common/common_date.cpp \
converter/converter.c \
formatter/formatter.c \
formatter/formatter_main.c \
@@ -53,17 +43,12 @@ if test "$PHP_INTL" != "no"; then
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
- dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
- dateformat/dateformat_create.cpp \
- dateformat/dateformat_attrcpp.cpp \
- dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
msgformat/msgformat_data.c \
msgformat/msgformat_format.c \
- msgformat/msgformat_helpers.cpp \
msgformat/msgformat_parse.c \
grapheme/grapheme_string.c \
grapheme/grapheme_util.c \
@@ -73,6 +58,21 @@ if test "$PHP_INTL" != "no"; then
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ uchar/uchar.c \
+ idn/idn.c \
+ spoofchecker/spoofchecker_class.c \
+ spoofchecker/spoofchecker.c\
+ spoofchecker/spoofchecker_create.c\
+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
+
+ PHP_INTL_CPP_SOURCES="intl_convertcpp.cpp \
+ common/common_enum.cpp \
+ common/common_date.cpp \
+ dateformat/dateformat_format_object.cpp \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
+ msgformat/msgformat_helpers.cpp \
timezone/timezone_class.cpp \
timezone/timezone_methods.cpp \
calendar/calendar_class.cpp \
@@ -83,10 +83,15 @@ if test "$PHP_INTL" != "no"; then
breakiterator/breakiterator_methods.cpp \
breakiterator/rulebasedbreakiterator_methods.cpp \
breakiterator/codepointiterator_internal.cpp \
- breakiterator/codepointiterator_methods.cpp \
- uchar/uchar.c \
- idn/idn.c \
- $icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,cxx)
+ breakiterator/codepointiterator_methods.cpp"
+
+ PHP_INTL_CPP_FLAGS="$ICU_CXXFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
+ if test "$ext_shared" = "no"; then
+ PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS)
+ else
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS, shared_objects_intl, yes)
+ fi
+
PHP_ADD_BUILD_DIR($ext_builddir/collator)
PHP_ADD_BUILD_DIR($ext_builddir/converter)
PHP_ADD_BUILD_DIR($ext_builddir/common)
--
2.19.2

@ -1,91 +0,0 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/45a05f38410d4a67c8c83c09906e2cfb42fc6e4c
https://github.com/php/php-src/commit/534684d1042978f3c21caf9b665a7aca27f3f325
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -27,6 +27,7 @@
#include <unicode/timezone.h>
#include <unicode/datefmt.h>
#include <unicode/calendar.h>
+#include <unicode/strenum.h>
#include <vector>
@@ -45,6 +46,7 @@ extern "C" {
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
#define HAS_MESSAGE_PATTERN 1
+#define HAS_MISALLOCATE_MEMORY_BUG 1
#endif
U_NAMESPACE_BEGIN
@@ -345,6 +347,26 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
return; /* already done */
}
+#ifdef HAS_MISALLOCATE_MEMORY_BUG
+ /* There is a bug in ICU which prevents MessageFormatter::getFormats()
+ to handle more than 10 formats correctly. The enumerator could be
+ used to walk through the present formatters using getFormat(), which
+ however seems to provide just a readonly access. This workaround
+ prevents crash when there are > 10 formats but doesn't set any error.
+ As a result, only DateFormatters with > 10 subformats are affected.
+ This workaround should be ifdef'd out, when the bug has been fixed
+ in ICU. */
+ icu::StringEnumeration* fnames = mf->getFormatNames(err.code);
+ if (!fnames || U_FAILURE(err.code)) {
+ return;
+ }
+ count = fnames->count(err.code);
+ delete fnames;
+ if (count > 10) {
+ return;
+ }
+#endif
+
formats = mf->getFormats(count);
if (formats == NULL) {
--- /dev/null
+++ b/ext/intl/tests/bug74484_MessageFormatter.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #74484 MessageFormatter::formatMessage memory corruption with 11+ named placeholder
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+?>
+--FILE--
+<?php
+$text = "{a} {b} {c} {d} {e} {f} {g} {h} {i} {j} {k} {l}";
+
+$vars = array(
+ 'a' => 1,
+ 'b' => 2,
+ 'c' => 3,
+ 'd' => 4,
+ 'e' => 5,
+ 'f' => 6,
+ 'g' => 7,
+ 'h' => 8,
+ 'i' => 9,
+ 'j' => 10,
+ 'k' => 11,
+ 'l' => 12
+);
+
+var_dump(MessageFormatter::formatMessage('en_US', $text, $vars));
+
+?>
+==DONE==
+--EXPECT--
+string(26) "1 2 3 4 5 6 7 8 9 10 11 12"
+==DONE==
--
2.19.2

@ -1,369 +0,0 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/8d35a423838eb462cd39ee535c5d003073cc5f22
https://github.com/php/php-src/commit/d8200e48857aeaf09f7127751efc5632ef7660a7
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
--- a/ext/intl/breakiterator/breakiterator_class.cpp
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -38,6 +38,7 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::RuleBasedBreakIterator;
/* {{{ Global variables */
zend_class_entry *BreakIterator_ce_ptr;
--- a/ext/intl/breakiterator/breakiterator_class.h
+++ b/ext/intl/breakiterator/breakiterator_class.h
@@ -26,6 +26,8 @@
#ifndef USE_BREAKITERATOR_POINTER
typedef void BreakIterator;
+#else
+using icu::BreakIterator;
#endif
typedef struct {
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -32,6 +32,8 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::BreakIterator;
+using icu::Locale;
U_CFUNC PHP_METHOD(BreakIterator, __construct)
{
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -33,6 +33,8 @@ typedef union {
using namespace PHP;
+using icu::UCharCharacterIterator;
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
CodePointBreakIterator::CodePointBreakIterator()
--- a/ext/intl/breakiterator/codepointiterator_internal.h
+++ b/ext/intl/breakiterator/codepointiterator_internal.h
@@ -18,8 +18,11 @@
#define CODEPOINTITERATOR_INTERNAL_H
#include <unicode/brkiter.h>
+#include <unicode/unistr.h>
-using U_ICU_NAMESPACE::BreakIterator;
+using icu::BreakIterator;
+using icu::CharacterIterator;
+using icu::UnicodeString;
namespace PHP {
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -26,6 +26,9 @@ extern "C" {
#include "../intl_convertcpp.h"
#include "../intl_common.h"
+using icu::RuleBasedBreakIterator;
+using icu::Locale;
+
static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
return (RuleBasedBreakIterator*)bio->biter;
}
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -34,6 +34,9 @@ extern "C" {
#include <assert.h>
}
+using icu::GregorianCalendar;
+using icu::Locale;
+
/* {{{ Global variables */
zend_class_entry *Calendar_ce_ptr;
zend_class_entry *GregorianCalendar_ce_ptr;
--- a/ext/intl/calendar/calendar_class.h
+++ b/ext/intl/calendar/calendar_class.h
@@ -26,6 +26,8 @@
#ifndef USE_CALENDAR_POINTER
typedef void Calendar;
+#else
+using icu::Calendar;
#endif
typedef struct {
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -40,6 +40,8 @@ extern "C" {
}
#include "../common/common_enum.h"
+using icu::Locale;
+
U_CFUNC PHP_METHOD(IntlCalendar, __construct)
{
zend_throw_exception( NULL,
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -23,6 +23,8 @@
#include <unicode/locid.h>
#include <unicode/calendar.h>
#include <unicode/gregocal.h>
+#include <unicode/ustring.h>
+
extern "C" {
#include "../php_intl.h"
#include "../intl_common.h"
@@ -34,6 +36,11 @@ extern "C" {
#include "zend_exceptions.h"
}
+using icu::GregorianCalendar;
+using icu::Locale;
+using icu::UnicodeString;
+using icu::StringPiece;
+
static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
return (GregorianCalendar*)co->ucal;
}
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -25,6 +25,9 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::TimeZone;
+using icu::UnicodeString;
+
#ifndef INFINITY
#define INFINITY (DBL_MAX+DBL_MAX)
#endif
--- a/ext/intl/common/common_date.h
+++ b/ext/intl/common/common_date.h
@@ -28,6 +28,8 @@ U_CDECL_END
#include <unicode/timezone.h>
+using icu::TimeZone;
+
U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
intl_error *err, const char *func);
--- a/ext/intl/common/common_enum.h
+++ b/ext/intl/common/common_enum.h
@@ -75,6 +75,7 @@ U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter);
U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
#ifdef __cplusplus
+using icu::StringEnumeration;
U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
#endif
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -18,6 +18,8 @@
#include "zend_exceptions.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
+#include <unicode/utf16.h>
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -33,6 +33,12 @@ extern "C" {
#include "../common/common_date.h"
}
+using icu::Locale;
+using icu::DateFormat;
+using icu::GregorianCalendar;
+using icu::StringPiece;
+using icu::SimpleDateFormat;
+
static const DateFormat::EStyle valid_styles[] = {
DateFormat::kNone,
DateFormat::kFull,
--- a/ext/intl/dateformat/dateformat_helpers.cpp
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -28,6 +28,8 @@ extern "C" {
#include "../calendar/calendar_class.h"
}
+using icu::GregorianCalendar;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/dateformat/dateformat_helpers.h
+++ b/ext/intl/dateformat/dateformat_helpers.h
@@ -22,11 +22,16 @@
#endif
#include <unicode/calendar.h>
+#include <unicode/datefmt.h>
extern "C" {
#include "../php_intl.h"
}
+using icu::Locale;
+using icu::Calendar;
+using icu::DateFormat;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -24,6 +24,7 @@
#include "grapheme_util.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
#include <unicode/ucol.h>
#include <unicode/ustring.h>
#include <unicode/ubrk.h>
@@ -831,10 +832,10 @@ PHP_FUNCTION(grapheme_extract)
pstr = str + start;
/* just in case pstr points in the middle of a character, move forward to the start of the next char */
- if ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
- char *str_end = str + str_len;
+ if ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ unsigned char *str_end = str + str_len;
- while ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ while ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
pstr++;
if ( pstr >= str_end ) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
--- a/ext/intl/intl_convertcpp.h
+++ b/ext/intl/intl_convertcpp.h
@@ -26,6 +26,8 @@
#include <unicode/unistr.h>
#include <zend_types.h>
+using icu::UnicodeString;
+
int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status);
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -76,6 +76,16 @@ MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
#endif
U_NAMESPACE_END
+using icu::Formattable;
+using icu::Format;
+using icu::DateFormat;
+using icu::MessageFormat;
+#ifdef HAS_MESSAGE_PATTERN
+using icu::MessagePattern;
+#endif
+using icu::MessageFormatAdapter;
+using icu::FieldPosition;
+
U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
{
int32_t fmt_count = 0;
@@ -227,15 +237,16 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
UnicodeString typeString = mp.getSubstring(type_part);
/* This is all based on the rules in the docs for MessageFormat
* @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */
- if (typeString == "number") {
+#define ASCII_LITERAL(s) UNICODE_STRING(s, sizeof(s)-1)
+ if (typeString == ASCII_LITERAL("number")) {
MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */
if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) {
UnicodeString styleString = mp.getSubstring(style_part);
- if (styleString == "integer") {
+ if (styleString == ASCII_LITERAL("integer")) {
type = Formattable::kInt64;
- } else if (styleString == "currency") {
+ } else if (styleString == ASCII_LITERAL("currency")) {
type = Formattable::kDouble;
- } else if (styleString == "percent") {
+ } else if (styleString == ASCII_LITERAL("percent")) {
type = Formattable::kDouble;
} else { /* some style invalid/unknown to us */
type = Formattable::kDouble;
@@ -243,12 +254,13 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
} else { // if missing style, part, make it a double
type = Formattable::kDouble;
}
- } else if ((typeString == "date") || (typeString == "time")) {
+ } else if ((typeString == ASCII_LITERAL("date")) || (typeString == ASCII_LITERAL("time"))) {
type = Formattable::kDate;
- } else if ((typeString == "spellout") || (typeString == "ordinal")
- || (typeString == "duration")) {
+ } else if ((typeString == ASCII_LITERAL("spellout")) || (typeString == ASCII_LITERAL("ordinal"))
+ || (typeString == ASCII_LITERAL("duration"))) {
type = Formattable::kDouble;
}
+#undef ASCII_LITERAL
} else {
/* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a
* UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -24,6 +24,7 @@
#include "normalizer_class.h"
#include "normalizer_normalize.h"
#include "intl_convert.h"
+#include <unicode/utf8.h>
/* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] )
* Normalize a string. }}} */
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -37,6 +37,8 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::Calendar;
+
/* {{{ Global variables */
U_CDECL_BEGIN
zend_class_entry *TimeZone_ce_ptr = NULL;
--- a/ext/intl/timezone/timezone_class.h
+++ b/ext/intl/timezone/timezone_class.h
@@ -29,6 +29,8 @@
#ifndef USE_TIMEZONE_POINTER
typedef void TimeZone;
+#else
+using icu::TimeZone;
#endif
typedef struct {
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -23,6 +23,7 @@
#include <unicode/locid.h>
#include <unicode/timezone.h>
#include <unicode/ustring.h>
+#include <unicode/calendar.h>
#include "intl_convertcpp.h"
#include "../common/common_date.h"
@@ -37,6 +38,9 @@ extern "C" {
}
#include "common/common_enum.h"
+using icu::Locale;
+using icu::Calendar;
+
U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
{
zend_throw_exception( NULL,
--
2.19.2

@ -1,751 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit flag-o-matic eapi7-ver systemd
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 sharedmem
+simplexml snmp soap sockets spell sqlite ssl
sysvipc systemd 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 ) )
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-61.1:= )
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 )
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= )
)
tidy? ( app-text/htmltidy )
truetype? (
=media-libs/freetype-2*
!gd? (
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
)
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
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 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 )
sharedmem? ( !threads )
mysql? ( || ( mysqli pdo ) )
"
PATCHES=(
"${FILESDIR}/mbstring-oniguruma-6.8.patch"
# hopefully upstream will include the same version check fixes in upcoming releases
# patch added 20180429
"${FILESDIR}/libressl-compatibility.patch"
"${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'
}
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 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|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,754 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit flag-o-matic systemd
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 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 sharedmem
+simplexml snmp soap sockets spell sqlite ssl
sysvipc systemd 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 ) )
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] )
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= )
)
tidy? ( app-text/htmltidy )
truetype? (
=media-libs/freetype-2*
!gd? (
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
)
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
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 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 )
sharedmem? ( !threads )
mysql? ( || ( mysqli pdo ) )
"
PATCHES=(
"${FILESDIR}/mbstring-oniguruma-6.8.patch"
# hopefully upstream will include the same version check fixes in upcoming releases
# patch added 20180429
"${FILESDIR}/libressl-compatibility.patch"
"${FILESDIR}/php-freetype-2.9.1.patch"
"${FILESDIR}/php-7.0.33-intl-detect-icu-via-pkg-config.patch"
"${FILESDIR}/php-7.0.33-intl-use-icu-namespace.patch"
"${FILESDIR}/php-7.0.33-intl-icu-memory-corruption.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'
}
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 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|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
}

@ -2,3 +2,5 @@ DIST vala-0.32.1.tar.xz 2759528 BLAKE2B cce23844ee5769216ef5cccb20476f4bdd2cb809
DIST vala-0.34.16.tar.xz 2795676 BLAKE2B 64428099c209e13a6aad09233af650f412efa191ff4873fae1dbfb9bcc252e13d4e152733c9f199cd23323872fd912807a685980f651c1f784bfaffae7bf4162 SHA512 6411d55524a6c717c2eaf5cc1231ac931400e3f66d151a8b8856910258eb5bd7affe3a90946de34feb51aabfafce721b8d57f61e0475095b275d20b73cc4bbec
DIST vala-0.36.15.tar.xz 2880300 BLAKE2B ea83bde6396f3be1c96038d63ae30b18fa070a6f7a06b75569bfed9d7792c898201a1f24d000f5b6415bb890cf975758341a97f22db74da02fcbeb3f283e546f SHA512 1c8f888832b2dd4248737a5a27f00f42d8bab2fe0a0790a7df5c426f4e3e1d0919ed0f6f6fd905be758ed477ba840e18f608e67811389c811ba65710094abe61
DIST vala-0.36.17.tar.xz 2898524 BLAKE2B 4a5a373bacd4e4a392350c7819e0498054e38f50dce89658412d7aeb5642892ef9f32a7689ebd45f53c41f064e0b6d2f52fb441be67a1dd48e67311a1e764637 SHA512 93d4fa600cd0ef62b71ed056b837f2c0a42c3aba25b021b2bbd2045428550307727827b250dae546926ea3fe2e33a5ac80c9b24b5100f02550ec584dd5da5e92
DIST vala-0.40.13.tar.xz 3394588 BLAKE2B cb3055b859b220f999bc5b4533251a069e9c10690963bc92b087b0ab351f0d78eb8f5992b747cc345d9d2a3dba69c68d130bca20604036c2c62e380442675e8b SHA512 0590224ec5128f6939b66109b6bcf7f764af3ece28f9bce9a5d715f53defbc8746d5d20599039b067848da2f38fdae7a057427be1ea9ef0fe09e0ce45db091d0
DIST vala-0.42.5.tar.xz 3350460 BLAKE2B 790c9f9e9e656ce96226f1ac6a0d090033ecf1943d024da0c9ee174bf65f76a14721819c6c2263c5b094f16cf112cc964000000ee42c9a7fdc0f2ad6fc01feb7 SHA512 1862307eab505e500326f84e267648f084926629f6b45b9abb6a90a20a7aa6dd2fc305962b9028c5ca7becb574573cca43fbecd9294b782d9942e71639a32aa9

@ -0,0 +1,184 @@
From 1dae711f17473e12c822a657ffca02abee27b3a2 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Sun, 27 Aug 2017 16:03:03 +0200
Subject: [PATCH] build: Allow disabling the build of valadoc
Allow disabling build of valadoc with configure option --disable-valadoc
Fixes https://gitlab.gnome.org/GNOME/vala/issues/596
---
Makefile.am | 10 +++++++++
configure.ac | 59 ++++++++++++++++++++++++++-----------------------
doc/Makefile.am | 17 +++++++++++++-
3 files changed, 57 insertions(+), 29 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 88bef90ed..e4d46741f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,9 +13,19 @@ SUBDIRS = \
doc \
gobject-introspection \
vapigen \
+ $(NULL)
+
+if ENABLE_VALADOC
+SUBDIRS += \
libvaladoc \
valadoc \
$(NULL)
+endif
+
+DISTCHECK_CONFIGURE_FLAGS = \
+ --enable-valadoc \
+ --enable-unversioned \
+ $(NULL)
if ENABLE_UNVERSIONED
aclocaldir = $(datadir)/aclocal
diff --git a/configure.ac b/configure.ac
index 88ca0f94b..9d1c97417 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,35 +119,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
-AC_MSG_CHECKING([for CGRAPH])
-cgraph_tmp_LIBADD="$LIBADD"
-cgraph_tmp_CFLAGS="$CFLAGS"
-LIBADD="$LIBADD $LIBGVC_LIBS"
-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
-AC_RUN_IFELSE(
- [AC_LANG_SOURCE([
- #include <gvc.h>
-
- int main(void) {
- #ifdef WITH_CGRAPH
- return 0;
- #else
- return -1;
- #endif
- }
- ])], [
- AC_MSG_RESULT([yes])
- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
- have_cgraph=yes
- ], [
- AC_MSG_RESULT([no])
- have_cgraph=no
- ]
-)
-LIBADD="$cgraph_tmp_LIBADD"
-CFLAGS="$cgraph_tmp_CFLAGS"
+AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, enable_valadoc=yes)
+if test x$enable_valadoc = xyes; then
+ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+ AC_MSG_CHECKING([for CGRAPH])
+ cgraph_tmp_LIBADD="$LIBADD"
+ cgraph_tmp_CFLAGS="$CFLAGS"
+ LIBADD="$LIBADD $LIBGVC_LIBS"
+ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([
+ #include <gvc.h>
+ int main(void) {
+ #ifdef WITH_CGRAPH
+ return 0;
+ #else
+ return -1;
+ #endif
+ }
+ ])], [
+ AC_MSG_RESULT([yes])
+ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
+ have_cgraph=yes
+ ], [
+ AC_MSG_RESULT([no])
+ have_cgraph=no
+ ]
+ )
+ LIBADD="$cgraph_tmp_LIBADD"
+ CFLAGS="$cgraph_tmp_CFLAGS"
+fi
AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
AC_PATH_PROG([XSLTPROC], [xsltproc], :)
AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 758ad733a..b79f229c4 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -6,11 +6,16 @@ SUBDIRS = \
dist_man_MANS = \
valac.1 \
- valadoc.1 \
vala-gen-introspect.1 \
vapigen.1 \
$(NULL)
+if ENABLE_VALADOC
+dist_man_MANS += \
+ valadoc.1 \
+ $(NULL)
+endif
+
EXTRA_DIST = \
valac.h2m \
valadoc.h2m \
@@ -19,7 +24,11 @@ EXTRA_DIST = \
$(NULL)
if HAVE_HELP2MAN
+if ENABLE_VALADOC
manpages: valac.1 valadoc.1 vala-gen-introspect.1 vapigen.1
+else
+manpages: valac.1 vala-gen-introspect.1 vapigen.1
+endif
@rm $^
$(MAKE) $(AM_MAKEFLAGS) $^
@@ -28,11 +37,13 @@ valac.1:
--include $(srcdir)/valac.h2m \
--libtool --no-info \
--output=$@
+if ENABLE_VALADOC
valadoc.1:
$(HELP2MAN) $(top_builddir)/valadoc/valadoc \
--include $(srcdir)/valadoc.h2m \
--libtool --no-info \
--output=$@
+endif
vala-gen-introspect.1:
$(HELP2MAN) $(top_builddir)/gobject-introspection/gen-introspect \
--include $(srcdir)/vala-gen-introspect.h2m \
@@ -49,12 +60,15 @@ endif
if ENABLE_UNVERSIONED
install-data-hook:
cd $(DESTDIR)$(man1dir) && $(LN_S) -f valac@PACKAGE_SUFFIX@.1 valac.1
+if ENABLE_VALADOC
cd $(DESTDIR)$(man1dir) && $(LN_S) -f valadoc@PACKAGE_SUFFIX@.1 valadoc.1
+endif
cd $(DESTDIR)$(man1dir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@.1 vala-gen-introspect.1
cd $(DESTDIR)$(man1dir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.1 vapigen.1
endif
+if ENABLE_VALADOC
COMMON_VALADOCFLAGS = \
--force \
--verbose \
@@ -130,6 +144,7 @@ internal-apis/valadoc: $(valadoc_VALASOURCES) internal-apis/codegen
@touch $@
internal-api-docs: internal-apis/gee internal-apis/vala internal-apis/ccode internal-apis/codegen internal-apis/valadoc
+endif
clean-local:
rm -rf $(builddir)/internal-apis
--
2.20.1

@ -0,0 +1,212 @@
From 3dc5768c045c400ff522b8a510b789001aa93df4 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Fri, 4 Jan 2019 11:31:14 +0100
Subject: [PATCH 2/2] Make valadoc doclets & data parallel installable
---
libvaladoc/Makefile.am | 12 ++++++++++--
valadoc/Makefile.am | 7 ++++++-
valadoc/doclets/devhelp/Makefile.am | 11 ++++++++---
valadoc/doclets/gtkdoc/Makefile.am | 11 ++++++++---
valadoc/doclets/html/Makefile.am | 11 ++++++++---
valadoc/icons/Makefile.am | 4 ++++
valadoc/tests/Makefile.am | 7 ++++++-
7 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
index f3f790e76..86875631b 100644
--- a/libvaladoc/Makefile.am
+++ b/libvaladoc/Makefile.am
@@ -3,8 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
- -DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
$(COVERAGE_CFLAGS) \
$(LIBGVC_CFLAGS) \
@@ -16,6 +14,16 @@ AM_CFLAGS = \
-I$(top_srcdir)/codegen \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += \
+ -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
+ -DPACKAGE_DATADIR=\"$(libdir)/valadoc\"
+else
+AM_CFLAGS += \
+ -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\" \
+ -DPACKAGE_DATADIR=\"$(libdir)/valadoc@PACKAGE_SUFFIX@\"
+endif
+
AM_VALAFLAGS = \
$(NULL)
diff --git a/valadoc/Makefile.am b/valadoc/Makefile.am
index 33f3a9375..2f3dec848 100644
--- a/valadoc/Makefile.am
+++ b/valadoc/Makefile.am
@@ -9,7 +9,6 @@ SUBDIRS = \
$(NULL)
AM_CFLAGS = \
- -DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
-I$(top_srcdir)/libvaladoc/ \
-I$(top_srcdir)/gee \
@@ -22,6 +21,12 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc\"
+else
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc@PACKAGE_SUFFIX@\"
+endif
+
BUILT_SOURCES = valadoc.vala.stamp
bin_PROGRAMS = valadoc
diff --git a/valadoc/doclets/devhelp/Makefile.am b/valadoc/doclets/devhelp/Makefile.am
index 5783c0b5a..afbb8f7f9 100644
--- a/valadoc/doclets/devhelp/Makefile.am
+++ b/valadoc/doclets/devhelp/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
@@ -12,12 +11,18 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\"
+docletdir = $(libdir)/valadoc/doclets/devhelp
+else
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\"
+docletdir = $(libdir)/valadoc@PACKAGE_SUFFIX@/doclets/devhelp
+endif
+
BUILT_SOURCES = libdoclet.vala.stamp
doclet_LTLIBRARIES = libdoclet.la
-docletdir = $(libdir)/valadoc/doclets/devhelp
-
libdoclet_la_LDFLAGS = -module -avoid-version -no-undefined
libdoclet_la_VALASOURCES = \
diff --git a/valadoc/doclets/gtkdoc/Makefile.am b/valadoc/doclets/gtkdoc/Makefile.am
index 763e46932..f689018ce 100644
--- a/valadoc/doclets/gtkdoc/Makefile.am
+++ b/valadoc/doclets/gtkdoc/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
@@ -12,12 +11,18 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\"
+docletdir = $(libdir)/valadoc/doclets/gtkdoc
+else
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\"
+docletdir = $(libdir)/valadoc@PACKAGE_SUFFIX@/doclets/gtkdoc
+endif
+
BUILT_SOURCES = libdoclet.vala.stamp
doclet_LTLIBRARIES = libdoclet.la
-docletdir = $(libdir)/valadoc/doclets/gtkdoc
-
libdoclet_la_LDFLAGS = -module -avoid-version -no-undefined
libdoclet_la_VALASOURCES = \
diff --git a/valadoc/doclets/html/Makefile.am b/valadoc/doclets/html/Makefile.am
index 885fbfbab..855184020 100644
--- a/valadoc/doclets/html/Makefile.am
+++ b/valadoc/doclets/html/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
@@ -12,12 +11,18 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\"
+docletdir = $(libdir)/valadoc/doclets/html
+else
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\"
+docletdir = $(libdir)/valadoc@PACKAGE_SUFFIX@/doclets/html
+endif
+
BUILT_SOURCES = libdoclet.vala.stamp
doclet_LTLIBRARIES = libdoclet.la
-docletdir = $(libdir)/valadoc/doclets/html
-
libdoclet_la_LDFLAGS = -module -avoid-version -no-undefined
libdoclet_la_VALASOURCES = \
diff --git a/valadoc/icons/Makefile.am b/valadoc/icons/Makefile.am
index 454bdba7c..668956f3b 100644
--- a/valadoc/icons/Makefile.am
+++ b/valadoc/icons/Makefile.am
@@ -1,6 +1,10 @@
NULL =
+if ENABLE_UNVERSIONED
iconsdir = $(datadir)/valadoc/icons
+else
+iconsdir = $(datadir)/valadoc@PACKAGE_SUFFIX@/icons
+endif
dist_icons_DATA = \
abstractclass.png \
diff --git a/valadoc/tests/Makefile.am b/valadoc/tests/Makefile.am
index e40cc1ca3..2bca58128 100644
--- a/valadoc/tests/Makefile.am
+++ b/valadoc/tests/Makefile.am
@@ -22,7 +22,6 @@ check-TESTS: $(TESTS)
G_DEBUG=fatal_warnings $(builddir)/driver
AM_CFLAGS = \
- -DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
-DTOP_SRC_DIR=\"$(abs_top_srcdir)\" \
-I$(top_srcdir)/libvaladoc/ \
@@ -36,6 +35,12 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc\"
+else
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc@PACKAGE_SUFFIX@\"
+endif
+
BUILT_SOURCES = driver.vala.stamp
check_PROGRAMS = driver
--
2.20.1

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<use>
<flag name="valadoc">Installs valadoc documentation generation tool</flag>
</use>
</pkgmetadata>

@ -0,0 +1,56 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
GNOME2_EAUTORECONF="yes"
inherit gnome2
DESCRIPTION="Compiler for the GObject type system"
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1"
SLOT="0.40"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
IUSE="test valadoc"
RDEPEND="
>=dev-libs/glib-2.40.0:2
>=dev-libs/vala-common-${PV}
valadoc? ( >=media-gfx/graphviz-2.16 )
"
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 )
"
PATCHES=(
# From master
"${FILESDIR}"/0.40-Allow-disabling-the-build-of-valadoc.patch
# Add missing bits to make valadoc parallel installable
"${FILESDIR}"/0.40-valadoc-doclets-data-parallel-installable.patch
)
src_configure() {
# https://bugs.gentoo.org/483134
export GIT_CEILING_DIRECTORIES="${WORKDIR}"
# weasyprint enables generation of PDF from HTML
gnome2_src_configure \
--disable-unversioned \
$(use_enable valadoc) \
VALAC=: \
WEASYPRINT=:
}
src_install() {
default
find "${D}" -name "*.la" -delete || die
}

@ -0,0 +1,56 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
GNOME2_EAUTORECONF="yes"
inherit gnome2
DESCRIPTION="Compiler for the GObject type system"
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1"
SLOT="0.42"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
IUSE="test valadoc"
RDEPEND="
>=dev-libs/glib-2.40.0:2
>=dev-libs/vala-common-${PV}
valadoc? ( >=media-gfx/graphviz-2.16 )
"
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 )
"
PATCHES=(
# From master
"${FILESDIR}"/0.40-Allow-disabling-the-build-of-valadoc.patch
# Add missing bits to make valadoc parallel installable
"${FILESDIR}"/0.40-valadoc-doclets-data-parallel-installable.patch
)
src_configure() {
# https://bugs.gentoo.org/483134
export GIT_CEILING_DIRECTORIES="${WORKDIR}"
# weasyprint enables generation of PDF from HTML
gnome2_src_configure \
--disable-unversioned \
$(use_enable valadoc) \
VALAC=: \
WEASYPRINT=:
}
src_install() {
default
find "${D}" -name "*.la" -delete || die
}

Binary file not shown.

@ -1 +1,2 @@
DIST json-c-0.12.tar.gz 501419 BLAKE2B 24f035792ff1ba5c39e55bca6ee4ba2509ab71d0374c70b520791f38e1ec4ff2245a282f234fde9f4a02cd9eaaaaa998ce307563a20702c04ee972fdf51f2539 SHA512 c959804362386f6b77e9d04b5fedf6d6aff1fcd0ab50250edb25f759b510b402e7ad4b33d1cbadc3337b63a3145d19f310812a9ee351748348304b384dc2dc35
DIST json-c-0.13.1.tar.gz 639425 BLAKE2B 1da310309f9ce03306a9fd4a161670e460cf0b2222348df7c006902390f74a4cf100aab1ce6ac8a361a278dd917c114a278de5b3445817f3a40ae287478add46 SHA512 e984db2a42b9c95b52c798b2e8dd1b79951a8dcba27370af30c43b9549fbb00008dbcf052a535c528209aaee38e6d1f760168b706905ae72f3e704ed20f8a1a1

@ -0,0 +1,40 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
AUTOTOOLS_AUTORECONF=true
inherit autotools-multilib
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/2"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc static-libs"
RDEPEND=""
# tests break otherwise
AUTOTOOLS_IN_SOURCE_BUILD=1
src_prepare() {
sed -i -e "s:-Werror::" Makefile.am.inc || die
autotools-multilib_src_prepare
}
src_test() {
export USE_VALGRIND=0 VERBOSE=1
autotools-multilib_src_test
}
src_install() {
use doc && HTML_DOCS=( "${S}"/doc/html )
autotools-multilib_src_install
# add symlink for projects not using pkgconfig
dosym ../json-c /usr/include/json-c/json
}

@ -12,7 +12,7 @@ SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
LICENSE="MIT"
SLOT="0/10"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc ~x86"
IUSE="doc input_devices_wacom"
# Tests require write access to udev rules directory which is a no-no for live system.
# Other tests are just about logs, exported symbols and autotest of the test library.

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -10,7 +10,7 @@ HOMEPAGE="https://github.com/michaelrsweet/mxml
https://www.msweet.org/mxml/"
SRC_URI="https://github.com/michaelrsweet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ppc ~ppc64 ~sparc ~x86"
LICENSE="Mini-XML"
SLOT="0"
IUSE="static-libs threads"

@ -15,7 +15,7 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.
LICENSE="BSD-2"
# Subslot == SONAME version
SLOT="0/1.0.0"
KEYWORDS="alpha ~amd64 ~arm arm64 hppa ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86"
KEYWORDS="alpha ~amd64 ~arm arm64 hppa ia64 ~mips ppc ~ppc64 ~s390 sparc x86"
IUSE="static-libs test"
RDEPEND=">=dev-libs/protobuf-2.6.0:0=[${MULTILIB_USEDEP}]"

@ -10,7 +10,7 @@ if [[ ${PV} == *9999 ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/zeux/${PN}/releases/download/v${PV}/${P}.tar.gz"
KEYWORDS="amd64 ~arm ~hppa ia64 ~ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
KEYWORDS="amd64 ~arm ~hppa ia64 ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
fi
DESCRIPTION="Light-weight, simple, and fast XML parser for C++ with XPath support"

@ -0,0 +1,88 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit db-use libtool
DESCRIPTION="High-level interface for the Resource Description Framework"
HOMEPAGE="http://librdf.org/"
SRC_URI="http://download.librdf.org/source/${P}.tar.gz"
LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="berkdb iodbc mysql odbc postgres sqlite static-libs"
RDEPEND="dev-libs/libltdl:0
mysql? ( dev-db/mysql-connector-c:0= )
sqlite? ( =dev-db/sqlite-3* )
berkdb? ( sys-libs/db )
>=media-libs/raptor-2.0.14
>=dev-libs/rasqal-0.9.32
postgres? ( dev-db/postgresql )
iodbc? ( dev-db/libiodbc )
odbc? ( dev-db/unixODBC )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
MAKEOPTS="${MAKEOPTS} -j1" #500574, required for both src_compile() and src_install()
src_prepare() {
default
elibtoolize # NOTE: this is for fbsd .so version
}
src_configure() {
local myconf=( --without-virtuoso )
if use iodbc; then
myconf=( --with-virtuoso --with-iodbc --without-unixodbc )
elif use odbc; then
myconf=( --with-virtuoso --with-unixodbc --without-iodbc )
fi
if use berkdb; then
myconf+=(
--with-bdb-include="$(db_includedir)"
--with-bdb-lib="${EPREFIX}"/usr/$(get_libdir)
--with-bdb-dbname="$(db_libname)"
)
fi
# FIXME: upstream doesn't test with --with-threads and testsuite fails
econf \
$(use_enable static-libs static) \
$(use_with berkdb bdb) \
$(use_with mysql) \
$(use_with sqlite) \
$(use_with postgres postgresql) \
--without-threads \
--with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
"${myconf[@]}"
}
src_test() {
if ! use berkdb; then
export REDLAND_TEST_CLONING_STORAGE_TYPE=hashes
export REDLAND_TEST_CLONING_STORAGE_NAME=test
export REDLAND_TEST_CLONING_STORAGE_OPTIONS="hash-type='memory',dir='.',write='yes',new='yes',contexts='yes'"
fi
default
}
src_install() {
default
docinto html
dodoc {FAQS,NEWS,README,RELEASE,TODO}.html
find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
# !!! REMOVE THIS ON VERSION BUMP, see bug 468298 for proper fix !!!
if [[ -n ${LDFLAGS} ]]; then
sed -i \
-e "s:${LDFLAGS} ::g" \
"${ED}"/usr/$(get_libdir)/pkgconfig/${PN}.pc || die
fi
# https://bugs.gentoo.org/467768
local _rdocdir=/usr/share/doc/${PF}/html/${PN}
[[ -d ${ED}/${_rdocdir} ]] && dosym ${_rdocdir} /usr/share/gtk-doc/html/${PN}
}

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -12,7 +12,7 @@ SRC_URI="https://gforge.inria.fr/frs/download.php/file/37744/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0/8"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="
blas cuda doc examples fftw fortran gcc-plugin mpi opencl opengl

@ -1,2 +1,4 @@
DIST vala-0.36.15.tar.xz 2880300 BLAKE2B ea83bde6396f3be1c96038d63ae30b18fa070a6f7a06b75569bfed9d7792c898201a1f24d000f5b6415bb890cf975758341a97f22db74da02fcbeb3f283e546f SHA512 1c8f888832b2dd4248737a5a27f00f42d8bab2fe0a0790a7df5c426f4e3e1d0919ed0f6f6fd905be758ed477ba840e18f608e67811389c811ba65710094abe61
DIST vala-0.36.17.tar.xz 2898524 BLAKE2B 4a5a373bacd4e4a392350c7819e0498054e38f50dce89658412d7aeb5642892ef9f32a7689ebd45f53c41f064e0b6d2f52fb441be67a1dd48e67311a1e764637 SHA512 93d4fa600cd0ef62b71ed056b837f2c0a42c3aba25b021b2bbd2045428550307727827b250dae546926ea3fe2e33a5ac80c9b24b5100f02550ec584dd5da5e92
DIST vala-0.40.13.tar.xz 3394588 BLAKE2B cb3055b859b220f999bc5b4533251a069e9c10690963bc92b087b0ab351f0d78eb8f5992b747cc345d9d2a3dba69c68d130bca20604036c2c62e380442675e8b SHA512 0590224ec5128f6939b66109b6bcf7f764af3ece28f9bce9a5d715f53defbc8746d5d20599039b067848da2f38fdae7a057427be1ea9ef0fe09e0ce45db091d0
DIST vala-0.42.5.tar.xz 3350460 BLAKE2B 790c9f9e9e656ce96226f1ac6a0d090033ecf1943d024da0c9ee174bf65f76a14721819c6c2263c5b094f16cf112cc964000000ee42c9a7fdc0f2ad6fc01feb7 SHA512 1862307eab505e500326f84e267648f084926629f6b45b9abb6a90a20a7aa6dd2fc305962b9028c5ca7becb574573cca43fbecd9294b782d9942e71639a32aa9

@ -0,0 +1,76 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
GNOME_ORG_MODULE="vala"
inherit gnome.org
DESCRIPTION="Build infrastructure for packages that use Vala"
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
IUSE=""
# Previously ${PN} was part of dev-lang/vala
RDEPEND="
!<dev-lang/vala-0.10.4-r2
!<dev-lang/vala-0.12.1-r1:0.12
!<dev-lang/vala-0.14.2-r2:0.14
!<dev-lang/vala-0.16.1-r2:0.16
!<dev-lang/vala-0.17.5:0.18
"
DEPEND=""
src_configure() { :; }
src_compile() { :; }
src_install() {
insinto /usr/share/aclocal
doins vala.m4 vapigen/vapigen.m4
insinto /usr/share/vala
doins vapigen/Makefile.vapigen
}
pkg_postinst() {
# Hack to prevent alternatives_auto_makesym in previously installed
# dev-lang/vala's pkg_postrm from overwriting vala-common's files
if has_version '<dev-lang/vala-0.10.4-r2:0.10' && [[ -f "${EROOT}usr/share/aclocal/vala-0-10.m4" ]]; then
ebegin "Removing old vala-0.10 macros"
rm "${EROOT}usr/share/aclocal/vala-0-10.m4" &> /dev/null
eend $?
fi
if has_version '<dev-lang/vala-0.12.1-r1:0.12' && [[ -f "${EROOT}usr/share/aclocal/vala-0-12.m4" ]]; then
ebegin "Removing old vala-0.12 macros"
rm "${EROOT}usr/share/aclocal/vala-0-12.m4" &> /dev/null
eend $?
fi
if has_version '<dev-lang/vala-0.14.2-r2:0.14' && [[ -f "${EROOT}usr/share/aclocal/vala-0-14.m4" ]]; then
ebegin "Removing old vala-0.14 macros"
rm "${EROOT}usr/share/aclocal/vala-0-14.m4" &> /dev/null
eend $?
fi
if has_version '<dev-lang/vala-0.16.1-r2:0.16' && [[ -f "${EROOT}usr/share/aclocal/vala-0-16.m4" ]]; then
ebegin "Removing old vala-0.16 macros"
rm "${EROOT}usr/share/aclocal/vala-0-14.m4" &> /dev/null
eend $?
if [[ -f "${EROOT}usr/share/vala-0.16/Makefile.vapigen" ]]; then
ebegin "Removing old vala-0.16 makefile template"
rm "${EROOT}usr/share/vala-0.16/Makefile.vapigen" &> /dev/null
eend $?
fi
fi
if has_version '<dev-lang/vala-0.17.5:0.18' && [[ -f "${EROOT}usr/share/aclocal/vala-0-18.m4" ]]; then
ebegin "Removing old vala-0.18 macros"
rm "${EROOT}usr/share/aclocal/vala-0-12.m4" &> /dev/null
eend $?
if [[ -f "${EROOT}usr/share/vala-0.18/Makefile.vapigen" ]]; then
ebegin "Removing old vala-0.18 makefile template"
rm "${EROOT}usr/share/vala-0.18/Makefile.vapigen" &> /dev/null
eend $?
fi
fi
}

@ -0,0 +1,76 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
GNOME_ORG_MODULE="vala"
inherit gnome.org
DESCRIPTION="Build infrastructure for packages that use Vala"
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
IUSE=""
# Previously ${PN} was part of dev-lang/vala
RDEPEND="
!<dev-lang/vala-0.10.4-r2
!<dev-lang/vala-0.12.1-r1:0.12
!<dev-lang/vala-0.14.2-r2:0.14
!<dev-lang/vala-0.16.1-r2:0.16
!<dev-lang/vala-0.17.5:0.18
"
DEPEND=""
src_configure() { :; }
src_compile() { :; }
src_install() {
insinto /usr/share/aclocal
doins vala.m4 vapigen/vapigen.m4
insinto /usr/share/vala
doins vapigen/Makefile.vapigen
}
pkg_postinst() {
# Hack to prevent alternatives_auto_makesym in previously installed
# dev-lang/vala's pkg_postrm from overwriting vala-common's files
if has_version '<dev-lang/vala-0.10.4-r2:0.10' && [[ -f "${EROOT}usr/share/aclocal/vala-0-10.m4" ]]; then
ebegin "Removing old vala-0.10 macros"
rm "${EROOT}usr/share/aclocal/vala-0-10.m4" &> /dev/null
eend $?
fi
if has_version '<dev-lang/vala-0.12.1-r1:0.12' && [[ -f "${EROOT}usr/share/aclocal/vala-0-12.m4" ]]; then
ebegin "Removing old vala-0.12 macros"
rm "${EROOT}usr/share/aclocal/vala-0-12.m4" &> /dev/null
eend $?
fi
if has_version '<dev-lang/vala-0.14.2-r2:0.14' && [[ -f "${EROOT}usr/share/aclocal/vala-0-14.m4" ]]; then
ebegin "Removing old vala-0.14 macros"
rm "${EROOT}usr/share/aclocal/vala-0-14.m4" &> /dev/null
eend $?
fi
if has_version '<dev-lang/vala-0.16.1-r2:0.16' && [[ -f "${EROOT}usr/share/aclocal/vala-0-16.m4" ]]; then
ebegin "Removing old vala-0.16 macros"
rm "${EROOT}usr/share/aclocal/vala-0-14.m4" &> /dev/null
eend $?
if [[ -f "${EROOT}usr/share/vala-0.16/Makefile.vapigen" ]]; then
ebegin "Removing old vala-0.16 makefile template"
rm "${EROOT}usr/share/vala-0.16/Makefile.vapigen" &> /dev/null
eend $?
fi
fi
if has_version '<dev-lang/vala-0.17.5:0.18' && [[ -f "${EROOT}usr/share/aclocal/vala-0-18.m4" ]]; then
ebegin "Removing old vala-0.18 macros"
rm "${EROOT}usr/share/aclocal/vala-0-12.m4" &> /dev/null
eend $?
if [[ -f "${EROOT}usr/share/vala-0.18/Makefile.vapigen" ]]; then
ebegin "Removing old vala-0.18 makefile template"
rm "${EROOT}usr/share/vala-0.18/Makefile.vapigen" &> /dev/null
eend $?
fi
fi
}

@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]] ; then
inherit subversion
else
SRC_URI="mirror://apache/xerces/c/3/sources/${P}.tar.gz"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ~ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ia64 ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
fi
LICENSE="Apache-2.0"

Binary file not shown.

@ -0,0 +1,38 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit findlib
IUSE="+ocamlopt"
DESCRIPTION="A package for ocaml that provides access to mysql databases"
SRC_URI="http://ygrek.org.ua/p/release/ocaml-mysql/${P}.tar.gz"
HOMEPAGE="http://ocaml-mysql.forge.ocamlcore.org/"
DEPEND=">=dev-lang/ocaml-3.10.2:=[ocamlopt?]
sys-libs/zlib
dev-db/mysql-connector-c:0="
RDEPEND="$DEPEND"
SLOT="0/${PV}"
LICENSE="LGPL-2"
KEYWORDS="~amd64 ~ppc ~x86"
src_compile()
{
emake all
if use ocamlopt; then
emake opt
fi
}
src_install()
{
findlib_src_preinst
emake install
dodoc CHANGES README VERSION
}

@ -1,9 +1,9 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
EAPI=7
inherit findlib eutils
inherit findlib
IUSE="+ocamlopt"
@ -13,7 +13,7 @@ HOMEPAGE="http://ocaml-mysql.forge.ocamlcore.org/"
DEPEND=">=dev-lang/ocaml-3.10.2:=[ocamlopt?]
sys-libs/zlib
>=virtual/mysql-4.0"
dev-db/mysql-connector-c:0="
RDEPEND="$DEPEND"
@ -34,5 +34,5 @@ src_install()
findlib_src_preinst
emake install
dodoc CHANGES README VERSION || die
dodoc CHANGES README VERSION
}

Binary file not shown.

@ -1 +1 @@
DIST sip-4.19.14.dev1812231555.tar.gz 1020224 BLAKE2B e3df5a8b7829278987c5b368b8b6c28c04fc0b3bb3847451e48411ef9ba5cda932007613ad31f34381446ea02d62281b27ae4951babca5ec8b75f065aa296365 SHA512 decf2f7baacede27c42d359eb875a895c9a92b36a8e8a29f4666b3f98f570d821e80dbb32fd946ce230f726fafc4000af9b167df8cfd188bcd7f85fbc71bd4b1
DIST sip-4.19.14.tar.gz 1049688 BLAKE2B 8e68910f533d0f58bef1f20ec58579ce0166efaee2caef1c64d4e9878b0887040d9284a9fa5ee48d7a4f0949866d0b988b0d962303f0ace03a4ad48bd08eec5d SHA512 afde261331f38eac863d8cea0e343649f460f0b9a603d7fe91f14583904ea4b488bbd88d20fad5c985c43c6c1683fffee38676d94831ac8f2de40d9ed4d0423e

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -13,14 +13,14 @@ MY_P=sip-${PV/_pre/.dev}
if [[ ${PV} == *_pre* ]]; then
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
else
SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
SRC_URI="https://www.riverbankcomputing.com/static/Downloads/sip/${MY_P}.tar.gz"
fi
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
SLOT="0/12"
LICENSE="|| ( GPL-2 GPL-3 SIP )"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
IUSE="debug"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@ -54,8 +54,8 @@ src_configure() {
local myconf=(
"${PYTHON}"
"${S}"/configure.py
$(usex debug --debug '')
--sip-module PyQt5.sip
--sysroot="${ESYSROOT}/usr"
--no-tools
AR="$(tc-getAR) cqs"
CC="$(tc-getCC)"

@ -10,9 +10,9 @@
<email>phil@riverbankcomputing.com</email>
<name>Phil Thompson</name>
</maintainer>
<changelog>https://www.riverbankcomputing.com/static/Downloads/sip/ChangeLog</changelog>
<doc>https://www.riverbankcomputing.com/static/Docs/sip/</doc>
<bugs-to>mailto:pyqt@riverbankcomputing.com</bugs-to>
<doc>http://pyqt.sourceforge.net/Docs/sip4/</doc>
<remote-id type="pypi">SIP</remote-id>
<remote-id type="sourceforge">pyqt</remote-id>
<remote-id type="pypi">PyQt5-sip</remote-id>
</upstream>
</pkgmetadata>

@ -1 +1,2 @@
DIST bashate-0.3.1.tar.gz 16016 BLAKE2B 72bcb6ef2c8dda48b40351f37971473b9c2137f3a727a355f1742f20355aee8a3898d4aaf61e0e6538b22adbe3ebd34bb30d67d0fb6b5f3535c9b46c1544ce5d SHA512 dfa3e8f98879169cef445cc9a788b4ed051630330e2270c721e472f080899d6742cd3deb571049ba6b943ada0fc77a70f5a7e4742a54d1ca6d5f075a92a00ffb
DIST bashate-0.6.0.tar.gz 30980 BLAKE2B 5b210edaa44a0652a03f30a641a072dba1482e1ca3b42c6b7140a52349ddb271f0137373a4d2f364032c22c176d6caf14be2635038df8a4e86585773d17a1f97 SHA512 bb64d8de0143bf2662497b1571ce654f4ceeb7d1dea3f625705b609ab70ed3b4bca6266c4eba7c2e7d99a1520fb9566a4a4daefa34c9c16538537b446c1da255

@ -0,0 +1,34 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
DISTUTILS_IN_SOURCE_BUILD=TRUE
# time
RESTRICT="test"
inherit distutils-r1
DESCRIPTION="A pep8 equivalent for bash scripts"
HOMEPAGE="https://pypi.org/project/bashate/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/pbr-2.0.0[${PYTHON_USEDEP}]
!~dev-python/pbr-2.1.0
"
RDEPEND="
>=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
!~dev-pythn/Babel-2.4.0
"
python_install_all() {
distutils-r1_python_install_all
}

@ -12,7 +12,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
RDEPEND="

@ -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
@ -13,7 +13,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="BSD-2 GPL-3 public-domain"
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 ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
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 ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE=""
DEPEND="dev-python/pygments[${PYTHON_USEDEP}]"

@ -18,7 +18,7 @@ IUSE="doc"
RDEPEND="
!dev-python/mysql-python
virtual/mysql"
dev-db/mysql-connector-c:0="
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"

@ -18,7 +18,7 @@ IUSE="doc"
RDEPEND="
!dev-python/mysql-python
virtual/mysql"
dev-db/mysql-connector-c:0="
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"

@ -0,0 +1,35 @@
# 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} pypy )
inherit distutils-r1
DESCRIPTION="Fork of MySQL-python"
HOMEPAGE="https://pypi.org/project/mysqlclient/ https://github.com/PyMySQL/mysqlclient-python"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="doc"
RDEPEND="
!dev-python/mysql-python
dev-db/mysql-connector-c:0="
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
DOCS=( README.md doc/{FAQ,MySQLdb}.rst )
python_compile_all() {
use doc && sphinx-build -b html doc doc/_build/
}
python_install_all() {
use doc && local HTML_DOCS=( doc/_build/. )
distutils-r1_python_install_all
}

@ -1,4 +1,3 @@
DIST pysnmp-4.4.4.tar.gz 436318 BLAKE2B 6e6616a79fc15d457b8da2e2260c65d9d8ef29888c033d80f2f47c8de035d0cff73dc4be1eeced8ef36dac1301b7da0d845837b780815792f545b6ad18d5496e SHA512 960ac73b7356bb236d3853432c094d3aa86a343f5e211065689e6c784293748ec6f2c1c17bf9d96b4cbe2d9d476ebbacbaff4bed7d86370e5ef61e6f03ba8c0e
DIST pysnmp-4.4.5.tar.gz 438424 BLAKE2B db989eb9faa0d548c7e58a5e9b7127824f2798c116d27b8885b4920f5e0acf9068ea5ad88e13e8e913e24c0d21d414026f6d733cf680b41e59370c960d856197 SHA512 3164e93a8623512d903c86eebdb6f9fa5ffee29309747df4a836e257e87dc5480cf706ab527e1a8966e80c0626961f6f1b68b60cf07df2ddece305706f5445f2
DIST pysnmp-4.4.6.tar.gz 434508 BLAKE2B 0613cd115d9b52b12a9e4ca45c0dc6b51a6e8506f5fe4d93641dd53ce61e88f4ed89783692c4220008c345179808bb4a79d4aaf1d828e072d822a0d131204fa1 SHA512 0b53fcb7d266a861b3f8dca228371a7430b5513506b4b7083e112916730cc25311cdef549373271c2da62441a603d3f33e6a1e9417dec3aac074db25fb2be7c8
DIST pysnmp-4.4.8.tar.gz 435494 BLAKE2B 801d52660af23f9db9fd6e4fbd7b93f06db65d1c4987d44239da0927a116559ba502f295a5ba345529f15a41971a0f407b60266ef0cbcb328476e7e58e3646e0 SHA512 a4b0954a65818e49ce76455ef48c7c363bbc69031b699b303e8e301e7aa5db10ac5042557cc1727e885b200672ba35aef995baadb989cd95aa90e528c7e97e04
DIST pysnmp-4.4.9.tar.gz 436017 BLAKE2B 4fa4d1cab4e783542164d8bc5313e2b900cad9fec42e3bd6bc37239514d279d849ee857b3c9c01021750773e02ce951da600f5fbf8676efe31c3bdf580b99f12 SHA512 0832abb4134b77d43f6c750ce6c797c976b5fb99ef02602e7aa6034e4524e229eb33ac5d5b086acfb5740893120eb5b17df648dda48decc5d038476270e5fe1e

@ -1,7 +1,7 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
inherit distutils-r1

@ -1,17 +1,17 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
inherit distutils-r1
inherit distutils-r1 git-r3
DESCRIPTION="Python SNMP library"
HOMEPAGE="http://snmplabs.com/pysnmp/ https://pypi.org/project/pysnmp/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
HOMEPAGE="http://snmplabs.com/pysnmp/ https://pypi.org/project/pysnmp/ https://github.com/etingof/pysnmp"
EGIT_REPO_URI="https://github.com/etingof/pysnmp"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
KEYWORDS=""
IUSE="doc examples"
DEPEND="

@ -14,7 +14,7 @@ SRC_URI="https://github.com/rtfd/recommonmark/archive/${EGIT_COMMIT}.tar.gz -> $
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
RESTRICT="!test? ( test )"

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
IUSE="socks5 +ssl"
RDEPEND="

@ -1,3 +1,2 @@
DIST sip-4.19.13.tar.gz 1038815 BLAKE2B 0b6f2941140a535cfdfb51db71cf9a55e5f65be85961e304496fded7781da42b0ab7d01045b8802468a3ce3b57e7f571851fc7713fd47a03c8344017982d6632 SHA512 eb456e1f7efa463f859047acc5301e19279e1627629d0bad3ac7a0a52b77575126bc3f2c64bb4278ae11d415c13d2731dfc8c816bba71307173d393a414aae98
DIST sip-4.19.14.dev1812231555.tar.gz 1020224 BLAKE2B e3df5a8b7829278987c5b368b8b6c28c04fc0b3bb3847451e48411ef9ba5cda932007613ad31f34381446ea02d62281b27ae4951babca5ec8b75f065aa296365 SHA512 decf2f7baacede27c42d359eb875a895c9a92b36a8e8a29f4666b3f98f570d821e80dbb32fd946ce230f726fafc4000af9b167df8cfd188bcd7f85fbc71bd4b1
DIST sip-4.19.8.tar.gz 1024548 BLAKE2B e43dfe542061db9f1d5981d0cc172d9c8420c4e66c282c52974ab28314c33bd28e6056b61f74b04680c1735c9bd2c4656e1a541f4bae94c858d18713f6222914 SHA512 9c0a9722a9a9dd23e2eabe751d622cdd31b376b7987b2c991f5ef4a8d11853c5c6e9f1c24a0d2d864d3990e2a45c2a159ca8511efd4a7e156a14937ef3c680f7
DIST sip-4.19.14.tar.gz 1049688 BLAKE2B 8e68910f533d0f58bef1f20ec58579ce0166efaee2caef1c64d4e9878b0887040d9284a9fa5ee48d7a4f0949866d0b988b0d962303f0ace03a4ad48bd08eec5d SHA512 afde261331f38eac863d8cea0e343649f460f0b9a603d7fe91f14583904ea4b488bbd88d20fad5c985c43c6c1683fffee38676d94831ac8f2de40d9ed4d0423e

@ -10,9 +10,9 @@
<email>phil@riverbankcomputing.com</email>
<name>Phil Thompson</name>
</maintainer>
<changelog>https://www.riverbankcomputing.com/static/Downloads/sip/ChangeLog</changelog>
<doc>https://www.riverbankcomputing.com/static/Docs/sip/</doc>
<bugs-to>mailto:pyqt@riverbankcomputing.com</bugs-to>
<doc>http://pyqt.sourceforge.net/Docs/sip4/</doc>
<remote-id type="pypi">SIP</remote-id>
<remote-id type="sourceforge">pyqt</remote-id>
</upstream>
</pkgmetadata>

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -9,18 +9,18 @@ inherit python-r1 toolchain-funcs
DESCRIPTION="Python extension module generator for C and C++ libraries"
HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
MY_P=${P/_pre/.dev}
MY_P=sip-${PV/_pre/.dev}
if [[ ${PV} == *_pre* ]]; then
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
else
SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
SRC_URI="https://www.riverbankcomputing.com/static/Downloads/sip/${MY_P}.tar.gz"
fi
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
SLOT="0/12"
LICENSE="|| ( GPL-2 GPL-3 SIP )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug doc"
IUSE="doc"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@ -49,12 +49,11 @@ src_prepare() {
src_configure() {
configuration() {
local incdir=$(python_get_includedir)
if ! python_is_python3; then
local CFLAGS="${CFLAGS} -fno-strict-aliasing"
fi
local incdir=$(python_get_includedir)
local myconf=(
"${PYTHON}"
"${S}"/configure.py
@ -62,7 +61,6 @@ src_configure() {
--bindir="${EPREFIX}/usr/bin"
--destdir="$(python_get_sitedir)"
--incdir="${incdir#${SYSROOT}}"
$(usex debug --debug '')
AR="$(tc-getAR) cqs"
CC="$(tc-getCC)"
CFLAGS="${CFLAGS}"

@ -1,116 +0,0 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
inherit python-r1 toolchain-funcs
DESCRIPTION="Python extension module generator for C and C++ libraries"
HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
if [[ ${PV} == *9999 ]]; then
inherit mercurial
EHG_REPO_URI="https://www.riverbankcomputing.com/hg/sip"
elif [[ ${PV} == *_pre* ]]; then
MY_P=${P/_pre/.dev}
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
else
SRC_URI="mirror://sourceforge/pyqt/${P}.tar.gz"
fi
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h.in
SLOT="0/12"
LICENSE="|| ( GPL-2 GPL-3 SIP )"
KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug doc"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
if [[ ${PV} == *9999 ]]; then
DEPEND+="
sys-devel/bison
sys-devel/flex
doc? ( dev-python/sphinx[$(python_gen_usedep 'python2*')] )"
fi
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
if [[ ${PV} == *9999 ]]; then
REQUIRED_USE+=" || ( $(python_gen_useflags 'python2*') )"
fi
PATCHES=( "${FILESDIR}"/${PN}-4.18-darwin.patch )
src_prepare() {
if [[ ${PV} == *9999 ]]; then
python_setup 'python2*'
"${PYTHON}" build.py prepare || die
if use doc; then
"${PYTHON}" build.py doc || die
fi
fi
# Sub-slot sanity check
local sub_slot=${SLOT#*/}
local sip_api_major_nr=$(sed -nre 's:^#define SIP_API_MAJOR_NR\s+([0-9]+):\1:p' siplib/sip.h.in)
if [[ ${sub_slot} != ${sip_api_major_nr} ]]; then
eerror
eerror "Ebuild sub-slot (${sub_slot}) does not match SIP_API_MAJOR_NR (${sip_api_major_nr})"
eerror "Please update SLOT variable as follows:"
eerror " SLOT=\"${SLOT%%/*}/${sip_api_major_nr}\""
eerror
die "sub-slot sanity check failed"
fi
default
}
src_configure() {
configuration() {
if ! python_is_python3; then
local CFLAGS="${CFLAGS} -fno-strict-aliasing"
fi
local myconf=(
"${PYTHON}"
"${S}"/configure.py
--bindir="${EPREFIX}/usr/bin"
--destdir="$(python_get_sitedir)"
--incdir="$(python_get_includedir)"
$(usex debug --debug '')
AR="$(tc-getAR) cqs"
CC="$(tc-getCC)"
CFLAGS="${CFLAGS}"
CFLAGS_RELEASE=
CXX="$(tc-getCXX)"
CXXFLAGS="${CXXFLAGS}"
CXXFLAGS_RELEASE=
LINK="$(tc-getCXX)"
LINK_SHLIB="$(tc-getCXX)"
LFLAGS="${LDFLAGS}"
LFLAGS_RELEASE=
RANLIB=
STRIP=
)
echo "${myconf[@]}"
"${myconf[@]}" || die
}
python_foreach_impl run_in_build_dir configuration
}
src_compile() {
python_foreach_impl run_in_build_dir default
}
src_install() {
installation() {
emake DESTDIR="${D}" install
python_optimize
}
python_foreach_impl run_in_build_dir installation
einstalldocs
use doc && dodoc -r doc/html
}

@ -13,7 +13,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-solaris"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"

Binary file not shown.

@ -8,7 +8,7 @@ inherit desktop gnome2-utils qt5-build
DESCRIPTION="WYSIWYG tool for designing and building Qt-based GUIs"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 x86 ~amd64-fbsd"
fi
IUSE="declarative webkit"

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="Tools for working with Qt translation data files"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 ~sparc x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86 ~amd64-fbsd"
fi
IUSE="qml"

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="Interface to Qt applications communicating over D-Bus"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 ~sparc x86"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86"
fi
IUSE=""

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="Multi-threading concurrence support library for the Qt5 framework"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 ~sparc x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86 ~amd64-fbsd"
fi
IUSE=""

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="Cross-platform application development framework"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 ~sparc x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86 ~amd64-fbsd"
fi
IUSE="icu systemd"

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="Qt5 module for inter-process communication over the D-Bus protocol"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 ~sparc x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86 ~amd64-fbsd"
fi
IUSE=""

@ -8,7 +8,7 @@ inherit python-any-r1 qt5-build
DESCRIPTION="The QML and Quick modules for the Qt5 framework"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 x86 ~amd64-fbsd"
fi
IUSE="gles2 +jit localstorage +widgets xml"

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="Set of QML types for adding visual effects to user interfaces"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 x86"
fi
IUSE=""

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 ~sparc x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86 ~amd64-fbsd"
fi
# TODO: linuxfb

@ -8,7 +8,7 @@ inherit qt5-build
DESCRIPTION="Qt5 module for integrating online documentation into applications"
if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 ~sparc x86 ~amd64-fbsd"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86 ~amd64-fbsd"
fi
IUSE=""

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

Loading…
Cancel
Save