From 1e81aa37238bf7d39045677d4f850fecfb126a54 Mon Sep 17 00:00:00 2001 From: Tim Hentenaar Date: Tue, 28 Apr 2026 11:58:07 -0400 Subject: [PATCH] molmol: change openmotif to motif and bump revision * Refresh PNG patch * Remove unneeded dependency on libXp * Fix port linting nits --- science/molmol/Portfile | 5 ++--- science/molmol/files/molmol-build.diff | 24 ++++++++++++------------ science/molmol/files/molmol-png.diff | 20 ++++++++++++-------- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/science/molmol/Portfile b/science/molmol/Portfile index a4a9bf404d0..b4b463b4de9 100644 --- a/science/molmol/Portfile +++ b/science/molmol/Portfile @@ -5,7 +5,7 @@ PortGroup compilers 1.0 name molmol version 2k.2.0 -revision 13 +revision 14 categories science chemistry maintainers {gmail.com:howarth.at.macports @jwhowarth} openmaintainer description Molecular graphics display program @@ -16,7 +16,6 @@ long_description MOLMOL is a molecular graphics program for displaying, analy and Windows NT/95/98/2000 and is freely available. It does not work \ properly with RNA. homepage http://www.mol.biol.ethz.ch/wuthrich/software/molmol/ -platforms darwin license Restrictive/Distributable master_sites ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip distfiles molmol-${version}-src.tar.gz \ @@ -29,7 +28,7 @@ checksums molmol-2k.2.0-src.tar.gz \ rmd160 08b3e21ab6eb7c9044e59373334181ff91ca8a53 \ sha256 07e1c3fd04ffe7c9e9d91eaefa0bf72e6d0913a981eec3bf0879bfc65537a6be \ size 1062297 -depends_lib port:openmotif \ +depends_lib port:motif \ port:mesa \ port:libGLU \ port:glw \ diff --git a/science/molmol/files/molmol-build.diff b/science/molmol/files/molmol-build.diff index 0c8f5245124..6d4610aca40 100644 --- a/science/molmol/files/molmol-build.diff +++ b/science/molmol/files/molmol-build.diff @@ -2,7 +2,7 @@ +++ makedef 2005-05-28 09:44:47.000000000 -0700 @@ -0,0 +1,60 @@ + TIFFDIR = @PREFIX@/lib -+ MESADIR = ++ MESADIR = + JPEGDIR = @PREFIX@/lib + + PNGDIR = @PREFIX@/lib @@ -23,7 +23,7 @@ + MISSFUNC = -Dsqrtf=sqrt -Dexpf=exp -Dlogf=log \ + -Dsinf=sin -Dcosf=cos \ + -Dfabsf=fabs -DMAXINT=INT_MAX -+ ++ + # -Dceilf=ceil + +CPP = /usr/bin/cpp @@ -57,7 +57,7 @@ + +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 -lXp -lXpm -lX11 -lXext -lSM -lICE -lm -lc -lmx ++ -lXmu -lXt -lXpm -lX11 -lXext -lSM -lICE -lm -lc -lmx + +TOOLSDIR = $(TOP)/tools +SGDIR = $(TOP)/sg @@ -69,12 +69,12 @@ # # 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}'` @@ -135,7 +135,7 @@ 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 @@ -165,23 +165,23 @@ +++ src/motogl/MotOGL.c 2005-05-28 09:44:50.000000000 -0700 @@ -31,7 +31,7 @@ #include - + #define BOOL MOTIF_BOOL /* hack to avoid naming conflict */ -#include +#include #undef BOOL - + #include --- 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 @@ @@ -192,9 +192,9 @@ @@ -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 diff --git a/science/molmol/files/molmol-png.diff b/science/molmol/files/molmol-png.diff index ea6df0b6a5d..0c228a54ff9 100644 --- a/science/molmol/files/molmol-png.diff +++ b/science/molmol/files/molmol-png.diff @@ -1,27 +1,31 @@ ---- src/motogl/MotOGLDump.c.orig 2012-05-10 19:56:16.000000000 -0400 -+++ src/motogl/MotOGLDump.c 2012-05-10 20:03:37.000000000 -0400 -@@ -248,7 +248,7 @@ - pngErrHand(png_structp pngStrucP, char *errMsg) +--- src/motogl/MotOGLDump.c 2001-07-07 21:21:34.000000000 -0400 ++++ src/motogl/MotOGLDump.c 2026-04-30 16:54:06.000000000 -0400 +@@ -245,10 +245,10 @@ + + #ifdef PNG_SUPPORT + static void +-pngErrHand(png_structp pngStrucP, char *errMsg) ++pngErrHand(png_structp pngStrucP, const char *errMsg) { IORaiseError(errMsg); - longjmp(pngStrucP->jmpbuf, 1); + longjmp(png_jmpbuf(pngStrucP), 1); } #endif - + @@ -357,7 +357,7 @@ return IO_RES_ERR; } - + - if (setjmp(pngStrucP->jmpbuf)) { + if (setjmp(png_jmpbuf(pngStrucP))) { if (cBuf != NULL) free(cBuf); if (fBuf != NULL) @@ -368,10 +368,7 @@ - + png_init_io(pngStrucP, ImgFileP); - + - pngInfoP->width = imgW; - pngInfoP->height = imgH; - pngInfoP->bit_depth = 8;