summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2012-07-12 11:05:15 +0000
committerFabian Groffen <grobian@gentoo.org>2012-07-12 11:05:15 +0000
commit502cd4156ae340b74467cbbd2fcea635c019db22 (patch)
treea8f4dfb5134c94b587cfb9119d390a1ef8458c93 /dev-libs/libpcre
parentVersion bump. (diff)
downloadgentoo-2-502cd4156ae340b74467cbbd2fcea635c019db22.tar.gz
gentoo-2-502cd4156ae340b74467cbbd2fcea635c019db22.tar.bz2
gentoo-2-502cd4156ae340b74467cbbd2fcea635c019db22.zip
Fix compilation on platforms lacking posix_madvise, using a partial patch grabbed from upstream.
(Portage version: 2.2.01.20757-prefix/cvs/SunOS i386)
Diffstat (limited to 'dev-libs/libpcre')
-rw-r--r--dev-libs/libpcre/ChangeLog7
-rw-r--r--dev-libs/libpcre/files/libpcre-8.31-madvise.patch31
-rw-r--r--dev-libs/libpcre/libpcre-8.31.ebuild3
3 files changed, 39 insertions, 2 deletions
diff --git a/dev-libs/libpcre/ChangeLog b/dev-libs/libpcre/ChangeLog
index b939b0ba03fb..f292bf9253c9 100644
--- a/dev-libs/libpcre/ChangeLog
+++ b/dev-libs/libpcre/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-libs/libpcre
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libpcre/ChangeLog,v 1.206 2012/07/11 20:17:24 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libpcre/ChangeLog,v 1.207 2012/07/12 11:05:15 grobian Exp $
+
+ 12 Jul 2012; Fabian Groffen <grobian@gentoo.org>
+ +files/libpcre-8.31-madvise.patch, libpcre-8.31.ebuild:
+ Fix compilation on platforms lacking posix_madvise, using a partial patch
+ grabbed from upstream.
*libpcre-8.31 (11 Jul 2012)
diff --git a/dev-libs/libpcre/files/libpcre-8.31-madvise.patch b/dev-libs/libpcre/files/libpcre-8.31-madvise.patch
new file mode 100644
index 000000000000..c9bb01a1e997
--- /dev/null
+++ b/dev-libs/libpcre/files/libpcre-8.31-madvise.patch
@@ -0,0 +1,31 @@
+Partial patch by upstream to fix compilation on platforms without
+posix_madvise.
+
+http://vcs.pcre.org/viewvc/code/trunk/sljit/sljitUtils.c?r1=952&r2=987&pathrev=987O
+
+--- code/trunk/sljit/sljitUtils.c 2012/03/16 12:59:30 952
++++ code/trunk/sljit/sljitUtils.c 2012/07/07 04:11:29 987
+@@ -106,7 +106,7 @@
+
+ #else /* _WIN32 */
+
+-#include "pthread.h"
++#include <pthread.h>
+
+ #if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+
+@@ -262,8 +262,14 @@
+ }
+ aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
+ aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
++ /* If madvise is available, we release the unnecessary space. */
++#if defined(POSIX_MADV_DONTNEED)
+ if (aligned_new_limit < aligned_old_limit)
+ posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);
++#elif defined(MADV_DONTNEED)
++ if (aligned_new_limit < aligned_old_limit)
++ madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);
++#endif
+ stack->limit = new_limit;
+ return 0;
+ #endif
diff --git a/dev-libs/libpcre/libpcre-8.31.ebuild b/dev-libs/libpcre/libpcre-8.31.ebuild
index 12d2ca99bfd2..939a5d6153af 100644
--- a/dev-libs/libpcre/libpcre-8.31.ebuild
+++ b/dev-libs/libpcre/libpcre-8.31.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libpcre/libpcre-8.31.ebuild,v 1.1 2012/07/11 20:17:24 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libpcre/libpcre-8.31.ebuild,v 1.2 2012/07/12 11:05:15 grobian Exp $
EAPI="4"
@@ -35,6 +35,7 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${MY_P}
src_prepare() {
+ epatch "${FILESDIR}"/${P}-madvise.patch # from upstream
sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die
elibtoolize
}