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}/ GENTOO \ | ||||
http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs | http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs | ||||
PKGNAMESUFFIX= ${SFX} | |||||
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 | BROKEN_aarch64= Does not build: sh: as: not found | ||||
BROKEN_armv7= Does not build: hasgot.c: undefined reference to `tgetent' | BROKEN_armv7= Does not build: hasgot.c: undefined reference to 'tgetent' | ||||
BROKEN_powerpc64= Does not build: error: too few arguments to function gethostbyname_r | 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_sparc64= Not supported by upstream | ||||
BROKEN_mips64= No ASM support | BROKEN_mips64= Not supported by upstream | ||||
BROKEN_mips= No ASM support | BROKEN_mips= Not supported by upstream | ||||
USES= cpe gmake tar:xz | USES= cpe gmake shebangfix tar:xz | ||||
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 | USE_LDCONFIG= yes | ||||
MAKE_JOBS_UNSAFE= yes | |||||
LDFLAGS_i386= -Wl,-znotext | LDFLAGS_i386= -Wl,-znotext | ||||
mat: CONFLICTS_INSTALL contains package names, these does not look like package names. | |||||
SHEBANG_LANG= awk | |||||
SHEBANG_FILES= tools/ocaml-instr-graph \ | |||||
tools/ocaml-instr-report | |||||
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" | ||||
MAKE_JOBS_UNSAFE= yes | |||||
OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES | OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES | ||||
OPTIONS_DEFAULT=X11 THREADS | 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/} | DOCSDISTNAME= ${DISTNAME:C/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/\1.\2/} | ||||
CONFLICTS= metaocaml-[0-9]* | |||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
.if ${PORT_OPTIONS:MDOCS} | .if ${PORT_OPTIONS:MDOCS} | ||||
DISTFILES:= ${DISTNAME}${EXTRACT_SUFX} \ | DISTFILES:= ${DISTNAME}${EXTRACT_SUFX} \ | ||||
${DOCSDISTNAME}-refman-html.tar.gz:docs \ | ${DOCSDISTNAME}-refman-html.tar.gz:docs \ | ||||
${DOCSDISTNAME}-refman.ps.gz:docs \ | ${DOCSDISTNAME}-refman.ps.gz:docs \ | ||||
${DOCSDISTNAME}-refman.pdf:docs | ${DOCSDISTNAME}-refman.pdf:docs | ||||
EXTRACT_ONLY:= ${DISTNAME}${EXTRACT_SUFX} \ | EXTRACT_ONLY:= ${DISTNAME}${EXTRACT_SUFX} \ | ||||
${DOCSDISTNAME}-refman-html.tar.gz | ${DOCSDISTNAME}-refman-html.tar.gz | ||||
PLIST_SUB+= DOC="" | PLIST_SUB+= DOC="" | ||||
PORTDOCS= htmlman ${DOCSDISTNAME}-refman.ps.gz ${DOCSDISTNAME}-refman.pdf | PORTDOCS= htmlman ${DOCSDISTNAME}-refman.ps.gz ${DOCSDISTNAME}-refman.pdf | ||||
.else | .else | ||||
PLIST_SUB+= DOC="@comment " | PLIST_SUB+= DOC="@comment " | ||||
.endif | .endif | ||||
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… | |||||
.if ${ARCH} == armv6 || ${ARCH} == armv7 | .if ${ARCH} == armv6 || ${ARCH} == armv7 | ||||
CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS} -meabi=5" | CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS} -meabi=5" | ||||
.else | .else | ||||
CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS}" | CONFIGURE_ARGS+= -as "${AS} ${ASFLAGS}" | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MTHREADS} | .if ${PORT_OPTIONS:MTHREADS} | ||||
PLIST_SUB+= THREADS="" | PLIST_SUB+= THREADS="" | ||||
THR_LD= -lpthread | THR_LD= -lpthread | ||||
.else | .else | ||||
PLIST_SUB+= THREADS="@comment " | PLIST_SUB+= THREADS="@comment " | ||||
THR_LD= #empty | THR_LD= #empty | ||||
CONFIGURE_ARGS+=-no-pthread | CONFIGURE_ARGS+= -no-pthread | ||||
.endif | .endif | ||||
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… | |||||
.if ${PORT_OPTIONS:MX11} | .if ${PORT_OPTIONS:MX11} | ||||
PLIST_SUB+= X11="" | PLIST_SUB+= X11="" | ||||
USE_XORG= x11 | USE_XORG= x11 | ||||
CONFLICTS+= ocaml-nox11-[0-9]* | CONFLICTS+= ocaml-nox11-[0-9]* | ||||
CONFIGURE_ARGS+=-x11include ${LOCALBASE}/include -x11lib ${LOCALBASE}/lib | CONFIGURE_ARGS+= -x11include ${LOCALBASE}/include -x11lib ${LOCALBASE}/lib | ||||
.else | .else | ||||
PLIST_SUB+= X11="@comment " | PLIST_SUB+= X11="@comment " | ||||
SFX= -nox11 | SFX= -nox11 | ||||
CONFLICTS+= ocaml-[0-9]* | CONFLICTS+= ocaml-[0-9]* | ||||
CONFIGURE_ARGS+=-no-graph | CONFIGURE_ARGS+= -no-graph | ||||
.endif | .endif | ||||
PATTERN= [[:space:]]*(do|then)?[[:space:]]*)(\$$\(CP\)|cp)([[:space:]] | |||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
.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: | post-extract: | ||||
.if ${PORT_OPTIONS:MDOCS} | .if ${PORT_OPTIONS:MDOCS} | ||||
@if ! (cd ${WRKDIR} && \ | @if ! (cd ${WRKDIR} && \ | ||||
${TAR} xf ${_DISTDIR}${DOCSDISTNAME}-refman-html.tar.gz \ | ${TAR} xf ${_DISTDIR}${DOCSDISTNAME}-refman-html.tar.gz \ | ||||
) \ | ) \ | ||||
then \ | then \ | ||||
exit 1; \ | exit 1; \ | ||||
fi; | fi; | ||||
.endif | .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 \ | @${REINPLACE_CMD} -E \ | ||||
-e '/^PTHREAD_LINK/s,-pthread,${THR_LD},g' \ | -e '/^PTHREAD_LINK/s,-pthread,${THR_LD},g' \ | ||||
${WRKSRC}/config/Makefile | ${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: | ||||
.if ${PORT_OPTIONS:MDOCS} | .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}${DOCSDISTNAME}-refman.ps.gz ${STAGEDIR}${DOCSDIR} | ||||
${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${STAGEDIR}${DOCSDIR} | ${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${STAGEDIR}${DOCSDIR} | ||||
.endif | .endif | ||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |
CONFLICTS_INSTALL contains package names, these does not look like package names.