Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
starfighter: Use MacPorts CXXFLAGS
This uses our optimization flags and the right C++ standard library.
  • Loading branch information
ryandesign committed Jun 1, 2018
1 parent 62a9a58 commit 72df4a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions games/starfighter/Portfile
Expand Up @@ -5,7 +5,7 @@ PortGroup app 1.0

name starfighter
version 1.1-1
revision 2
revision 3
categories games
platforms darwin
maintainers nomaintainer
Expand Down Expand Up @@ -41,7 +41,7 @@ use_configure no
variant universal {}

build.args PREFIX=${prefix} \
CXX="${configure.cxx} [get_canonical_archflags]"
CXX="${configure.cxx} ${configure.cxxflags} [get_canonical_archflags]"

destroot.destdir PREFIX=${destroot}${prefix}

Expand Down
13 changes: 10 additions & 3 deletions games/starfighter/files/patch-makefile.diff
@@ -1,12 +1,12 @@
--- makefile Mon Aug 18 14:48:23 2003
+++ makefile.new Wed Feb 11 00:24:18 2004
--- makefile.orig 2003-08-18 07:48:23.000000000 -0500
+++ makefile 2018-06-01 00:42:40.000000000 -0500
@@ -1,4 +1,4 @@
-CFLAGS = `sdl-config --cflags` -Wall -DLINUX
+CFLAGS = `sdl-config --cflags` -I$(PREFIX)/include -Wall -DLINUX
LIBS = `sdl-config --libs` -lSDL_mixer -lSDL_image
OBJS = ai.o aliens.o audio.o bullets.o cargo.o collectable.o comms.o debris.o events.o explosions.o game.o globals.o graphics.o init.o intermission.o loadSave.o messages.o misc.o missions.o player.o resources.o script.o shop.o Starfighter.o title.o unpack.o weapons.o

@@ -7,9 +7,9 @@
@@ -7,15 +7,15 @@
PACK = starfighter.pak
DOCS = docs/*

Expand All @@ -19,6 +19,13 @@
# top-level rule to create the program.
all: $(PROG)

# compiling other source files.
%.o: code/%.cpp code/%.h code/structs.h code/defs.h code/classes.h
- $(CXX) $(CFLAGS) -c -O3 -DVERSION=\"$(VERSION)\" -DPACKLOCATION=\"$(DATADIR)$(PACK)\" $<
+ $(CXX) $(CFLAGS) -c -DVERSION=\"$(VERSION)\" -DPACKLOCATION=\"$(DATADIR)$(PACK)\" $<

# linking the program.
$(PROG): $(OBJS)
@@ -30,8 +30,8 @@

# install
Expand Down

0 comments on commit 72df4a9

Please sign in to comment.