pkgsrc-WIP-changes archive

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

jfsw-git: import jfsw-0.0nb20181218 as wip/jfsw-git



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Tue Dec 18 22:39:15 2018 +0200
Changeset:	ff6d9bf78e54cfd066477b7151eea6bc46614e0f

Modified Files:
	Makefile
Added Files:
	jfsw-git/DESCR
	jfsw-git/Makefile
	jfsw-git/PLIST
	jfsw-git/distinfo
	jfsw-git/patches/patch-Makefile
	jfsw-git/patches/patch-jfbuild_Makefile.shared
	jfsw-git/patches/patch-jfbuild_include_compat.h
	jfsw-git/patches/patch-jfbuild_src_mmulti.c

Log Message:
jfsw-git: import jfsw-0.0nb20181218 as wip/jfsw-git

Native Windows and Linux port using JonoF's Build engine port.
 * OpenGL rendering support.
 * True-colour textures support.

The aim of this port is to present Shadow Warrior as closely as possible
to the original game while adding optional features to expand the
possibilities of the game.

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

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

diffstat:
 Makefile                                        |  1 +
 jfsw-git/DESCR                                  |  7 ++++++
 jfsw-git/Makefile                               | 32 +++++++++++++++++++++++++
 jfsw-git/PLIST                                  |  3 +++
 jfsw-git/distinfo                               |  6 +++++
 jfsw-git/patches/patch-Makefile                 | 31 ++++++++++++++++++++++++
 jfsw-git/patches/patch-jfbuild_Makefile.shared  | 19 +++++++++++++++
 jfsw-git/patches/patch-jfbuild_include_compat.h | 25 +++++++++++++++++++
 jfsw-git/patches/patch-jfbuild_src_mmulti.c     | 16 +++++++++++++
 9 files changed, 140 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 15d6174a56..45e4b60b75 100644
--- a/Makefile
+++ b/Makefile
@@ -1620,6 +1620,7 @@ SUBDIR+=	jedit
 SUBDIR+=	jellyfish
 SUBDIR+=	jellyfish2
 SUBDIR+=	jemboss-standalone
+SUBDIR+=	jfsw-git
 SUBDIR+=	jgloss
 SUBDIR+=	jgraphx
 SUBDIR+=	jitsi
