<!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>[147861] trunk/dports/net/nss</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/147861">147861</a></dd>
<dt>Author</dt> <dd>mcalhoun@macports.org</dd>
<dt>Date</dt> <dd>2016-04-18 17:51:32 -0700 (Mon, 18 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>nss: update version 3.14.3-&gt;3.23; remove nss- prefix from binaries; allow universal build</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsnetnssPortfile">trunk/dports/net/nss/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsnetnssfilesMakefileMacPortsInstallin">trunk/dports/net/nss/files/Makefile-MacPorts-Install.in</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsnetnssfilespatchDarwinmkdiff">trunk/dports/net/nss/files/patch-Darwin.mk.diff</a></li>
<li><a href="#trunkdportsnetnssfilespatchUNIXmkdiff">trunk/dports/net/nss/files/patch-UNIX.mk.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsnetnssPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/net/nss/Portfile (147860 => 147861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/net/nss/Portfile        2016-04-19 00:44:41 UTC (rev 147860)
+++ trunk/dports/net/nss/Portfile        2016-04-19 00:51:32 UTC (rev 147861)
</span><span class="lines">@@ -2,9 +2,10 @@
</span><span class="cx"> # $Id$
</span><span class="cx"> 
</span><span class="cx"> PortSystem          1.0
</span><ins>+PortGroup           muniversal 1.0
</ins><span class="cx"> 
</span><span class="cx"> name                nss
</span><del>-version             3.14.3
</del><ins>+version             3.23
</ins><span class="cx"> set NSS_VMAJOR      [lindex [split ${version} .] 0]
</span><span class="cx"> set NSS_VMINOR      [lindex [split ${version} .] 1]
</span><span class="cx"> set NSS_VPATCH      [lindex [split ${version} .] 2]
</span><span class="lines">@@ -14,7 +15,7 @@
</span><span class="cx"> }
</span><span class="cx"> categories          net
</span><span class="cx"> maintainers         nomaintainer
</span><del>-license             {MPL-1.1 GPL-2+ LGPL-2.1+}
</del><ins>+license             {MPL-2 GPL-2+ LGPL-2.1+}
</ins><span class="cx"> description         Network Security Service libraries.
</span><span class="cx"> 
</span><span class="cx"> long_description    ${description}
</span><span class="lines">@@ -28,64 +29,35 @@
</span><span class="cx"> master_sites        ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/ \
</span><span class="cx">                     http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/
</span><span class="cx"> 
</span><del>-checksums           rmd160  78ce247c6d649ac0624b087d7a947e8b3482d520 \
-                    sha256  d9d366be94d33395597ebf82363fcdedfa693a6d627cf7f6bec025f609d54cc0
</del><ins>+checksums           rmd160  2cb9a448ec60a00edd7cf5a08321dd6583d03cb9 \
+                    sha256  94b383e31c9671e9dfcca81084a8a813817e8f05a57f54533509b318d26e11cf
</ins><span class="cx"> 
</span><span class="cx"> depends_lib     port:nspr \
</span><ins>+                port:zlib \
</ins><span class="cx">                 port:sqlite3
</span><span class="cx"> 
</span><del>-patchfiles      patch-UNIX.mk.diff \
-                patch-Darwin.mk.diff
</del><ins>+destroot.dir ${destroot.dir}/dist
+build.dir    ${build.dir}/nss
</ins><span class="cx"> 
</span><del>-# This is all kinds of messed up for universal...
-universal_variant no
</del><ins>+# muniversal destroot requires a Makefile
+post-extract {
+    xinstall -d -m 0755 ${destroot.dir}
</ins><span class="cx"> 
</span><ins>+    copy ${filespath}/Makefile-MacPorts-Install.in ${destroot.dir}/Makefile-MacPorts-Install
+    reinplace &quot;s|__MACPORTS_PREFIX__|${prefix}|g&quot; ${destroot.dir}/Makefile-MacPorts-Install
+}
+
+destroot.args-append \
+    -f Makefile-MacPorts-Install
+
</ins><span class="cx"> post-patch {
</span><span class="cx">     # libraries are not relative to any main executable, so no need for @executable_path
</span><span class="cx">     reinplace &quot;s|@executable_path|${prefix}/lib/nss|g&quot; \
</span><del>-        ${worksrcpath}/mozilla/security/coreconf/Darwin.mk \
-        ${worksrcpath}/mozilla/security/nss/lib/freebl/config.mk
-    reinplace &quot;s|@@PREFIX@@|${prefix}|g&quot; \
-        ${worksrcpath}/mozilla/security/coreconf/Darwin.mk \
-        ${worksrcpath}/mozilla/security/coreconf/UNIX.mk
-    reinplace &quot;s|= cc\$|= ${configure.cc}|&quot; \
-        ${worksrcpath}/mozilla/security/coreconf/Darwin.mk
-    reinplace &quot;s|= c++\$|= ${configure.cxx}|&quot; \
-        ${worksrcpath}/mozilla/security/coreconf/Darwin.mk
-    reinplace &quot;s|= ranlib\$|= /usr/bin/ranlib|&quot; \
-        ${worksrcpath}/mozilla/security/coreconf/Darwin.mk
-    reinplace &quot;s|=gcc|=${configure.cc}|&quot; \
-        ${worksrcpath}/mozilla/security/nss/Makefile
-    reinplace &quot;s|=g++|=${configure.cxx}|&quot; \
-        ${worksrcpath}/mozilla/security/nss/Makefile
</del><ins>+        ${build.dir}/coreconf/Darwin.mk \
+        ${build.dir}/lib/freebl/config.mk
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-build {
-    if {[info exists build_arch] &amp;&amp; (${build_arch} eq &quot;x86_64&quot; || ${build_arch} eq &quot;ppc64&quot;)} {
-        set use_64 &quot; USE_64=1&quot;
-    } else {
-        set use_64 &quot;&quot;
-    }
-    set make_args &quot;NSPR_LIB_DIR=${prefix}/lib/nspr NSS_USE_SYSTEM_SQLITE=1${use_64} CC=\&quot;${configure.cc} -arch ${build_arch}\&quot; CXX=$\&quot;{configure.cxx} -arch ${build_arch}\&quot;&quot;
-    system &quot;cd ${worksrcpath} &amp;&amp; \
-            make -C mozilla/security/coreconf/nsinstall ${make_args} &amp;&amp; \
-            make -C mozilla/security/dbm ${make_args} &amp;&amp; \
-            make -C mozilla/security/nss ${make_args}&quot;
-}
-
-destroot {
-    xinstall -m 755 -d ${destroot}${prefix}/include/nss
-    xinstall -m 755 {*}[glob -directory ${worksrcpath}/mozilla/dist/public/ nss/* dbm/*] ${destroot}${prefix}/include/nss
-    xinstall -m 755 -d ${destroot}${prefix}/bin
-    foreach f [glob ${worksrcpath}/mozilla/dist/Darwin*/bin/*] {
-        xinstall -m 755 $f ${destroot}${prefix}/bin/nss-[file tail $f]
-    }
-    xinstall -m 755 -d ${destroot}${prefix}/lib/nss
-    xinstall -m 755 {*}[glob ${worksrcpath}/mozilla/dist/Darwin*/lib/*.dylib] ${destroot}${prefix}/lib/nss
-    xinstall -m 644 {*}[glob ${worksrcpath}/mozilla/dist/Darwin*/lib/libcrmf.a] ${destroot}${prefix}/lib/nss
-
-    xinstall -m 755 -d ${destroot}${prefix}/lib/pkgconfig
-
</del><ins>+post-destroot {
</ins><span class="cx">     # applications seem to expect an nss-config executable and nss.pc file, but nss does not provide them
</span><span class="cx">     # see https://bugzilla.mozilla.org/show_bug.cgi?id=530672
</span><span class="cx"> 
</span><span class="lines">@@ -101,15 +73,81 @@
</span><span class="cx">     set nspr_version [exec ${prefix}/bin/nspr-config --version]
</span><span class="cx">     set nss_version  [exec ${destroot}${prefix}/bin/nss-config --version]
</span><span class="cx"> 
</span><del>-    xinstall  ${filespath}/nss.pc.in                  ${destroot}${prefix}/lib/pkgconfig/nss.pc
</del><ins>+    xinstall  -m 0644 ${filespath}/nss.pc.in          ${destroot}${prefix}/lib/pkgconfig/nss.pc
</ins><span class="cx">     reinplace &quot;s,@libdir@,${prefix}/lib/nss,g&quot;        ${destroot}${prefix}/lib/pkgconfig/nss.pc
</span><span class="cx">     reinplace &quot;s,@prefix@,${prefix},g&quot;                ${destroot}${prefix}/lib/pkgconfig/nss.pc
</span><span class="cx">     reinplace &quot;s,@exec_prefix@,${prefix},g&quot;           ${destroot}${prefix}/lib/pkgconfig/nss.pc
</span><span class="cx">     reinplace &quot;s,@includedir@,${prefix}/include/nss,&quot; ${destroot}${prefix}/lib/pkgconfig/nss.pc
</span><span class="cx">     reinplace &quot;s,@NSPR_VERSION@,${nspr_version},g&quot;    ${destroot}${prefix}/lib/pkgconfig/nss.pc
</span><span class="cx">     reinplace &quot;s,@NSS_VERSION@,${nss_version},g&quot;      ${destroot}${prefix}/lib/pkgconfig/nss.pc
</span><ins>+
+    # install man files
+    xinstall -m 0644 \
+        {*}[glob ${build.dir}/doc/nroff/*.1] \
+        ${destroot}${prefix}/share/man/man1/
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+use_parallel_build  no
+
+# mimic nss/coreconf/Darwin.mk
+
+if {![variant_isset universal]} {
+    if {${build_arch} eq &quot;x86_64&quot; || ${build_arch} eq &quot;ppc64&quot;} {
+        build.args-append USE_64=1
+    }
+
+    build.args-append \
+        CC=\&quot;${configure.cc} -arch ${build_arch}\&quot; \
+        CCC=\&quot;${configure.cxx} -arch ${build_arch}\&quot;
+} else {
+    lappend merger_build_args(x86_64) USE_64=1
+    lappend merger_build_args(ppc64)  USE_64=1
+
+    foreach arch ${universal_archs} {
+        lappend merger_build_args(${arch}) \
+            CC='${configure.cc} -arch ${arch}' \
+            CCC='${configure.cxx} -arch ${arch}'
+    }
+}
+
+build.args-append \
+    NSPR_INCLUDE_DIR=${prefix}/include/nspr \
+    NSPR_LIB_DIR=${prefix}/lib/nspr \
+    NSS_USE_SYSTEM_SQLITE=1 \
+    USE_SYSTEM_ZLIB=1 \
+    BUILD_OPT=1 \
+    OPTIMIZER=&quot;${configure.optflags}&quot; \
+    OBJDIR_NAME=&quot;Output.OBJD&quot;
+
+if {${configure.sdkroot} ne &quot;&quot;} {
+    build.args-append \
+        MACOS_SDK_DIR=${configure.sdkroot}
+}
+
+if {[variant_isset universal]} {
+    # chk files can not be merged
+
+    merger-post-destroot {
+        foreach arch ${universal_archs_to_use} {
+            foreach chk [glob -nocomplain -directory ${destroot}-${arch}${prefix}/lib/nss *.chk] {
+                # delete chk file and replace it with an empty file, which can be merged
+                # keep the empty file so that later, we can know which chk files need to be regenerated from universal library
+                file delete ${chk}
+                system &quot;touch ${chk}&quot;
+            }
+        }
+    }
+
+    post-destroot {
+        foreach chk [glob -nocomplain -directory ${destroot}${prefix}/lib/nss *.chk] {
+            # replace empty chk file with an actual one generated from universal library
+            file delete ${chk}
+            set base [file rootname ${chk}]
+            system &quot;env DYLD_LIBRARY_PATH=${destroot}${prefix}/lib/nss ${destroot}${prefix}/bin/shlibsign -i ${base}.dylib -o ${chk}&quot;
+        }
+    }
+}
+
</ins><span class="cx"> livecheck.type    regex
</span><span class="cx"> livecheck.url     http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/
</span><span class="cx"> if {${NSS_VPATCH} eq 0} {
</span></span></pre></div>
<a id="trunkdportsnetnssfilesMakefileMacPortsInstallin"></a>
<div class="addfile"><h4>Added: trunk/dports/net/nss/files/Makefile-MacPorts-Install.in (0 => 147861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/net/nss/files/Makefile-MacPorts-Install.in                                (rev 0)
+++ trunk/dports/net/nss/files/Makefile-MacPorts-Install.in        2016-04-19 00:51:32 UTC (rev 147861)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+# -*- mode: makefile -*-
+INSTALL=/usr/bin/install
+PREFIX=__MACPORTS_PREFIX__
+
+install:
+        $(INSTALL) -m 0755 Output.OBJD/bin/*       $(DESTDIR)$(PREFIX)/bin
+        $(INSTALL) -m 0755 -d                      $(DESTDIR)$(PREFIX)/lib/nss
+        $(INSTALL) -m 0755 Output.OBJD/lib/*.dylib $(DESTDIR)$(PREFIX)/lib/nss
+        $(INSTALL) -m 0644 Output.OBJD/lib/*.a     $(DESTDIR)$(PREFIX)/lib/nss
+        $(INSTALL) -m 0644 Output.OBJD/lib/*.chk   $(DESTDIR)$(PREFIX)/lib/nss
+        $(INSTALL) -m 0755 -d                      $(DESTDIR)$(PREFIX)/include/nss
+        $(INSTALL) -m 0644 public/{dbm,nss}/*.h    $(DESTDIR)$(PREFIX)/include/nss
</ins></span></pre></div>
<a id="trunkdportsnetnssfilespatchDarwinmkdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/net/nss/files/patch-Darwin.mk.diff (147860 => 147861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/net/nss/files/patch-Darwin.mk.diff        2016-04-19 00:44:41 UTC (rev 147860)
+++ trunk/dports/net/nss/files/patch-Darwin.mk.diff        2016-04-19 00:51:32 UTC (rev 147861)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>---- mozilla/security/coreconf/Darwin.mk.orig        2011-08-24 18:57:43.000000000 -0500
-+++ mozilla/security/coreconf/Darwin.mk        2012-04-03 22:50:14.000000000 -0500
-@@ -86,7 +86,7 @@
-         export NEXT_ROOT
-     else
-         # GCC &gt;= 4
--        DARWIN_SDK_CFLAGS = -isysroot $(MACOS_SDK_DIR)
-+        DARWIN_SDK_CFLAGS = -isysroot $(MACOS_SDK_DIR) -arch i386 -arch ppc
-         ifneq (4.0.0,$(GCC_VERSION_FULL))
-             # gcc &gt; 4.0.0 passes -syslibroot to ld based on -isysroot.
-             # Don't add -isysroot to DARWIN_SDK_LDFLAGS, because the programs
-@@ -95,7 +95,7 @@
-         else
-             # gcc 4.0.0 doesn't pass -syslibroot to ld, it needs to be
-             # explicit.
--            DARWIN_SDK_LDFLAGS = -Wl,-syslibroot,$(MACOS_SDK_DIR)
-+            DARWIN_SDK_LDFLAGS = -Wl,-syslibroot,$(MACOS_SDK_DIR) -arch i386 -arch ppc
-             DARWIN_SDK_SHLIBFLAGS = $(DARWIN_SDK_LDFLAGS)
-         endif
-     endif
-@@ -136,7 +136,7 @@
- # May override this with different compatibility and current version numbers.
- DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
- # May override this with -bundle to create a loadable module.
--DSO_LDOPTS        = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
-+DSO_LDOPTS        = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @executable_path/$(notdir $@) -headerpad_max_install_names -L@@PREFIX@@/lib/nspr -L@@PREFIX@@/lib/

- MKSHLIB                = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
- DLL_SUFFIX        = dylib
</del></span></pre></div>
<a id="trunkdportsnetnssfilespatchUNIXmkdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/net/nss/files/patch-UNIX.mk.diff (147860 => 147861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/net/nss/files/patch-UNIX.mk.diff        2016-04-19 00:44:41 UTC (rev 147860)
+++ trunk/dports/net/nss/files/patch-UNIX.mk.diff        2016-04-19 00:51:32 UTC (rev 147861)
</span><span class="lines">@@ -1,11 +0,0 @@
</span><del>---- mozilla/security/coreconf/UNIX.mk.orig        2008-10-03 12:12:41.000000000 -0700
-+++ mozilla/security/coreconf/UNIX.mk        2009-05-10 21:11:17.000000000 -0700
-@@ -48,7 +48,7 @@ else
-         OPTIMIZER  += -g
-         USERNAME   := $(shell whoami)
-         USERNAME   := $(subst -,_,$(USERNAME))
--        DEFINES    += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME)
-+        DEFINES    += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME) -I@@PREFIX@@/include/nspr -L@@PREFIX@@/lib/nspr -I@@PREFIX@@/include -L@@PREFIX@@/lib
- endif

- ifdef BUILD_TREE
</del></span></pre>
</div>
</div>

</body>
</html>