Index: head/games/linwarrior/Makefile =================================================================== --- head/games/linwarrior/Makefile (revision 494292) +++ head/games/linwarrior/Makefile (revision 494293) @@ -1,48 +1,46 @@ # Created by: Dmitry Marakasov # $FreeBSD$ PORTNAME= linwarrior PORTVERSION= 20100320 PORTREVISION= 5 CATEGORIES= games MASTER_SITES= http://www.hackcraft.de/games/linwarrior_3d/downloads/ \ http://mirror.amdmi3.ru/distfiles/ DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= amdmi3@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} PLIST_FILES= bin/${PORTNAME} PORTDATA= * DESKTOP_ENTRIES="LinWarrior 3D" \ "Mech Simulation Game" \ "" \ "linwarrior" \ "Game;ActionGame;Simulation;" \ false post-extract: @${FIND} ${WRKSRC} -type d -exec ${CHMOD} a+rx {} \; @${FIND} ${WRKSRC} -type f -exec ${CHMOD} a+r {} \; post-patch: @${REINPLACE_CMD} -e '/hash_set/ d' ${WRKSRC}/source/cAlert.h @${FIND} ${WRKSRC}/source -name '*.cpp' -print0 | ${XARGS} -0 \ ${REINPLACE_CMD} -e 's|data/|${DATADIR}/|' do-install: ${INSTALL_PROGRAM} ${WRKSRC}/dist/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ cd ${WRKSRC}/data && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/ .include Index: head/games/linwarrior/files/patch-Makefile =================================================================== --- head/games/linwarrior/files/patch-Makefile (revision 494292) +++ head/games/linwarrior/files/patch-Makefile (revision 494293) @@ -1,40 +1,58 @@ --- Makefile.orig 2010-02-05 19:50:30 UTC +++ Makefile @@ -2,7 +2,7 @@ # Makefile with auto-dependency generation # Add Include directories here. -INCLUDES = -I . +INCLUDES = -I . `${SDL_CONFIG} --cflags` # 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 - LIBRARIES= -lGL -lGLU -lSDL -lopenal -lalut + LIBRARIES= ${LDFLAGS} -lGL -lGLU `${SDL_CONFIG} --libs` -lopenal -lalut TARGET=dist/linwarrior MKDIR=mkdir RM=rm -f RMREC=rm -f -r CP=cp - CPP=c++ + CPP=${CXX} LIMITER=/ endif # Creation of dependency information when compiling. -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