Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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) (cherry picked from commit 328d02d)
- Loading branch information
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
/*---------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters