diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2022-07-15 16:31:26 -0700 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2022-07-15 16:34:09 -0700 |
commit | 328d02d88e00267338e1a266aafb94f27827f4b3 (patch) | |
tree | cda9e89e915caca992ac93597da83211a5c5a9b0 /biology/molden | |
parent | devel/wasi-compiler-rt14: add new port (diff) |
biology/molden: Unbreak build; Correct WWW
For unbreak:
- pass FFLAGS to the build
- fix several errors in C
- remove the failing 'ex' command from makefile
Reported by: fallout
Approved by: portmgr (unbreak)
Diffstat (limited to 'biology/molden')
-rw-r--r-- | biology/molden/files/patch-makefile | 41 | ||||
-rw-r--r-- | biology/molden/files/patch-src_surf_Makefile | 13 | ||||
-rw-r--r-- | biology/molden/files/patch-src_surf_utils.c | 21 | ||||
-rw-r--r-- | biology/molden/files/patch-src_xwin.c | 10 | ||||
-rw-r--r-- | biology/molden/pkg-descr | 2 |
5 files changed, 86 insertions, 1 deletions
diff --git a/biology/molden/files/patch-makefile b/biology/molden/files/patch-makefile new file mode 100644 index 000000000000..4a086a6fdd57 --- /dev/null +++ b/biology/molden/files/patch-makefile @@ -0,0 +1,41 @@ +- pass supplied FFLAGS to the build + +--- makefile.orig 2021-01-28 14:05:10 UTC ++++ makefile +@@ -107,7 +107,7 @@ ifneq ($(comgcc), $(empty)) + EXTRAZ = -Wno-implicit-function-declaration + EXT = ${EXTRAZ} + endif +-FFLAGS = -g ${AFLAG} ++FFLAGS += -g ${AFLAG} + LIBS = -L/usr/X11R6/lib -lX11 -lm + ifeq ($(AFLAG),"-m64") + LIBS = -L/usr/X11R6/lib64 -lX11 -lm +@@ -132,11 +132,11 @@ ifeq ($(uname), Darwin) + # + CC=cc + CFLAGS= -std=gnu89 -Wno-return-type -DDARWIN -I/usr/X11R6/include -DDOBACK -DHASTIMER -DCOLOR_OFFSET=0.0 -Wno-logical-op-parentheses +-FFLAGS=-O3 -funroll-loops ++FFLAGS+=-O3 -funroll-loops + LIBS = -L/usr/X11R6/lib -lX11 -lm + LIBSG = -L/usr/X11R6/lib -lGLU "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" -lGL -lXmu -lX11 -lm + EXT= -std=gnu89 -Wno-return-type -DDARWIN ${EXTRAZ} +-FFLAGS=-O3 -funroll-loops ++FFLAGS+=-O3 -funroll-loops + LIBS = -L/usr/X11R6/lib -lX11 -lm + LIBSG = -L/usr/X11R6/lib -lGLU "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" -lGL -lXmu -lX11 -lm + CFLAGS= -g -std=gnu89 -Wno-return-type -DDARWIN -I/usr/X11R6/include -DDOBACK -DHASTIMER -DCOLOR_OFFSET=0.0 -Wno-logical-op-parentheses -Wno-implicit-function-declaration -Wno-tautological-pointer-compare -Wno-tautological-constant-out-of-range-compare +@@ -306,11 +306,11 @@ gmolden: $(OBJS) src/mpdum.o src/xwingl.o + mv gmolden bin/gmolden + + ambfor/ambfor: src/ambfor/*.f src/ambfor/*.c +- $(MAKE) -C src/ambfor FC=${FC} LDR="${LDR}" EXT="${EXT}" ++ $(MAKE) -C src/ambfor FC=${FC} LDR="${LDR}" EXT="${EXT}" FFLAGS="$(FFLAGS)" + mv src/ambfor/ambfor bin/ambfor + + ambfor/ambmd: src/ambfor/*.f src/ambfor/*.c +- $(MAKE) -C src/ambfor ambmd FC=${FC} LDR="${LDR}" EXT="${EXT}" ++ $(MAKE) -C src/ambfor ambmd FC=${FC} LDR="${LDR}" EXT="${EXT}" FFLAGS="$(FFLAGS)" FFLAGS="$(FFLAGS)" + mv src/ambfor/ambmd bin/ambmd + + surf/surf: src/surf/*.h src/surf/*.c diff --git a/biology/molden/files/patch-src_surf_Makefile b/biology/molden/files/patch-src_surf_Makefile new file mode 100644 index 000000000000..ca1673d9c3cf --- /dev/null +++ b/biology/molden/files/patch-src_surf_Makefile @@ -0,0 +1,13 @@ +- disable ex: it breaks the build, not sure why is it there + +--- src/surf/Makefile.orig 2022-07-15 23:19:54 UTC ++++ src/surf/Makefile +@@ -58,7 +58,7 @@ depend: $(DEPEND) + @ echo '$$r makedep' >>eddep + @ echo 'w' >>eddep + @ cp Makefile Makefile.bak +- @ ex - Makefile < eddep ++ #@ ex - Makefile < eddep + @ rm eddep makedep + @ echo ' ' >> Makefile + @ echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile diff --git a/biology/molden/files/patch-src_surf_utils.c b/biology/molden/files/patch-src_surf_utils.c new file mode 100644 index 000000000000..bc05318375f8 --- /dev/null +++ b/biology/molden/files/patch-src_surf_utils.c @@ -0,0 +1,21 @@ +- fix return statements in the function the returns int + +--- src/surf/utils.c.orig 2022-07-15 23:20:39 UTC ++++ src/surf/utils.c +@@ -91,7 +91,7 @@ float radius; + disc = radius*radius - DOTPROD3(EO, EO); + if (FP_EQ_EPS(disc, 0, GP_EPS*GP_EPS)) + { VEC3_ASN_OP(int_point, =, ray_pt); +- return; ++ return -1; + } + + one_by_sq_dir_mag = 1.0/DOTPROD3(ray_dir, ray_dir); +@@ -107,6 +107,7 @@ float radius; + { t = v*one_by_sq_dir_mag - sqrt(disc*one_by_sq_dir_mag); + VEC3_V_OP_V_OP_S(int_point, ray_pt, +, ray_dir, *, t); + } ++ return -1; + } + + /*---------------------------------------------------------------------------------- diff --git a/biology/molden/files/patch-src_xwin.c b/biology/molden/files/patch-src_xwin.c new file mode 100644 index 000000000000..b16dab11bff8 --- /dev/null +++ b/biology/molden/files/patch-src_xwin.c @@ -0,0 +1,10 @@ +- disable GLIBC symbols specific to linux + +--- src/xwin.c.orig 2022-07-15 23:09:11 UTC ++++ src/xwin.c +@@ -1,4 +1,4 @@ +-#ifndef DARWIN ++#if !defined(DARWIN) && !defined(__FreeBSD__) + __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); + __asm__(".symver memmove,memmove@GLIBC_2.2.5"); + __asm__(".symver log,log@GLIBC_2.2.5"); diff --git a/biology/molden/pkg-descr b/biology/molden/pkg-descr index 45612201a3c7..2b20fa8c9f98 100644 --- a/biology/molden/pkg-descr +++ b/biology/molden/pkg-descr @@ -21,4 +21,4 @@ optimisation jobs. Molden has a powerful Z-matrix editor which give full control over the geometry and allows you to build molecules from scratch, including polypeptides. -WWW: http://cheminf.cmbi.ru.nl/molden/ +WWW: https://www.theochem.ru.nl/molden/ |