$OpenBSD: patch-rts_ghc_mk,v 1.1 2019/09/30 11:44:18 kili Exp $

libffi build process seems to be using bundled libtool which only
produces the .so.8.0 and not a plain .so which is expected to exist.
The patch forces the dependency on versioned file at the expense of
hardcoding the version number.

Index: rts/ghc.mk
--- rts/ghc.mk.orig
+++ rts/ghc.mk
@@ -126,7 +126,7 @@ rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(
 else
 # This is a little hacky. We don't know the SO version, so we only
 # depend on libffi.so, but copy libffi.so*
-rts/dist/build/lib$(LIBFFI_NAME)$(soext): libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext)
+rts/dist/build/lib$(LIBFFI_NAME)$(soext): libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext).8.0
 	cp libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext)* rts/dist/build
 ifeq "$(TargetOS_CPP)" "darwin"
 	install_name_tool -id @rpath/lib$(LIBFFI_NAME)$(soext) rts/dist/build/lib$(LIBFFI_NAME)$(soext)
