Changeset View
Changeset View
Standalone View
Standalone View
lang/ocaml/Makefile
# Created by: Kiriyama Kazuhiko <kiri@kiri.toba-cmt.ac.jp> | # Created by: Kiriyama Kazuhiko <kiri@kiri.toba-cmt.ac.jp> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# for committer: bump PORTREVISION for math/facile whenever ocaml gets updated | # for committer: bump PORTREVISION for math/facile whenever ocaml gets updated | ||||
PORTNAME= ocaml | PORTNAME= ocaml | ||||
PORTVERSION= 4.02.3 | DISTVERSION= 4.07.1 | ||||
CATEGORIES= lang | CATEGORIES= lang | ||||
MASTER_SITES= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ GENTOO \ | MASTER_SITES= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ \ | ||||
http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs | http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs | ||||
PKGNAMESUFFIX= ${SFX} | DISTFILES= ${DISTNAME}.tar.gz \ | ||||
${DISTNAME:R}-refman-html.tar.gz:docs \ | |||||
${DISTNAME:R}-refman.pdf:docs \ | |||||
${DISTNAME:R}-refman.ps.gz:docs | |||||
EXTRACT_ONLY= ${DISTNAME}.tar.gz | |||||
MAINTAINER= michipili@gmail.com | MAINTAINER= ports@FreeBSD.org | ||||
COMMENT= Objective Caml compiler and programming environment | COMMENT= Objective Caml compiler and programming environment | ||||
LICENSE= QPL10 LGPL20 | LICENSE= QPL10 LGPL20 | ||||
LICENSE_COMB= multi | LICENSE_COMB= multi | ||||
LICENSE_NAME_QPL10= Q Public License, Version 1.0 | LICENSE_NAME_QPL10= Q Public License, Version 1.0 | ||||
LICENSE_FILE_QPL10= ${WRKSRC}/LICENSE | LICENSE_FILE_QPL10= ${WRKSRC}/LICENSE | ||||
LICENSE_PERMS_QPL10= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept | LICENSE_PERMS_QPL10= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept | ||||
BROKEN_aarch64= Does not build: sh: as: not found | NOT_FOR_ARCHS= mips mips64 sparc64 | ||||
BROKEN_armv7= Does not build: hasgot.c: undefined reference to `tgetent' | NOT_FOR_ARCHS_REASON= Unsupported by upstream | ||||
BROKEN_powerpc64= Does not build: error: too few arguments to function gethostbyname_r | |||||
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 gmake tar:xz | BUILD_DEPENDS_armv7= ${LOCALBASE}/bin/ld:devel/binutils | ||||
FLAVORS= default nox11 | |||||
FLAVOR?= ${FLAVORS:[1]} | |||||
nox11_PKGNAMESUFFIX= -nox11 | |||||
default_CONFLICTS_INSTALL= nox11 | |||||
nox11_CONFLICTS_INSTALL= default | |||||
mat: CONFLICTS_INSTALL contains package names, these does not look like package names. | |||||
USES= cpe gmake shebangfix | |||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
ALL_TARGET= world.opt | |||||
CPE_VENDOR= inria | CPE_VENDOR= inria | ||||
HAS_CONFIGURE= yes | HAS_CONFIGURE= yes | ||||
ALL_TARGET= world.opt | STRIP= #empty | ||||
STRIP= | |||||
SSP_UNSAFE= yes | |||||
MAKE_JOBS_UNSAFE= yes | |||||
LDFLAGS_i386= -Wl,-znotext | |||||
NOPRECIOUSMAKEVARS= yes | |||||
CONFIGURE_ARGS= -verbose -prefix "${PREFIX}" \ | CONFIGURE_ARGS= -verbose -prefix "${PREFIX}" \ | ||||
-cc "${CC}" \ | -cc "${CC}" \ | ||||
-aspp "${CC} -c" \ | -aspp "${CC} -c" \ | ||||
-partialld "${LD} -r" | -partialld "${LD} -r" | ||||
OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES | LDFLAGS_i386= -Wl,-znotext | ||||
OPTIONS_DEFAULT=X11 THREADS | EXTRA_PATCHES_armv7= ${FILESDIR}/extra-patch-no-lld | ||||
CMP_LIB_DESC= Install compiler libraries | |||||
MODOPT= camlp4o camlp4r ocamlc ocamldep ocamldoc ocamllex ocamlopt | SHEBANG_LANG= awk | ||||
PATTERN= [[:space:]]*(do|then)?[[:space:]]*)(\$$\(CP\)|cp)([[:space:]] | SHEBANG_FILES= tools/ocaml-instr-graph \ | ||||
DOCSDISTNAME= ${DISTNAME:C/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/\1.\2/} | tools/ocaml-instr-report | ||||
CONFLICTS= metaocaml-[0-9]* | |||||
.include <bsd.port.options.mk> | PORTDOCS= htmlman \ | ||||
${DISTNAME:R}-refman.ps.gz \ | |||||
${DISTNAME:R}-refman.pdf | |||||
.if ${PORT_OPTIONS:MDOCS} | OPTIONS_DEFINE= DOCS THREADS X11 | ||||
DISTFILES:= ${DISTNAME}${EXTRACT_SUFX} \ | OPTIONS_DEFAULT= THREADS X11 | ||||
${DOCSDISTNAME}-refman-html.tar.gz:docs \ | OPTIONS_SUB= yes | ||||
Done Inline ActionsYou should probably add a DOCS_DISTFILES with the doc distfiles so that people who don't want the docs don't have to download them. mat: You should probably add a DOCS_DISTFILES with the doc distfiles so that people who don't want… | |||||
${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 | DOCS_VARS= EXTRACT_ONLY+=${DISTNAME:R}-refman-html.tar.gz | ||||
CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS} -meabi=5" | |||||
.else | |||||
CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS}" | |||||
.endif | |||||
.if ${PORT_OPTIONS:MTHREADS} | THREADS_CONFIGURE_OFF= -no-pthread | ||||
Done Inline ActionsThat is a bit strange to only set the X11 options helpers if you are not in the nox11 flavor (see the multiple negatives in there, FLAVOR:Mdefault would probably be more straightforward.) and then if you're in the nox11 case, you exclude the X11 option, but the X11 option does nothing as no helpers are defined, for example, -no-graph is never added to CONFIGURE_ARGS. mat: That is a bit strange to only set the X11 options helpers if you are not in the nox11 flavor… | |||||
PLIST_SUB+= THREADS="" | |||||
THR_LD= -lpthread | |||||
.else | |||||
PLIST_SUB+= THREADS="@comment " | |||||
THR_LD= #empty | |||||
CONFIGURE_ARGS+=-no-pthread | |||||
.endif | |||||
.if ${PORT_OPTIONS:MX11} | .if ${FLAVOR:Nnox11} | ||||
PLIST_SUB+= X11="" | X11_USE= XORG=x11 | ||||
USE_XORG= x11 | X11_CONFIGURE_ON= -x11include ${LOCALBASE}/include -x11lib ${LOCALBASE}/lib | ||||
CONFLICTS+= ocaml-nox11-[0-9]* | X11_CONFIGURE_OFF= -no-graph | ||||
CONFIGURE_ARGS+=-x11include ${LOCALBASE}/include -x11lib ${LOCALBASE}/lib | |||||
.else | .else | ||||
PLIST_SUB+= X11="@comment " | OPTIONS_EXCLUDE= X11 | ||||
SFX= -nox11 | |||||
CONFLICTS+= ocaml-[0-9]* | |||||
CONFIGURE_ARGS+=-no-graph | |||||
.endif | .endif | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
# | |||||
# Is it still relevant for PowerPC? | |||||
# | |||||
.if defined(NO_PROFILE) || ${ARCH:Mpowerpc} || ${ARCH:Mamd64} | .if defined(NO_PROFILE) || ${ARCH:Mpowerpc} || ${ARCH:Mamd64} | ||||
PLIST_SUB+= PROF="@comment " | PLIST_SUB+= PROF="@comment " | ||||
.else | .else | ||||
PLIST_SUB+= PROF="" | PLIST_SUB+= PROF="" | ||||
.endif | .endif | ||||
post-extract: | PATTERN= [[:space:]]*(do|then)?[[:space:]]*)(\$$\(CP\)|cp)([[:space:]] | ||||
.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}/asmrun/Makefile \ | |||||
${WRKSRC}/otherlibs/systhreads/Makefile \ | |||||
${WRKSRC}/testsuite/makefiles/Makefile.common \ | |||||
${WRKSRC}/testsuite/tests/asmcomp/Makefile | |||||
post-configure: | post-configure: | ||||
@${REINPLACE_CMD} -E \ | |||||
-e '/^PTHREAD_LINK/s,-pthread,${THR_LD},g' \ | |||||
${WRKSRC}/config/Makefile | |||||
# INSTALL* safeness (which preserves the correct permissions despite | # INSTALL* safeness (which preserves the correct permissions despite | ||||
# user's umask(1) | # user's umask(1) | ||||
@${FIND} ${WRKDIR} -type f -name Makefile -print0 | \ | @${FIND} ${WRKDIR} -type f -name Makefile -print0 | \ | ||||
${XARGS} -0 -n 5 -x ${REINPLACE_CMD} -E \ | ${XARGS} -0 -n 5 -x ${REINPLACE_CMD} -E \ | ||||
-e 's,^(${PATTERN}+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \4,' \ | -e 's,^(${PATTERN}+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \4,' \ | ||||
-e 's,^(${PATTERN}+.*BINDIR),\1\$${BSD_INSTALL_PROGRAM} \4,' \ | -e 's,^(${PATTERN}+.*BINDIR),\1\$${BSD_INSTALL_PROGRAM} \4,' \ | ||||
-e 's,^(${PATTERN}+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \4,' \ | -e 's,^(${PATTERN}+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \4,' \ | ||||
-e 's,(${PATTERN}+.*(MANDIR|MANODIR|MANEXT)),\1\$${BSD_INSTALL_MAN} \4,' | -e 's,(${PATTERN}+.*(MANDIR|MANODIR|MANEXT)),\1\$${BSD_INSTALL_MAN} \4,' | ||||
check-test: do-install | check-test: do-install | ||||
Done Inline ActionsThis should probably simply be do-test:. mat: This should probably simply be `do-test:`. | |||||
@cd ${WRKSRC}/testsuite; ${RM} _log; for d in tests/* ; do \ | @cd ${WRKSRC}/testsuite; ${RM} _log; for d in tests/* ; do \ | ||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one DIR=$${d} \ | ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one DIR=$${d} \ | ||||
2>&1 | tee -a _log || ${TRUE} ; done ; \ | 2>&1 | tee -a _log || ${TRUE} ; done ; \ | ||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report | ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report | ||||
post-install: | post-install-DOCS-on: | ||||
.if ${PORT_OPTIONS:MDOCS} | |||||
${MKDIR} ${STAGEDIR}${DOCSDIR} | ${MKDIR} ${STAGEDIR}${DOCSDIR} | ||||
(cd ${WRKDIR} && ${COPYTREE_SHARE} htmlman ${STAGEDIR}${DOCSDIR}) | (cd ${WRKDIR} && ${COPYTREE_SHARE} htmlman ${STAGEDIR}${DOCSDIR}) | ||||
${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.ps.gz ${STAGEDIR}${DOCSDIR} | ${INSTALL_DATA} ${_DISTDIR}${DISTNAME:R}-refman.ps.gz ${STAGEDIR}${DOCSDIR} | ||||
${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${STAGEDIR}${DOCSDIR} | ${INSTALL_DATA} ${_DISTDIR}${DISTNAME:R}-refman.pdf ${STAGEDIR}${DOCSDIR} | ||||
.endif | |||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |
CONFLICTS_INSTALL contains package names, these does not look like package names.