Files
macports-ports/science/molmol/files/molmol-build.diff
Tim HentenaarandRenee Otten 1e81aa3723 molmol: change openmotif to motif and bump revision
* Refresh PNG patch
* Remove unneeded dependency on libXp
* Fix port linting nits
2026-05-20 17:50:10 -04:00

201 lines
5.4 KiB
Diff

--- makedef.orig 1969-12-31 16:00:00.000000000 -0800
+++ makedef 2005-05-28 09:44:47.000000000 -0700
@@ -0,0 +1,60 @@
+ TIFFDIR = @PREFIX@/lib
+ MESADIR =
+ JPEGDIR = @PREFIX@/lib
+
+ PNGDIR = @PREFIX@/lib
+ ZLIBDIR = @PREFIX@/lib
+
+# If you configured any of the above three image formats, uncomment
+# the following four lines, and delete the non-relevant parts if
+# necessary, i. e. if you did not configure all three formats.
+#
+ IMGDEF = -DTIFF_SUPPORT -DJPEG_SUPPORT -DPNG_SUPPORT
+ IMGINCL = -I$(TIFFDIR) -I$(JPEGDIR) -I$(PNGDIR) -I$(ZLIBDIR)
+ IMGLIB = $(TIFFDIR)/libtiff.dylib $(JPEGDIR)/libjpeg.dylib \
+ $(PNGDIR)/libpng.dylib $(ZLIBDIR)/libz.dylib
+
+# Some systems do not have the float versions of various math functions,
+# uncomment the following lines if this is the case
+
+ MISSFUNC = -Dsqrtf=sqrt -Dexpf=exp -Dlogf=log \
+ -Dsinf=sin -Dcosf=cos \
+ -Dfabsf=fabs -DMAXINT=INT_MAX
+
+ # -Dceilf=ceil
+
+CPP = /usr/bin/cpp
+
+MCPPFLAGS = -DMAXINT=INT_MAX -I@PREFIX@/include -I$(TOP)
+
+CC = @CC@
+
+MCFLAGS = -O -Wall
+
+RANLIB = /usr/bin/ranlib
+
+WAIT = /bin/sleep 2
+
+SHELL = /bin/sh
+
+SGDEVDIR = ogl x11 no pov rib vrml1 vrml2 ps fm
+
+SGDEVDEF = -DSG_DEV_OGL -DSG_DEV_X11 -DSG_DEV_NO -DSG_DEV_POV -DSG_DEV_RIB -DSG_DEV_VRML1 -DSG_DEV_VRML2 -DSG_DEV_PS -DSG_DEV_CPS -DSG_DEV_FM3 -DSG_DEV_FM4
+
+PUDEVDIR = motif tty
+
+PUDEVDEF = -DPU_DEV_MOTIF -DPU_DEV_TTY
+
+IODEVDIR = motx11 motogl ttyno
+
+IODEVDEF = -DIO_DEV_MOTIF_X11 -DIO_DEV_MOTIF_OGL -DIO_DEV_TTY_NO
+
+
+MOTIFDEF = -DFUNCPROTO
+
+SYSLIB = -L/usr/lib -L@PREFIX@/lib \
+ -lX11 -lXm -lGLU -lGL /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib @PREFIX@/lib/libGLw.dylib \
+ -lXmu -lXt -lXpm -lX11 -lXext -lSM -lICE -lm -lc -lmx
+
+TOOLSDIR = $(TOP)/tools
+SGDIR = $(TOP)/sg
--- molmol.orig 2003-01-20 17:44:58.000000000 -0800
+++ molmol 2005-05-28 09:44:48.000000000 -0700
@@ -1,9 +1,9 @@
-#!/bin/ksh
+#!/bin/zsh -f
#
# startup script for MOLMOL
#
-MOLMOLHOME=/opt/group/MOLMOL
+MOLMOLHOME=@PREFIX@/share/molmol;MOLMOLDEV="Motif/OpenGL"
export MOLMOLHOME
export MOLMOLDEV
@@ -11,55 +11,8 @@
osrel=`uname -r`
osmaj=`echo $osrel | awk -F. '{print $1}'`
osmin=`echo $osrel | awk -F. '{print $2}'`
-localdev=
-glxdev=
-
-if [ $ostype = "IRIX" -o $ostype = "IRIX64" ]; then
- if [ $osmaj -eq 6 -a $osmin -ge 2 -o $osmaj -gt 6 ]; then
- arch=sgi6
- localdev=Motif/OpenGL
- glxdev=Motif/OpenGL
- elif [ $osmaj -eq 5 -a $osmin -ge 3 -o $osmaj -gt 5 ]; then
- arch=sgi5
- localdev=Motif/OpenGL
- glxdev=Motif/OpenGL
- else
- arch=sgi4
- localdev=Motif/GL
- fi
- MONITOR=72HZ; export MONITOR
-elif [ $ostype = "AIX" ]; then
- arch=aix
- localdev=Motif/OpenGL
-elif [ $ostype = "HP-UX" ]; then
- arch=hp
- localdev=Motif/OpenGL
- glxdev=Motif/OpenGL
-elif [ $ostype = "OSF1" ]; then
- arch=dec
- localdev=Motif/OpenGL
-elif [ $ostype = "Linux" ]; then
- arch=lnx
- localdev=Motif/OpenGL
-elif [ $ostype = "SunOS" ]; then
- if [ $osmaj -eq 5 -a $osmin -ge 4 -o $osmaj -gt 5 ]; then
- arch=sol
- localdev=Motif/OpenGL
- else
- arch=sun
- fi
-else
- arch=unknown
-fi
-
-if [ $ostype = "SunOS" ]; then
- xdpy=/usr/openwin/bin/xdpyinfo
-elif [ $ostype = "HP-UX" ]; then
- xdpy=/usr/contrib/bin/X11/xdpyinfo
-else
- xdpy=/usr/bin/X11/xdpyinfo
-fi
-
+localdev=Motif/OpenGL
+glxdev=Motif/OpenGL
printUsage () {
echo "Usage: molmol -ht2as [-o dev] [-r range] [-f macro] files"
echo ""
@@ -209,7 +162,7 @@
fi
if [ "$input" = "-" -o -n "$nograph" ]; then
- $MOLMOLHOME/molmol.$arch $xopt
+ echo "LineBond solid 1 " >>| $startmacro ; @PREFIX@/share/molmol/src/main/molmol $xopt
else
- $MOLMOLHOME/molmol.$arch $xopt < /dev/null
+ echo "LineBond solid 1 " >>| $startmacro ; @PREFIX@/share/molmol/src/main/molmol $xopt
fi
--- src/iodev/IODev.c.orig 2001-05-27 14:03:30.000000000 -0700
+++ src/iodev/IODev.c 2005-05-28 11:03:09.000000000 -0700
@@ -44,7 +44,6 @@
#endif
#ifdef IO_DEV_MOTIF_OGL
extern void IOMotifOGLSetDev(void);
-extern void IOMotifOGLDSetDev(void);
#endif
#ifdef IO_DEV_MOTIF_XGL
extern void IOMotifXGLSetDev(void);
@@ -76,7 +75,6 @@
#endif
#ifdef IO_DEV_MOTIF_OGL
{"Motif/OpenGL", IOMotifOGLSetDev},
- {"Motif/OpenGLD", IOMotifOGLDSetDev},
#endif
#ifdef IO_DEV_MOTIF_XGL
{"Motif/XGL", IOMotifXGLSetDev},
--- src/motogl/MotOGL.c.orig 2000-05-29 09:31:51.000000000 -0700
+++ src/motogl/MotOGL.c 2005-05-28 09:44:50.000000000 -0700
@@ -31,7 +31,7 @@
#include <Xm/XmStrDefs.h>
#define BOOL MOTIF_BOOL /* hack to avoid naming conflict */
-#include <X11/GLw/GLwMDrawA.h>
+#include <GL/GLwMDrawA.h>
#undef BOOL
#include <sg.h>
--- src/os/GFile.c.orig 2001-06-17 11:59:17.000000000 -0700
+++ src/os/GFile.c 2005-05-28 11:04:20.000000000 -0700
@@ -38,7 +38,6 @@
const INT32 GFMagic = 0x3b7a12f9;
#ifndef __linux__
-extern char *sys_errlist[];
#endif
extern int errno;
--- tools/include/values.h.orig 1969-12-31 16:00:00.000000000 -0800
+++ tools/include/values.h 2005-05-28 09:44:52.000000000 -0700
@@ -0,0 +1,2 @@
+#include <math.h>
+#include <limits.h>
--- src/data/DataDist.c.org 2009-08-29 14:34:52.000000000 -0400
+++ src/data/DataDist.c 2009-08-29 14:36:50.000000000 -0400
@@ -89,7 +89,7 @@
{
TabEntryInter *entryP = p;
- return ((unsigned) entryP->atom1P + (unsigned) entryP->atom2P) % size;
+ return ((unsigned)(uintptr_t) entryP->atom1P + (unsigned)(uintptr_t) entryP->atom2P) % size;
}
static int