summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortron <tron>2009-01-22 11:40:54 +0000
committertron <tron>2009-01-22 11:40:54 +0000
commita9f24b929a28034df93b3dbb96be86bc50ebf5fd (patch)
treefb02e9e147a170f7ddb09fdb47eccb671350517c /lang
parent372cf76d5aee28de2643a890cae9d97928d35e97 (diff)
downloadpkgsrc-a9f24b929a28034df93b3dbb96be86bc50ebf5fd.tar.gz
Pullup ticket #2649 - requested by he
ocaml: build fix for NetBSD/macppc Revisons pulled up: - lang/ocaml/Makefile 1.61 - lang/ocaml/distinfo 1.44 - lang/ocaml/patches/patch-bv 1.5 --- Module Name: pkgsrc Committed By: he Date: Thu Jan 22 01:00:34 UTC 2009 Modified Files: pkgsrc/lang/ocaml: Makefile distinfo Added Files: pkgsrc/lang/ocaml/patches: patch-bv Log Message: 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 (limited to 'lang')
-rw-r--r--lang/ocaml/Makefile3
-rw-r--r--lang/ocaml/distinfo3
-rw-r--r--lang/ocaml/patches/patch-bv38
3 files changed, 42 insertions, 2 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index 6be0b703e20..3923f2ca65c 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.60 2008/12/22 20:04:07 joerg Exp $
+# $NetBSD: Makefile,v 1.60.2.1 2009/01/22 11:40:54 tron Exp $
PKG_DESTDIR_SUPPORT= user-destdir
@@ -30,6 +30,7 @@ BUILD_TARGET+= opt opt.opt
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 --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo
index 33294c50a92..b97ba3a9b98 100644
--- a/lang/ocaml/distinfo
+++ b/lang/ocaml/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2008/04/25 07:13:39 wiz Exp $
+$NetBSD: distinfo,v 1.43.10.1 2009/01/22 11:40:54 tron Exp $
SHA1 (ocaml-3.10.2.tar.bz2) = f604580bf2943891d8faf265eeb900bbe90abce0
RMD160 (ocaml-3.10.2.tar.bz2) = f631230b090dbd9bf9a9f71631cd0347c033cbb1
@@ -37,3 +37,4 @@ SHA1 (patch-br) = c26f18532d3756188eb9c79bf9a301e50a0ce84b
SHA1 (patch-bs) = 8554ef37cdeac1998978adc74a9c709a84cccb92
SHA1 (patch-bt) = a1b9034f3034712bbedab51aed430285ca02ee5e
SHA1 (patch-bu) = df80c076248e1ad1ab6eae195bda724ea354a55e
+SHA1 (patch-bv) = 595641bb079174f393e420bdf5c48fe8ca1912cf
diff --git a/lang/ocaml/patches/patch-bv b/lang/ocaml/patches/patch-bv
new file mode 100644
index 00000000000..bcfe1f5810e
--- /dev/null
+++ b/lang/ocaml/patches/patch-bv
@@ -0,0 +1,38 @@
+$NetBSD: patch-bv,v 1.4.14.1 2009/01/22 11:40:54 tron 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 */
+