summaryrefslogtreecommitdiff
path: root/lang/gprolog/Makefile
blob: aa3ddd0d981f5a5c96dda63955e55bf08a5bbd58 (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
# Created by: Douglas Anestad <yotta@dougdidit.com>
# $FreeBSD$

PORTNAME=	gprolog
PORTVERSION=	1.4.4
PORTREVISION=	7
CATEGORIES=	lang
MASTER_SITES=	http://www.gprolog.org/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Free Prolog compiler

LICENSE=	GPLv2

ONLY_FOR_ARCHS=	i386 amd64

USES=		gmake
USE_GCC=	any
CFLAGS+=	-O3 # gcc5/gcc6 + -O2 = pl2wam hangs
PLIST_SUB=	GPROLOG_VER=${PORTVERSION}
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-c-flags="${CFLAGS}" \
		--with-doc-dir="${DOCSDIR}" \
		--with-examples-dir="${EXAMPLESDIR}"
CONFIGURE_TARGET=	${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL}
MAKE_JOBS_UNSAFE=	yes
WRKSRC_SUBDIR=	src

OPTIONS_DEFINE=		FD DOCS EXAMPLES
OPTIONS_DEFAULT=	FD
OPTIONS_SUB=		yes

FD_DESC=		Enable finite domain constraint solver
FD_CONFIGURE_OFF=	--disable-fd-solver

.include <bsd.port.options.mk>

# Disable registers on i386. This fixes build with gcc6.
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852008
.if ${ARCH} == i386
CONFIGURE_ARGS+=		--disable-regs
.endif

post-patch:
	@${REINPLACE_CMD} \
		'/LINKS_DIR/s|$$(INSTALL_DIR)|../${PORTNAME}-${PORTVERSION}|' \
		${WRKSRC}/Makefile.in

.include <bsd.port.mk>