From d1a57d31030f49051e58fed7bacdb017e2867a0a Mon Sep 17 00:00:00 2001 From: Johan van Selst Date: Wed, 1 Jul 2015 19:54:56 +0000 Subject: [PATCH] - Fix build for several architectures. Set CPUS=1 on non-x86. This leads to disabling custom thread synchronization primitives coded in x86 assembly and thus allows build (confirmed successful builds on mips and armv6, however haven't tested whether it actually works). - Minor cleanups added to pet portlint PR: 201255 Submitted by: amdmi3 --- games/crafty/Makefile | 23 ++++++++--------------- games/crafty/pkg-plist | 5 ++--- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/games/crafty/Makefile b/games/crafty/Makefile index 9e674ac01c2f..53927b7cf3cd 100644 --- a/games/crafty/Makefile +++ b/games/crafty/Makefile @@ -31,7 +31,7 @@ WITH_RCDIR?= ~/ WITH_TBDIR?= ${PREFIX}/lib/crafty/TB WITH_PERSDIR?= ${PREFIX}/lib/crafty/cpf -OPT= -DCPUS=4 -DHASHSTATS -DTRACE -DBOOKDIR=\\\"${WITH_BOOKDIR}\\\" \ +OPT= -DHASHSTATS -DTRACE -DBOOKDIR=\\\"${WITH_BOOKDIR}\\\" \ -DLOGDIR=\\\"${WITH_LOGDIR}\\\" \ -DRCDIR=\\\"${WITH_RCDIR}\\\" \ -DTBDIR=\\\"${WITH_TBDIR}\\\" \ @@ -42,22 +42,17 @@ OPTIONS_DEFAULT=DOCS OPTIONS_SUB= yes BOOK_DESC= Include (default) opening book -.include - -.if ${ARCH} == "i386" -# The i386 assembly is currently broken - disable for this version -#OPT+= -DINLINE32 -.elif ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" -BROKEN= Does not compile on ia64, powerpc, or sparc64 -.endif - -.include - -.if ${PORT_OPTIONS:MDOCS} DOCFILES= crafty.doc.ascii crafty.doc.ps DISTFILES+= ${DOCFILES:S/$/:doc/} UTILS= bitmaps.tgz sound.zip DISTFILES+= ${UTILS:S/$/:utils/} + +.include + +.if ${ARCH} == "i386" || ${ARCH} == "amd64" +OPT+= -DCPUS=4 +.else +OPT+= -DCPUS=1 # disables x86 assembler .endif .if ${PORT_OPTIONS:MBOOK} @@ -85,10 +80,8 @@ do-install: .endif ${INSTALL_DATA} ${WRKSRC}/books.bin ${WRKSRC}/crafty.hlp \ ${STAGEDIR}${PREFIX}/lib/crafty -.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${DOCFILES} ${UTILS} \ ${STAGEDIR}${DOCSDIR} -.endif .include diff --git a/games/crafty/pkg-plist b/games/crafty/pkg-plist index da378873522a..1de6a89b71ee 100644 --- a/games/crafty/pkg-plist +++ b/games/crafty/pkg-plist @@ -12,10 +12,9 @@ lib/crafty/crafty.hlp %%PORTDOCS%%%%DOCSDIR%%/crafty.doc.ps %%PORTDOCS%%%%DOCSDIR%%/bitmaps.tgz %%PORTDOCS%%%%DOCSDIR%%/sound.zip -%%PORTDOCS%%@dirrm %%DOCSDIR%% @mode 775 @group nogroup -@dirrm lib/crafty/cpf -@dirrm lib/crafty +@dir lib/crafty/cpf +@dir lib/crafty @mode @group wheel