diff --git a/jfsw-git/DESCR b/jfsw-git/DESCR
new file mode 100644
index 0000000000..c3221e6bb1
--- /dev/null
+++ b/jfsw-git/DESCR
@@ -0,0 +1,7 @@
+Native Windows and Linux port using JonoF's Build engine port.
+ * OpenGL rendering support.
+ * True-colour textures support.
+
+The aim of this port is to present Shadow Warrior as closely as possible
+to the original game while adding optional features to expand the
+possibilities of the game.
diff --git a/jfsw-git/Makefile b/jfsw-git/Makefile
new file mode 100644
index 0000000000..c6d7dd9af9
--- /dev/null
+++ b/jfsw-git/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD$
+
+DISTNAME=	jfsw-0.0
+CATEGORIES=	games
+MASTER_SITES=	${MASTER_SITE_GITHUB:=jonof/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://www.jonof.id.au/jfsw
+COMMENT=	JonoF's Shadow Warrior port
+LICENSE=	gnu-gpl-v2
+
+WRKSRC=		${WRKDIR}/jfsw
+USE_TOOLS+=	gmake pkg-config
+USE_LANGUAGES=	c c++
+
+BUILD_MAKE_FLAGS+=	LDFLAGS="${X11_LDFLAGS}"
+GIT_REPOSITORIES=	jfsw
+GIT_REPO.jfsw=		git://github.com/jonof/jfsw.git
+INSTALLATION_DIRS+=	bin share/doc/jfsw
+PKGCONFIG_OVERRIDE+=	jfbuild/libsquish/libsquish.pc.in
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/sw ${DESTDIR}${PREFIX}/bin/jfsw
+	${INSTALL_DATA} ${WRKSRC}/releasenotes.html ${DESTDIR}${PREFIX}/share/doc/jfsw/releasenotes.html
+
+.include "../../audio/fluidsynth/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/x11.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/jfsw-git/PLIST b/jfsw-git/PLIST
new file mode 100644
index 0000000000..efe05c275c
--- /dev/null
+++ b/jfsw-git/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+bin/jfsw
+share/doc/jfsw/releasenotes.html
diff --git a/jfsw-git/distinfo b/jfsw-git/distinfo
new file mode 100644
index 0000000000..e639924b1e
--- /dev/null
+++ b/jfsw-git/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+SHA1 (patch-Makefile) = db3fd5a59a90857800818217d823baa440459cc8
+SHA1 (patch-jfbuild_Makefile.shared) = b7f15a87d4a391678f38cb623376e89d1d3d5a18
+SHA1 (patch-jfbuild_include_compat.h) = 8d398f00aebb8724d50bc0f818b429ef235989db
+SHA1 (patch-jfbuild_src_mmulti.c) = eccf5b7c753a88a1a38c8aacf1689a182c6f1e7e
diff --git a/jfsw-git/patches/patch-Makefile b/jfsw-git/patches/patch-Makefile
new file mode 100644
index 0000000000..5d596a1923
--- /dev/null
+++ b/jfsw-git/patches/patch-Makefile
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Set LIBS for BSD.
+Add LDFLAGS so that the X11 library paths can be used.
+
+--- Makefile.orig	2018-12-18 11:54:38.000000000 +0000
++++ Makefile
+@@ -163,6 +163,10 @@ EDITOROBJS=$(SRC)/jnstub.$o \
+ 
+ include $(EROOT)/Makefile.shared
+ 
++ifeq ($(PLATFORM),BSD)
++	NASMFLAGS+= -f elf
++	GAMELIBS+= $(JFAUDIOLIB_LDFLAGS)
++endif
+ ifeq ($(PLATFORM),LINUX)
+ 	NASMFLAGS+= -f elf
+ 	GAMELIBS+= $(JFAUDIOLIB_LDFLAGS)
+@@ -227,10 +231,10 @@ endif
+ all: sw$(EXESUFFIX) build$(EXESUFFIX)
+ 
+ sw$(EXESUFFIX): $(GAMEOBJS) $(ELIB)/$(ENGINELIB) $(AUDIOLIBROOT)/$(JFAUDIOLIB)
+-	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(GAMELIBS) -Wl,-Map=$@.map
++	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(GAMELIBS) $(LDFLAGS) -Wl,-Map=$@.map
+ 
+ build$(EXESUFFIX): $(EDITOROBJS) $(ELIB)/$(EDITORLIB) $(ELIB)/$(ENGINELIB)
+-	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) -Wl,-Map=$@.map
++	$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) -Wl,-Map=$@.map
+ 
+ include Makefile.deps
+ 
diff --git a/jfsw-git/patches/patch-jfbuild_Makefile.shared b/jfsw-git/patches/patch-jfbuild_Makefile.shared
new file mode 100644
index 0000000000..415edba17b
--- /dev/null
+++ b/jfsw-git/patches/patch-jfbuild_Makefile.shared
@@ -0,0 +1,19 @@
+$NetBSD$
+
+Recognize more BSD's.
+
+--- jfbuild/Makefile.shared.orig	2018-12-18 11:55:00.000000000 +0000
++++ jfbuild/Makefile.shared
+@@ -32,6 +32,12 @@ ifndef PLATFORM
+ 	ifneq (,$(findstring -freebsd,$(machine)))
+ 		PLATFORM=BSD
+ 	endif
++	ifneq (,$(findstring -netbsd,$(machine)))
++		PLATFORM=BSD
++	endif
++	ifneq (,$(findstring -openbsd,$(machine)))
++		PLATFORM=BSD
++	endif
+ 	ifneq (,$(findstring -mingw32,$(machine)))
+ 		PLATFORM=WINDOWS
+ 	endif
diff --git a/jfsw-git/patches/patch-jfbuild_include_compat.h b/jfsw-git/patches/patch-jfbuild_include_compat.h
new file mode 100644
index 0000000000..7b39c45b9c
--- /dev/null
+++ b/jfsw-git/patches/patch-jfbuild_include_compat.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Use the correct bswap functions on NetBSD.
+
+--- jfbuild/include/compat.h.orig	2018-12-18 11:09:10.000000000 +0000
++++ jfbuild/include/compat.h
+@@ -116,9 +116,15 @@
+ #  define B_LITTLE_ENDIAN 0
+ #  define B_BIG_ENDIAN    1
+ # endif
+-# define B_SWAP64(x) __bswap64(x)
+-# define B_SWAP32(x) __bswap32(x)
+-# define B_SWAP16(x) __bswap16(x)
++# if defined(__FreeBSD__) || defined(__OpenBSD__)
++#  define B_SWAP64(x) __bswap64(x)
++#  define B_SWAP32(x) __bswap32(x)
++#  define B_SWAP16(x) __bswap16(x)
++# elif defined(__NetBSD__)
++#  define B_SWAP64(x) bswap64(x)
++#  define B_SWAP32(x) bswap32(x)
++#  define B_SWAP16(x) bswap16(x)
++# endif
+ 
+ #elif defined(__APPLE__)
+ # if defined(__LITTLE_ENDIAN__)
diff --git a/jfsw-git/patches/patch-jfbuild_src_mmulti.c b/jfsw-git/patches/patch-jfbuild_src_mmulti.c
new file mode 100644
index 0000000000..433cb52a37
--- /dev/null
+++ b/jfsw-git/patches/patch-jfbuild_src_mmulti.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+AI_V4MAPPED is not defined on some platforms.
+
+--- jfbuild/src/mmulti.c.orig	2018-12-18 11:09:10.000000000 +0000
++++ jfbuild/src/mmulti.c
+@@ -900,7 +900,9 @@ static int lookuphost(const char *name, 
+ 	hints.ai_flags = AI_ADDRCONFIG;
+ 	hints.ai_family = domain;
+ 	if (domain == PF_INET6) {
++#ifdef AI_V4MAPPED
+ 		hints.ai_flags |= AI_V4MAPPED;
++#endif
+ 	}
+ 	hints.ai_socktype = SOCK_DGRAM;
+ 	hints.ai_protocol = IPPROTO_UDP;


Home | Main Index | Thread Index | Old Index