Sun Jan 4 03:26:34 2015 UTC ()
Systematize 32-on-64 handling.


(dholland)
diff -r1.47 -r1.48 pkgsrc/lang/nhc98/Makefile

cvs diff -r1.47 -r1.48 pkgsrc/lang/nhc98/Attic/Makefile (expand / switch to context diff)
--- pkgsrc/lang/nhc98/Attic/Makefile 2014/03/09 11:59:09 1.47
+++ pkgsrc/lang/nhc98/Attic/Makefile 2015/01/04 03:26:34 1.48
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2014/03/09 11:59:09 roy Exp $
+# $NetBSD: Makefile,v 1.48 2015/01/04 03:26:34 dholland Exp $
 
 DISTNAME=		nhc98src-1.22
 PKGNAME=		nhc98-1.22
@@ -18,15 +18,20 @@
 CONFIGURE_ARGS+=	--buildwith=gcc --installdir=${PREFIX} \
 			+docs --docdir=${PREFIX}/share/doc/nhc98
 
-.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \
-    (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \
-    (${MACHINE_ARCH} == "powerpc64") || (defined(ABI) && ${ABI} == "64")
-# 64-bit platform
-BUILD_MAKE_FLAGS+=	PKGSRC_M32=-m32
-.else
-# not a 64-bit platform
-BUILD_MAKE_FLAGS+=	PKGSRC_M32=
+.include "../../mk/bsd.prefs.mk"
+
+# These platforms cannot build 32-on-64 binaries.
+NOT_FOR_PLATFORM+=	*-*-alpha
+NOT_FOR_PLATFORM+=	DragonFly-*-x86_64
+
+# This package has LP64 issues, so must build as 32-bit binary.
+M32=
+.for P in ${LP64PLATFORMS}
+.if ${MACHINE_PLATFORM:M${P}}
+M32=			-m32
 .endif
+.endfor
+BUILD_MAKE_FLAGS+=	PKGSRC_M32=${M32}
 
 PLIST_SUBST+=		HARCH=`${WRKSRC}/script/harch`