mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-10 02:21:15 +02:00
add ocaml 410
This commit is contained in:
21
_alpha/ocaml410/Makefile
Normal file
21
_alpha/ocaml410/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Created by: Kiriyama Kazuhiko <kiri@kiri.toba-cmt.ac.jp>
|
||||
# $FreeBSD: head/lang/ocaml/Makefile 536967 2020-05-29 11:27:54Z antoine $
|
||||
# for committer: bump PORTREVISION for math/facile whenever ocaml gets updated
|
||||
|
||||
PORTNAME= ocaml
|
||||
PORTVERSION= 4.10.0
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES+= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ GENTOO
|
||||
MASTER_SITES+= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs
|
||||
PKGNAMESUFFIX= ${SFX}
|
||||
|
||||
MAINTAINER= michipili@gmail.com
|
||||
COMMENT= Objective Caml compiler and programming environment
|
||||
|
||||
USES= compiler:c11 gmake tar:xz autoreconf
|
||||
USE_LDCONFIG= yes
|
||||
GNU_CONFIGURE= yes
|
||||
SSP_UNSAFE= yes
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
|
||||
.include <bsd.port.mk>
|
||||
3
_alpha/ocaml410/distinfo
Normal file
3
_alpha/ocaml410/distinfo
Normal file
@@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1593075385
|
||||
SHA256 (ocaml-4.10.0.tar.xz) = 30734db17b609fdd1609c39a05912325c299023968a2c783e5955dd5163dfeb7
|
||||
SIZE (ocaml-4.10.0.tar.xz) = 3416016
|
||||
99
_alpha/ocaml410/files/_patch-asmrun_power.S
Normal file
99
_alpha/ocaml410/files/_patch-asmrun_power.S
Normal file
@@ -0,0 +1,99 @@
|
||||
--- asmrun/power.S.orig 2019-12-02 12:34:04 UTC
|
||||
+++ asmrun/power.S
|
||||
@@ -13,7 +13,7 @@
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
-#if defined(MODEL_ppc64le)
|
||||
+#if _CALL_ELF == 2
|
||||
.abiversion 2
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define CALLBACK_LINK_SIZE 16
|
||||
#define CALLBACK_LINK_OFFSET 0
|
||||
#endif
|
||||
-#if defined(MODEL_ppc64)
|
||||
+#if _CALL_ELF == 1
|
||||
#define RESERVED_STACK 48
|
||||
#define PARAM_SAVE_AREA (8*8)
|
||||
#define LR_SAVE 16
|
||||
@@ -54,7 +54,7 @@
|
||||
#define CALLBACK_LINK_SIZE 32
|
||||
#define CALLBACK_LINK_OFFSET 48
|
||||
#endif
|
||||
-#if defined(MODEL_ppc64le)
|
||||
+#if _CALL_ELF == 2
|
||||
#define RESERVED_STACK 32
|
||||
#define PARAM_SAVE_AREA 0
|
||||
#define LR_SAVE 16
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
-#if defined(MODEL_ppc64)
|
||||
+#if _CALL_ELF == 1
|
||||
#define FUNCTION(name) \
|
||||
.section ".opd","aw"; \
|
||||
.align 3; \
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
-#if defined(MODEL_ppc64le)
|
||||
+#if _CALL_ELF == 2
|
||||
#define FUNCTION(name) \
|
||||
.section ".text"; \
|
||||
.globl name; \
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
-#if defined(MODEL_ppc64)
|
||||
+#if _CALL_ELF == 1
|
||||
.section ".opd","aw"
|
||||
#else
|
||||
.section ".text"
|
||||
@@ -338,14 +338,14 @@ FUNCTION(caml_c_call)
|
||||
#if defined(MODEL_ppc)
|
||||
mtctr 28
|
||||
bctrl
|
||||
-#elif defined(MODEL_ppc64)
|
||||
+#elif _CALL_ELF == 1
|
||||
ld 0, 0(28)
|
||||
mr 26, 2 /* save current TOC in a callee-save register */
|
||||
mtctr 0
|
||||
ld 2, 8(28)
|
||||
bctrl
|
||||
mr 2, 26 /* restore current TOC */
|
||||
-#elif defined(MODEL_ppc64le)
|
||||
+#elif _CALL_ELF == 2
|
||||
mtctr 28
|
||||
mr 12, 28
|
||||
mr 26, 2 /* save current TOC in a callee-save register */
|
||||
@@ -514,14 +514,14 @@ FUNCTION(caml_start_program)
|
||||
#if defined(MODEL_ppc)
|
||||
mtctr 12
|
||||
.L105: bctrl
|
||||
-#elif defined(MODEL_ppc64)
|
||||
+#elif _CALL_ELF == 1
|
||||
ld 0, 0(12)
|
||||
mtctr 0
|
||||
std 2, TOC_SAVE(1)
|
||||
ld 2, 8(12)
|
||||
.L105: bctrl
|
||||
ld 2, TOC_SAVE(1)
|
||||
-#elif defined(MODEL_ppc64le)
|
||||
+#elif _CALL_ELF == 2
|
||||
mtctr 12
|
||||
std 2, TOC_SAVE(1)
|
||||
.L105: bctrl
|
||||
@@ -634,7 +634,7 @@ FUNCTION(caml_callback3_exn)
|
||||
b .L102
|
||||
ENDFUNCTION(caml_callback3_exn)
|
||||
|
||||
-#if defined(MODEL_ppc64)
|
||||
+#if _CALL_ELF == 1
|
||||
.section ".opd","aw"
|
||||
#else
|
||||
.section ".text"
|
||||
15
_alpha/ocaml410/files/_patch-byterun_caml_stack.h
Normal file
15
_alpha/ocaml410/files/_patch-byterun_caml_stack.h
Normal file
@@ -0,0 +1,15 @@
|
||||
--- byterun/caml/stack.h.orig 2017-07-13 08:56:44 UTC
|
||||
+++ byterun/caml/stack.h
|
||||
@@ -40,10 +40,10 @@
|
||||
#if defined(MODEL_ppc)
|
||||
#define Saved_return_address(sp) *((intnat *)((sp) - 4))
|
||||
#define Callback_link(sp) ((struct caml_context *)((sp) + 16))
|
||||
-#elif defined(MODEL_ppc64)
|
||||
+#elif _CALL_ELF == 1
|
||||
#define Saved_return_address(sp) *((intnat *)((sp) + 16))
|
||||
#define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
|
||||
-#elif defined(MODEL_ppc64le)
|
||||
+#elif _CALL_ELF == 2
|
||||
#define Saved_return_address(sp) *((intnat *)((sp) + 16))
|
||||
#define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
|
||||
#else
|
||||
84
_alpha/ocaml410/files/_patch-configure
Normal file
84
_alpha/ocaml410/files/_patch-configure
Normal file
@@ -0,0 +1,84 @@
|
||||
--- configure.orig 2017-07-13 08:56:44 UTC
|
||||
+++ configure
|
||||
@@ -806,7 +806,7 @@ if test $with_sharedlibs = "yes"; then
|
||||
*-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\
|
||||
|*-*-openbsd*|*-*-netbsd*|*-*-dragonfly*|*-*-gnu*|*-*-haiku*)
|
||||
sharedcccompopts="-fPIC"
|
||||
- mksharedlib="$bytecc -shared"
|
||||
+ mksharedlib="$bytecc $bytecclinkopts -shared"
|
||||
bytecclinkopts="$bytecclinkopts -Wl,-E"
|
||||
byteccrpath="-Wl,-rpath,"
|
||||
mksharedlibrpath="-Wl,-rpath,"
|
||||
@@ -838,6 +838,7 @@ if test $with_sharedlibs = "yes"; then
|
||||
x86_64-*-darwin*) natdynlink=true;;
|
||||
s390x*-*-linux*) natdynlink=true;;
|
||||
powerpc*-*-linux*) natdynlink=true;;
|
||||
+ powerpc*-*-freebsd*) natdynlink=true;;
|
||||
sparc*-*-linux*) natdynlink=true;;
|
||||
i686-*-kfreebsd*) natdynlink=true;;
|
||||
x86_64-*-kfreebsd*) natdynlink=true;;
|
||||
@@ -854,6 +855,7 @@ if test $with_sharedlibs = "yes"; then
|
||||
arm*-*-freebsd*) natdynlink=true;;
|
||||
earm*-*-netbsd*) natdynlink=true;;
|
||||
aarch64-*-linux*) natdynlink=true;;
|
||||
+ aarch64-*-freebsd*) natdynlink=true;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -921,6 +923,9 @@ case "$target" in
|
||||
powerpc*-*-linux*) arch=power;
|
||||
if $arch64; then model=ppc64; else model=ppc; fi
|
||||
system=elf;;
|
||||
+ powerpc*-*-freebsd*) arch=power;
|
||||
+ if $arch64; then model=ppc64; else model=ppc; fi
|
||||
+ system=bsd_elf;;
|
||||
powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
|
||||
powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;;
|
||||
s390x*-*-linux*) arch=s390x; model=z10; system=elf;;
|
||||
@@ -930,6 +935,7 @@ case "$target" in
|
||||
armv6t2*-*-linux-gnueabi) arch=arm; model=armv6t2; system=linux_eabi;;
|
||||
armv6*-*-linux-gnueabi) arch=arm; model=armv6; system=linux_eabi;;
|
||||
armv6*-*-freebsd*) arch=arm; model=armv6; system=freebsd;;
|
||||
+ armv7*-*-freebsd*) arch=arm; model=armv7; system=freebsd;;
|
||||
earmv6*-*-netbsd*) arch=arm; model=armv6; system=netbsd;;
|
||||
earmv7*-*-netbsd*) arch=arm; model=armv7; system=netbsd;;
|
||||
armv5te*-*-linux-gnueabi) arch=arm; model=armv5te; system=linux_eabi;;
|
||||
@@ -946,6 +952,7 @@ case "$target" in
|
||||
x86_64-*-darwin*) arch=amd64; system=macosx;;
|
||||
x86_64-*-mingw*) arch=amd64; system=mingw;;
|
||||
aarch64-*-linux*) arch=arm64; system=linux;;
|
||||
+ aarch64-*-freebsd*) arch=arm64; system=freebsd;;
|
||||
x86_64-*-cygwin*) arch=amd64; system=cygwin;;
|
||||
esac
|
||||
|
||||
@@ -1051,10 +1058,12 @@ case "$arch,$system" in
|
||||
case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
|
||||
amd64,linux) profiling='true';;
|
||||
amd64,openbsd) profiling='true';;
|
||||
+ amd64,dragonfly) profiling='true';;
|
||||
amd64,freebsd) profiling='true';;
|
||||
amd64,netbsd) profiling='true';;
|
||||
arm,netbsd) profiling='true';;
|
||||
amd64,gnu) profiling='true';;
|
||||
+ arm,freebsd) profiling='true';;
|
||||
arm,linux*) profiling='true';;
|
||||
power,elf) profiling='true';;
|
||||
power,bsd*) profiling='true';;
|
||||
@@ -1168,7 +1177,7 @@ fi
|
||||
|
||||
if test "$with_curses" = "yes"; then
|
||||
for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
|
||||
- if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
|
||||
+ if sh ./hasgot -i term.h $libs tgetent tgetstr tgetnum tputs; then
|
||||
inf "termcap functions found (with libraries '$libs')"
|
||||
echo "#define HAS_TERMCAP" >> s.h
|
||||
curseslibs="${libs}"
|
||||
@@ -2029,7 +2037,7 @@ MKLIB=${TOOLPREF}ar rc \$(1) \$(2); ${TOOLPREF}ranlib
|
||||
#ml Printf.sprintf "${TOOLPREF}ar rc %s %s %s; ${TOOLPREF}ranlib %s"
|
||||
#ml out opts files out;;
|
||||
EOF
|
||||
-echo "ARCH=$arch" >> Makefile
|
||||
+echo "SYSTEM_ARCH=$arch" >> Makefile
|
||||
echo "MODEL=$model" >> Makefile
|
||||
echo "SYSTEM=$system" >> Makefile
|
||||
echo "NATIVECC=$nativecc $nativecccompopts" >> Makefile
|
||||
62
_alpha/ocaml410/files/_patch-testsuite_tests_asmcomp_power.S
Normal file
62
_alpha/ocaml410/files/_patch-testsuite_tests_asmcomp_power.S
Normal file
@@ -0,0 +1,62 @@
|
||||
--- testsuite/tests/asmcomp/power.S.orig 2019-12-02 12:36:28 UTC
|
||||
+++ testsuite/tests/asmcomp/power.S
|
||||
@@ -26,11 +26,11 @@
|
||||
#define RESERVED_STACK 16
|
||||
#define LR_SAVE_AREA 4
|
||||
#endif
|
||||
-#if defined(MODEL_ppc64)
|
||||
+#if _CALL_ELF == 1
|
||||
#define RESERVED_STACK 48
|
||||
#define LR_SAVE_AREA 16
|
||||
#endif
|
||||
-#if defined(MODEL_ppc64le)
|
||||
+#if _CALL_ELF == 2
|
||||
#define RESERVED_STACK 32
|
||||
#define LR_SAVE_AREA 16
|
||||
#endif
|
||||
@@ -46,7 +46,7 @@
|
||||
name:
|
||||
#endif
|
||||
|
||||
-#if defined(MODEL_ppc64)
|
||||
+#if _CALL_ELF == 1
|
||||
#define FUNCTION(name) \
|
||||
.section ".opd","aw"; \
|
||||
.align 3; \
|
||||
@@ -58,7 +58,7 @@
|
||||
.L.name:
|
||||
#endif
|
||||
|
||||
-#if defined(MODEL_ppc64le)
|
||||
+#if _CALL_ELF == 2
|
||||
#define FUNCTION(name) \
|
||||
.section ".text"; \
|
||||
.globl name; \
|
||||
@@ -118,11 +118,11 @@ FUNCTION(call_gen_code)
|
||||
/* Get function pointer in CTR */
|
||||
#if defined(MODEL_ppc)
|
||||
mtctr 3
|
||||
-#elif defined(MODEL_ppc64)
|
||||
+#elif _CALL_ELF == 1
|
||||
ld 0, 0(3)
|
||||
mtctr 0
|
||||
ld 2, 8(3)
|
||||
-#elif defined(MODEL_ppc64le)
|
||||
+#elif _CALL_ELF == 2
|
||||
mtctr 3
|
||||
mr 12, 3
|
||||
#else
|
||||
@@ -184,11 +184,11 @@ FUNCTION(caml_c_call)
|
||||
/* Jump to C function (address in r28) */
|
||||
#if defined(MODEL_ppc)
|
||||
mtctr 28
|
||||
-#elif defined(MODEL_ppc64)
|
||||
+#elif _CALL_ELF == 1
|
||||
ld 0, 0(28)
|
||||
mtctr 0
|
||||
ld 2, 8(28)
|
||||
-#elif defined(MODEL_ppc64le)
|
||||
+#elif _CALL_ELF == 2
|
||||
mtctr 28
|
||||
mr 12, 28
|
||||
#else
|
||||
11
_alpha/ocaml410/files/extra-patch-asmcomp_power_arch.ml
Normal file
11
_alpha/ocaml410/files/extra-patch-asmcomp_power_arch.ml
Normal file
@@ -0,0 +1,11 @@
|
||||
--- asmcomp/power/arch.ml.orig 2019-12-02 10:44:34 UTC
|
||||
+++ asmcomp/power/arch.ml
|
||||
@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
|
||||
let abi =
|
||||
match Config.model with
|
||||
| "ppc" -> ELF32
|
||||
- | "ppc64" -> ELF64v1
|
||||
+ | "ppc64" -> ELF64v2
|
||||
| "ppc64le" -> ELF64v2
|
||||
| _ -> assert false
|
||||
|
||||
11
_alpha/ocaml410/files/patch-x-configure.ac
Normal file
11
_alpha/ocaml410/files/patch-x-configure.ac
Normal file
@@ -0,0 +1,11 @@
|
||||
--- ./configure.ac.orig 2020-02-21 16:22:37.000000000 +0200
|
||||
+++ ./configure.ac 2020-06-25 11:17:52.476328000 +0200
|
||||
@@ -928,6 +928,8 @@
|
||||
[arch=arm64; system=linux],
|
||||
[aarch64-*-freebsd*],
|
||||
[arch=arm64; system=freebsd],
|
||||
+ [amd64-*-freebsd*],
|
||||
+ [arch=amd64; system=freebsd],
|
||||
[x86_64-*-cygwin*],
|
||||
[arch=amd64; system=cygwin]
|
||||
)
|
||||
19
_alpha/ocaml410/pkg-descr
Normal file
19
_alpha/ocaml410/pkg-descr
Normal file
@@ -0,0 +1,19 @@
|
||||
Objective Caml is an implementation of the ML language, based on
|
||||
the Caml Light dialect extended with a complete class-based object system
|
||||
and a powerful module system in the style of Standard ML.
|
||||
|
||||
Objective Caml comprises two compilers. One generates bytecode
|
||||
which is then interpreted by a C program. This compiler runs quickly,
|
||||
generates compact code with moderate memory requirements, and is
|
||||
portable to essentially any 32 or 64 bit Unix platform. Performance of
|
||||
generated programs is quite good for a bytecoded implementation:
|
||||
almost twice as fast as Caml Light 0.7. This compiler can be used
|
||||
either as a standalone, batch-oriented compiler that produces
|
||||
standalone programs, or as an interactive, toplevel-based system.
|
||||
|
||||
The other compiler generates high-performance native code for a number
|
||||
of processors. Compilation takes longer and generates bigger code, but
|
||||
the generated programs deliver excellent performance, while retaining
|
||||
the moderate memory requirements of the bytecode compiler.
|
||||
|
||||
WWW: https://ocaml.org/
|
||||
2281
_alpha/ocaml410/pkg-plist
Normal file
2281
_alpha/ocaml410/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user