Fix compilation on older Darwin hosts, upstream bug 822427
authorFabian Groffen <grobian@gentoo.org>
Thu, 1 Sep 2011 13:07:52 +0000 (13:07 +0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 1 Sep 2011 13:07:52 +0000 (13:07 +0000)
Package-Manager: portage-2.2.01.19074-prefix/cvs/SunOS i386

dev-python/dulwich/ChangeLog
dev-python/dulwich/Manifest
dev-python/dulwich/dulwich-0.8.0.ebuild
dev-python/dulwich/files/dulwich-0.8.0-darwin.patch [new file with mode: 0644]

index 7d23ad495aafcf19d1ef2ca740f9cf833ef76820..d58c9f624086e98f88a827c05b24ad5ea42a2680 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-python/dulwich
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/dulwich/ChangeLog,v 1.34 2011/09/01 12:14:48 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/dulwich/ChangeLog,v 1.35 2011/09/01 13:07:52 grobian Exp $
+
+  01 Sep 2011; Fabian Groffen <grobian@gentoo.org> dulwich-0.8.0.ebuild,
+  +files/dulwich-0.8.0-darwin.patch:
+  Fix compilation on older Darwin hosts, upstream bug 822427
 
   01 Sep 2011; Fabian Groffen <grobian@gentoo.org> dulwich-0.8.0.ebuild:
   Marked ~amd64-linux dulwich-0.8.0.ebuild
index 1e68140fcba02f2eb7f07d42c9119b2cc1e97430..a0d185aa2bc8a9f63bd3c4c5e87b2f1471fda75d 100644 (file)
@@ -1,16 +1,17 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
+AUX dulwich-0.8.0-darwin.patch 869 RMD160 190e656d10443a04fd4b46744477a2734fae2db6 SHA1 bf3658dcf552f0c386855c2a970ec4cd80016f6c SHA256 9d255f480852d56486d9f5f939c77e623bb7e8af661553571e99bc0477720cb7
 DIST dulwich-0.7.1.tar.gz 164718 RMD160 569a628854c2c29d14735acb15615a23fba14417 SHA1 cfbeb7e83c4258f489ed2736a684190004c1733f SHA256 24e393bdadd685608b61e0293719296d467b76917e2135822576246b988724b5
 DIST dulwich-0.8.0.tar.gz 183532 RMD160 772f70d1c5a8c322acdb8ca61fbd2a82b02ca7ce SHA1 b8976fdc9d6e1add3606985240eef4679465e65c SHA256 342f84c713839c9a2e24a7e7121cf150a6f53da08224b66da6125fd09bd2886f
 EBUILD dulwich-0.7.1.ebuild 1397 RMD160 4243149ce1f56c91d11e0d9691cff43a1083721b SHA1 b6bf9c48f2dac524384e2154c1eff95f356980d4 SHA256 26b9d8bf97339942cd474522c50ca7dd9ca09680f55a17ae85b341769a02d357
-EBUILD dulwich-0.8.0.ebuild 1424 RMD160 2e5fbb51cb418d00b56c8b7bd8970af7d5968cc9 SHA1 abcbe46a62986f33162f5b152630ff002871a1b3 SHA256 abfebbe95a8d103c8520760451b24b09122e4c9bc6e6260ae6920fa5249f7fcf
-MISC ChangeLog 4071 RMD160 afcfe641fb7744b50276001f9cc7b525735b32bd SHA1 aa14f24d395aa9484656aa13e4bf323843afd1b6 SHA256 1d9c8c594c8a1e73fd223d8325523dabb9cc31ababc038313a930c65c37f5541
+EBUILD dulwich-0.8.0.ebuild 1471 RMD160 63c699a7fd91130badebb3f5f80c800af5972fd3 SHA1 26111f3022011b7925e9db4192170018db106149 SHA256 daf4b1d0854ad593c7ae063211804bb3fc234dd2d67cb13c31d7b94230af2c21
+MISC ChangeLog 4243 RMD160 04db27c471c01490c9d07f9e9e8f1f9933e5ddeb SHA1 199ec7dfd65a7e8705cd870a254ed0f697de3371 SHA256 942a98f63983f1605f7f09f5ad38ec93b43027e607b80ea36b7628110809c26a
 MISC metadata.xml 259 RMD160 4b781a038008fac445e4154045f964b64ad59e75 SHA1 9809d89f3360f9f7537c2bb480d6bcbe942c6ea0 SHA256 0fb1da675767b69b5bd240d135effe2fc500e8b997a5f4eed212e5b26d027972
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (SunOS)
 
-iEYEARECAAYFAk5fdz4ACgkQX3X2B8XHTomwVACgkYpZ3ngJgPzf93jWIZWwjbgW
-G2oAn0IwmBB5Vfiv6iSPR2xwhAHcFXyi
-=4f/I
+iEYEARECAAYFAk5fg60ACgkQX3X2B8XHTolUaQCfZxcWxCmhDEc8gqDtAFduZ1wn
+bPsAnj2GyrLC75Oiovtp+kLuesn7A5Ud
+=Xt4a
 -----END PGP SIGNATURE-----
index 533c829f99ba1977c2cd0eae59cc9a362213881f..7b4fee2fd20b0d73c685385785d057b4590f5e92 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/dulwich/dulwich-0.8.0.ebuild,v 1.3 2011/09/01 12:14:48 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/dulwich/dulwich-0.8.0.ebuild,v 1.4 2011/09/01 13:07:52 grobian Exp $
 
 EAPI="3"
 PYTHON_DEPEND="2"
@@ -8,7 +8,7 @@ SUPPORT_PYTHON_ABIS="1"
 RESTRICT_PYTHON_ABIS="3.* *-jython"
 DISTUTILS_SRC_TEST="nosetests"
 
-inherit distutils
+inherit distutils eutils
 
 DESCRIPTION="Dulwich is a pure-Python implementation of the Git file formats and protocols."
 HOMEPAGE="http://samba.org/~jelmer/dulwich/ http://pypi.python.org/pypi/dulwich"
@@ -25,6 +25,7 @@ RDEPEND=""
 
 src_prepare() {
        distutils_src_prepare
+       epatch "${FILESDIR}"/${P}-darwin.patch
        sed -e "s/test_fetch_from_dulwich(/_&/" -i dulwich/tests/compat/server_utils.py
 }
 
diff --git a/dev-python/dulwich/files/dulwich-0.8.0-darwin.patch b/dev-python/dulwich/files/dulwich-0.8.0-darwin.patch
new file mode 100644 (file)
index 0000000..b0d888b
--- /dev/null
@@ -0,0 +1,36 @@
+https://bugs.launchpad.net/dulwich/+bug/822427
+
+--- dulwich/_objects.c
++++ dulwich/_objects.c
+@@ -21,21 +21,15 @@
+ #include <stdlib.h>
+ #include <sys/stat.h>
+-#if defined(__APPLE__)
+-#include <Availability.h>
+-#endif
+-
+ #if (PY_VERSION_HEX < 0x02050000)
+ typedef int Py_ssize_t;
+ #endif
+-#if defined(__MINGW32_VERSION) || (defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
+-size_t strnlen(char *text, size_t maxlen)
++static size_t dwstrnlen(char *text, size_t maxlen)
+ {
+       const char *last = memchr(text, '\0', maxlen);
+       return last ? (size_t) (last - text) : maxlen;
+ }
+-#endif
+ #define bytehex(x) (((x)<0xa)?('0'+(x)):('a'-0xa+(x)))
+@@ -98,7 +92,7 @@
+               text++;
+-              namelen = strnlen(text, len - (text - start));
++              namelen = dwstrnlen(text, len - (text - start));
+               name = PyString_FromStringAndSize(text, namelen);
+               if (name == NULL) {