<!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>[128859] trunk/dports/science/ds9</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/128859">128859</a></dd>
<dt>Author</dt> <dd>aronnax@macports.org</dd>
<dt>Date</dt> <dd>2014-11-28 11:50:56 -0800 (Fri, 28 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>ds9: store resources on filesystem, not in zip archive</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsscienceds9Portfile">trunk/dports/science/ds9/Portfile</a></li>
<li><a href="#trunkdportsscienceds9filespatchds9_Makefileunixdiff">trunk/dports/science/ds9/files/patch-ds9_Makefile.unix.diff</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsscienceds9filespatchds9_ds9unixdiff">trunk/dports/science/ds9/files/patch-ds9_ds9.unix.diff</a></li>
<li><a href="#trunkdportsscienceds9filespatchsrc_ds9tcldiff">trunk/dports/science/ds9/files/patch-src_ds9.tcl.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsscienceds9Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/science/ds9/Portfile (128858 => 128859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/ds9/Portfile        2014-11-28 19:13:41 UTC (rev 128858)
+++ trunk/dports/science/ds9/Portfile        2014-11-28 19:50:56 UTC (rev 128859)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> name                    ds9
</span><span class="cx"> version                 7.3.2
</span><del>-revision                1
</del><ins>+revision                2
</ins><span class="cx"> categories              science
</span><span class="cx"> platforms               darwin
</span><span class="cx"> maintainers             aronnax
</span><span class="lines">@@ -39,8 +39,7 @@
</span><span class="cx">                         port:libzip
</span><span class="cx"> 
</span><span class="cx"> # FIXME: ast is currently statically linked
</span><del>-depends_build-append    port:ast \
-                        port:zip
</del><ins>+depends_build-append    port:ast
</ins><span class="cx"> 
</span><span class="cx"> universal_variant       no
</span><span class="cx"> 
</span><span class="lines">@@ -72,13 +71,18 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> patchfiles              patch-Makefile.unix.diff \
</span><del>-                        patch-ds9_Makefile.unix.diff
</del><ins>+                        patch-ds9_Makefile.unix.diff \
+                        patch-ds9_ds9.unix.diff \
+                        patch-src_ds9.tcl.diff
</ins><span class="cx"> 
</span><span class="cx"> post-patch {
</span><span class="cx">     # FIXME: We have to statically link libast because libast needs to call
</span><span class="cx">     # functions that are defined in the static libsaotk. Probably best to
</span><span class="cx">     # eventually make libsaotk a dynamic library.
</span><del>-    reinplace &quot;s|@prefix@|${prefix}|g&quot; ${worksrcpath}/ds9/Makefile.unix
</del><ins>+    reinplace &quot;s|@prefix@|${prefix}|g&quot; \
+        ${worksrcpath}/ds9/Makefile.unix \
+        ${worksrcpath}/ds9/ds9.unix \
+        ${worksrcpath}/src/ds9.tcl
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # The 'configure' stage for ds9 consists of copying or symbolically linking a
</span><span class="lines">@@ -98,7 +102,7 @@
</span><span class="cx"> 
</span><span class="cx"> destroot {
</span><span class="cx">     xinstall ${worksrcpath}/bin/ds9 ${destroot}${prefix}/bin
</span><del>-    xinstall -m 644 ${worksrcpath}/bin/ds9.zip ${destroot}${prefix}/bin
</del><ins>+    exec cp -r ${worksrcpath}/ds9/zipdir/zvfsmntpt ${destroot}${prefix}/share/ds9
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> livecheck.url           ${homepage}/site/Download.html
</span></span></pre></div>
<a id="trunkdportsscienceds9filespatchds9_Makefileunixdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/science/ds9/files/patch-ds9_Makefile.unix.diff (128858 => 128859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/ds9/files/patch-ds9_Makefile.unix.diff        2014-11-28 19:13:41 UTC (rev 128858)
+++ trunk/dports/science/ds9/files/patch-ds9_Makefile.unix.diff        2014-11-28 19:50:56 UTC (rev 128859)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><del>---- ds9/Makefile.unix.orig        2014-11-27 14:49:58.000000000 -0800
-+++ ds9/Makefile.unix        2014-11-27 14:50:14.000000000 -0800
</del><ins>+--- ds9/Makefile.unix.orig        2014-11-28 11:38:57.000000000 -0800
++++ ds9/Makefile.unix        2014-11-28 11:39:43.000000000 -0800
</ins><span class="cx"> @@ -43,9 +43,6 @@
</span><span class="cx">          ../lib/librice.a \
</span><span class="cx">          ../lib/libhcomp.a \
</span><span class="lines">@@ -10,7 +10,16 @@
</span><span class="cx">          ../lib/libsaotk.a \
</span><span class="cx">          ../lib/libwcs.a \
</span><span class="cx">          ../lib/libzvfs.a \
</span><del>-@@ -114,9 +111,44 @@
</del><ins>+@@ -104,8 +101,6 @@
+         strip ds9Base
+         cp ds9Base ds9
+         cp ds9 ../bin/.
+-        cp ds9.zip ../bin/.
+-        cd ../bin; $(CODESIGN) -s &quot;SAOImage DS9&quot; ds9

+ debug        : ds9Base ds9.zip
+         $(RM) $@
+@@ -114,9 +109,44 @@
</ins><span class="cx">  ds9Base        : $(OBJS) $(LIBS)
</span><span class="cx">          $(RM) $@
</span><span class="cx">          $(CXX) ${OPTS} \
</span><span class="lines">@@ -36,9 +45,9 @@
</span><span class="cx"> +        ../lib/librice.a \
</span><span class="cx"> +        ../lib/libhcomp.a \
</span><span class="cx"> +        ../lib/libplio.a \
</span><del>-+        @prefix@/lib/libast.a \
-+        @prefix@/lib/libast_err.a \
-+        @prefix@/lib/libast_pal.a \
</del><ins>++        /opt/local/lib/libast.a \
++        /opt/local/lib/libast_err.a \
++        /opt/local/lib/libast_pal.a \
</ins><span class="cx"> +        ../lib/libsaotk.a \
</span><span class="cx"> +        ../lib/libwcs.a \
</span><span class="cx"> +        ../lib/libzvfs.a \
</span><span class="lines">@@ -57,3 +66,11 @@
</span><span class="cx">  
</span><span class="cx">  endif
</span><span class="cx">  
</span><ins>+@@ -152,7 +182,6 @@

+ ds9.zip        : $(FILES)
+         cd zipdir; find . -depth -name &quot;CVS&quot; -exec rm -r {} \;
+-        cd zipdir; zip -r ../ds9.zip *        

+ zipdir        : 
+         mkdir zipdir
</ins></span></pre></div>
<a id="trunkdportsscienceds9filespatchds9_ds9unixdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/science/ds9/files/patch-ds9_ds9.unix.diff (0 => 128859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/ds9/files/patch-ds9_ds9.unix.diff                                (rev 0)
+++ trunk/dports/science/ds9/files/patch-ds9_ds9.unix.diff        2014-11-28 19:50:56 UTC (rev 128859)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+--- ds9/ds9.unix.orig        2014-11-28 11:26:55.000000000 -0800
++++ ds9/ds9.unix        2014-11-28 11:26:58.000000000 -0800
+@@ -70,11 +70,11 @@

+   // so that tcl and tk know where to find their libs
+   // we do it here before InitLibraryPath is called
+-  putenv((char*)&quot;TCL_LIBRARY=./zvfsmntpt/tcl8.6&quot;);
+-  putenv((char*)&quot;TK_LIBRARY=./zvfsmntpt/tk8.6&quot;);
++  putenv((char*)&quot;TCL_LIBRARY=@prefix@/share/ds9/tcl8.6&quot;);
++  putenv((char*)&quot;TK_LIBRARY==@prefix@/share/ds9/tk8.6&quot;);

+   // startup script
+-  Tcl_Obj *path = Tcl_NewStringObj(&quot;./zvfsmntpt/src/ds9.tcl&quot;,-1);
++  Tcl_Obj *path = Tcl_NewStringObj(&quot;@prefix@/share/ds9/src/ds9.tcl&quot;,-1);
+   Tcl_SetStartupScript(path, NULL);

+   return TCL_OK;
+@@ -85,37 +85,6 @@
+   // save interp for cputs function
+   global_interp = interp;

+-  // We have to initialize the virtual filesystem before calling
+-  // Tcl_Init().  Otherwise, Tcl_Init() will not be able to find
+-  // its startup script files.
+-  if (Zvfs_Init(interp) == TCL_ERROR)
+-    return TCL_ERROR;
+-  Tcl_StaticPackage (interp, &quot;zvfs&quot;, Zvfs_Init, (Tcl_PackageInitProc*)NULL);
+-
+-  // find current working directory, and set as mount point
+-  {
+-    Tcl_DString pwd;
+-    Tcl_DStringInit(&amp;pwd);
+-    Tcl_GetCwd(interp, &amp;pwd);
+-
+-#ifdef ZIPFILE
+-    ostringstream str;
+-    str &lt;&lt; (char *)Tcl_GetNameOfExecutable() 
+-        &lt;&lt; &quot;.zip&quot; 
+-        &lt;&lt;  ends;
+-    if( Zvfs_Mount(interp, (char*)str.str().c_str(), Tcl_DStringValue(&amp;pwd)) != TCL_OK ){
+-      char str[] = &quot;ERROR: Unable to open the auxiliary ds9 file 'ds9.zip'. If you moved the ds9 program from its original location, please also move the zip file to the same place.&quot;;
+-
+-      cerr &lt;&lt; str &lt;&lt; endl;
+-      exit(1);
+-    }
+-#else
+-    Zvfs_Mount(interp, (char *)Tcl_GetNameOfExecutable(), 
+-               Tcl_DStringValue(&amp;pwd));
+-#endif
+-    Tcl_DStringFree(&amp;pwd);
+-  }
+-
+   // Tcl
+   if (Tcl_Init(interp) == TCL_ERROR)
+     return TCL_ERROR;
</ins></span></pre></div>
<a id="trunkdportsscienceds9filespatchsrc_ds9tcldiff"></a>
<div class="addfile"><h4>Added: trunk/dports/science/ds9/files/patch-src_ds9.tcl.diff (0 => 128859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/ds9/files/patch-src_ds9.tcl.diff                                (rev 0)
+++ trunk/dports/science/ds9/files/patch-src_ds9.tcl.diff        2014-11-28 19:50:56 UTC (rev 128859)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- src/ds9.tcl.orig        2014-11-28 11:28:10.000000000 -0800
++++ src/ds9.tcl        2014-11-28 11:28:46.000000000 -0800
+@@ -200,7 +200,7 @@
+     x11 {
+         # set to absolute path so that if -cd command is used,
+         # so we can still find our files
+-        set ds9(root) [file normalize [file join [pwd] zvfsmntpt]]
++        set ds9(root) &quot;@prefix@/share/ds9&quot;

+         if {![namespace exists msgcat]} {
+             source $ds9(root)/tcl8/8.5/msgcat-1.5.2.tm
</ins></span></pre>
</div>
</div>

</body>
</html>