[60248] trunk/dports/science

jmr at macports.org jmr at macports.org
Sat Nov 7 01:06:27 PST 2009


Revision: 60248
          http://trac.macports.org/changeset/60248
Author:   jmr at macports.org
Date:     2009-11-07 01:06:24 -0800 (Sat, 07 Nov 2009)
Log Message:
-----------
New port: mddisplay (#21611)

Added Paths:
-----------
    trunk/dports/science/mddisplay/
    trunk/dports/science/mddisplay/Portfile
    trunk/dports/science/mddisplay/files/
    trunk/dports/science/mddisplay/files/patch-displib.c.diff
    trunk/dports/science/mddisplay/files/patch-mddisplay.c.diff
    trunk/dports/science/mddisplay/files/patch-preproc.c.diff

Added: trunk/dports/science/mddisplay/Portfile
===================================================================
--- trunk/dports/science/mddisplay/Portfile	                        (rev 0)
+++ trunk/dports/science/mddisplay/Portfile	2009-11-07 09:06:24 UTC (rev 60248)
@@ -0,0 +1,45 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem      1.0
+
+name            mddisplay
+version         3.0
+categories      science
+maintainers     yahoo.com:mjhsieh
+description     A 3D Stereo Molecular Dynamics Trajectory Visualization Package
+long_description    MD Display turns molecular dynamics trajectory data into a \
+                    colorful, animated, on-screen movie. Key features include: \
+                    Mouse control of translation, rotation, scaling, and \
+                    clipping. Half-bond coloring controls. Animation speed and \
+                    direction controls. Dynamic monitoring of distances, bond \
+                    angles, dihedrals, and hydrogen bonds. Superimposition of \
+                    static initial or average reference structures. \
+                    Ramachandron plots. Real-time filtering of higher \
+                    frequency molecular motions. PDB dump feature, for \
+                    extracting movie frames on-the-fly.
+
+homepage        http://structbio.vanderbilt.edu/~cmoth/mddisplay/
+master_sites    ${homepage}
+distname        ${name}
+dist_subdir     ${name}/${version}
+platforms       darwin
+checksums       md5 b4f61a306d321bcdb53870887090c2e0 \
+                sha1 d5586a6b1357d8d42f778b4cf299db28f02190e4
+
+use_configure   no
+
+patchfiles      patch-mddisplay.c.diff \
+                patch-displib.c.diff \
+                patch-preproc.c.diff
+
+build.args      CC=${configure.cc} CFLAGS="${configure.cflags} ${configure.cc_archflags}"
+
+build.target    -f makefile.osx default
+
+destroot        {
+        xinstall -m 0755 ${worksrcpath}/mddisplay ${destroot}${prefix}/bin
+        xinstall -m 0755 ${worksrcpath}/preproc ${destroot}${prefix}/bin
+        xinstall -d ${destroot}${prefix}/share/doc/${name}
+        xinstall -m 0644 ${worksrcpath}/readme.txt ${destroot}${prefix}/share/doc/${name}
+}


Property changes on: trunk/dports/science/mddisplay/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/science/mddisplay/files/patch-displib.c.diff
===================================================================
--- trunk/dports/science/mddisplay/files/patch-displib.c.diff	                        (rev 0)
+++ trunk/dports/science/mddisplay/files/patch-displib.c.diff	2009-11-07 09:06:24 UTC (rev 60248)
@@ -0,0 +1,20 @@
+--- displib.c.orig	2003-08-04 07:50:36.000000000 -0700
++++ displib.c	2009-09-30 11:43:57.000000000 -0700
+@@ -76,7 +76,7 @@
+ 
+    if ( nread != n )
+       {
+-      fprintf(stderr,"Unable to fread(%d elements of size %d).  fread() returned %d  Error: %s\n",n,size,nread,strerror(errno));
++      fprintf(stderr,"Unable to fread(%ld elements of size %ld).  fread() returned %ld  Error: %s\n",n,size,nread,strerror(errno));
+       exit(EXIT_FAILURE);
+       }
+ }
+@@ -89,7 +89,7 @@
+ 
+    if ( nwritten != n )
+       {
+-      fprintf(stderr,"Unable to fwrite(%d elements of size %d): %s\n",n,size,strerror(errno));
++      fprintf(stderr,"Unable to fwrite(%ld elements of size %ld): %s\n",n,size,strerror(errno));
+       exit(EXIT_FAILURE);
+       }
+ }

