[128859] trunk/dports/science/ds9
aronnax at macports.org
aronnax at macports.org
Fri Nov 28 11:50:56 PST 2014
Revision: 128859
https://trac.macports.org/changeset/128859
Author: aronnax at macports.org
Date: 2014-11-28 11:50:56 -0800 (Fri, 28 Nov 2014)
Log Message:
-----------
ds9: store resources on filesystem, not in zip archive
Modified Paths:
--------------
trunk/dports/science/ds9/Portfile
trunk/dports/science/ds9/files/patch-ds9_Makefile.unix.diff
Added Paths:
-----------
trunk/dports/science/ds9/files/patch-ds9_ds9.unix.diff
trunk/dports/science/ds9/files/patch-src_ds9.tcl.diff
Modified: trunk/dports/science/ds9/Portfile
===================================================================
--- 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)
@@ -5,7 +5,7 @@
name ds9
version 7.3.2
-revision 1
+revision 2
categories science
platforms darwin
maintainers aronnax
@@ -39,8 +39,7 @@
port:libzip
# FIXME: ast is currently statically linked
-depends_build-append port:ast \
- port:zip
+depends_build-append port:ast
universal_variant no
@@ -72,13 +71,18 @@
}
patchfiles patch-Makefile.unix.diff \
- patch-ds9_Makefile.unix.diff
+ patch-ds9_Makefile.unix.diff \
+ patch-ds9_ds9.unix.diff \
+ patch-src_ds9.tcl.diff
post-patch {
# FIXME: We have to statically link libast because libast needs to call
# functions that are defined in the static libsaotk. Probably best to
# eventually make libsaotk a dynamic library.
- reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/ds9/Makefile.unix
+ reinplace "s|@prefix@|${prefix}|g" \
+ ${worksrcpath}/ds9/Makefile.unix \
+ ${worksrcpath}/ds9/ds9.unix \
+ ${worksrcpath}/src/ds9.tcl
}
# The 'configure' stage for ds9 consists of copying or symbolically linking a
@@ -98,7 +102,7 @@
destroot {
xinstall ${worksrcpath}/bin/ds9 ${destroot}${prefix}/bin
- xinstall -m 644 ${worksrcpath}/bin/ds9.zip ${destroot}${prefix}/bin
+ exec cp -r ${worksrcpath}/ds9/zipdir/zvfsmntpt ${destroot}${prefix}/share/ds9
}
livecheck.url ${homepage}/site/Download.html
Modified: trunk/dports/science/ds9/files/patch-ds9_Makefile.unix.diff
===================================================================
--- 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)
@@ -1,5 +1,5 @@
---- ds9/Makefile.unix.orig 2014-11-27 14:49:58.000000000 -0800
-+++ ds9/Makefile.unix 2014-11-27 14:50:14.000000000 -0800
+--- ds9/Makefile.unix.orig 2014-11-28 11:38:57.000000000 -0800
++++ ds9/Makefile.unix 2014-11-28 11:39:43.000000000 -0800
@@ -43,9 +43,6 @@
../lib/librice.a \
../lib/libhcomp.a \
@@ -10,7 +10,16 @@
../lib/libsaotk.a \
../lib/libwcs.a \
../lib/libzvfs.a \
-@@ -114,9 +111,44 @@
+@@ -104,8 +101,6 @@
+ strip ds9Base
+ cp ds9Base ds9
+ cp ds9 ../bin/.
+- cp ds9.zip ../bin/.
+- cd ../bin; $(CODESIGN) -s "SAOImage DS9" ds9
+
+ debug : ds9Base ds9.zip
+ $(RM) $@
+@@ -114,9 +109,44 @@
ds9Base : $(OBJS) $(LIBS)
$(RM) $@
$(CXX) ${OPTS} \
@@ -36,9 +45,9 @@
+ ../lib/librice.a \
+ ../lib/libhcomp.a \
+ ../lib/libplio.a \
-+ @prefix@/lib/libast.a \
-+ @prefix@/lib/libast_err.a \
-+ @prefix@/lib/libast_pal.a \
++ /opt/local/lib/libast.a \
++ /opt/local/lib/libast_err.a \
++ /opt/local/lib/libast_pal.a \
+ ../lib/libsaotk.a \
+ ../lib/libwcs.a \
+ ../lib/libzvfs.a \
@@ -57,3 +66,11 @@
endif
+@@ -152,7 +182,6 @@
+
+ ds9.zip : $(FILES)
+ cd zipdir; find . -depth -name "CVS" -exec rm -r {} \;
+- cd zipdir; zip -r ../ds9.zip *
+
+ zipdir :
+ mkdir zipdir
Added: trunk/dports/science/ds9/files/patch-ds9_ds9.unix.diff
===================================================================
--- 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)
@@ -0,0 +1,55 @@
+--- 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*)"TCL_LIBRARY=./zvfsmntpt/tcl8.6");
+- putenv((char*)"TK_LIBRARY=./zvfsmntpt/tk8.6");
++ putenv((char*)"TCL_LIBRARY=@prefix@/share/ds9/tcl8.6");
++ putenv((char*)"TK_LIBRARY==@prefix@/share/ds9/tk8.6");
+
+ // startup script
+- Tcl_Obj *path = Tcl_NewStringObj("./zvfsmntpt/src/ds9.tcl",-1);
++ Tcl_Obj *path = Tcl_NewStringObj("@prefix@/share/ds9/src/ds9.tcl",-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, "zvfs", Zvfs_Init, (Tcl_PackageInitProc*)NULL);
+-
+- // find current working directory, and set as mount point
+- {
+- Tcl_DString pwd;
+- Tcl_DStringInit(&pwd);
+- Tcl_GetCwd(interp, &pwd);
+-
+-#ifdef ZIPFILE
+- ostringstream str;
+- str << (char *)Tcl_GetNameOfExecutable()
+- << ".zip"
+- << ends;
+- if( Zvfs_Mount(interp, (char*)str.str().c_str(), Tcl_DStringValue(&pwd)) != TCL_OK ){
+- char str[] = "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.";
+-
+- cerr << str << endl;
+- exit(1);
+- }
+-#else
+- Zvfs_Mount(interp, (char *)Tcl_GetNameOfExecutable(),
+- Tcl_DStringValue(&pwd));
+-#endif
+- Tcl_DStringFree(&pwd);
+- }
+-
+ // Tcl
+ if (Tcl_Init(interp) == TCL_ERROR)
+ return TCL_ERROR;
Added: trunk/dports/science/ds9/files/patch-src_ds9.tcl.diff
===================================================================
--- 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)
@@ -0,0 +1,11 @@
+--- 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) "@prefix@/share/ds9"
+
+ if {![namespace exists msgcat]} {
+ source $ds9(root)/tcl8/8.5/msgcat-1.5.2.tm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141128/43f3d655/attachment-0001.html>
More information about the macports-changes
mailing list