summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2019-12-02 22:54:23 +0800
committerBenda Xu <heroxbd@gentoo.org>2019-12-23 10:59:52 +0800
commitc8f1ba80a5e0a61ea85a61c8ee69432dbaee20ba (patch)
treef34d4e4c5609a4b3358a6cd2ae40477eb2747fa6 /net-libs
parentp/f/prefix/standalone/kernel-2.6.16+/profile.bashrc: hack qtcore to compile. (diff)
downloadgentoo-c8f1ba80a5e0a61ea85a61c8ee69432dbaee20ba.tar.gz
gentoo-c8f1ba80a5e0a61ea85a61c8ee69432dbaee20ba.tar.bz2
gentoo-c8f1ba80a5e0a61ea85a61c8ee69432dbaee20ba.zip
net-libs/serf: inherit python-any-r1 for scons, bump EAPI
The scons package depends on python, and in this case python-any-r1 is needed. Reference: https://wiki.gentoo.org/wiki/Project:Python/scons-utils_integration Closes: https://bugs.gentoo.org/701760 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/serf/files/serf-1.3.9-python3.patch28
-rw-r--r--net-libs/serf/files/serf-1.3.9-python3_byte.patch28
-rw-r--r--net-libs/serf/serf-1.3.9-r1.ebuild74
3 files changed, 130 insertions, 0 deletions
diff --git a/net-libs/serf/files/serf-1.3.9-python3.patch b/net-libs/serf/files/serf-1.3.9-python3.patch
new file mode 100644
index 000000000000..7ba43d91968c
--- /dev/null
+++ b/net-libs/serf/files/serf-1.3.9-python3.patch
@@ -0,0 +1,28 @@
+From 1c0241847e845a8da265aa89f297d3db6ae483b1 Mon Sep 17 00:00:00 2001
+From: Bert Huijben <rhuijben@apache.org>
+Date: Wed, 4 Oct 2017 14:56:22 +0000
+Subject: [PATCH] Fix syntax of a print() in the scons file to unbreak building
+ with most recent scons version.
+
+* SConstruct
+ Use Python 3.0 valid syntax to make Scons 3.0.0 happy on both python 3.0
+ and 2.7.
+
+git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1811083 13f79535-47bb-0310-9956-ffa450edef68
+---
+ SConstruct | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index e5d407b..fab9828 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -199,7 +199,7 @@ CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help'))
+
+ unknown = opts.UnknownVariables()
+ if unknown:
+- print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
++ print('Warning: Used unknown variables:', ', '.join(unknown.keys()))
+
+ apr = str(env['APR'])
+ apu = str(env['APU'])
diff --git a/net-libs/serf/files/serf-1.3.9-python3_byte.patch b/net-libs/serf/files/serf-1.3.9-python3_byte.patch
new file mode 100644
index 000000000000..ab86af2082d9
--- /dev/null
+++ b/net-libs/serf/files/serf-1.3.9-python3_byte.patch
@@ -0,0 +1,28 @@
+From 9d30108b630b77f732ef94d1642b159066ffd890 Mon Sep 17 00:00:00 2001
+From: Andreas Stieger <astieger@apache.org>
+Date: Wed, 8 Nov 2017 17:05:28 +0000
+Subject: [PATCH] Follow-up to r1811083, fix building with scons 3.0.0 and
+ Python3
+
+* SConstruct: Append decode('utf-8) to FILE.get_contents() to avoid
+ TypeError: cannot use a string pattern on a bytes-like object
+
+
+git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1814604 13f79535-47bb-0310-9956-ffa450edef68
+---
+ SConstruct | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index 5f5036b..71e5b0a 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -182,7 +182,7 @@ env.Append(BUILDERS = {
+ match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
+ 'SERF_MINOR_VERSION ([0-9]+).*'
+ 'SERF_PATCH_VERSION ([0-9]+)',
+- env.File('serf.h').get_contents(),
++ env.File('serf.h').get_contents().decode('utf-8'),
+ re.DOTALL)
+ MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
+ env.Append(MAJOR=str(MAJOR))
diff --git a/net-libs/serf/serf-1.3.9-r1.ebuild b/net-libs/serf/serf-1.3.9-r1.ebuild
new file mode 100644
index 000000000000..f4165ca2e0d5
--- /dev/null
+++ b/net-libs/serf/serf-1.3.9-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_6 )
+
+inherit python-any-r1 scons-utils toolchain-funcs flag-o-matic
+
+DESCRIPTION="HTTP client library"
+HOMEPAGE="https://serf.apache.org/"
+SRC_URI="mirror://apache/${PN}/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="kerberos static-libs libressl"
+RESTRICT="test"
+
+RDEPEND="dev-libs/apr:1=
+ dev-libs/apr-util:1=
+ !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= )
+ sys-libs/zlib:0=
+ kerberos? ( virtual/krb5 )"
+DEPEND="${RDEPEND}
+ >=dev-util/scons-2.3.0"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.3.8-static-lib.patch
+ "${FILESDIR}"/${PN}-1.3.8-openssl.patch
+ "${FILESDIR}"/${PN}-1.3.9-python3.patch
+ "${FILESDIR}"/${PN}-1.3.9-python3_byte.patch )
+
+src_prepare() {
+ default
+
+ # https://code.google.com/p/serf/issues/detail?id=133
+ sed -e "/env.Append(CCFLAGS=\['-O2'\])/d" -i SConstruct
+
+ # need limits.h for PATH_MAX (only when EXTENSIONS is enabled)
+ [[ ${CHOST} == *-solaris* ]] && append-cppflags -D__EXTENSIONS__
+}
+
+src_compile() {
+ myesconsargs=(
+ PREFIX="${EPREFIX}/usr"
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+ # These config scripts are sent through a shell with an empty env
+ # which breaks the SYSROOT usage in them. Set the vars inline to
+ # avoid that.
+ APR="SYSROOT='${SYSROOT}' ${SYSROOT}${EPREFIX}/usr/bin/apr-1-config"
+ APU="SYSROOT='${SYSROOT}' ${SYSROOT}${EPREFIX}/usr/bin/apu-1-config"
+ BUILD_STATIC=$(usex static-libs)
+ AR="$(tc-getAR)"
+ RANLIB="$(tc-getRANLIB)"
+ CC="$(tc-getCC)"
+ CPPFLAGS="${CPPFLAGS}"
+ CFLAGS="${CFLAGS}"
+ LINKFLAGS="${LDFLAGS}"
+ )
+
+ if use kerberos; then
+ myesconsargs+=( GSSAPI="${SYSROOT}${EPREFIX}/usr/bin/krb5-config" )
+ fi
+
+ escons "${myesconsargs[@]}"
+}
+
+src_test() {
+ escons check
+}
+
+src_install() {
+ escons install --install-sandbox="${D}"
+}