svn commit: r494293 - in head/games/linwarrior: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Fri Mar 1 13:06:11 UTC 2019
Author: amdmi3
Date: Fri Mar 1 13:06:09 2019
New Revision: 494293
URL: https://svnweb.freebsd.org/changeset/ports/494293
Log:
- Switch to more correct way of avoiding C++11 related build errors
- Make upstream build system properly respect CXX/CXXFLAGS
- Add missing USES
Modified:
head/games/linwarrior/Makefile
head/games/linwarrior/files/patch-Makefile
Modified: head/games/linwarrior/Makefile
==============================================================================
--- head/games/linwarrior/Makefile Fri Mar 1 13:06:06 2019 (r494292)
+++ head/games/linwarrior/Makefile Fri Mar 1 13:06:09 2019 (r494293)
@@ -12,13 +12,11 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= amdmi3 at FreeBSD.org
COMMENT= Navigate a mech through a 3D world and fire at enemies
-USES= compiler gmake openal:al,alut
+USES= gl gmake openal:al,alut sdl
USE_GL= gl glu
USE_SDL= sdl
LLD_UNSAFE= yes
-
-CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}}
-CFLAGS_clang= -Wno-c++11-narrowing
+USE_CXXSTD= gnu++98
WRKSRC= ${WRKDIR}/${PORTNAME}
Modified: head/games/linwarrior/files/patch-Makefile
==============================================================================
--- head/games/linwarrior/files/patch-Makefile Fri Mar 1 13:06:06 2019 (r494292)
+++ head/games/linwarrior/files/patch-Makefile Fri Mar 1 13:06:09 2019 (r494293)
@@ -9,7 +9,7 @@
# Automatic searching for source files.
# Objects to compile are all sources (cpp) and put the .o below build-dir.
-@@ -20,18 +20,17 @@ ifneq (,$(findstring Win,$(OS)))
+@@ -20,40 +20,38 @@ ifneq (,$(findstring Win,$(OS)))
LIMITER=$(dir \file)
CFLAGS+= -static-libgcc
else
@@ -29,12 +29,30 @@
-CFLAGS += -Wp,-M,-MP,-MT,$@,-MF,dep/$(subst /,-,$@).d
# Print warnings when compiling.
- CFLAGS += -Wall
-@@ -40,7 +39,6 @@ CFLAGS += -Wall
- CFLAGS += $(INCLUDES)
+-CFLAGS += -Wall
++CXXFLAGS += -Wall
+ # Use the given includepathes.
+-CFLAGS += $(INCLUDES)
++CXXFLAGS += $(INCLUDES)
+
# Optimizations.
-CFLAGS += -O1 -funroll-loops
# Default makefile Target.
all: $(TARGET)
+
+ # For executable we need all sources compiled to objects.
+ $(TARGET): $(OBJECTS)
+- $(CPP) -o $(TARGET) $(OBJECTS) $(LIBRARIES)
++ $(CXX) -o $(TARGET) $(OBJECTS) ${LDFLAGS} $(LIBRARIES)
+
+ # Compile all Source files, creates output directories as necessary.
+ build/%.o: %.cpp
+ $(shell $(MKDIR) build 2>/dev/null)
+ $(shell $(MKDIR) $(dir $@) 2>/dev/null)
+- $(CPP) $(CFLAGS) -c $< -o $@
++ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ # IDE may call makefile with target "build" instead of "all".
+ build: all
More information about the svn-ports-head
mailing list