aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-07-21 13:39:11 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-07-21 14:45:28 +0000
commit86a00f98f1afc843ad66e82e05d300d6e276e05b (patch)
tree18b66d99c9f8aa893e4a8507049c191513568480
parent77e6f6a8b0b23364ed22dc1e18602e6de70e5b09 (diff)
downloadports-86a00f98f1afc843ad66e82e05d300d6e276e05b.tar.gz
ports-86a00f98f1afc843ad66e82e05d300d6e276e05b.zip
science/drawxtl: Fix build with llvm16
Approved by: portmgr (blanket) Sponsored by: The FreeBSD Foundation
-rw-r--r--science/drawxtl/files/patch-Makefile85
1 files changed, 82 insertions, 3 deletions
diff --git a/science/drawxtl/files/patch-Makefile b/science/drawxtl/files/patch-Makefile
index 1cbcca22e7a8..7f5c93af116f 100644
--- a/science/drawxtl/files/patch-Makefile
+++ b/science/drawxtl/files/patch-Makefile
@@ -1,6 +1,15 @@
--- Makefile.orig 2011-03-08 18:55:26 UTC
+++ Makefile
-@@ -34,11 +34,11 @@ ifeq ($(OS),Linux)
+@@ -6,7 +6,7 @@
+
+ OPTIM = error
+ TARGET = ../../exe/DRAWxtl55
+-PREINC =
++PREINC =
+ RESFILE =
+
+ # post processing command - overwritten for Mac
+@@ -34,29 +34,29 @@ ifeq ($(OS),Linux)
prefix = /usr/local
includedir = ${prefix}/include
@@ -14,7 +23,15 @@
endif
# compiler name:
-@@ -52,11 +52,11 @@ ifeq ($(OS),Linux)
+ CXX = g++
+
+ # flags for C++ compiler:
+- OPTIM = -g -Wall -Wunused -fno-exceptions
+-# work around a bug in freeglut 2.4 - only enable this if you have to use a version
++ OPTIM = -g -Wall -Wunused -fno-exceptions --std=c++14
++# work around a bug in freeglut 2.4 - only enable this if you have to use a version
+ # of fltk before 1.1.8 AND exactly version 2.4 of freeglut
+ # GLUT = -DFREEGLUT24
CXXFLAGS = $(OPTIM) -I/usr/X11R6/include $(GLUT)
# libraries to link with:
@@ -28,7 +45,49 @@
# The extension to use for executables...
EXEEXT =
-@@ -216,7 +216,7 @@ clean:
+@@ -68,7 +68,7 @@ ifeq ($(OS),CYGWIN)
+ # section to define the various symbols needed to build DRAWxtl for cygwin running on Windows
+
+ prefix = /usr/
+- includedir =
++ includedir =
+ libdir = /fltk/lib
+
+ # compiler name:
+@@ -108,10 +108,10 @@ ifeq ($(OS),IRIX64) # use GNU g++ compil
+
+ # flags for C++ compiler:
+ OPTIM = -g -O2 -Wall -Wunused -fno-exceptions
+- CXXFLAGS = $(OPTIM)
++ CXXFLAGS = $(OPTIM)
+
+ # libraries to link with:
+- GLDLIBS = -L/usr/freeware/lib32 -lglut -L/usr/lib32/ -lGL -lGLU -lm -lXpm -lX11
++ GLDLIBS = -L/usr/freeware/lib32 -lglut -L/usr/lib32/ -lGL -lGLU -lm -lXpm -lX11
+ LINKFLTKGL = -L$(libdir) -lfltk_gl -lfltk
+
+ # The extension to use for executables...
+@@ -131,8 +131,8 @@ ifeq ($(OS),Darwin)
+
+ # flags for C++ compiler:
+ OPTIM = -g -O2 -Wall -Wunused -fno-exceptions
+- CXXFLAGS = $(OPTIM)
+-# in 10.2 I think I needed to add this to the above:
++ CXXFLAGS = $(OPTIM)
++# in 10.2 I think I needed to add this to the above:
+ # -framework AGL -framework GLUT -framework OpenGL -framework Carbon -framework ApplicationServices
+
+ # libraries to link with:
+@@ -205,7 +205,7 @@ CPPFILES =\
+
+ OBJFILES = $(CPPFILES:.cxx=.o) $(RESFILE:.rc=.o)
+
+-all: $(TARGET)
++all: $(TARGET)
+
+ clean:
+ -@ rm -f $(TARGET) *.o core *~ .deps ../../examples/*.{out,cns,pov,wrl,tmp,tga,lst,fl,bmp} \
+@@ -216,23 +216,22 @@ clean:
.deps: $(CPPFILES)
echo "Building dependencies..."
echo >.deps
@@ -37,3 +96,23 @@
-include .deps
+-# DRAWxtl
++# DRAWxtl
+
+-$(TARGET) : .deps $(OBJFILES)
++$(TARGET) : .deps $(OBJFILES)
+ echo Linking $@...
+ mkdir -p ../../exe
+ $(CXX) $(CXXFLAGS) -o $@ $(OBJFILES) \
+- $(LINKFLTKGL) $(GLDLIBS)
++ $(LINKFLTKGL) $(GLDLIBS)
+ $(POSTLINK) $@
+
+-static: .deps $(OBJFILES)
++static: .deps $(OBJFILES)
+ echo Linking $@...
+ mkdir -p ../../exe
+ $(CXX) $(CXXFLAGS) -static -o DRAWxtl.$@ $(OBJFILES) \
+ $(LINKFLTKGL) $(GLDLIBS) -lXxf86vm -ldl
+ strip $@
+-