aboutsummaryrefslogtreecommitdiff
path: root/games/wizznic/files
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2019-12-12 14:44:17 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2019-12-12 14:44:17 +0000
commit59c0a126127659e0ea0538489240a72316023b96 (patch)
tree87ffe8b35905c8d972f3f5f9d45cf0734811fab4 /games/wizznic/files
parentbd26fd710b1048531dec2dcc83893d7d926f2bf1 (diff)
downloadports-59c0a126127659e0ea0538489240a72316023b96.tar.gz
ports-59c0a126127659e0ea0538489240a72316023b96.zip
Notes
Diffstat (limited to 'games/wizznic/files')
-rw-r--r--games/wizznic/files/patch-Makefile49
-rw-r--r--games/wizznic/files/patch-Makefile.linux51
-rw-r--r--games/wizznic/files/patch-src_bundle.c20
3 files changed, 71 insertions, 49 deletions
diff --git a/games/wizznic/files/patch-Makefile b/games/wizznic/files/patch-Makefile
deleted file mode 100644
index f1b57c84b710..000000000000
--- a/games/wizznic/files/patch-Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
---- Makefile.orig 2011-12-29 23:12:52.000000000 +0100
-+++ Makefile 2013-09-28 11:45:51.000000000 +0200
-@@ -2,7 +2,7 @@
- #To make a system-wide install add DATADIR=/dir/to/data/ and BINDIR=/dir/to/bin/ to the make command
- #To compile with OpenGL scaling support, add WITH_OPENGL=true to the make command.
-
--CC = gcc
-+CC ?= gcc
- LD = $(CC)
- STRIP = strip
-
-@@ -16,9 +16,9 @@
-
- DEFS = $(PUF) -DDATADIR="\"$(DATADIR)\""
-
--INCS = -I. -I/usr/include -I/usr/include/SDL
-+CPPFLAGS+= -I/usr/local/include
-+LDFLAGS+= -L/usr/local/lib
-
--LDFLAGS=$(CFLAGS)
- LIBS = -lSDL -lSDL_image -lSDL_mixer -lpng -lm -lz -lpthread
-
- #Are we compiling with gl?
-@@ -32,7 +32,7 @@
- levelselector.o leveleditor.o particle.o pack.o settings.o stats.o strings.o\
- mbrowse.o teleport.o credits.o waveimg.o userfiles.o
-
--MYCC = $(CC) $(CFLAGS) $(INCS) $(DEFS)
-+MYCC = $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS)
-
- ########################################################################
-
-@@ -46,12 +46,12 @@
- $(MYCC) -c $< -o $@
-
- install:
-- install -d -D -m 755 "$(DESTDIR)$(BINDIR)"
-- install -D -m 755 "$(TARGET)" "$(DESTDIR)$(BINDIR)"
-- install -d -D -m 755 "$(DESTDIR)$(DATADIR)"
-+ install -d -m 755 "$(DESTDIR)$(BINDIR)"
-+ install -m 755 "$(TARGET)" "$(DESTDIR)$(BINDIR)"
-+ install -d -m 755 "$(DESTDIR)$(DATADIR)"
- cp -R data "$(DESTDIR)$(DATADIR)"
- cp -R packs "$(DESTDIR)$(DATADIR)"
-- chmod -R 755 "$(DESTIR)$(DATADIR)"
-+# chmod -R 755 "$(DESTIR)$(DATADIR)"
-
- clean:
- rm -f *.o $(NAME)
diff --git a/games/wizznic/files/patch-Makefile.linux b/games/wizznic/files/patch-Makefile.linux
new file mode 100644
index 000000000000..2287eda02092
--- /dev/null
+++ b/games/wizznic/files/patch-Makefile.linux
@@ -0,0 +1,51 @@
+--- Makefile.linux.orig 2016-02-16 19:47:56 UTC
++++ Makefile.linux
+@@ -2,7 +2,7 @@
+ #To make a system-wide install add DATADIR=/dir/to/data/ and BINDIR=/dir/to/bin/ to the make command
+ #To compile without OpenGL scaling support, add WITH_OPENGL=false to the make command.
+
+-CC = gcc
++CC ?= gcc
+ LD = $(CC)
+ STRIP = strip
+ MAKE = make
+@@ -19,7 +19,7 @@ DEFS = -DDATADIR="\"$(DATADIR)\"" -D_DEFAULT_SOURCE -D
+ #default to /usr/share/man for man page
+ #note: some systems use /usr/local/share/man, others use /usr/local/man
+ #packagers should set the variable accordingly
+-MANDIR = /usr/share/man/
++MANDIR = ${PREFIX}/man/
+
+ #Add the PER_USER_FILES define if the DATADIR is set
+ ifneq ($(DATADIR),)
+@@ -32,17 +32,10 @@ ifneq ($(BUILD_NUMBER),)
+ DEFS +=-DBUILD_NUMBER="\"$(BUILD_NUMBER)\""
+ endif
+
+-INCS = -I. -I/usr/include -I/usr/include/SDL
+-CFLAGS= -Wall -Wextra -Werror -std=c99
+-ifeq ($(DEBUG),)
+- CFLAGS += -O3
+-else
+- CFLAGS += -g
+- DEFS +=-DDEBUG
+-endif
++INCS = `sdl-config --cflags`
++CFLAGS+= -Wall -Wextra -std=c99
+
+-LDFLAGS=$(CFLAGS)
+-LIBS = -lSDL -lSDL_image -lSDL_mixer -lm -lpthread
++LIBS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lm -lpthread
+
+ #Are we compiling with gl?
+ ifneq ($(WITH_OPENGL),false)
+@@ -62,9 +55,6 @@ all: $(TARGET)
+
+ $(TARGET): $(OBJS)
+ $(LD) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
+-ifeq ($(DEBUG),)
+- $(STRIP) $@
+-endif
+
+ tools: mkbundle
+
diff --git a/games/wizznic/files/patch-src_bundle.c b/games/wizznic/files/patch-src_bundle.c
new file mode 100644
index 000000000000..c013eed35084
--- /dev/null
+++ b/games/wizznic/files/patch-src_bundle.c
@@ -0,0 +1,20 @@
+--- src/bundle.c.orig 2016-02-16 19:47:58 UTC
++++ src/bundle.c
+@@ -104,7 +104,7 @@ int dirScan( const char* dir,int type, list_t* list )
+ sprintf(buf, "%s/%s",dir,pent->d_name);
+ if(stat(buf, &st)==0)
+ {
+- if( (st.st_mode&S_IFDIR)==S_IFDIR )
++ if( (st.st_mode&S_IFMT)==S_IFDIR )
+ {
+ if( type==TYPE_DIR)
+ {
+@@ -120,7 +120,7 @@ int dirScan( const char* dir,int type, list_t* list )
+ {
+ return(0);
+ }
+- } else if( (st.st_mode&&S_IFREG))
++ } else if( (st.st_mode&S_IFMT)==S_IFREG)
+ {
+ if( type== TYPE_FILE )
+ {