pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
omnispeak: import omnispeak-1.0 as wip/omnispeak
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Fri Nov 3 23:36:16 2017 +0200
Changeset: 8b924a3f1e2b1953d9ff01401229c5856e96b02b
Modified Files:
Makefile
Added Files:
omnispeak/DESCR
omnispeak/Makefile
omnispeak/PLIST
omnispeak/distinfo
omnispeak/patches/patch-Makefile
omnispeak/patches/patch-src_ck6_misc.c
omnispeak/patches/patch-src_id_ca.c
Log Message:
omnispeak: import omnispeak-1.0 as wip/omnispeak
DESCR:
Omnispeak is an open-source reimplementation of Commander Keen
episodes 4, 5, and 6. It aims to be a pixel-perfect, bug-for-bug
clone of the original games, and is compatible with savegames from
the DOS version.
The game data files are required to run the game (shareware or
registered copy).
PKGSRC changes: Search for common data files in the package's
data directory if not found in the current directory.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8b924a3f1e2b1953d9ff01401229c5856e96b02b
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
omnispeak/DESCR | 7 ++++
omnispeak/Makefile | 37 ++++++++++++++++++++++
omnispeak/PLIST | 29 +++++++++++++++++
omnispeak/distinfo | 9 ++++++
omnispeak/patches/patch-Makefile | 15 +++++++++
omnispeak/patches/patch-src_ck6_misc.c | 23 ++++++++++++++
omnispeak/patches/patch-src_id_ca.c | 58 ++++++++++++++++++++++++++++++++++
8 files changed, 179 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index e7f118f11c..1b5203e265 100644
--- a/Makefile
+++ b/Makefile
@@ -2220,6 +2220,7 @@ SUBDIR+= ogmrip
SUBDIR+= ogre
SUBDIR+= olsrd
SUBDIR+= omega
+SUBDIR+= omnispeak
SUBDIR+= oneloop
SUBDIR+= oolite
SUBDIR+= oops
diff --git a/omnispeak/DESCR b/omnispeak/DESCR
new file mode 100644
index 0000000000..ef6d05f36a
--- /dev/null
+++ b/omnispeak/DESCR
@@ -0,0 +1,7 @@
+Omnispeak is an open-source reimplementation of Commander Keen
+episodes 4, 5, and 6. It aims to be a pixel-perfect, bug-for-bug
+clone of the original games, and is compatible with savegames from
+the DOS version.
+
+The game data files are required to run the game (shareware or
+registered copy).
diff --git a/omnispeak/Makefile b/omnispeak/Makefile
new file mode 100644
index 0000000000..005ec60503
--- /dev/null
+++ b/omnispeak/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD$
+
+GITHUB_PROJECT= omnispeak
+DISTNAME= ${GITHUB_TAG}
+PKGNAME= ${GITHUB_PROJECT}-1.0
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_GITHUB:=sulix/}
+GITHUB_TAG= 5bfa6102d24e0fa06d577063d2a2f83d435ba20f
+DIST_SUBDIR= ${GITHUB_PROJECT}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://davidgow.net/keen/omnispeak.html
+COMMENT= Open-source re-implementation of "Commander Keen in Goodbye Galaxy"
+LICENSE= gnu-gpl-v2
+
+USE_LANGUAGES+= c++
+USE_TOOLS+= gmake
+
+WRKSRC= ${WRKDIR}/omnispeak-${GITHUB_TAG}
+
+SUBST_CLASSES+= search-path
+SUBST_STAGE.search-path= pre-configure
+SUBST_MESSAGE.search-path= Search for files in PREFIX.
+SUBST_FILES.search-path= src/id_ca.c
+SUBST_SED.search-path= -e 's,@@PKGSRC_DATA_DIR@@,${PREFIX}/share/omnispeak,g'
+
+BUILD_DIRS= src
+BUILD_MAKE_FLAGS+= X11_LDFLAGS=${X11_LDFLAGS:Q}
+INSTALLATION_DIRS+= bin share/omnispeak
+
+do-install:
+ ${INSTALL_GAME} ${WRKSRC}/bin/omnispeak ${DESTDIR}${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKSRC}/bin/*.* ${DESTDIR}${PREFIX}/share/omnispeak/
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/omnispeak/PLIST b/omnispeak/PLIST
new file mode 100644
index 0000000000..b989b5f6be
--- /dev/null
+++ b/omnispeak/PLIST
@@ -0,0 +1,29 @@
+@comment $NetBSD$
+bin/omnispeak
+share/omnispeak/ACTION.CK4
+share/omnispeak/ACTION.CK5
+share/omnispeak/ACTION.CK6
+share/omnispeak/AUDINFOE.CK4
+share/omnispeak/AUDINFOE.CK5
+share/omnispeak/AUDINFOE.CK6
+share/omnispeak/AUDIODCT.CK4
+share/omnispeak/AUDIODCT.CK5
+share/omnispeak/AUDIODCT.CK6
+share/omnispeak/AUDIOHHD.CK4
+share/omnispeak/AUDIOHHD.CK5
+share/omnispeak/AUDIOHHD.CK6
+share/omnispeak/EGADICT.CK4
+share/omnispeak/EGADICT.CK5
+share/omnispeak/EGADICT.CK6
+share/omnispeak/EGAHEAD.CK4
+share/omnispeak/EGAHEAD.CK5
+share/omnispeak/EGAHEAD.CK6
+share/omnispeak/GFXINFOE.CK4
+share/omnispeak/GFXINFOE.CK5
+share/omnispeak/GFXINFOE.CK6
+share/omnispeak/MAPHEAD.CK4
+share/omnispeak/MAPHEAD.CK5
+share/omnispeak/MAPHEAD.CK6
+share/omnispeak/TILEINFO.CK4
+share/omnispeak/TILEINFO.CK5
+share/omnispeak/TILEINFO.CK6
diff --git a/omnispeak/distinfo b/omnispeak/distinfo
new file mode 100644
index 0000000000..1f2c2a98ef
--- /dev/null
+++ b/omnispeak/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+SHA1 (omnispeak/5bfa6102d24e0fa06d577063d2a2f83d435ba20f-5bfa6102d24e0fa06d577063d2a2f83d435ba20f.tar.gz) = a16d9e3017361bd9a42259863cd89e6e6897ba2f
+RMD160 (omnispeak/5bfa6102d24e0fa06d577063d2a2f83d435ba20f-5bfa6102d24e0fa06d577063d2a2f83d435ba20f.tar.gz) = 59fe51cdbd2d430cfd2213a100a4c92f12f06b8f
+SHA512 (omnispeak/5bfa6102d24e0fa06d577063d2a2f83d435ba20f-5bfa6102d24e0fa06d577063d2a2f83d435ba20f.tar.gz) = 5b996b3115f938438c01a33577c0e5d76bdd02ef10e5f8666afa59ee247706ca2bd2f22ccc3af65440a12b8e53075b2fdeb071e050957bfed3e3b2476bafde7b
+Size (omnispeak/5bfa6102d24e0fa06d577063d2a2f83d435ba20f-5bfa6102d24e0fa06d577063d2a2f83d435ba20f.tar.gz) = 362089 bytes
+SHA1 (patch-Makefile) = 73ef750fd0389785e84f50a025bbf06b37a1b77d
+SHA1 (patch-src_ck6_misc.c) = 4edb4800960462e35f5f1034e713c2dffae724d9
+SHA1 (patch-src_id_ca.c) = a7603be7438a29b3a24256362df3038f020acd93
diff --git a/omnispeak/patches/patch-Makefile b/omnispeak/patches/patch-Makefile
new file mode 100644
index 0000000000..333f6290ae
--- /dev/null
+++ b/omnispeak/patches/patch-Makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use X11_LDFLAGS to fix linking.
+
+--- src/Makefile.orig 2017-07-15 21:27:56.000000000 +0000
++++ src/Makefile
+@@ -63,7 +63,7 @@ ifeq ($(WITH_SDL2), 1)
+ ifeq ($(PLATFORM), WINDOWS)
+ LIBS+= -lopengl32
+ else
+- LIBS+= -lGL
++ LIBS+= -lGL $(X11_LDFLAGS)
+ endif
+ IDOBJECTS+= id_vl_sdl2gl.o
+ endif
diff --git a/omnispeak/patches/patch-src_ck6_misc.c b/omnispeak/patches/patch-src_ck6_misc.c
new file mode 100644
index 0000000000..db61d077c6
--- /dev/null
+++ b/omnispeak/patches/patch-src_ck6_misc.c
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Part of a patch set to search for data files in PREFIX.
+
+--- src/ck6_misc.c.orig 2017-07-15 21:27:56.000000000 +0000
++++ src/ck6_misc.c
+@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fi
+ #include "ck_def.h"
+ #include "ck_act.h"
+ #include "ck6_ep.h"
++#include <limits.h>
+ #include <stdio.h>
+
+ CK_EpisodeDef *ck6_episode;
+@@ -106,7 +107,7 @@ bool CK6_IsPresent()
+ if (!CA_IsFilePresent("AUDIO.CK6"))
+ return false;
+
+- char egaGraphName[] = "EGAGRAPH.CK6";
++ char egaGraphName[PATH_MAX] = "EGAGRAPH.CK6";
+ CAL_AdjustFilenameCase(egaGraphName);
+ size_t egaGraphSize = CA_GetFileSize(egaGraphName);
+ if (egaGraphSize == 464662)
diff --git a/omnispeak/patches/patch-src_id_ca.c b/omnispeak/patches/patch-src_id_ca.c
new file mode 100644
index 0000000000..72bb55e66a
--- /dev/null
+++ b/omnispeak/patches/patch-src_id_ca.c
@@ -0,0 +1,58 @@
+$NetBSD$
+
+Search for data files in PREFIX.
+
+--- src/id_ca.c.orig 2017-07-15 21:27:56.000000000 +0000
++++ src/id_ca.c
+@@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fi
+ #include "ck_cross.h"
+ #include "ck_def.h"
+
++#include <limits.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include "SDL_endian.h"
+@@ -85,6 +86,25 @@ bool CAL_AdjustFilenameCase(char *filena
+
+ // We didn't find a matching file.
+ closedir(currentDirPtr);
++
++ currentDirPtr = opendir("@@PKGSRC_DATA_DIR@@");
++
++ // Search the current directory for matching names.
++ for (struct dirent *dirEntry = readdir(currentDirPtr); dirEntry; dirEntry = readdir(currentDirPtr))
++ {
++ if (!CK_Cross_strcasecmp(dirEntry->d_name, filename))
++ {
++ strncpy(filename, "@@PKGSRC_DATA_DIR@@", PATH_MAX);
++ strncat(filename, "/", PATH_MAX);
++ strncat(filename, dirEntry->d_name, PATH_MAX);
++ closedir(currentDirPtr);
++ return true;
++ }
++ }
++
++ // We didn't find a matching file.
++ closedir(currentDirPtr);
++
+ return false;
+ }
+ #else
+@@ -161,7 +181,7 @@ void (*ca_finishCacheBox) (void);
+ // Does a file exist (with filename case correction)
+ bool CA_IsFilePresent(const char *filename)
+ {
+- static char newname[16];
++ static char newname[PATH_MAX];
+ strcpy(newname,filename);
+ if (!CAL_AdjustFilenameCase(newname))
+ {
+@@ -175,7 +195,7 @@ bool CA_IsFilePresent(const char *filena
+ // valid until the NEXT invocation of this function.
+ char* CAL_AdjustExtension(const char *filename)
+ {
+- static char newname[16];
++ static char newname[PATH_MAX];
+ strcpy(newname,filename);
+ size_t fnamelen = strlen(filename);
+ newname[fnamelen-3] = ck_currentEpisode->ext[0];
Home |
Main Index |
Thread Index |
Old Index