[BACK]Return to patch-libffi_ghc.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / ghc7 / patches

File: [cvs.NetBSD.org] / pkgsrc / lang / ghc7 / patches / Attic / patch-libffi_ghc.mk (download)

Revision 1.1, Sat May 7 10:02:06 2016 UTC (4 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2
Branch point for: pkgsrc-2016Q1

Fix libffi linkage, so that it actually picks up the right version and
includes the rpath. Seen by a not so happy devel/happy. Bump revision.

$NetBSD: patch-libffi_ghc.mk,v 1.1 2016/05/07 10:02:06 joerg Exp $

--- libffi/ghc.mk.orig	2015-09-22 19:10:58.000000000 +0000
+++ libffi/ghc.mk
@@ -31,7 +31,7 @@ libffi_STAMP_INSTALL   = $(libffi_STAMP_
 libffi_EnableShared    = no
 endif
 
-libffi_STATIC_LIB  = libffi/build/inst/lib/libffi.a
+libffi_STATIC_LIB  = libffi/build/inst${ghclibdir}/libffi.a
 libffi_HEADERS     = rts/dist/build/ffi.h \
                      rts/dist/build/ffitarget.h
 
@@ -85,8 +85,8 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
         CFLAGS="$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE1) -w" \
         LDFLAGS="$(SRC_LD_OPTS) $(CONF_GCC_LINKER_OPTS_STAGE1) -w" \
         "$(SHELL)" configure \
-	          --prefix=$(TOP)/libffi/build/inst \
-	          --libdir=$(TOP)/libffi/build/inst/lib \
+	          --prefix=${prefix} \
+	          --libdir=${ghclibdir} \
 	          --enable-static=yes \
 	          --enable-shared=$(libffi_EnableShared) \
 	          --host=$(TargetPlatformFull)
@@ -103,14 +103,14 @@ $(libffi_STAMP_BUILD): $(libffi_STAMP_CO
 	"$(TOUCH_CMD)" $@
 
 $(libffi_STAMP_INSTALL): $(libffi_STAMP_BUILD) $(TOUCH_DEP)
-	$(MAKE) -C libffi/build MAKEFLAGS= install
+	$(MAKE) -C libffi/build MAKEFLAGS= install DESTDIR=$(TOP)/libffi/build/inst
 	"$(TOUCH_CMD)" $@
 
 $(libffi_STATIC_LIB): $(libffi_STAMP_INSTALL)
 	@test -f $@ || { echo "$< exists, but $@ does not."; echo "Suggest removing $<."; exit 1; }
 
 $(libffi_HEADERS): $(libffi_STAMP_INSTALL) | $$(dir $$@)/.
-	cp -f libffi/build/inst/lib/libffi-*/include/$(notdir $@) $@
+	cp -f libffi/build/inst/${ghclibdir}/libffi-*/include/$(notdir $@) $@
 
 $(eval $(call clean-target,libffi,, \
     libffi/build $(wildcard libffi/stamp.ffi.*) libffi/dist-install))