Index: head/lang/ocaml/Makefile =================================================================== --- head/lang/ocaml/Makefile (revision 507826) +++ head/lang/ocaml/Makefile (revision 507827) @@ -1,158 +1,158 @@ # 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_armv7= Does not build: hasgot.c: undefined reference to `tgetent' 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="" 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 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} == i386 || ${ARCH} == powerpc +.if ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc @${REINPLACE_CMD} -e '/raw_spacetime_lib/d' ${TMPPLIST} .endif .include Index: head/lang/ocaml/files/patch-configure =================================================================== --- head/lang/ocaml/files/patch-configure (revision 507826) +++ head/lang/ocaml/files/patch-configure (revision 507827) @@ -1,67 +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;; -@@ -946,6 +951,7 @@ case "$target" in +@@ -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 +1057,12 @@ case "$arch,$system" in +@@ -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';; -@@ -2029,7 +2037,7 @@ MKLIB=${TOOLPREF}ar rc \$(1) \$(2); ${TOOLPREF}ranlib +@@ -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