pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

jfsw-git: update patches to make jfsw build again



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Sat Jul 22 23:10:33 2023 +0200
Changeset:	1b903064b9b1826aa992c3d33e0e8796cf1941b3

Modified Files:
	jfsw-git/distinfo
	jfsw-git/patches/patch-Makefile
	jfsw-git/patches/patch-jfbuild_Makefile.shared
Added Files:
	jfsw-git/patches/patch-jfaudiolib_src_driver__alsa.c
	jfsw-git/patches/patch-jfaudiolib_src_midi.c
	jfsw-git/patches/patch-jfbuild_Makefile
	jfsw-git/patches/patch-jfbuild_kenbuild_Makefile

Log Message:
jfsw-git: update patches to make jfsw build again

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1b903064b9b1826aa992c3d33e0e8796cf1941b3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 jfsw-git/distinfo                                  |  8 +++++--
 jfsw-git/patches/patch-Makefile                    | 28 ++++++++++++++--------
 .../patches/patch-jfaudiolib_src_driver__alsa.c    | 18 ++++++++++++++
 jfsw-git/patches/patch-jfaudiolib_src_midi.c       | 18 ++++++++++++++
 jfsw-git/patches/patch-jfbuild_Makefile            | 15 ++++++++++++
 jfsw-git/patches/patch-jfbuild_Makefile.shared     | 12 +++++-----
 jfsw-git/patches/patch-jfbuild_kenbuild_Makefile   | 15 ++++++++++++
 7 files changed, 96 insertions(+), 18 deletions(-)

diffs:
diff --git a/jfsw-git/distinfo b/jfsw-git/distinfo
index 3e131f404c..50cf05559d 100644
--- a/jfsw-git/distinfo
+++ b/jfsw-git/distinfo
@@ -1,6 +1,10 @@
 $NetBSD$
 
-SHA1 (patch-Makefile) = 3d6a5b855df58dd46c3e1f111ad7d649de30c763
-SHA1 (patch-jfbuild_Makefile.shared) = b7f15a87d4a391678f38cb623376e89d1d3d5a18
+SHA1 (patch-Makefile) = b4dc1655e23110e5b44175a969cd7cd394dd35a2
+SHA1 (patch-jfaudiolib_src_driver__alsa.c) = 02f5e18cbca953928ded702746756188041b216b
+SHA1 (patch-jfaudiolib_src_midi.c) = 4799c316c142144b075e1d2edd84fa2dcf16320e
+SHA1 (patch-jfbuild_Makefile) = 94f1afd86f448b6e4eaf9a8f02cfd63d381b7c03
+SHA1 (patch-jfbuild_Makefile.shared) = 8f71efdbca1035b527f7ef120f6daa5caef9142f
 SHA1 (patch-jfbuild_include_compat.h) = 8d398f00aebb8724d50bc0f818b429ef235989db
+SHA1 (patch-jfbuild_kenbuild_Makefile) = 8168be6c902ff434aee41436e8820a3773d76a62
 SHA1 (patch-jfbuild_src_mmulti.c) = eccf5b7c753a88a1a38c8aacf1689a182c6f1e7e
diff --git a/jfsw-git/patches/patch-Makefile b/jfsw-git/patches/patch-Makefile
index 8e24118393..6c53e2bfa3 100644
--- a/jfsw-git/patches/patch-Makefile
+++ b/jfsw-git/patches/patch-Makefile
@@ -3,18 +3,26 @@ $NetBSD$
 Set LIBS for BSD.
 Add LDFLAGS so that the X11 library paths can be used.
 
---- Makefile.orig	2021-12-26 20:11:15.000000000 +0000
+--- Makefile.orig	2023-03-21 20:06:13.000000000 +0000
 +++ Makefile
-@@ -233,10 +233,10 @@ endif
- all: sw$(EXESUFFIX) build$(EXESUFFIX)
+@@ -48,7 +48,7 @@ CXX?=g++
+ RC?=windres
  
