pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ocaml Add a patch so that this package builds for...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/838a9d255707
branches:  trunk
changeset: 553467:838a9d255707
user:      he <he%pkgsrc.org@localhost>
date:      Thu Jan 22 01:00:33 2009 +0000

description:
Add a patch so that this package builds for our powerpc ports
as well.  In this case, we fall into the SYS_elf branch together
with Linux, but we need a few other specifics to access registers
in the sigcontext.

diffstat:

 lang/ocaml/Makefile         |   3 ++-
 lang/ocaml/distinfo         |   3 ++-
 lang/ocaml/patches/patch-bv |  38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 2 deletions(-)

diffs (73 lines):

diff -r eacd00a0dba1 -r 838a9d255707 lang/ocaml/Makefile
--- a/lang/ocaml/Makefile       Wed Jan 21 23:48:35 2009 +0000
+++ b/lang/ocaml/Makefile       Thu Jan 22 01:00:33 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.60 2008/12/22 20:04:07 joerg Exp $
+# $NetBSD: Makefile,v 1.61 2009/01/22 01:00:33 he Exp $
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 
@@ -30,6 +30,7 @@
 PLIST_SRC+=    ${PKGDIR}/PLIST.opt
 .  if empty(MACHINE_PLATFORM:MDarwin-*-powerpc) && \
       empty(MACHINE_PLATFORM:MSunOS-*-i386) && \
+      empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) && \
       empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) && \
       empty(MACHINE_PLATFORM:MNetBSD-*-sparc)
 PLIST_SRC+=    ${PKGDIR}/PLIST.prof
diff -r eacd00a0dba1 -r 838a9d255707 lang/ocaml/distinfo
--- a/lang/ocaml/distinfo       Wed Jan 21 23:48:35 2009 +0000
+++ b/lang/ocaml/distinfo       Thu Jan 22 01:00:33 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2008/04/25 07:13:39 wiz Exp $
+$NetBSD: distinfo,v 1.44 2009/01/22 01:00:33 he Exp $
 
 SHA1 (ocaml-3.10.2.tar.bz2) = f604580bf2943891d8faf265eeb900bbe90abce0
 RMD160 (ocaml-3.10.2.tar.bz2) = f631230b090dbd9bf9a9f71631cd0347c033cbb1
@@ -37,3 +37,4 @@
 SHA1 (patch-bs) = 8554ef37cdeac1998978adc74a9c709a84cccb92
 SHA1 (patch-bt) = a1b9034f3034712bbedab51aed430285ca02ee5e
 SHA1 (patch-bu) = df80c076248e1ad1ab6eae195bda724ea354a55e
+SHA1 (patch-bv) = 595641bb079174f393e420bdf5c48fe8ca1912cf
diff -r eacd00a0dba1 -r 838a9d255707 lang/ocaml/patches/patch-bv
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ocaml/patches/patch-bv       Thu Jan 22 01:00:33 2009 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-bv,v 1.5 2009/01/22 01:00:34 he Exp $
+
+--- ./asmrun/signals_osdep.h.orig      2007-11-26 17:58:51.000000000 +0100
++++ ./asmrun/signals_osdep.h
+@@ -158,10 +158,9 @@
+   #define CONTEXT_SP (CONTEXT_STATE.CONTEXT_REG(r1))
+   #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
+ 
+-/****************** PowerPC, ELF (Linux) */
++/****************** PowerPC, ELF (Linux | NetBSD) */
+ 
+ #elif defined(TARGET_power) && defined(SYS_elf)
+-
+   #define DECLARE_SIGNAL_HANDLER(name) \
+     static void name(int sig, struct sigcontext * context)
+ 
+@@ -169,11 +168,21 @@
+      sigact.sa_handler = (void (*)(int)) (name); \
+      sigact.sa_flags = 0
+ 
++ #ifdef __NetBSD__
++  typedef register_t context_reg;
++  #define CONTEXT_PC (context->sc_frame.srr0)
++  #define CONTEXT_EXCEPTION_POINTER (context->sc_frame.fixreg[29])
++  #define CONTEXT_YOUNG_LIMIT (context->sc_frame.fixreg[30])
++  #define CONTEXT_YOUNG_PTR (context->sc_frame.fixreg[31])
++
++ #else
++
+   typedef unsigned long context_reg;
+   #define CONTEXT_PC (context->regs->nip)
+   #define CONTEXT_EXCEPTION_POINTER (context->regs->gpr[29])
+   #define CONTEXT_YOUNG_LIMIT (context->regs->gpr[30])
+   #define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
++ #endif /* __NetBSD__ */
+ 
+ /****************** PowerPC, BSD */
+ 



Home | Main Index | Thread Index | Old Index