Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2023 14:45:36 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 86a00f98f1af - main - science/drawxtl: Fix build with llvm16
Message-ID:  <202307211445.36LEjaVl025402@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=86a00f98f1afc843ad66e82e05d300d6e276e05b

commit 86a00f98f1afc843ad66e82e05d300d6e276e05b
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-21 13:39:11 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-21 14:45:28 +0000

    science/drawxtl: Fix build with llvm16
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 science/drawxtl/files/patch-Makefile | 85 ++++++++++++++++++++++++++++++++++--
 1 file 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 $@
+-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307211445.36LEjaVl025402>