aboutsummaryrefslogtreecommitdiff
path: root/lang/yap/Makefile
blob: 0080e8b6b313b7c30574a0f524f3760fb65c86d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
PORTNAME=	yap
PORTVERSION=	6.2.2
PORTREVISION=	11
CATEGORIES=	lang
MASTER_SITES=	https://mirrors.dotsrc.org/mirrors/exherbo/	\
		http://ftp.lyx.org/pub/minix/distfiles/backup/	\
		http://tenampak.izt.uam.mx/programas/

MAINTAINER=	eugen@FreeBSD.org
COMMENT=	High-performance Prolog compiler
WWW=		http://www.dcc.fc.up.pt/~vsc/Yap/

LICENSE=		ART20 LGPL20
LICENSE_COMB=		dual
LICENSE_FILE_ART20=	${WRKSRC}/Artistic
LICENSE_FILE_LGPL20=	${WRKSRC}/COPYING

#BROKEN_riscv64=		fails to build: procedure chr_translate/2 is undefined, called from context  prolog:once/1

LIB_DEPENDS=	libgmp.so:math/gmp

USES=		compiler:features gmake localbase readline
PORTSCOUT=	limit:^6\.2\.

OPTIONS_DEFINE=		DOCS BUILDDOCS
BUILDDOCS_DESC=	Rebuild documentation (requires TeX)
DOCS_DESC=	Install documentation

BUILDDOCS_USES=		tex
BUILDDOCS_USE=		TEX=formats:build,dvipsk:build
BUILDDOCS_BUILD_DEPENDS=${LOCALBASE}/bin/texi2html:textproc/texi2html \
			${LOCALBASE}/bin/texi2pdf:print/texinfo

DOCS_INSTALL_TARGET=	install install_docs

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-max-performance \
		--disable-myddas

DOCSDIR=	${PREFIX}/share/doc/Yap
DATADIR=	${PREFIX}/share/Yap
DOCS_PACKAGE=	yap-doc-${PORTVERSION}

post-build-DOCS-off:
	# prevent the instalation of three docs files
	${REINPLACE_CMD} -e '559,562d' ${WRKSRC}/Makefile

.include <bsd.port.pre.mk>

.if ${OPSYS} == FreeBSD && ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
CFLAGS+=	-Wno-incompatible-function-pointer-types
CONFIGURE_ENV+=	CFLAGS="${CFLAGS}"
.endif

.if ${OPSYS} == FreeBSD && ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 180
pre-configure:
	${REINPLACE_CMD} 's/ -export-dynamic/ -Wl,--export-dynamic/' \
		${WRKSRC}/configure ${WRKSRC}/packages/cplint/slipcase/Makefile.in
.endif

.if ${ARCH:Mpowerpc*}
USES+=		compiler:gcc-c++11-lib
.endif

.if ${PORT_OPTIONS:MDOCS} && !${PORT_OPTIONS:MBUILDDOCS}
MASTER_SITES+=	http://www.grosbein.net/freebsd/distfiles/:docs \
		LOCAL/eugen:docs
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DOCS_PACKAGE}${EXTRACT_SUFX}:docs
.endif

.include <bsd.port.post.mk>