summaryrefslogtreecommitdiff
path: root/games-roguelike/wrogue/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
commit90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch)
tree83fc5facb6b12be510a37bc3d241cc63e965b13a /games-roguelike/wrogue/files
parentfeb0daf81d888e9160f9f94502de09b66f2a63fd (diff)
gentoo resync : 29.06.2020
Diffstat (limited to 'games-roguelike/wrogue/files')
-rw-r--r--games-roguelike/wrogue/files/wrogue-0.8.0b-fix-build-system.patch47
-rw-r--r--games-roguelike/wrogue/files/wrogue-0.8.0b-ldflags.patch29
-rw-r--r--games-roguelike/wrogue/files/wrogue-0.8.0b-string-allocation.patch20
3 files changed, 67 insertions, 29 deletions
diff --git a/games-roguelike/wrogue/files/wrogue-0.8.0b-fix-build-system.patch b/games-roguelike/wrogue/files/wrogue-0.8.0b-fix-build-system.patch
new file mode 100644
index 000000000000..b17ea5c196be
--- /dev/null
+++ b/games-roguelike/wrogue/files/wrogue-0.8.0b-fix-build-system.patch
@@ -0,0 +1,47 @@
+--- a/src/linux.mak
++++ b/src/linux.mak
+@@ -18,8 +18,9 @@
+ #
+ # common compiler/linker flags
+ #
+-CFLAGS=-I./include -I./lib -std=c89 `sdl-config --cflags`
+-LDFLAGS=-lm `sdl-config --libs`
++CFLAGS+=-std=gnu99
++CPPFLAGS+=-Iinclude -Ilib -Iui -Igenerate `sdl-config --cflags`
++LDLIBS+=-lm `sdl-config --libs`
+
+
+ SRC=\
+@@ -30,7 +31,6 @@
+ OBJ=$(SRC:.c=.o)
+ EXE=./wrogue
+
+-CC=gcc
+ RM=rm -f
+
+
+@@ -39,9 +39,7 @@
+ # target: release
+ #
+ .PHONY: release
+-release: CFLAGS += -pipe -O2 -fomit-frame-pointer -march=i686
+-release: LDFLAGS += -Wl,-O1
+-release: STRIP_BINARY = yes
++release: STRIP_BINARY = no
+ release: build
+
+
+@@ -89,12 +87,8 @@
+
+
+
+-%.o: %.c
+- @echo Building $<
+- @$(CC) $(CFLAGS) -o $@ -c $<
+-
+ $(EXE): $(OBJ)
+- @$(CC) $(OBJ) $(LDFLAGS) -o $@
++ $(CC) $(LDFLAGS) $(OBJ) -o $@ $(LDLIBS)
+
+
+
diff --git a/games-roguelike/wrogue/files/wrogue-0.8.0b-ldflags.patch b/games-roguelike/wrogue/files/wrogue-0.8.0b-ldflags.patch
deleted file mode 100644
index d3ec216b4c13..000000000000
--- a/games-roguelike/wrogue/files/wrogue-0.8.0b-ldflags.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/src/linux.mak 2010-10-14 11:07:22.000000000 +0200
-+++ b/src/linux.mak 2010-10-14 11:08:00.000000000 +0200
-@@ -19,7 +19,7 @@
- # common compiler/linker flags
- #
- CFLAGS=-I./include -I./lib -std=c89 `sdl-config --cflags`
--LDFLAGS=-lm `sdl-config --libs`
-+LDLIBS=-lm `sdl-config --libs`
-
-
- SRC=\
-@@ -40,7 +40,7 @@
- #
- .PHONY: release
- release: CFLAGS += -pipe -O2 -fomit-frame-pointer -march=i686
--release: LDFLAGS += -Wl,-O1
-+release: LDLIBS += -Wl,-O1
- release: STRIP_BINARY = yes
- release: build
-
-@@ -94,7 +94,7 @@
- @$(CC) $(CFLAGS) -o $@ -c $<
-
- $(EXE): $(OBJ)
-- @$(CC) $(OBJ) $(LDFLAGS) -o $@
-+ $(CC) $(LDFLAGS) $(OBJ) $(LDLIBS) -o $@
-
-
-
diff --git a/games-roguelike/wrogue/files/wrogue-0.8.0b-string-allocation.patch b/games-roguelike/wrogue/files/wrogue-0.8.0b-string-allocation.patch
new file mode 100644
index 000000000000..66afe8ea1d7b
--- /dev/null
+++ b/games-roguelike/wrogue/files/wrogue-0.8.0b-string-allocation.patch
@@ -0,0 +1,20 @@
+--- a/src/lib/appdir.c
++++ b/src/lib/appdir.c
+@@ -149,7 +149,7 @@
+ CreateDirectory(UserData, NULL);
+
+ /* Determine app data directory */
+- AppData[0] = '.'; AppData[1] = ADIR_DELIMITER; AppData[2] = '\0';
++ strcpy(AppData, "/usr/share/wrogue/");
+
+ /* Initialize internal data */
+ Handle = INVALID_HANDLE_VALUE;
+@@ -558,7 +558,7 @@
+ }
+
+ /* Determine app data directory */
+- AppData[0] = '.'; AppData[1] = ADIR_DELIMITER; AppData[2] = '\0';
++ strcpy(AppData, "/usr/share/wrogue/");
+
+ /* Initialize internal data */
+ DirectoryStreamValid = ADIR_FALSE;