mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
5973cbeb09
Update to version 1.4.5 released in 2020. Make it build and run with Clang 10: - clang has no register reservation for x86, hence patch-EnginePl_machine.h and -DNO_MACHINE_REG_FOR_REG_BANK to prevent using missing feature; - add patch-Ma2Asm_x86__64__any.c fetched from upstream SourceForge post-release commit dealing with PIC issues; - disable usage of spinlocks that results in a hang eating all available CPU cycles; fixed with -DUSE_LOCKS=1 -DUSE_RECURSIVE_LOCKS=1 -DUSE_SPIN_LOCKS=0; - the software uses bundled dlmalloc dated back 2011 that replaces functions like calloc() with own implemenations and it's calloc() sometimes fails to clear allocated memory; this results in SIGSEGV when its own hash-table implementation dereferences junk that supposed to be NULL pointer, so it fails to complete build; fixed with MMAP_CLEARS=0. PR: 231393
42 lines
986 B
Makefile
42 lines
986 B
Makefile
# Created by: Douglas Anestad <yotta@dougdidit.com>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= gprolog
|
|
PORTVERSION= 1.4.5
|
|
CATEGORIES= lang
|
|
MASTER_SITES= http://www.gprolog.org/
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Free Prolog compiler
|
|
|
|
LICENSE= GPLv2
|
|
|
|
ONLY_FOR_ARCHS= amd64 i386
|
|
|
|
USES= gmake
|
|
CFLAGS+= -DUSE_LOCKS=1 -DUSE_RECURSIVE_LOCKS=1 -DUSE_SPIN_LOCKS=0 \
|
|
-DMMAP_CLEARS=0 -DNO_MACHINE_REG_FOR_REG_BANK
|
|
|
|
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
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} \
|
|
'/LINKS_DIR/s|$$(INSTALL_DIR)|../${PORTNAME}-${PORTVERSION}|' \
|
|
${WRKSRC}/Makefile.in
|
|
|
|
.include <bsd.port.mk>
|