- sw$(EXESUFFIX): $(GAMEOBJS) $(ELIB)/$(ENGINELIB) $(AUDIOLIBROOT)/$(JFAUDIOLIB)
--	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(GAMELIBS) -Wl,-Map=$@.map
-+	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(GAMELIBS) $(PKGSRCLDFLAGS) -Wl,-Map=$@.map
+ OURCFLAGS=-g -W -Wall -fno-strict-aliasing -std=c99
+-OURCXXFLAGS=-g -W -Wall -fno-exceptions -fno-rtti -std=c++98
++OURCXXFLAGS=-g -W -Wall -fno-exceptions -fno-rtti -std=c++20
+ OURCPPFLAGS=-I$(SRC) -I$(ENGINEINC) -I$(MACTROOT) -I$(AUDIOLIBROOT)/include
+ OURLDFLAGS=
  
- build$(EXESUFFIX): $(EDITOROBJS) $(ELIB)/$(EDITORLIB) $(ELIB)/$(ENGINELIB)
--	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) -Wl,-Map=$@.map
-+	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(PKGSRCLDFLAGS) -Wl,-Map=$@.map
+@@ -235,9 +235,11 @@ $(AUDIOLIBROOT)/%:
  
- include Makefile.deps
+ sw$(EXESUFFIX): $(GAMEOBJS) $(ENGINEROOT)/$(ENGINELIB) $(AUDIOLIBROOT)/$(JFAUDIOLIB)
+ 	$(CXX) $(CPPFLAGS) $(OURCPPFLAGS) $(CXXFLAGS) $(OURCXXFLAGS) -o $@ $^ $(LDFLAGS) $(OURLDFLAGS)
++	$(CXX) $(CPPFLAGS) $(OURCPPFLAGS) $(CXXFLAGS) $(OURCXXFLAGS) -o $@ $^ $(LDFLAGS) $(OURLDFLAGS) $(PKGSRCLDFLAGS)
  
