Index: head/lang/ocaml/Makefile =================================================================== --- head/lang/ocaml/Makefile (revision 520253) +++ head/lang/ocaml/Makefile (revision 520254) @@ -1,159 +1,164 @@ # Created by: Kiriyama Kazuhiko # $FreeBSD$ # for committer: bump PORTREVISION for math/facile whenever ocaml gets updated PORTNAME= ocaml PORTVERSION= 4.05.0 PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ GENTOO \ http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs PKGNAMESUFFIX= ${SFX} MAINTAINER= michipili@gmail.com COMMENT= Objective Caml compiler and programming environment LICENSE= QPL10 LGPL20 LICENSE_COMB= multi LICENSE_NAME_QPL10= Q Public License, Version 1.0 LICENSE_FILE_QPL10= ${WRKSRC}/LICENSE LICENSE_PERMS_QPL10= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BROKEN_aarch64= Does not build: sh: as: not found BROKEN_sparc64= No rule to make target 'none.o', needed by 'libasmrun.a' BROKEN_mips64= No ASM support BROKEN_mips= No ASM support USES= cpe compiler:c11 gmake tar:xz USE_LDCONFIG= yes CPE_VENDOR= inria HAS_CONFIGURE= yes ALL_TARGET= world.opt STRIP= SSP_UNSAFE= yes MAKE_JOBS_UNSAFE= yes LDFLAGS_armv7= -Wl,-znotext LDFLAGS_i386= -Wl,-znotext CONFIGURE_ARGS= -verbose -prefix "${PREFIX}" \ -cc "${CC}" \ -aspp "${CC} -c" \ -partialld "${LD} -r" OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES OPTIONS_DEFAULT=X11 THREADS CMP_LIB_DESC= Install compiler libraries MODOPT= camlp4o camlp4r ocamlc ocamldep ocamldoc ocamllex ocamlopt PATTERN= [[:space:]]*(do|then)?[[:space:]]*)(\$$\(CP\)|cp)([[:space:]] DOCSDISTNAME= ${DISTNAME:C/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/\1.\2/} CONFLICTS= metaocaml-[0-9]* .include .if ${PORT_OPTIONS:MDOCS} DISTFILES:= ${DISTNAME}${EXTRACT_SUFX} \ ${DOCSDISTNAME}-refman-html.tar.gz:docs \ ${DOCSDISTNAME}-refman.ps.gz:docs \ ${DOCSDISTNAME}-refman.pdf:docs EXTRACT_ONLY:= ${DISTNAME}${EXTRACT_SUFX} \ ${DOCSDISTNAME}-refman-html.tar.gz PLIST_SUB+= DOC="" PORTDOCS= htmlman ${DOCSDISTNAME}-refman.ps.gz ${DOCSDISTNAME}-refman.pdf .else PLIST_SUB+= DOC="@comment " .endif .if ${ARCH} == armv6 || ${ARCH} == armv7 CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS} -meabi=5" .else CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS}" .endif .if ${PORT_OPTIONS:MTHREADS} PLIST_SUB+= THREADS="" THR_LD= -lpthread .else PLIST_SUB+= THREADS="@comment " THR_LD= #empty CONFIGURE_ARGS+=-no-pthread .endif .if ${PORT_OPTIONS:MX11} PLIST_SUB+= X11="" USES+= xorg USE_XORG= x11 CONFLICTS+= ocaml-nox11-[0-9]* CONFIGURE_ARGS+=-x11include ${LOCALBASE}/include -x11lib ${LOCALBASE}/lib .else PLIST_SUB+= X11="@comment " SFX= -nox11 CONFLICTS+= ocaml-[0-9]* CONFIGURE_ARGS+=-no-graph .endif .include .if defined(NO_PROFILE) || ${ARCH:Mpowerpc} || ${ARCH:Mamd64} PLIST_SUB+= PROF="@comment " .else PLIST_SUB+= PROF="" .endif +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-asmcomp_power_arch.ml +USE_GCC= yes +.endif + post-extract: .if ${PORT_OPTIONS:MDOCS} @if ! (cd ${WRKDIR} && \ ${TAR} xf ${_DISTDIR}${DOCSDISTNAME}-refman-html.tar.gz \ ) \ then \ exit 1; \ fi; .endif post-patch: @${REINPLACE_CMD} \ -e '\|MKLIB=|s|ar rc|${AR} rc|' \ -e '\|RANLIB|s|ranlib|${RANLIB}|' \ -e '\|bytecclinkopts=|s|""|"${LDFLAGS}"|' \ -e "\|nativecclinkopts=|s|''|\"${LDFLAGS:C/-Wl,//}\"|" \ ${WRKSRC}/configure @${REINPLACE_CMD} -e 's,$$(ARCH),$$(SYSTEM_ARCH),' \ ${WRKSRC}/Makefile ${WRKSRC}/Makefile.tools \ ${WRKSRC}/asmrun/Makefile \ ${WRKSRC}/otherlibs/systhreads/Makefile \ ${WRKSRC}/testsuite/makefiles/Makefile.common \ ${WRKSRC}/testsuite/tests/asmcomp/Makefile post-configure: @${REINPLACE_CMD} -E \ -e '/^PTHREAD_LINK/s,-pthread,${THR_LD},g' \ ${WRKSRC}/config/Makefile # INSTALL* safeness (which preserves the correct permissions despite # user's umask(1) @${FIND} ${WRKDIR} -type f -name Makefile -print0 | \ ${XARGS} -0 -n 5 -x ${REINPLACE_CMD} -E \ -e 's,^(${PATTERN}+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \4,' \ -e 's,^(${PATTERN}+.*BINDIR),\1\$${BSD_INSTALL_PROGRAM} \4,' \ -e 's,^(${PATTERN}+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \4,' \ -e 's,(${PATTERN}+.*(MANDIR|MANODIR|MANEXT)),\1\$${BSD_INSTALL_MAN} \4,' check-test: do-install @cd ${WRKSRC}/testsuite; ${RM} _log; for d in tests/* ; do \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one DIR=$${d} \ 2>&1 | tee -a _log || ${TRUE} ; done ; \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report post-install: .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKDIR} && ${COPYTREE_SHARE} htmlman ${STAGEDIR}${DOCSDIR}) ${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.ps.gz ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${STAGEDIR}${DOCSDIR} .endif # Spacetime profiling is only available for native code on 64-bit targets .if ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc @${REINPLACE_CMD} -e '/raw_spacetime_lib/d' ${TMPPLIST} .endif .include Index: head/lang/ocaml/files/extra-patch-asmcomp_power_arch.ml =================================================================== --- head/lang/ocaml/files/extra-patch-asmcomp_power_arch.ml (nonexistent) +++ head/lang/ocaml/files/extra-patch-asmcomp_power_arch.ml (revision 520254) @@ -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 + Property changes on: head/lang/ocaml/files/extra-patch-asmcomp_power_arch.ml ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/ocaml/files/patch-asmrun_power.S =================================================================== --- head/lang/ocaml/files/patch-asmrun_power.S (nonexistent) +++ head/lang/ocaml/files/patch-asmrun_power.S (revision 520254) @@ -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" Property changes on: head/lang/ocaml/files/patch-asmrun_power.S ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/ocaml/files/patch-byterun_caml_stack.h =================================================================== --- head/lang/ocaml/files/patch-byterun_caml_stack.h (nonexistent) +++ head/lang/ocaml/files/patch-byterun_caml_stack.h (revision 520254) @@ -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 Property changes on: head/lang/ocaml/files/patch-byterun_caml_stack.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/ocaml/files/patch-testsuite_tests_asmcomp_power.S =================================================================== --- head/lang/ocaml/files/patch-testsuite_tests_asmcomp_power.S (nonexistent) +++ head/lang/ocaml/files/patch-testsuite_tests_asmcomp_power.S (revision 520254) @@ -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 Property changes on: head/lang/ocaml/files/patch-testsuite_tests_asmcomp_power.S ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property