Added: trunk/dports/science/mddisplay/files/patch-mddisplay.c.diff
===================================================================
--- trunk/dports/science/mddisplay/files/patch-mddisplay.c.diff	                        (rev 0)
+++ trunk/dports/science/mddisplay/files/patch-mddisplay.c.diff	2009-11-07 09:06:24 UTC (rev 60248)
@@ -0,0 +1,20 @@
+--- mddisplay.c.orig	2003-08-04 07:48:13.000000000 -0700
++++ mddisplay.c	2009-09-30 11:36:01.000000000 -0700
+@@ -3598,7 +3598,7 @@
+ 
+    // Write the movie and view structs, which contain transformation matrices,
+    // as well as other info such as scaling
+-   printf("   Writing session file %s (%d bytes).\n", sesFileName,sizeof(movie) + sizeof (view));
++   printf("   Writing session file %s (%ld bytes).\n", sesFileName,sizeof(movie) + sizeof (view));
+    f = fopen_or_exit_if_error(sesFileName,"wb");
+    fwrite_or_exit_if_error(&movie,sizeof (movie),1,f);
+    fwrite_or_exit_if_error(&view,sizeof (view),1,f);
+@@ -5225,7 +5225,7 @@
+       sizeof(atomattrib) *
+             fread(&attribs[nat+nres+1],sizeof(atomattrib),1,f);
+ 
+-   printf("%d attribute bytes read (%d attribute records).\n",
++   printf("%d attribute bytes read (%ld attribute records).\n",
+       attribytesread,attribytesread/sizeof(atomattrib));
+ 
+    /* CHECK FOR BOX COORDS */

Added: trunk/dports/science/mddisplay/files/patch-preproc.c.diff
===================================================================
--- trunk/dports/science/mddisplay/files/patch-preproc.c.diff	                        (rev 0)
+++ trunk/dports/science/mddisplay/files/patch-preproc.c.diff	2009-11-07 09:06:24 UTC (rev 60248)
@@ -0,0 +1,128 @@
+--- preproc.c.orig	2003-08-04 08:48:01.000000000 -0700
++++ preproc.c	2009-09-30 11:42:07.000000000 -0700
+@@ -3205,7 +3205,7 @@
+       goto bin;
+ 
+    nline++;
+-   if (sscanf(line,"%5d",&ntun)!=1)
++   if (sscanf(line,"%5ld",&ntun)!=1)
+       goto bin;
+ 
+    if (ntun<1 || ntun>3)  goto bin;
+@@ -3219,7 +3219,7 @@
+       goto bin;
+ 
+    nline++;
+-   if (sscanf(line,"%5d",&nratt)!=1) /* # of atom types */
++   if (sscanf(line,"%5ld",&nratt)!=1) /* # of atom types */
+ 
+       goto bin;
+ 
+@@ -3269,7 +3269,7 @@
+    if (fgets(line,120,filep)==NULL)
+       goto err1;
+ 
+-   if (sscanf(line,"%5d",&nraa2)!=1) /* Number of residues */
++   if (sscanf(line,"%5ld",&nraa2)!=1) /* Number of residues */
+ 
+       goto err1;
+ 
+@@ -3293,7 +3293,7 @@
+ 
+    if (fgets(line,120,filep)==NULL)
+       goto err1;
+-   if (sscanf(line,"%5d",&nrp)!=1)
++   if (sscanf(line,"%5ld",&nrp)!=1)
+       goto err1;
+ 
+    if (nrp<1 || nrp>MAXATM)
+@@ -3347,7 +3347,7 @@
+    /* Skip over the nbty - BUG: Comment what is nbty??? */
+ 
+ 
+-   if (sscanf(line,"%5d",&nbty)!=1)
++   if (sscanf(line,"%5ld",&nbty)!=1)
+       goto err1;
+ 
+    n = (nbty+3)/4;
+@@ -3365,7 +3365,7 @@
+       goto err1;
+    /* Read about bonds involving hydrogen */
+ 
+-   if (sscanf(line,"%5d",&nbonh)!=1)
++   if (sscanf(line,"%5ld",&nbonh)!=1)
+       goto err1;
+ 
+    for (k=0;k<nbonh;k++)
+@@ -3375,7 +3375,7 @@
+       if (fgets(line,120,filep)==NULL)
+          goto err1;
+ 
+-      if (sscanf(line,"%5d%5d",&ibond[k][0],&ibond[k][1])!=2)
++      if (sscanf(line,"%5ld%5ld",&ibond[k][0],&ibond[k][1])!=2)
+          goto err1;
+       }
+ 
+@@ -3390,7 +3390,7 @@
+ 
+    /* seem to throw around bonds involving H */
+ 
+-   if (sscanf(line,"%5d",&nbond)!=1)
++   if (sscanf(line,"%5ld",&nbond)!=1)
+       goto err1;
+ 
+    {
+@@ -3405,7 +3405,7 @@
+       if (fgets(line,120,filep)==NULL)
+          goto err1;
+ 
+-      if (sscanf(line,"%5d%5d",&ibond[k][0],&ibond[k][1])!=2)
++      if (sscanf(line,"%5ld%5ld",&ibond[k][0],&ibond[k][1])!=2)
+          goto err1;
+       }
+ 
+@@ -3425,7 +3425,7 @@
+ 
+ 
+    filep = fopen_or_exit_if_error("bond.dat","w");
+-   fprintf(filep,"%5d %5d\n",nbonh,nbond);
++   fprintf(filep,"%5ld %5ld\n",nbonh,nbond);
+    for (k=0;k<nbonh+nbond+1;k++)
+       fprintf(filep,"%5d %5d %5d\n",ib[k][0],ib[k][1],ib[k][2]);
+    fclose_or_exit_if_error("bond.dat",filep);
+@@ -3536,7 +3536,7 @@
+   goto write;
+ 
+ err1:
+-  printf("\n Error reading gromos formatted molecular topology file at line %d\n\n",nline);
++  printf("\n Error reading gromos formatted molecular topology file at line %ld\n\n",nline);
+   fclose(filep);
+ 
+ 
+@@ -3914,7 +3914,7 @@
+    bufptr = getuflong(buff,&nattyp,1);
+    if (nattyp>MAXATP)
+       {
+-      printf("\nError: (# of atom types) NATTYP=%d exceeds (Max # atom types) MAXATP=%d\n",nattyp,MAXATP);
++      printf("\nError: (# of atom types) NATTYP=%ld exceeds (Max # atom types) MAXATP=%d\n",nattyp,MAXATP);
+       exit(EXIT_FAILURE);
+       }
+ 
+@@ -3966,7 +3966,7 @@
+    bufptr = getuflong(bufptr,&natmov,1);
+    if (natmov>natom)
+       {
+-      printf("NATMOV=%d > NATOM=%d??\n\n",natmov,natom);
++      printf("NATMOV=%ld > NATOM=%ld??\n\n",natmov,natom);
+       exit(EXIT_FAILURE);
+       }
+ 
+@@ -4020,7 +4020,7 @@
+    getuflong(buff,&nbond,1);
+    if (nbond>MAXBND)
+       {
+-      printf("\nError:  NBOND=%d exceeds MAXBND=%d\n\n",nbond,MAXBND);
++      printf("\nError:  NBOND=%ld exceeds MAXBND=%d\n\n",nbond,MAXBND);
+       exit(EXIT_FAILURE);
+       }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091107/4a923425/attachment.html>


More information about the macports-changes mailing list