summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/pth')
-rw-r--r--dev-libs/pth/ChangeLog9
-rw-r--r--dev-libs/pth/files/pth-2.0.7-ia64.patch30
-rw-r--r--dev-libs/pth/pth-2.0.7-r3.ebuild48
3 files changed, 86 insertions, 1 deletions
diff --git a/dev-libs/pth/ChangeLog b/dev-libs/pth/ChangeLog
index faa4caf8143c..5953b764567d 100644
--- a/dev-libs/pth/ChangeLog
+++ b/dev-libs/pth/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/pth
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/pth/ChangeLog,v 1.63 2011/01/25 19:11:15 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/pth/ChangeLog,v 1.64 2011/04/09 13:49:35 armin76 Exp $
+
+*pth-2.0.7-r3 (09 Apr 2011)
+
+ 09 Apr 2011; Raúl Porcel <armin76@gentoo.org> +pth-2.0.7-r3.ebuild,
+ +files/pth-2.0.7-ia64.patch:
+ Add a new revision that provides a workaround for bug #350815, and a patch
+ for ia64. Straight to stable for arm/ia64/sh
25 Jan 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
-pth-2.0.7.ebuild, -pth-2.0.7-r1.ebuild:
diff --git a/dev-libs/pth/files/pth-2.0.7-ia64.patch b/dev-libs/pth/files/pth-2.0.7-ia64.patch
new file mode 100644
index 000000000000..8b08b82ca6c1
--- /dev/null
+++ b/dev-libs/pth/files/pth-2.0.7-ia64.patch
@@ -0,0 +1,30 @@
+# http://bugs.debian.org/225780
+diff -Naurp pth.orig/pth_sched.c pth/pth_sched.c
+--- pth.orig/pth_sched.c 2009-07-16 23:16:52.000000000 +0000
++++ pth/pth_sched.c 2009-07-16 23:20:51.000000000 +0000
+@@ -297,8 +297,15 @@ intern void *pth_scheduler(void *dummy)
+ /*
+ * Check for stack overflow
+ */
++#ifndef __ia64__
+ if (pth_current->stackguard != NULL) {
+ if (*pth_current->stackguard != 0xDEAD) {
++#else
++ /* On ia64 the stack grows down but the bottom part is used for register
++ * backing store which grows up. So we check for a meet in the middle
++ */
++ if (pth_current->mctx.uc.uc_mcontext.sc_gr[12] <= pth_current->mctx.uc.uc_mcontext.sc_ar_bsp) {
++#endif
+ pth_debug3("pth_scheduler: stack overflow detected for thread 0x%lx (\"%s\")",
+ (unsigned long)pth_current, pth_current->name);
+ /*
+@@ -324,7 +331,9 @@ intern void *pth_scheduler(void *dummy)
+ pth_current->state = PTH_STATE_DEAD;
+ kill(getpid(), SIGSEGV);
+ }
++#ifndef __ia64__
+ }
++#endif
+
+ /*
+ * If previous thread is now marked as dead, kick it out
diff --git a/dev-libs/pth/pth-2.0.7-r3.ebuild b/dev-libs/pth/pth-2.0.7-r3.ebuild
new file mode 100644
index 000000000000..f02dd9fcb742
--- /dev/null
+++ b/dev-libs/pth/pth-2.0.7-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/pth/pth-2.0.7-r3.ebuild,v 1.1 2011/04/09 13:49:35 armin76 Exp $
+
+inherit eutils fixheadtails libtool flag-o-matic
+
+DESCRIPTION="GNU Portable Threads"
+HOMEPAGE="http://www.gnu.org/software/pth/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 arm ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-2.0.5-parallelfix.patch
+ epatch "${FILESDIR}"/${PN}-2.0.6-ldflags.patch
+ epatch "${FILESDIR}"/${PN}-2.0.6-sigstack.patch
+ epatch "${FILESDIR}"/${PN}-2.0.7-parallel-install.patch
+ epatch "${FILESDIR}"/${PN}-2.0.7-ia64.patch
+
+ ht_fix_file aclocal.m4 configure
+
+ elibtoolize
+}
+
+src_compile() {
+ # bug 350815
+ ( use arm || use sh ) && append-flags -U_FORTIFY_SOURCE
+
+ local conf
+ use debug && conf="${conf} --enable-debug" # have a bug --disable-debug and shared
+ econf ${conf} || die
+ emake || die
+}
+
+src_install() {
+ #Parallel install issuse fixed with parallel-install.patch.
+ #Submitted upstream on 12-13-2010.
+ emake DESTDIR="${D}" install || die
+ dodoc ANNOUNCE AUTHORS ChangeLog NEWS README THANKS USERS || die
+}