Hello hackers,
here's a small patch that fixes the problem with chicken-install
reported by Mario in #1373.
I've briefly tested it and have inspected the contents of the
.install.sh file and it does look right.

Cheers,
Lemonboy
From 5b9d64f015d31a9c97c5e7f0c4691f6ec016ded1 Mon Sep 17 00:00:00 2001
From: LemonBoy <thatle...@gmail.com>
Date: Thu, 25 May 2017 15:53:30 +0200
Subject: [PATCH] Respect install-name when specified.

Do this for 'program' and 'extension' components.
---
 egg-compile.scm | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/egg-compile.scm b/egg-compile.scm
index 4d7332c0..5504eb13 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -143,15 +143,17 @@
                       (oname #f)
                       (opts '()))
             (for-each compile-extension/program (cddr info))
-            (let ((dest (destination-repository mode #t)))
-              (when (eq? #t tfile) (set! tfile target))
-              (when (eq? #t ifile) (set! ifile target))
+            (let ((dest (destination-repository mode #t))
+                  ; Respect install-name if specified
+                  (rtarget (or oname target)))
+              (when (eq? #t tfile) (set! tfile rtarget))
+              (when (eq? #t ifile) (set! ifile rtarget))
               (addfiles 
                 (if (memq 'static link) 
-                    (list (conc dest "/" target objext)
-                          (conc dest "/" target +link-file-extension+))
+                    (list (conc dest "/" rtarget objext)
+                          (conc dest "/" rtarget +link-file-extension+))
                     '())
-                (if (memq 'dynamic link) (list (conc dest "/" target ".so")) '())
+                (if (memq 'dynamic link) (list (conc dest "/" rtarget ".so")) '())
                 (if tfile 
                     (list (conc dest "/" tfile ".types"))
                     '())
@@ -159,8 +161,8 @@
                     (list (conc dest "/" ifile ".inline"))
                     '())
                 (list (if (uses-compiled-import-library? mode)
-                          (conc dest "/" target ".import.so")
-                          (conc dest "/" target ".import.scm")))))
+                          (conc dest "/" rtarget ".import.so")
+                          (conc dest "/" rtarget ".import.scm")))))
             (set! exts 
               (cons (list target dependencies: deps source: src options: opts 
                           link-options: lopts linkage: link custom: cbuild
@@ -235,8 +237,10 @@
             (for-each compile-extension/program (cddr info))
             (let ((dest (if (eq? mode 'target) 
                             default-bindir   ; XXX wrong!
-                            host-bindir)))
-              (addfiles (list (conc dest "/" target exeext))))
+                            host-bindir))
+                  ; Respect install-name if specified
+                  (rtarget (or oname target)))
+              (addfiles (list (conc dest "/" rtarget exeext))))
             (set! prgs 
               (cons (list target dependencies: deps source: src options: opts 
                           link-options: lopts linkage: link custom: cbuild
-- 
2.13.0

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to