-# "${BUILDLINK_DIR}/bin". Note that in-place ghc isn't usable before
-# running "ghc-pkg recache".
-
-.if ${MACHINE_ARCH} == "i386"
-BOOTSTRAP_TARBALL = ${DISTNAME}-boot-i386-unknown-freebsd.tar.bz2
-#.elif ${MACHINE_ARCH} == "powerpc"
-#BOOTSTRAP_TARBALL = ${DISTNAME}-boot-powerpc-apple-darwin.tar.bz2
-.endif
+# "${BUILDLINK_DIR}/bin". Note that in-place ghc isn't usable until we
+# run "ghc-pkg recache".
+
+.if ${MACHINE_ARCH} == "i386" && ${OPSYS} == "NetBSD"
+BOOTSTRAP_BUILD_MK = ${PKGDIR}/files/bootstrap-bsd.mk
+BOOTSTRAP_CAPI_C = ${PKGDIR}/files/capi-wrappers-netbsd-i386.c
+BOOTSTRAP_TARBALL = ${DISTNAME}-boot-i386-unknown-netbsdelf6.99.1.tar.bz2
+PLATFORM = i386-unknown-netbsd
+
+.elif ${MACHINE_ARCH} == "i386" && ${OPSYS} == "FreeBSD"
+BOOTSTRAP_BUILD_MK = ${PKGDIR}/files/bootstrap-bsd.mk
+BOOTSTRAP_CAPI_C = ${PKGDIR}/files/capi-wrappers-freebsd-i386.c
+BOOTSTRAP_TARBALL = ${DISTNAME}-boot-i386-unknown-freebsd8.0.tar.bz2
+PLATFORM = i386-unknown-freebsd
+
+.elif ${MACHINE_ARCH} == "powerpc" && ${OPSYS} == "Darwin"
+BOOTSTRAP_BUILD_MK = ${PKGDIR}/files/bootstrap.mk
+BOOTSTRAP_CAPI_C = ${PKGDIR}/files/capi-wrappers-darwin-powerpc.c
+BOOTSTRAP_TARBALL = ${DISTNAME}-boot-i386-unknown-darwin9.8.0.tar.bz2
+PLATFORM = powerpc-apple-darwin
+# Existence of libelf makes LeadingUnderscore being "NO", which is
+# incorrect for this platform. See ghc-6.12.1/aclocal.m4
+# (FP_LEADING_UNDERSCORE)
+CONFLICTS= libelf-[0-9]*