pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/ocaml Apply the required fixes to make this work ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/382790cafe12
branches: trunk
changeset: 370053:382790cafe12
user: he <he%pkgsrc.org@localhost>
date: Tue Oct 10 12:10:05 2017 +0000
description:
Apply the required fixes to make this work again on NetBSD/powerpc.
A similar set of changes has been sent upstream.
OK by jaapb@
diffstat:
lang/ocaml/Makefile | 6 +-
lang/ocaml/PLIST | 10 +-
lang/ocaml/distinfo | 8 +-
lang/ocaml/patches/patch-asmrun_signals__osdep.h | 74 +++++++--
lang/ocaml/patches/patch-configure | 61 ++++++-
lang/ocaml/patches/patch-testsuite_tests_lib-dynlink-native_Makefile | 16 ++
lang/ocaml/patches/patch-testsuite_tests_tool-ocamldoc-man_Makefile | 24 +++
7 files changed, 156 insertions(+), 43 deletions(-)
diffs (truncated from 368 to 300 lines):
diff -r fefe8a5a3655 -r 382790cafe12 lang/ocaml/Makefile
--- a/lang/ocaml/Makefile Tue Oct 10 11:17:42 2017 +0000
+++ b/lang/ocaml/Makefile Tue Oct 10 12:10:05 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.114 2017/09/21 13:56:59 jperkin Exp $
+# $NetBSD: Makefile,v 1.115 2017/10/10 12:10:05 he Exp $
.include "Makefile.common"
-#PKGREVISION= 3
+PKGREVISION= 1
CONFIGURE_ENV+= disable_x11=yes
@@ -98,7 +98,7 @@
post-install:
set -e ; cd ${DESTDIR}${PREFIX}/lib/ocaml/${PKGMANDIR}/man1; \
for m in *; do \
- ln -s ${PREFIX}/lib/ocaml/${PKGMANDIR}/man1/$$m \
+ ln -sf ${PREFIX}/lib/ocaml/${PKGMANDIR}/man1/$$m \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/$$m; \
done
diff -r fefe8a5a3655 -r 382790cafe12 lang/ocaml/PLIST
--- a/lang/ocaml/PLIST Tue Oct 10 11:17:42 2017 +0000
+++ b/lang/ocaml/PLIST Tue Oct 10 12:10:05 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.43 2017/09/22 09:48:28 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.44 2017/10/10 12:10:05 he Exp $
bin/ocaml
bin/ocamlc
bin/ocamlc.byte
@@ -1277,12 +1277,12 @@
${PLIST.ocaml-prof}lib/ocaml/digest.p.cmt
${PLIST.ocaml-prof}${PLIST.ocaml-opt}lib/ocaml/digest.p.cmx
${PLIST.ocaml-opt}${PLIST.ocaml-nat}lib/ocaml/dynlink.a
-${PLIST.ocaml-nat}lib/ocaml/dynlink.cma
-${PLIST.ocaml-nat}lib/ocaml/dynlink.cmi
-${PLIST.ocaml-nat}lib/ocaml/dynlink.cmti
+${PLIST.ocaml-opt}lib/ocaml/dynlink.cma
+${PLIST.ocaml-opt}lib/ocaml/dynlink.cmi
+${PLIST.ocaml-opt}lib/ocaml/dynlink.cmti
${PLIST.ocaml-nat}${PLIST.ocaml-opt}lib/ocaml/dynlink.cmx
${PLIST.ocaml-nat}${PLIST.ocaml-opt}lib/ocaml/dynlink.cmxa
-${PLIST.ocaml-nat}lib/ocaml/dynlink.mli
+${PLIST.ocaml-opt}lib/ocaml/dynlink.mli
lib/ocaml/ephemeron.cmi
lib/ocaml/ephemeron.cmt
lib/ocaml/ephemeron.cmti
diff -r fefe8a5a3655 -r 382790cafe12 lang/ocaml/distinfo
--- a/lang/ocaml/distinfo Tue Oct 10 11:17:42 2017 +0000
+++ b/lang/ocaml/distinfo Tue Oct 10 12:10:05 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.110 2017/09/10 08:56:47 wiz Exp $
+$NetBSD: distinfo,v 1.111 2017/10/10 12:10:05 he Exp $
SHA1 (ocaml-4.05.0.tar.gz) = ef9e3febed311cf9331baefd2999961b36f849cb
RMD160 (ocaml-4.05.0.tar.gz) = 67b299c3abe032f955e95eac106c32664351453c
@@ -7,9 +7,9 @@
SHA1 (patch-Makefile) = 557a2a34d09e7c063b34d9b97b4e3d1a8e4cd902
SHA1 (patch-asmcomp_asmlink.ml) = db2b387ea17f41a62c2bce53b91f945d5e29a82f
SHA1 (patch-asmrun_Makefile) = 86c88be262ae1278ca376d7966b496b49c549e72
-SHA1 (patch-asmrun_signals__osdep.h) = 1b990aad8e99692f0799e2d3dc61df2f4d1c8f6a
+SHA1 (patch-asmrun_signals__osdep.h) = fa0c6981ca08d1114a377df1720ad866b94eff43
SHA1 (patch-byterun_Makefile) = 28b8298093a439fe1418dc91bb8a06da9870bfab
-SHA1 (patch-configure) = 6559c8728ed6676b2bab19f75538ba9d16cceea1
+SHA1 (patch-configure) = 8c515cc9fada57bce81134c02b8763a13b9d4445
SHA1 (patch-driver_compenv.ml) = 658e315bb08f8a1093f11c8474ac1e4ad73c8306
SHA1 (patch-driver_main.ml) = 69a6f761ded38e0721a7aed1416a9f19a288d991
SHA1 (patch-driver_main_args.ml) = 4c6a6ec25f433974f9aab99b4f2ac9c884bb3b04
@@ -24,6 +24,8 @@
SHA1 (patch-otherlibs_systhreads_Makefile) = edf1c481d57f42da9d0cb2699aa39c93eb46265e
SHA1 (patch-otherlibs_threads_Makefile) = b25c0003a4e4304b6751ec90bdb99aae7a24cf70
SHA1 (patch-stdlib_Makefile) = 4832d06bf0d0873ddf814e77f6085a2acf2b8988
+SHA1 (patch-testsuite_tests_lib-dynlink-native_Makefile) = aad24bed515295fe0262ab09d015f3afbe2f3bc4
+SHA1 (patch-testsuite_tests_tool-ocamldoc-man_Makefile) = 670c9ecc83ae3b83c2232f9f182ccd21624bfed0
SHA1 (patch-tools_ocamlcp.ml) = 299c84c169bacfe0315a986d739b3e61d2491289
SHA1 (patch-tools_ocamlmklib) = 53785aa5f0684a2c8708891d7e4e9d4400afbe7d
SHA1 (patch-tools_ocamloptp.ml) = bb6ba38e9bb260117d67491566474fda750d708b
diff -r fefe8a5a3655 -r 382790cafe12 lang/ocaml/patches/patch-asmrun_signals__osdep.h
--- a/lang/ocaml/patches/patch-asmrun_signals__osdep.h Tue Oct 10 11:17:42 2017 +0000
+++ b/lang/ocaml/patches/patch-asmrun_signals__osdep.h Tue Oct 10 12:10:05 2017 +0000
@@ -1,21 +1,34 @@
-$NetBSD: patch-asmrun_signals__osdep.h,v 1.1 2017/07/11 17:15:02 he Exp $
+$NetBSD: patch-asmrun_signals__osdep.h,v 1.2 2017/10/10 12:10:05 he Exp $
Provide necessary glue to do this on NetBSD/powerpc.
---- asmrun/signals_osdep.h.orig 2016-11-04 16:08:24.000000000 +0000
+--- asmrun/signals_osdep.h.orig 2017-07-13 08:56:44.000000000 +0000
+++ asmrun/signals_osdep.h
-@@ -154,6 +154,26 @@
- #define CONTEXT_YOUNG_PTR (context->uc_mcontext.gregs[REG_R15])
- #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
+@@ -303,27 +303,30 @@
+ #define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
+ #define CONTEXT_SP (context->regs->gpr[1])
+
+-/****************** s390x, ELF (Linux) */
+-#elif defined(TARGET_s390x) && defined(SYS_elf)
++/****************** PowerPC, NetBSD */
-+/****************** PowerPC, NetBSD */
-+
-+#elif defined(TARGET_power) && defined (__NetBSD__)
-+
+- #define DECLARE_SIGNAL_HANDLER(name) \
+- static void name(int sig, struct sigcontext * context)
++#elif defined(TARGET_power) && defined (SYS_netbsd)
+
+- #define SET_SIGACT(sigact,name) \
+- sigact.sa_handler = (void (*)(int)) (name); \
+- sigact.sa_flags = 0
+ #include <ucontext.h>
+ #define DECLARE_SIGNAL_HANDLER(name) \
+ static void name(int sig, siginfo_t * info, ucontext_t * context)
-+
+
+- typedef unsigned long context_reg;
+- #define CONTEXT_PC (context->sregs->regs.psw.addr)
+- #define CONTEXT_EXCEPTION_POINTER (context->sregs->regs.gprs[13])
+- #define CONTEXT_YOUNG_LIMIT (context->sregs->regs.gprs[10])
+- #define CONTEXT_YOUNG_PTR (context->sregs->regs.gprs[11])
+- #define CONTEXT_SP (context->sregs->regs.gprs[15])
+ #define SET_SIGACT(sigact,name) \
+ sigact.sa_sigaction = (void (*)(int,siginfo_t *,void *)) (name); \
+ sigact.sa_flags = SA_SIGINFO
@@ -25,18 +38,39 @@
+ #define CONTEXT_YOUNG_PTR (context->uc_mcontext.__gregs[_REG_R31])
+ #define CONTEXT_SP (_UC_MACHINE_SP(context))
+ #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
-+
+
+-/****************** PowerPC, BSD */
+/* #define CONTEXT_YOUNG_LIMIT (CONTEXT_STATE.CONTEXT_REG(r30)) */
+
- /****************** I386, Linux */
-
- #elif defined(TARGET_i386) && defined(SYS_linux_elf)
-@@ -287,7 +307,7 @@
++/****************** PowerPC, other BSDs */
- /****************** PowerPC, ELF (Linux) */
-
--#elif defined(TARGET_power) && defined(SYS_elf)
-+#elif defined(TARGET_power) && defined(SYS_elf) && !defined(__NetBSD__)
+ #elif defined(TARGET_power) && \
+- (defined(SYS_bsd) || defined(SYS_bsd_elf) || defined(SYS_netbsd))
++ (defined(SYS_bsd) || defined(SYS_bsd_elf))
#define DECLARE_SIGNAL_HANDLER(name) \
- static void name(int sig, struct sigcontext * context)
+ static void name(int sig, int code, struct sigcontext * context)
+@@ -339,6 +342,23 @@
+ #define CONTEXT_YOUNG_PTR (context->sc_frame.fixreg[31])
+ #define CONTEXT_SP (context->sc_frame.fixreg[1])
+
++/****************** s390x, ELF (Linux) */
++#elif defined(TARGET_s390x) && defined(SYS_elf)
++
++ #define DECLARE_SIGNAL_HANDLER(name) \
++ static void name(int sig, struct sigcontext * context)
++
++ #define SET_SIGACT(sigact,name) \
++ sigact.sa_handler = (void (*)(int)) (name); \
++ sigact.sa_flags = 0
++
++ typedef unsigned long context_reg;
++ #define CONTEXT_PC (context->sregs->regs.psw.addr)
++ #define CONTEXT_EXCEPTION_POINTER (context->sregs->regs.gprs[13])
++ #define CONTEXT_YOUNG_LIMIT (context->sregs->regs.gprs[10])
++ #define CONTEXT_YOUNG_PTR (context->sregs->regs.gprs[11])
++ #define CONTEXT_SP (context->sregs->regs.gprs[15])
++
+ /****************** SPARC, Solaris */
+
+ #elif defined(TARGET_sparc) && defined(SYS_solaris)
diff -r fefe8a5a3655 -r 382790cafe12 lang/ocaml/patches/patch-configure
--- a/lang/ocaml/patches/patch-configure Tue Oct 10 11:17:42 2017 +0000
+++ b/lang/ocaml/patches/patch-configure Tue Oct 10 12:10:05 2017 +0000
@@ -1,9 +1,18 @@
-$NetBSD: patch-configure,v 1.24 2017/09/08 09:12:44 jaapb Exp $
+$NetBSD: patch-configure,v 1.25 2017/10/10 12:10:05 he Exp $
All kinds of OS-specific changes to configure
---- configure.orig 2016-11-04 16:08:24.000000000 +0000
+--- configure.orig 2017-07-13 08:56:44.000000000 +0000
+++ configure
+@@ -359,7 +359,7 @@ mkexe="\$(BYTECC)"
+ mkexedebugflag="-g"
+ bytecccompopts=""
+ byteccprivatecompopts=""
+-bytecclinkopts=""
++bytecclinkopts=" -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib"
+ ostype="Unix"
+ exe=""
+ iflexdir=""
@@ -764,7 +764,10 @@ if test $with_sharedlibs = "yes"; then
*gcc*)
sharedcccompopts="-fPIC"
@@ -48,7 +57,7 @@
i386-*-gnu0.3) natdynlink=true;;
i[3456]86-*-haiku*) natdynlink=true;;
arm*-*-linux*) natdynlink=true;;
-@@ -891,6 +893,7 @@ case "$target" in
+@@ -901,6 +903,7 @@ case "$target" in
sparc*-*-gnu*) arch=sparc; system=gnu;;
i[3456]86-*-linux*) arch=i386; system=linux_`sh ./runtest elf.c`;;
i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
@@ -56,7 +65,7 @@
i[3456]86-*-nextstep*) arch=i386; system=nextstep;;
i[3456]86-*-solaris*) if $arch64; then
arch=amd64; system=solaris
-@@ -900,6 +903,7 @@ case "$target" in
+@@ -910,6 +913,7 @@ case "$target" in
i[3456]86-*-haiku*) arch=i386; system=beos;;
i[3456]86-*-beos*) arch=i386; system=beos;;
i[3456]86-*-cygwin*) arch=i386; system=cygwin;;
@@ -64,7 +73,16 @@
i[3456]86-*-darwin*) if $arch64; then
arch=amd64; system=macosx
else
-@@ -937,6 +941,7 @@ case "$target" in
+@@ -921,7 +925,7 @@ case "$target" in
+ powerpc*-*-linux*) arch=power;
+ if $arch64; then model=ppc64; else model=ppc; fi
+ system=elf;;
+- powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
++ powerpc-*-netbsd*) arch=power; model=ppc; system=netbsd;;
+ powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;;
+ s390x*-*-linux*) arch=s390x; model=z10; system=elf;;
+ armv6*-*-linux-gnueabihf) arch=arm; model=armv6; system=linux_eabihf;;
+@@ -947,6 +951,7 @@ case "$target" in
x86_64-*-mingw*) arch=amd64; system=mingw;;
aarch64-*-linux*) arch=arm64; system=linux;;
x86_64-*-cygwin*) arch=amd64; system=cygwin;;
@@ -72,7 +90,16 @@
esac
# Some platforms exist both in 32-bit and 64-bit variants, not distinguished
-@@ -973,7 +978,6 @@ case "$arch,$nativecc,$system,$model" in
+@@ -974,7 +979,7 @@ fi
+ nativecccompopts="$bytecccompopts"
+ nativeccprivatecompopts="$byteccprivatecompopts"
+ nativeccprofopts=''
+-nativecclinkopts=''
++nativecclinkopts="-L/usr/lib -R/usr/lib -R/usr/pkg/lib"
+ # FIXME the naming of nativecclinkopts is broken: these are options for
+ # ld (for shared libs), not for cc
+ nativeccrpath="$byteccrpath"
+@@ -983,7 +988,6 @@ case "$arch,$nativecc,$system,$model" in
*,*,nextstep,*) nativecclinkopts="-posix";;
*,*,rhapsody,*) if $arch64; then partialld="ld -r -arch ppc64"; fi;;
amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
@@ -80,7 +107,7 @@
power,gcc*,elf,ppc) partialld="ld -r -m elf32ppclinux";;
power,gcc*,elf,ppc64) partialld="ld -r -m elf64ppc";;
power,gcc*,elf,ppc64le) partialld="ld -r -m elf64lppc";;
-@@ -991,8 +995,8 @@ case "$arch,$system" in
+@@ -1001,8 +1005,8 @@ case "$arch,$system" in
fi;;
amd64,solaris) as="${TOOLPREF}as --64"
aspp="${TOOLPREF}gcc -m64 -c";;
@@ -91,16 +118,26 @@
power,elf) if $arch64; then
as="${TOOLPREF}as -a64 -mppc64"
aspp="${TOOLPREF}gcc -m64 -c"
-@@ -1048,6 +1052,8 @@ case "$arch,$system" in
+@@ -1023,7 +1027,7 @@ case "$arch,$system" in
+ aspp="${TOOLPREF}cc -c";;
+ *,freebsd) as="${TOOLPREF}as"
+ aspp="${TOOLPREF}cc -c";;
+- amd64,*|arm,*|arm64,*|i386,*|power,bsd*|sparc,*)
++ amd64,*|arm,*|arm64,*|i386,*|power,bsd*|power,netbsd|sparc,*)
+ as="${TOOLPREF}as"
+ case "$ccfamily" in
+ clang-*)
+@@ -1058,6 +1062,9 @@ case "$arch,$system" in
arm,linux*) profiling='true';;
power,elf) profiling='true';;
power,bsd*) profiling='true';;
++ power,netbsd) profiling='true';;
+ *,*,dragonfly) profiling='true';;
+ amd64,solaris) profiling='true';;
*) profiling='false';;
esac
-@@ -1642,6 +1648,8 @@ fi
+@@ -1652,6 +1659,8 @@ fi
x11_include="not found"
x11_link="not found"
@@ -109,7 +146,7 @@
if test -z "$x11_include_dir" -a -z "$x11_lib_dir"; then
if pkg-config --exists x11 2>/dev/null; then
x11_include=`pkg-config --cflags x11`
-@@ -1688,6 +1696,7 @@ if test "$x11_include" = "not found"; th
+@@ -1698,6 +1707,7 @@ if test "$x11_include" = "not found"; th
/usr/XFree86/include/X11 \
Home |
Main Index |
Thread Index |
Old Index