[153747] trunk/dports/lang/guile18/Portfile

dports at macports.org dports at macports.org
Mon Oct 10 02:35:36 CEST 2016


Revision: 153747
          https://trac.macports.org/changeset/153747
Author:   dports at macports.org
Date:     2016-10-09 17:35:36 -0700 (Sun, 09 Oct 2016)
Log Message:
-----------
guile18: install library files in subdirectory of $prefix/lib to avoid
DYLD_LIBRARY_PATH problems; link them into $prefix/lib for
compatibility. See #52494.

Modified Paths:
--------------
    trunk/dports/lang/guile18/Portfile

Modified: trunk/dports/lang/guile18/Portfile
===================================================================
--- trunk/dports/lang/guile18/Portfile	2016-10-10 00:30:15 UTC (rev 153746)
+++ trunk/dports/lang/guile18/Portfile	2016-10-10 00:35:36 UTC (rev 153747)
@@ -6,7 +6,7 @@
 
 name		guile18
 version		1.8.8
-revision    4
+revision    5
 categories	lang
 maintainers	nomaintainer
 platforms	darwin
@@ -54,12 +54,22 @@
                 port:libtool \
                 port:gmp
 
+# guile-using applications may need to set DYLD_LIBRARY_PATH to the
+# guile library path so they can be loaded at runtime. They should not
+# use $prefix/lib because this includes other MacPorts libraries that
+# they may not wish to load instead. Accordingly, we install guile
+# libraries into $prefix/lib/$libsubdir For compatibility, we symlink
+# everything back into $prefix/lib.
+# See https://trac.macports.org/ticket/52494
+set libsubdir guile18
+
 configure.args	CPPFLAGS="-I${prefix}/include"		\
 		LDFLAGS="-L${prefix}/lib"		\
 		--infodir="${prefix}/share/info"	\
 		--mandir="${prefix}/share/man"		\
 		--enable-regex                          \
-		--disable-error-on-warning
+		--disable-error-on-warning \
+        --libdir ${prefix}/lib/${libsubdir}
 
 post-patch {
     # This changes configure to do what the author actually intended based on their comments
@@ -116,6 +126,18 @@
 set merger_dont_diff "${prefix}/include/libguile/scmconfig.h"
 
 post-destroot {
+    # Clean up libsubdir redirection and provide symlinks to ${prefix}/lib
+    file rename ${destroot}${prefix}/lib/${libsubdir}/pkgconfig/guile-1.8.pc ${destroot}${prefix}/lib/pkgconfig/
+    file delete ${destroot}${prefix}/lib/${libsubdir}/pkgconfig
+
+    foreach f [glob -tails -directory ${destroot}${prefix}/lib/${libsubdir} *] {
+        ln -s ${libsubdir}/$f ${destroot}${prefix}/lib
+    }
+
+
+
+    # Remove conflicting files and rename to make guile18 installable
+    # with guile 2.0. Update internal paths and links.
     file delete ${destroot}${prefix}/share/${name}/1.6/ice-9/and-let\*.scm
     file delete ${destroot}${prefix}/share/info/goops.info
     file delete ${destroot}${prefix}/share/info/guile-tut.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161009/d9b9bd2c/attachment-0002.html>


More information about the macports-changes mailing list