+ build$(EXESUFFIX): $(EDITOROBJS) $(ENGINEROOT)/$(EDITORLIB) $(ENGINEROOT)/$(ENGINELIB)
+ 	$(CXX) $(CPPFLAGS) $(OURCPPFLAGS) $(CXXFLAGS) $(OURCXXFLAGS) -o $@ $^ $(LDFLAGS) $(OURLDFLAGS)
++	$(CXX) $(CPPFLAGS) $(OURCPPFLAGS) $(CXXFLAGS) $(OURCXXFLAGS) -o $@ $^ $(LDFLAGS) $(OURLDFLAGS) $(PKGSRCLDFLAGS)
+ 
+ # RULES
+ $(SRC)/%.$o: $(SRC)/%.c
diff --git a/jfsw-git/patches/patch-jfaudiolib_src_driver__alsa.c b/jfsw-git/patches/patch-jfaudiolib_src_driver__alsa.c
new file mode 100644
index 0000000000..8b90b53b30
--- /dev/null
+++ b/jfsw-git/patches/patch-jfaudiolib_src_driver__alsa.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+alloca is in stdlib.h on NetBSD.
+
+--- jfaudiolib/src/driver_alsa.c.orig	2023-03-21 20:06:34.000000000 +0000
++++ jfaudiolib/src/driver_alsa.c
+@@ -33,7 +33,11 @@
+ #include <alsa/asoundlib.h>
+ #include <unistd.h>
+ #include <math.h>
++#if defined(__linux)
+ #include <alloca.h>
++#else
++#include <stdlib.h>
++#endif
+ 
+ enum {
+    ALSAErr_Warning = -2,
diff --git a/jfsw-git/patches/patch-jfaudiolib_src_midi.c b/jfsw-git/patches/patch-jfaudiolib_src_midi.c
new file mode 100644
index 0000000000..dd0d90ba3a
--- /dev/null
+++ b/jfsw-git/patches/patch-jfaudiolib_src_midi.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+alloca is in stdlib.h on NetBSD.
+
+--- jfaudiolib/src/midi.c.orig	2023-03-21 20:06:34.000000000 +0000
++++ jfaudiolib/src/midi.c
+@@ -34,8 +34,10 @@ Foundation, Inc., 59 Temple Place - Suit
+ #include <stdio.h>
+ #ifdef _WIN32
+ # include <malloc.h>
+-#else
++#elseif defined(__linux)
+ # include <alloca.h>
++#else
++# include <stdlib.h>
+ #endif
+ #include "sndcards.h"
+ #include "drivers.h"
diff --git a/jfsw-git/patches/patch-jfbuild_Makefile b/jfsw-git/patches/patch-jfbuild_Makefile
new file mode 100644
index 0000000000..713a5a3070
--- /dev/null
+++ b/jfsw-git/patches/patch-jfbuild_Makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use c++20 to fix compilation errors.
+
+--- jfbuild/Makefile.orig	2023-03-21 20:06:35.000000000 +0000
++++ jfbuild/Makefile
+@@ -39,7 +39,7 @@ HOSTCC?=$(CC)
+ HOSTCXX?=$(CXX)
+ 
+ OURCFLAGS=-g -W -Wall -fno-strict-aliasing -std=c99
+-OURCXXFLAGS=-g -W -Wall -fno-exceptions -fno-rtti -std=c++98
++OURCXXFLAGS=-g -W -Wall -fno-exceptions -fno-rtti -std=c++20
+ OURCPPFLAGS=-I$(INC) -I$(SRC) -I$(LIBSQUISH)
+ OURLDFLAGS=
+ 
diff --git a/jfsw-git/patches/patch-jfbuild_Makefile.shared b/jfsw-git/patches/patch-jfbuild_Makefile.shared
index 415edba17b..1ffdac0362 100644
--- a/jfsw-git/patches/patch-jfbuild_Makefile.shared
+++ b/jfsw-git/patches/patch-jfbuild_Makefile.shared
@@ -2,18 +2,18 @@ $NetBSD$
 
 Recognize more BSD's.
 
---- jfbuild/Makefile.shared.orig	2018-12-18 11:55:00.000000000 +0000
+--- jfbuild/Makefile.shared.orig	2023-03-21 20:06:35.000000000 +0000
 +++ jfbuild/Makefile.shared
-@@ -32,6 +32,12 @@ ifndef PLATFORM
- 	ifneq (,$(findstring -freebsd,$(machine)))
+@@ -31,6 +31,12 @@ ifndef PLATFORM
+ 	ifneq (,$(findstring -freebsd,$(TARGETMACHINE)))
  		PLATFORM=BSD
  	endif
-+	ifneq (,$(findstring -netbsd,$(machine)))
++	ifneq (,$(findstring -netbsd,$(TARGETMACHINE)))
 +		PLATFORM=BSD
 +	endif
-+	ifneq (,$(findstring -openbsd,$(machine)))
++	ifneq (,$(findstring -openbsd,$(TARGETMACHINE)))
 +		PLATFORM=BSD
 +	endif
- 	ifneq (,$(findstring -mingw32,$(machine)))
+ 	ifneq (,$(findstring -mingw32,$(TARGETMACHINE)))
  		PLATFORM=WINDOWS
  	endif
diff --git a/jfsw-git/patches/patch-jfbuild_kenbuild_Makefile b/jfsw-git/patches/patch-jfbuild_kenbuild_Makefile
new file mode 100644
index 0000000000..7012832d15
--- /dev/null
+++ b/jfsw-git/patches/patch-jfbuild_kenbuild_Makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use c++20 to fix compilation errors.
+
+--- jfbuild/kenbuild/Makefile.orig	2023-03-21 20:06:35.000000000 +0000
++++ jfbuild/kenbuild/Makefile
+@@ -33,7 +33,7 @@ CXX?=g++
+ RC?=windres
+ 
+ GAMECFLAGS=-g -W -Wall -fno-strict-aliasing -std=c99
+-GAMECXXFLAGS=-g -W -Wall -fno-exceptions -fno-rtti -std=c++98
++GAMECXXFLAGS=-g -W -Wall -fno-exceptions -fno-rtti -std=c++20
+ GAMECPPFLAGS=-I$(SRC) -I$(ENGINEINC)
+ GAMELDFLAGS=
+ 


Home | Main Index | Thread Index | Old Index