summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Dimiduk <ndimiduk@gentoo.org>2004-10-16 05:47:27 +0000
committerNick Dimiduk <ndimiduk@gentoo.org>2004-10-16 05:47:27 +0000
commit411cae945cbab163cce987037ba7489799e4db55 (patch)
treec51c9ffe4d83fbfa23334a4b997d396a8c2d0f26 /dev-libs/libsigsegv
parentversion bump, closes #67662. (diff)
downloadhistorical-411cae945cbab163cce987037ba7489799e4db55.tar.gz
historical-411cae945cbab163cce987037ba7489799e4db55.tar.bz2
historical-411cae945cbab163cce987037ba7489799e4db55.zip
Added patch and keyword for ~ppc-macos
Diffstat (limited to 'dev-libs/libsigsegv')
-rw-r--r--dev-libs/libsigsegv/ChangeLog8
-rw-r--r--dev-libs/libsigsegv/Manifest5
-rw-r--r--dev-libs/libsigsegv/files/libsigsegv-2.1-darwin-7.x.patch106
-rw-r--r--dev-libs/libsigsegv/libsigsegv-2.1.ebuild8
4 files changed, 122 insertions, 5 deletions
diff --git a/dev-libs/libsigsegv/ChangeLog b/dev-libs/libsigsegv/ChangeLog
index 23eff2926055..aff6f398fc98 100644
--- a/dev-libs/libsigsegv/ChangeLog
+++ b/dev-libs/libsigsegv/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/libsigsegv
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libsigsegv/ChangeLog,v 1.7 2004/07/04 11:36:30 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libsigsegv/ChangeLog,v 1.8 2004/10/16 05:47:27 ndimiduk Exp $
+
+ 16 Oct 2004; Nick Dimiduk <ndimiduk@gentoo.org> libsigsegv-2.1.ebuild,
+ +libsigsegv-2.1-darwin-7.x.patch:
+ Added patch to support macos. The unpatched version should work with
+ darwin versions through 5.5. The patch fixes it for 7.x series darwin
+ (Mac OS 10.3.x). Added keyword ~ppc-macos.
04 Jul 2004; David Holm <dholm@gentoo.org> libsigsegv-2.1.ebuild:
Added to ~ppc.
diff --git a/dev-libs/libsigsegv/Manifest b/dev-libs/libsigsegv/Manifest
index a71e44ca23c7..b720974509c0 100644
--- a/dev-libs/libsigsegv/Manifest
+++ b/dev-libs/libsigsegv/Manifest
@@ -1,5 +1,6 @@
MD5 d7d07a7a82ae12f3e6f4c5dbe0bf63cc libsigsegv-2.0.ebuild 810
-MD5 d2b64afe8743556a23cfe8f4c197be97 libsigsegv-2.1.ebuild 670
-MD5 a7884b2d582a45b39ce9325d3ceef40b ChangeLog 871
+MD5 68a538ec11f2fb278c0f9ecfa20e2f17 libsigsegv-2.1.ebuild 770
+MD5 c32e982c80251e97ebed493f8f0ca446 ChangeLog 1178
+MD5 dda0160f1d6fde7b52e5985e13713ffb files/libsigsegv-2.1-darwin-7.x.patch 3526
MD5 9c1f70a4611212eebb02bb95cb254f3b files/digest-libsigsegv-2.0 66
MD5 ab150e95621479ef341ba173f9182181 files/digest-libsigsegv-2.1 66
diff --git a/dev-libs/libsigsegv/files/libsigsegv-2.1-darwin-7.x.patch b/dev-libs/libsigsegv/files/libsigsegv-2.1-darwin-7.x.patch
new file mode 100644
index 000000000000..2637421adb45
--- /dev/null
+++ b/dev-libs/libsigsegv/files/libsigsegv-2.1-darwin-7.x.patch
@@ -0,0 +1,106 @@
+--- /var/tmp/portage/libsigsegv-2.1/work/libsigsegv-2.1/configure Thu Aug 21 21:27:56 2003
++++ configure Mon Aug 9 19:54:50 2004
+@@ -10986,9 +10986,9 @@
+
+ #include <signal.h>
+ #include "$srcdir/src/fault-macos-powerpc.c"
+-void sigsegv_handler (int sig, int code, struct sigcontext *scp)
++void sigsegv_handler (int sig, siginfo_t *sip, struct sigcontext *scp)
+ {
+- void *fault_address = (void *) (get_fault_addr (scp));
++ void *fault_address = (void *) (get_fault_addr (scp, sip->si_addr));
+ }
+
+ int
+@@ -11037,6 +11037,7 @@
+ #if HAVE_SYS_SIGNAL_H
+ # include <sys/signal.h>
+ #endif
++#include <sys/ucontext.h>
+ #include "$srcdir/src/fault-macos-powerpc.c"
+ #include <sys/types.h>
+ #include <sys/mman.h>
+@@ -11061,9 +11062,9 @@
+ #endif
+ unsigned long page;
+ int handler_called = 0;
+-void sigsegv_handler (int sig, int code, struct sigcontext *scp)
++void sigsegv_handler (int sig, siginfo_t *sip, struct sigcontext *scp)
+ {
+- void *fault_address = (void *) (get_fault_addr (scp));
++ void *fault_address = (void *) (get_fault_addr (scp, sip->si_addr));
+ handler_called++;
+ if (handler_called == 10)
+ exit (4);
+@@ -11102,7 +11103,7 @@
+ sigemptyset(&action.sa_mask);
+
+ action.sa_handler = (void (*) (int)) &sigsegv_handler;
+- action.sa_flags = 0;
++ action.sa_flags = SA_SIGINFO;
+
+ sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
+ sigaction (SIGBUS, &action, (struct sigaction *) NULL);
+--- /var/tmp/portage/libsigsegv-2.1/work/libsigsegv-2.1/src/fault-macos-powerpc.c Mon Sep 30 20:46:54 2002
++++ fault-macos-powerpc.c Mon Aug 9 19:58:53 2004
+@@ -31,10 +31,11 @@
+ #define EXTRACT_DISP(iw) ((short *) &(iw))[1]
+
+ static void *
+-get_fault_addr (struct sigcontext *scp)
++get_fault_addr (struct sigcontext *scp,unsigned int *ir)
+ {
+- unsigned int instr = *((unsigned int *) scp->sc_ir);
+- unsigned int *regs = &((unsigned int *) scp->sc_regs)[2];
++ unsigned int instr = *ir;
++ unsigned int *regs = & ((struct ucontext *)scp)->uc_mcontext->ss.r0 ;
++
+ int disp = 0;
+ int tmp;
+ unsigned int baseA = 0;
+@@ -42,6 +43,7 @@
+ unsigned int addr;
+ unsigned int alignmask = 0xFFFFFFFF;
+
++
+ switch (EXTRACT_OP1 (instr))
+ {
+ case 38: /* stb */
+@@ -56,8 +58,10 @@
+ case 36: /* stw */
+ case 37: /* stwu */
+ tmp = EXTRACT_REGA (instr);
++
++
+ if (tmp > 0)
+- baseA = regs[tmp];
++ baseA = regs[tmp];
+ disp = EXTRACT_DISP (instr);
+ break;
+ case 31:
+@@ -120,5 +124,6 @@
+
+ addr = (baseA + baseB) + disp;
+ addr &= alignmask;
++
+ return (void *) addr;
+ }
+--- /var/tmp/portage/libsigsegv-2.1/work/libsigsegv-2.1/src/fault-macos-powerpc.h Thu Apr 3 06:56:20 2003
++++ fault-macos-powerpc.h Mon Aug 9 20:17:16 2004
+@@ -15,12 +15,14 @@
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
++#include <sys/ucontext.h>
+ #include "fault-macos-powerpc.c"
+
+-#define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, int code, struct sigcontext *scp
+-#define SIGSEGV_FAULT_ADDRESS (unsigned long) get_fault_addr (scp)
++#define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, siginfo_t *sip, struct sigcontext *scp
++#define SIGSEGV_FAULT_ADDRESS (unsigned long) get_fault_addr (scp, sip->si_addr)
+ #define SIGSEGV_FAULT_CONTEXT scp
+ #if 0
+ #define SIGSEGV_FAULT_STACKPOINTER (&((unsigned int *) scp->sc_regs)[2])[1]
+ #endif
+ #define SIGSEGV_FAULT_STACKPOINTER (scp->sc_regs ? ((unsigned int *) scp->sc_regs)[3] : scp->sc_sp)
++#define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
diff --git a/dev-libs/libsigsegv/libsigsegv-2.1.ebuild b/dev-libs/libsigsegv/libsigsegv-2.1.ebuild
index f489358ae074..4585f5573537 100644
--- a/dev-libs/libsigsegv/libsigsegv-2.1.ebuild
+++ b/dev-libs/libsigsegv/libsigsegv-2.1.ebuild
@@ -1,18 +1,22 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libsigsegv/libsigsegv-2.1.ebuild,v 1.3 2004/07/14 14:46:31 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libsigsegv/libsigsegv-2.1.ebuild,v 1.4 2004/10/16 05:47:27 ndimiduk Exp $
DESCRIPTION="GNU libsigsegv is a library for handling page faults in user mode."
HOMEPAGE="ftp://ftp.gnu.org/pub/gnu/libsigsegv/"
SRC_URI="ftp://ftp.gnu.org/pub/gnu/libsigsegv/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="x86 ~ppc"
+KEYWORDS="x86 ~ppc ~ppc-macos"
IUSE=""
DEPEND="virtual/libc"
+inherit eutils
+
src_compile() {
+ use ppc-macos && \
+ epatch ${FILESDIR}/libsigsegv-2.1-darwin-7.x.patch
econf --enable-shared || die
emake || die
}