Thu Sep 6 19:07:12 2018 UTC ()
swi-prolog-lite: Avoid to hardcode 64bit platforms, use LP64PLATFORMS and ABI

Instead of hardcoding the check of 64bit platforms just reuse LP64PLATFORMS and
ABI (shamelessy stolen from lang/python27/Makefile).

This fixes the build of swi-prolog-lite on aarch64 and probably
other 64bit platforms too previously not listed.


(leot)
diff -r1.26 -r1.27 pkgsrc/lang/swi-prolog-lite/Makefile

cvs diff -r1.26 -r1.27 pkgsrc/lang/swi-prolog-lite/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/swi-prolog-lite/Makefile 2018/04/17 20:57:19 1.26
+++ pkgsrc/lang/swi-prolog-lite/Makefile 2018/09/06 19:07:12 1.27
@@ -1,34 +1,34 @@ @@ -1,34 +1,34 @@
1# $NetBSD: Makefile,v 1.26 2018/04/17 20:57:19 leot Exp $ 1# $NetBSD: Makefile,v 1.27 2018/09/06 19:07:12 leot Exp $
2 2
3PKGREVISION= 2 3PKGREVISION= 2
4.include "Makefile.common" 4.include "Makefile.common"
5 5
6PKGNAME= swi-prolog-lite-${SWIPLVERS} 6PKGNAME= swi-prolog-lite-${SWIPLVERS}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9COMMENT= ISO/Edinburgh-style Prolog compiler 9COMMENT= ISO/Edinburgh-style Prolog compiler
10 10
11GNU_CONFIGURE= yes 11GNU_CONFIGURE= yes
12CONFIGURE_DIRS= src 12CONFIGURE_DIRS= src
13 13
14CONFIGURE_ENV+= PL=swi-prolog 14CONFIGURE_ENV+= PL=swi-prolog
15CONFIGURE_ENV+= PLARCH=${MACHINE_GNU_PLATFORM} # make PLIST consistent 15CONFIGURE_ENV+= PLARCH=${MACHINE_GNU_PLATFORM} # make PLIST consistent
16USE_TOOLS+= gmake bash:run 16USE_TOOLS+= gmake bash:run
17 17
18.include "../../mk/bsd.prefs.mk" 18.include "../../mk/bsd.prefs.mk"
19 19
20.if ${MACHINE_ARCH} == alpha || ${MACHINE_ARCH} == sparc64 || \ 20.if !empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@) || \
21 ${MACHINE_ARCH} == x86_64 21 (defined(ABI) && ${ABI} == "64")
22PLIST_SUBST+= BITS=64 22PLIST_SUBST+= BITS=64
23.else 23.else
24PLIST_SUBST+= BITS=32 24PLIST_SUBST+= BITS=32
25.endif 25.endif
26 26
27REPLACE_INTERPRETER+= swipl 27REPLACE_INTERPRETER+= swipl
28REPLACE.swipl.old= /usr/bin/swipl 28REPLACE.swipl.old= /usr/bin/swipl
29REPLACE.swipl.new= ${PREFIX}/bin/swi-prolog 29REPLACE.swipl.new= ${PREFIX}/bin/swi-prolog
30REPLACE_FILES.swipl+= library/dialect/sicstus/swipl-lfr.pl 30REPLACE_FILES.swipl+= library/dialect/sicstus/swipl-lfr.pl
31 31
32TEST_TARGET= check 32TEST_TARGET= check
33 33
34.include "../../devel/ncurses/buildlink3.mk" 34.include "../../devel/ncurses/buildlink3.mk"