<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[129361] trunk/dports/lang</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/129361">129361</a></dd>
<dt>Author</dt> <dd>larryv@macports.org</dd>
<dt>Date</dt> <dd>2014-12-10 16:07:46 -0800 (Wed, 10 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>{clang,llvm}-3.{4,5,6}: Use full paths for dylib IDs
    
Most of the installed binaries still link to at least one dylib using
@rpath or @executable_path. Patching the make rules should catch all of
them. Probably.
    
(Jeremy signed off via email.)</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportslangllvm34Portfile">trunk/dports/lang/llvm-3.4/Portfile</a></li>
<li><a href="#trunkdportslangllvm35Portfile">trunk/dports/lang/llvm-3.5/Portfile</a></li>
<li><a href="#trunkdportslangllvm36Portfile">trunk/dports/lang/llvm-3.6/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportslangllvm34filesfixclangdylibidspatch">trunk/dports/lang/llvm-3.4/files/fix-clang-dylib-ids.patch</a></li>
<li><a href="#trunkdportslangllvm34filesfixdylibidspatch">trunk/dports/lang/llvm-3.4/files/fix-dylib-ids.patch</a></li>
<li><a href="#trunkdportslangllvm35filesfixdylibidspatch">trunk/dports/lang/llvm-3.5/files/fix-dylib-ids.patch</a></li>
<li><a href="#trunkdportslangllvm35filesfixlibclang_rtdylibidspatch">trunk/dports/lang/llvm-3.5/files/fix-libclang_rt-dylib-ids.patch</a></li>
<li><a href="#trunkdportslangllvm36filesfixdylibidspatch">trunk/dports/lang/llvm-3.6/files/fix-dylib-ids.patch</a></li>
<li><a href="#trunkdportslangllvm36filesfixlibclang_rtdylibidspatch">trunk/dports/lang/llvm-3.6/files/fix-libclang_rt-dylib-ids.patch</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportslangllvm34filestigershlibclangpatch">trunk/dports/lang/llvm-3.4/files/tiger-shlib-clang.patch</a></li>
<li><a href="#trunkdportslangllvm34filestigershlibpatch">trunk/dports/lang/llvm-3.4/files/tiger-shlib.patch</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportslangllvm34Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/lang/llvm-3.4/Portfile (129360 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.4/Portfile        2014-12-10 23:56:05 UTC (rev 129360)
+++ trunk/dports/lang/llvm-3.4/Portfile        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -7,7 +7,8 @@
</span><span class="cx"> set llvm_version        3.4
</span><span class="cx"> set llvm_version_no_dot 34
</span><span class="cx"> name                    llvm-${llvm_version}
</span><del>-subport                 clang-${llvm_version} { revision 2 }
</del><ins>+revision                1
+subport                 clang-${llvm_version} { revision 3 }
</ins><span class="cx"> set suffix              mp-${llvm_version}
</span><span class="cx"> set sub_prefix          ${prefix}/libexec/llvm-${llvm_version}
</span><span class="cx"> dist_subdir             llvm
</span><span class="lines">@@ -107,13 +108,13 @@
</span><span class="cx"> 
</span><span class="cx"> patchfiles      install_target.patch \
</span><span class="cx">                 0001-Fix-regular-expression-to-work-with-multiple-digit-v.patch \
</span><del>-                tiger-shlib.patch
</del><ins>+                fix-dylib-ids.patch
</ins><span class="cx"> 
</span><span class="cx"> patch.pre_args  -p1
</span><span class="cx"> 
</span><span class="cx"> if {${subport} eq &quot;clang-${llvm_version}&quot;} {
</span><span class="cx">     patchfiles-append   move-clang-resources.patch \
</span><del>-                        tiger-shlib-clang.patch \
</del><ins>+                        fix-clang-dylib-ids.patch \
</ins><span class="cx">                         tiger-libclang.patch \
</span><span class="cx">                         scan-build-PR-35006.patch \
</span><span class="cx">                         0001-Comment-out-SL-cctools-workaround.patch \
</span><span class="lines">@@ -286,35 +287,11 @@
</span><span class="cx">         #    set basename [string map &quot;${destroot}${sub_prefix}/share/man/man1/ {}&quot; ${man}]
</span><span class="cx">         #    file rename ${man} ${destroot}${prefix}/share/man/man1/[string map &quot;.1 -${suffix}.1&quot; ${basename}]
</span><span class="cx">         #}
</span><del>-
-        foreach liba [glob ${destroot}${sub_prefix}/lib/*dylib] {
-            set liba_nodr [string map &quot;${destroot} {}&quot; ${liba}]
-            system &quot;install_name_tool -id ${liba_nodr} ${liba}&quot;
-
-            foreach libb [glob ${destroot}${sub_prefix}/lib/*dylib] {
-                set libb_base [string map &quot;${destroot}${sub_prefix}/lib/ {}&quot; ${libb}]
-                set libb_nodr [string map &quot;${destroot} {}&quot; ${libb}]
-
-                system &quot;install_name_tool -change @executable_path/../lib/${libb_base} ${libb_nodr} ${liba}&quot;
-                system &quot;install_name_tool -change @rpath/${libb_base} ${libb_nodr} ${liba}&quot;
-            }
-        }
</del><span class="cx">     } elseif {${subport} eq &quot;clang-${llvm_version}&quot;} {
</span><span class="cx">         system &quot;ditto ${worksrcpath}/projects/libcxx/include ${destroot}${sub_prefix}/lib/c++/v1&quot;
</span><span class="cx"> 
</span><span class="cx">         # http://trac.macports.org/ticket/33207
</span><span class="cx">         ln -s ${prefix}/libexec/ld64/ld ${destroot}${sub_prefix}/bin/ld
</span><del>-
-        system &quot;install_name_tool -id ${sub_prefix}/lib/libclang.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @rpath/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @rpath/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-
-        if {${os.major} &gt; 9} {
-            # http://trac.macports.org/ticket/38527
-            system &quot;install_name_tool -id ${sub_prefix}/lib/clang/${llvm_version}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib&quot;
-        }
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkdportslangllvm34filesfixclangdylibidspatchfromrev129360trunkdportslangllvm34filestigershlibclangpatch"></a>
<div class="copfile"><h4>Copied: trunk/dports/lang/llvm-3.4/files/fix-clang-dylib-ids.patch (from rev 129360, trunk/dports/lang/llvm-3.4/files/tiger-shlib-clang.patch) (0 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.4/files/fix-clang-dylib-ids.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.4/files/fix-clang-dylib-ids.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+Index: llvm-3.4.2.src/tools/clang/runtime/compiler-rt/Makefile
+===================================================================
+--- llvm-3.4.2.src.orig/tools/clang/runtime/compiler-rt/Makefile
++++ llvm-3.4.2.src/tools/clang/runtime/compiler-rt/Makefile
+@@ -215,8 +215,6 @@ $(ResourceLibDir)/$1/libclang_rt.%.dylib
+                 $(ResourceLibDir)/$1/.dir
+         $(Echo) Copying runtime library $1/$$* to build dir
+         $(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.dylib $$@
+-        $(Echo) Fixing LC_ID_DYLIB of $$@
+-        $(Verb) install_name_tool $$@ -id $$@
+ RuntimeLibrary.$1: \
+                 $(RuntimeLibrary.$1.Configs:%=$(ResourceLibDir)/$1/libclang_rt.%)
+ .PHONY: RuntimeLibrary.$1
+@@ -236,6 +234,7 @@ $(PROJ_resources_lib)/$1/libclang_rt.%.d
+                 $(ResourceLibDir)/$1/libclang_rt.%.dylib | $(PROJ_resources_lib)/$1
+         $(Echo) Installing compiler runtime library: $1/$$*
+         $(Verb) $(DataInstall) $$&lt; $(PROJ_resources_lib)/$1
++        $(Verb) install_name_tool $$@ -id $$(patsubst $(DESTDIR)%,%,$$@)

+ # Rule to install runtime libraries.
+ RuntimeLibraryInstall.$1: \
+Index: llvm-3.4.2.src/tools/clang/tools/libclang/Makefile
+===================================================================
+--- llvm-3.4.2.src.orig/tools/clang/tools/libclang/Makefile
++++ llvm-3.4.2.src/tools/clang/tools/libclang/Makefile
+@@ -49,12 +49,8 @@ ifeq ($(HOST_OS),Darwin)
+     # Extra options to override libtool defaults.
+     LLVMLibsOptions += -Wl,-dead_strip

+-    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+-    DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+-    ifneq ($(DARWIN_VERS),8)
+-       LLVMLibsOptions += -Wl,-install_name \
+-                          -Wl,&quot;@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
+-    endif
++    # $(CLANG_LEVEL)/../../Makefile.rules has been patched to set the
++    # install name for all dylibs.

+     # If we're doing an Apple-style build, add the LTO object path.
+     ifeq ($(RC_XBS),YES)
</ins></span></pre></div>
<a id="trunkdportslangllvm34filesfixdylibidspatchfromrev129360trunkdportslangllvm34filestigershlibpatch"></a>
<div class="copfile"><h4>Copied: trunk/dports/lang/llvm-3.4/files/fix-dylib-ids.patch (from rev 129360, trunk/dports/lang/llvm-3.4/files/tiger-shlib.patch) (0 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.4/files/fix-dylib-ids.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.4/files/fix-dylib-ids.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+Index: llvm-3.4.2.src/tools/llvm-shlib/Makefile
+===================================================================
+--- llvm-3.4.2.src.orig/tools/llvm-shlib/Makefile
++++ llvm-3.4.2.src/tools/llvm-shlib/Makefile
+@@ -55,13 +55,8 @@ ifeq ($(HOST_OS),Darwin)
+     LLVMLibsOptions    := $(LLVMLibsOptions)  \
+                          -Wl,-dead_strip

+-    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+-    DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+-    ifneq ($(DARWIN_VERS),8)
+-       LLVMLibsOptions    := $(LLVMLibsOptions)  \
+-                            -Wl,-install_name \
+-                            -Wl,&quot;@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
+-    endif
++    # $(LEVEL)/Makefile.rules has been patched to set the install name
++    # for all dylibs.
+ endif

+ ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD OpenBSD GNU Bitrig))
+Index: llvm-3.4.2.src/tools/lto/Makefile
+===================================================================
+--- llvm-3.4.2.src.orig/tools/lto/Makefile
++++ llvm-3.4.2.src/tools/lto/Makefile
+@@ -41,13 +41,8 @@ ifeq ($(HOST_OS),Darwin)
+     LLVMLibsOptions    := $(LLVMLibsOptions)  \
+                          -Wl,-dead_strip

+-    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+-    DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+-    ifneq ($(DARWIN_VERS),8)
+-       LLVMLibsOptions    := $(LLVMLibsOptions)  \
+-                            -Wl,-install_name \
+-                            -Wl,&quot;@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
+-    endif
++    # $(LEVEL)/Makefile.rules has been patched to set the install name
++    # for all dylibs.

+     # If we're doing an Apple-style build, add the LTO object path.
+     ifeq ($(RC_XBS),YES)
+Index: llvm-3.4.2.src/Makefile.rules
+===================================================================
+--- llvm-3.4.2.src.orig/Makefile.rules
++++ llvm-3.4.2.src/Makefile.rules
+@@ -581,6 +581,17 @@ ifdef SHARED_LIBRARY
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ ifneq ($(HOST_OS),Darwin)
+   LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
++else
++  ifeq ($(DARWIN_MAJVERS),4)
++    LD.Flags += -Wl,-dylib_install_name
++  else
++    LD.Flags += -Wl,-install_name
++  endif
++  ifdef LOADABLE_MODULE
++    LD.Flags += -Wl,&quot;$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  else
++    LD.Flags += -Wl,&quot;$(PROJ_libdir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  endif
+ endif
+ endif
+ endif
</ins></span></pre></div>
<a id="trunkdportslangllvm34filestigershlibclangpatch"></a>
<div class="delfile"><h4>Deleted: trunk/dports/lang/llvm-3.4/files/tiger-shlib-clang.patch (129360 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.4/files/tiger-shlib-clang.patch        2014-12-10 23:56:05 UTC (rev 129360)
+++ trunk/dports/lang/llvm-3.4/files/tiger-shlib-clang.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>---- llvm-3.0.src.orig/tools/clang/tools/libclang/Makefile        2011-07-09 14:35:58.000000000 -0700
-+++ llvm-3.0.src/tools/clang/tools/libclang/Makefile        2012-04-20 10:09:40.000000000 -0700
-@@ -38,9 +38,11 @@ ifeq ($(HOST_OS),Darwin)
-     # Extra options to override libtool defaults.
-     LLVMLibsOptions += -Wl,-dead_strip -Wl,-seg1addr,0xE0000000 

--    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
-     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
--    ifneq ($(DARWIN_VERS),8)
-+    ifeq ($(DARWIN_VERS),8)
-+       LLVMLibsOptions += -Wl,-install_name \
-+                          -Wl,&quot;@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
-+    else
-        LLVMLibsOptions += -Wl,-install_name \
-                           -Wl,&quot;@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
-     endif
</del></span></pre></div>
<a id="trunkdportslangllvm34filestigershlibpatch"></a>
<div class="delfile"><h4>Deleted: trunk/dports/lang/llvm-3.4/files/tiger-shlib.patch (129360 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.4/files/tiger-shlib.patch        2014-12-10 23:56:05 UTC (rev 129360)
+++ trunk/dports/lang/llvm-3.4/files/tiger-shlib.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-diff -Naurp trunk.orig/tools/llvm-shlib/Makefile trunk/tools/llvm-shlib/Makefile
---- trunk.orig/tools/llvm-shlib/Makefile        2012-10-12 00:37:16.000000000 -0700
-+++ trunk/tools/llvm-shlib/Makefile        2012-10-12 00:39:43.000000000 -0700
-@@ -54,9 +54,12 @@ ifeq ($(HOST_OS),Darwin)
-                          -Wl,-dead_strip \
-                          -Wl,-seg1addr -Wl,0xE0000000 

--    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
-     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
--    ifneq ($(DARWIN_VERS),8)
-+    ifeq ($(DARWIN_VERS),8)
-+       LLVMLibsOptions    := $(LLVMLibsOptions)  \
-+                            -Wl,-dylib_install_name \
-+                            -Wl,&quot;@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
-+    else
-        LLVMLibsOptions    := $(LLVMLibsOptions)  \
-                             -Wl,-install_name \
-                             -Wl,&quot;@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
-diff -Naurp trunk.orig/tools/lto/Makefile trunk/tools/lto/Makefile
---- trunk.orig/tools/lto/Makefile        2012-10-12 00:37:16.000000000 -0700
-+++ trunk/tools/lto/Makefile        2012-10-12 00:39:43.000000000 -0700
-@@ -42,9 +42,12 @@ ifeq ($(HOST_OS),Darwin)
-                          -Wl,-dead_strip \
-                          -Wl,-seg1addr -Wl,0xE0000000 

--    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
-     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
--    ifneq ($(DARWIN_VERS),8)
-+    ifeq ($(DARWIN_VERS),8)
-+       LLVMLibsOptions    := $(LLVMLibsOptions)  \
-+                            -Wl,-dylib_install_name \
-+                            -Wl,&quot;@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
-+    else
-        LLVMLibsOptions    := $(LLVMLibsOptions)  \
-                             -Wl,-install_name \
-                             -Wl,&quot;@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
</del></span></pre></div>
<a id="trunkdportslangllvm35Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/lang/llvm-3.5/Portfile (129360 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.5/Portfile        2014-12-10 23:56:05 UTC (rev 129360)
+++ trunk/dports/lang/llvm-3.5/Portfile        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx"> #default_variants-append +assertions
</span><span class="cx"> 
</span><span class="cx"> version                 ${llvm_version}.0
</span><ins>+revision                1
</ins><span class="cx"> epoch                   1
</span><span class="cx"> master_sites            http://llvm.org/releases/${version}
</span><span class="cx"> use_xz                  yes
</span><span class="lines">@@ -112,7 +113,8 @@
</span><span class="cx">                     rmd160  28c64aacabae5d37f0ab32ddfe96d451e540e554 \
</span><span class="cx">                     sha256  2981beb378afb5aa5c50ed017720a42a33e77e902c7086ad2d412ef4fa931f69
</span><span class="cx"> 
</span><del>-patchfiles      install_target.patch
</del><ins>+patchfiles      install_target.patch \
+                fix-dylib-ids.patch
</ins><span class="cx"> 
</span><span class="cx"> patch.pre_args  -p1
</span><span class="cx"> 
</span><span class="lines">@@ -124,7 +126,8 @@
</span><span class="cx">                          clang-format.patch \
</span><span class="cx">                          clang-modernize.patch \
</span><span class="cx">                          snowleopard-cmath.patch \
</span><del>-                         move-clang-resources.patch
</del><ins>+                         move-clang-resources.patch \
+                         fix-libclang_rt-dylib-ids.patch
</ins><span class="cx"> 
</span><span class="cx">     build.target        clang-only
</span><span class="cx">     destroot.target     install-clang
</span><span class="lines">@@ -287,35 +290,11 @@
</span><span class="cx">         #    set basename [string map &quot;${destroot}${sub_prefix}/share/man/man1/ {}&quot; ${man}]
</span><span class="cx">         #    file rename ${man} ${destroot}${prefix}/share/man/man1/[string map &quot;.1 -${suffix}.1&quot; ${basename}]
</span><span class="cx">         #}
</span><del>-
-        foreach liba [glob ${destroot}${sub_prefix}/lib/*dylib] {
-            set liba_nodr [string map &quot;${destroot} {}&quot; ${liba}]
-            system &quot;install_name_tool -id ${liba_nodr} ${liba}&quot;
-
-            foreach libb [glob ${destroot}${sub_prefix}/lib/*dylib] {
-                set libb_base [string map &quot;${destroot}${sub_prefix}/lib/ {}&quot; ${libb}]
-                set libb_nodr [string map &quot;${destroot} {}&quot; ${libb}]
-
-                system &quot;install_name_tool -change @executable_path/../lib/${libb_base} ${libb_nodr} ${liba}&quot;
-                system &quot;install_name_tool -change @rpath/${libb_base} ${libb_nodr} ${liba}&quot;
-            }
-        }
</del><span class="cx">     } elseif {${subport} eq &quot;clang-${llvm_version}&quot;} {
</span><span class="cx">         system &quot;ditto ${worksrcpath}/projects/libcxx/include ${destroot}${sub_prefix}/lib/c++/v1&quot;
</span><span class="cx"> 
</span><span class="cx">         # http://trac.macports.org/ticket/33207
</span><span class="cx">         ln -s ${prefix}/libexec/ld64/ld ${destroot}${sub_prefix}/bin/ld
</span><del>-
-        system &quot;install_name_tool -id ${sub_prefix}/lib/libclang.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @rpath/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @rpath/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-
-        if {${os.major} &gt; 9} {
-            # http://trac.macports.org/ticket/38527
-            system &quot;install_name_tool -id ${sub_prefix}/lib/clang/${llvm_version}.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib&quot;
-        }
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkdportslangllvm35filesfixdylibidspatch"></a>
<div class="addfile"><h4>Added: trunk/dports/lang/llvm-3.5/files/fix-dylib-ids.patch (0 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.5/files/fix-dylib-ids.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/fix-dylib-ids.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+Index: llvm-3.5.0.src/Makefile.rules
+===================================================================
+--- llvm-3.5.0.src.orig/Makefile.rules
++++ llvm-3.5.0.src/Makefile.rules
+@@ -599,7 +599,12 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), 
+ ifneq ($(HOST_OS),Darwin)
+   LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
+ else
+-  LD.Flags += -Wl,-install_name  -Wl,&quot;@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  LD.Flags += -Wl,-install_name
++  ifdef LOADABLE_MODULE
++    LD.Flags += -Wl,&quot;$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  else
++    LD.Flags += -Wl,&quot;$(PROJ_libdir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  endif
+ endif
+ endif
+ endif
</ins></span></pre></div>
<a id="trunkdportslangllvm35filesfixlibclang_rtdylibidspatch"></a>
<div class="addfile"><h4>Added: trunk/dports/lang/llvm-3.5/files/fix-libclang_rt-dylib-ids.patch (0 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.5/files/fix-libclang_rt-dylib-ids.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/fix-libclang_rt-dylib-ids.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Index: llvm-3.5.0.src/tools/clang/runtime/compiler-rt/Makefile
+===================================================================
+--- llvm-3.5.0.src.orig/tools/clang/runtime/compiler-rt/Makefile
++++ llvm-3.5.0.src/tools/clang/runtime/compiler-rt/Makefile
+@@ -221,8 +221,6 @@ $(ResourceLibDir)/$1/libclang_rt.%.dylib
+                 $(ResourceLibDir)/$1/.dir
+         $(Echo) Copying runtime library $1/$$* to build dir
+         $(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.dylib $$@
+-        $(Echo) Fixing LC_ID_DYLIB of $$@
+-        $(Verb) install_name_tool $$@ -id $$@
+ RuntimeLibrary.$1: \
+                 $(RuntimeLibrary.$1.Configs:%=$(ResourceLibDir)/$1/libclang_rt.%)
+ .PHONY: RuntimeLibrary.$1
+@@ -242,6 +240,7 @@ $(PROJ_resources_lib)/$1/libclang_rt.%.d
+                 $(ResourceLibDir)/$1/libclang_rt.%.dylib | $(PROJ_resources_lib)/$1
+         $(Echo) Installing compiler runtime library: $1/$$*
+         $(Verb) $(DataInstall) $$&lt; $(PROJ_resources_lib)/$1
++        $(Verb) install_name_tool $$@ -id $$(patsubst $(DESTDIR)%,%,$$@)

+ # Rule to install runtime libraries.
+ RuntimeLibraryInstall.$1: \
</ins></span></pre></div>
<a id="trunkdportslangllvm36Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/lang/llvm-3.6/Portfile (129360 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.6/Portfile        2014-12-10 23:56:05 UTC (rev 129360)
+++ trunk/dports/lang/llvm-3.6/Portfile        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -93,7 +93,8 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-patchfiles      install_target.patch
</del><ins>+patchfiles      install_target.patch \
+                fix-dylib-ids.patch
</ins><span class="cx"> 
</span><span class="cx"> patch.pre_args  -p1
</span><span class="cx"> 
</span><span class="lines">@@ -103,7 +104,8 @@
</span><span class="cx">                          clang-format.patch \
</span><span class="cx">                          clang-modernize.patch \
</span><span class="cx">                          snowleopard-cmath.patch \
</span><del>-                         move-clang-resources.patch
</del><ins>+                         move-clang-resources.patch \
+                         fix-libclang_rt-dylib-ids.patch
</ins><span class="cx"> 
</span><span class="cx">     build.target        clang-only
</span><span class="cx">     destroot.target     install-clang
</span><span class="lines">@@ -266,35 +268,11 @@
</span><span class="cx">         #    set basename [string map &quot;${destroot}${sub_prefix}/share/man/man1/ {}&quot; ${man}]
</span><span class="cx">         #    file rename ${man} ${destroot}${prefix}/share/man/man1/[string map &quot;.1 -${suffix}.1&quot; ${basename}]
</span><span class="cx">         #}
</span><del>-
-        foreach liba [glob ${destroot}${sub_prefix}/lib/*dylib] {
-            set liba_nodr [string map &quot;${destroot} {}&quot; ${liba}]
-            system &quot;install_name_tool -id ${liba_nodr} ${liba}&quot;
-
-            foreach libb [glob ${destroot}${sub_prefix}/lib/*dylib] {
-                set libb_base [string map &quot;${destroot}${sub_prefix}/lib/ {}&quot; ${libb}]
-                set libb_nodr [string map &quot;${destroot} {}&quot; ${libb}]
-
-                system &quot;install_name_tool -change @executable_path/../lib/${libb_base} ${libb_nodr} ${liba}&quot;
-                system &quot;install_name_tool -change @rpath/${libb_base} ${libb_nodr} ${liba}&quot;
-            }
-        }
</del><span class="cx">     } elseif {${subport} eq &quot;clang-${llvm_version}&quot;} {
</span><span class="cx">         system &quot;ditto ${worksrcpath}/projects/libcxx/include ${destroot}${sub_prefix}/lib/c++/v1&quot;
</span><span class="cx"> 
</span><span class="cx">         # http://trac.macports.org/ticket/33207
</span><span class="cx">         ln -s ${prefix}/libexec/ld64/ld ${destroot}${sub_prefix}/bin/ld
</span><del>-
-        system &quot;install_name_tool -id ${sub_prefix}/lib/libclang.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @rpath/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-        system &quot;install_name_tool -change @rpath/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib&quot;
-
-        if {${os.major} &gt; 9} {
-            # http://trac.macports.org/ticket/38527
-            system &quot;install_name_tool -id ${sub_prefix}/lib/clang/${llvm_version}.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib&quot;
-        }
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkdportslangllvm36filesfixdylibidspatch"></a>
<div class="addfile"><h4>Added: trunk/dports/lang/llvm-3.6/files/fix-dylib-ids.patch (0 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.6/files/fix-dylib-ids.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/fix-dylib-ids.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+diff --git a/Makefile.rules b/Makefile.rules
+index c8c971f..78b9c51 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -598,7 +598,12 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ ifneq ($(HOST_OS),Darwin)
+   LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
+ else
+-  LD.Flags += -Wl,-install_name  -Wl,&quot;@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  LD.Flags += -Wl,-install_name
++  ifdef LOADABLE_MODULE
++    LD.Flags += -Wl,&quot;$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  else
++    LD.Flags += -Wl,&quot;$(PROJ_libdir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)&quot;
++  endif
+ endif
+ endif
+ endif
</ins></span></pre></div>
<a id="trunkdportslangllvm36filesfixlibclang_rtdylibidspatch"></a>
<div class="addfile"><h4>Added: trunk/dports/lang/llvm-3.6/files/fix-libclang_rt-dylib-ids.patch (0 => 129361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.6/files/fix-libclang_rt-dylib-ids.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/fix-libclang_rt-dylib-ids.patch        2014-12-11 00:07:46 UTC (rev 129361)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+diff --git a/tools/clang/runtime/compiler-rt/Makefile b/tools/clang/runtime/compiler-rt/Makefile
+index f06ef99..ca9bcd9 100644
+--- a/tools/clang/runtime/compiler-rt/Makefile
++++ b/tools/clang/runtime/compiler-rt/Makefile
+@@ -234,6 +234,7 @@ $(PROJ_resources_lib)/$1/libclang_rt.%.dylib: \
+                 $(ResourceLibDir)/$1/libclang_rt.%.dylib | $(PROJ_resources_lib)/$1
+         $(Echo) Installing compiler runtime library: $1/$$*
+         $(Verb) $(DataInstall) $$&lt; $(PROJ_resources_lib)/$1
++        $(Verb) install_name_tool $$@ -id $$(patsubst $(DESTDIR)%,%,$$@)

+ # Rule to install runtime libraries.
+ RuntimeLibraryInstall.$1: \
</ins></span></pre>
</div>
</div>

</body>
</html>