import Red Eclipse 1.4

Red Eclipse is a single-player and multi-player first-person
ego-shooter, built as a total conversion of Cube Engine 2,
which lends itself toward a balanced gameplay, completely at
the control of map makers, while maintaining a general theme
of agility in a variety of environments.

help from and ok ajacoutot@, ok rfreeman@
This commit is contained in:
jsg 2013-04-29 01:50:53 +00:00
parent c208d2cc90
commit a3176459a6
9 changed files with 4407 additions and 0 deletions

47
games/redeclipse/Makefile Normal file
View File

@ -0,0 +1,47 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/04/29 01:50:53 jsg Exp $
ONLY_FOR_ARCHS= i386 amd64
COMMENT-main= redeclipse client
COMMENT-data= redeclipse data
CATEGORIES= games x11
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=redeclipse/}
HOMEPAGE= http://www.redeclipse.net/
MAINTAINER= Jonathan Gray <jsg@openbsd.org>
MULTI_PACKAGES= -main -data
N= redeclipse
V= 1.4
REVISION= 1
PKGNAME= ${N}-${V}
PKGNAME-main= ${N}-${V}
PKGNAME-data= ${N}-data-${V}
DISTNAME= ${N}_${V}_nix
EXTRACT_SUFX= .tar.bz2
PKG_ARCH-data= *
# zlib (code) + CC-BY-SA-3.0 (data)
PERMIT_PACKAGE_CDROM= Yes
RUN_DEPENDS-main += ${BASE_PKGPATH},-data \
devel/desktop-file-utils \
x11/gtk+2,-guic
BUILD_DEPENDS= textproc/gsed
LIB_DEPENDS-main= devel/sdl-mixer \
devel/sdl-image \
net/enet
WANTLIB-main+= GL X11 SDL SDL_image SDL_mixer c enet m pthread stdc++ z
WRKDIST= ${WRKDIR}/${N}-${V}/src
USE_GMAKE= Yes
MAKE_ENV+= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
TRUEPREFIX="${TRUEPREFIX}"
NO_TEST= Yes
INSTALL_TARGET= system-install
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (redeclipse_1.4_nix.tar.bz2) = oN/FJ7D0NxcKQjtV32ipfhtuYNjJ+2yEJRm2Zwweab8=
SIZE (redeclipse_1.4_nix.tar.bz2) = 678617164

View File

@ -0,0 +1,88 @@
$OpenBSD: patch-core_mk,v 1.1.1.1 2013/04/29 01:50:57 jsg Exp $
--- core.mk.orig Fri Mar 22 06:45:14 2013
+++ core.mk Fri Apr 12 16:04:33 2013
@@ -3,7 +3,7 @@ APPCLIENT=$(APPNAME)
APPSERVER=$(APPNAME)_server
#CXXFLAGS= -ggdb3
-CXXFLAGS= -O3 -fomit-frame-pointer
+CXXFLAGS?= -O3 -fomit-frame-pointer
override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti
PLATFORM= $(shell uname -s)
@@ -23,12 +23,12 @@ TOOLSET_PREFIX=x86_64-w64-mingw32-
else
TOOLSET_PREFIX=i686-w64-mingw32-
endif
-CXX=g++
+CXX?=g++
endif
CXX_TEMP:=$(CXX)
override CXX=$(TOOLSET_PREFIX)$(CXX_TEMP)
-INCLUDES= -Ishared -Iengine -Igame -Ienet/include $(APPFLAGS)
+INCLUDES= -Ishared -Iengine -Igame `pkg-config --cflags libenet` $(APPFLAGS)
STRIP=
@@ -65,8 +65,8 @@ endif
CLIENT_INCLUDES= $(INCLUDES) -Iinclude
CLIENT_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lSDL -lSDL_image -lSDL_mixer -lzlib1 -lopengl32 -lenet -lws2_32 -lwinmm
else
-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags`
-CLIENT_LIBS= -Lenet/.libs -lenet -L/usr/X11R6/lib -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
+CLIENT_INCLUDES= $(INCLUDES) `sdl-config --cflags`
+CLIENT_LIBS= `pkg-config --libs libenet` `sdl-config --libs` -lX11 -lSDL_image -lSDL_mixer -lz -lGL
endif
ifeq ($(PLATFORM),Linux)
CLIENT_LIBS+= -lrt
@@ -137,7 +137,7 @@ SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -Iinclude
SERVER_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm
else
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
-SERVER_LIBS= -Lenet/.libs -lenet -lz
+SERVER_LIBS= `pkg-config --libs libenet` -lz
endif
SERVER_OBJS= \
shared/crypto-standalone.o \
@@ -152,15 +152,6 @@ SERVER_OBJS= \
default: all
-enet/Makefile:
- cd enet; ./configure --enable-shared=no --enable-static=yes
-
-libenet: enet/Makefile
- $(MAKE) -C enet/ all
-
-clean-enet: enet/Makefile
- $(MAKE) -C enet/ clean
-
clean: clean-client clean-server
clean-client:
@@ -202,13 +193,13 @@ ifneq (,$(STRIP))
$(STRIP) $(WINBIN)/$(APPSERVER).exe
endif
else
-client: libenet $(CLIENT_OBJS)
+client: $(CLIENT_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(APPCLIENT) $(CLIENT_OBJS) $(CLIENT_LIBS)
ifneq (,$(STRIP))
$(STRIP) $(APPCLIENT)
endif
-server: libenet $(SERVER_OBJS)
+server: $(SERVER_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(APPSERVER) $(SERVER_OBJS) $(SERVER_LIBS)
ifneq (,$(STRIP))
$(STRIP) $(APPSERVER)
@@ -243,7 +234,7 @@ depend:
all: client server
include system-install.mk
-include dist.mk
+#include dist.mk
engine/engine.h.gch: shared/cube.h.gch

View File

@ -0,0 +1,57 @@
$OpenBSD: patch-engine_sound_cpp,v 1.1.1.1 2013/04/29 01:50:57 jsg Exp $
--- engine/sound.cpp.orig Thu Feb 28 04:08:16 2013
+++ engine/sound.cpp Sat Mar 23 21:01:49 2013
@@ -572,7 +572,7 @@ COMMAND(0, resetsound, "");
#include <unistd.h>
-#ifdef _POSIX_SHARED_MEMORY_OBJECTS
+#if _POSIX_SHARED_MEMORY_OBJECTS > 0
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
@@ -582,7 +582,7 @@ COMMAND(0, resetsound, "");
#endif
-#if defined(WIN32) || defined(_POSIX_SHARED_MEMORY_OBJECTS)
+#if defined(WIN32) || _POSIX_SHARED_MEMORY_OBJECTS > 0
struct MumbleInfo
{
int version, timestamp;
@@ -595,7 +595,7 @@ struct MumbleInfo
static HANDLE mumblelink = NULL;
static MumbleInfo *mumbleinfo = NULL;
#define VALID_MUMBLELINK (mumblelink && mumbleinfo)
-#elif defined(_POSIX_SHARED_MEMORY_OBJECTS)
+#elif _POSIX_SHARED_MEMORY_OBJECTS > 0
static int mumblelink = -1;
static MumbleInfo *mumbleinfo = (MumbleInfo *)-1;
#define VALID_MUMBLELINK (mumblelink >= 0 && mumbleinfo != (MumbleInfo *)-1)
@@ -620,7 +620,7 @@ void initmumble()
mumbleinfo = (MumbleInfo *)MapViewOfFile(mumblelink, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(MumbleInfo));
if(mumbleinfo) wcsncpy(mumbleinfo->name, (const wchar_t *)versionuname, 256);
}
- #elif defined(_POSIX_SHARED_MEMORY_OBJECTS)
+ #elif _POSIX_SHARED_MEMORY_OBJECTS > 0
defformatstring(shmname)("/MumbleLink.%d", getuid());
mumblelink = shm_open(shmname, O_RDWR, 0);
if(mumblelink >= 0)
@@ -631,7 +631,7 @@ void initmumble()
#endif
if(!VALID_MUMBLELINK) closemumble();
#else
- conoutf(CON_ERROR, "Mumble positional audio is not available on this platform.");
+ conoutft(CON_MESG, "Mumble positional audio is not available on this platform.");
#endif
}
@@ -640,7 +640,7 @@ void closemumble()
#ifdef WIN32
if(mumbleinfo) { UnmapViewOfFile(mumbleinfo); mumbleinfo = NULL; }
if(mumblelink) { CloseHandle(mumblelink); mumblelink = NULL; }
-#elif defined(_POSIX_SHARED_MEMORY_OBJECTS)
+#elif _POSIX_SHARED_MEMORY_OBJECTS > 0
if(mumbleinfo != (MumbleInfo *)-1) { munmap(mumbleinfo, sizeof(MumbleInfo)); mumbleinfo = (MumbleInfo *)-1; }
if(mumblelink >= 0) { close(mumblelink); mumblelink = -1; }
#endif

View File

@ -0,0 +1,149 @@
$OpenBSD: patch-system-install_mk,v 1.1.1.1 2013/04/29 01:50:57 jsg Exp $
--- system-install.mk.orig Thu Mar 21 09:21:57 2013
+++ system-install.mk Fri Apr 12 15:56:44 2013
@@ -6,7 +6,7 @@ appclient=$(APPCLIENT)
appserver=$(APPSERVER)
appgamedir=game/$(APPSHORTNAME)
-prefix=/usr/local
+prefix=$(TRUEPREFIX)
games=
gamesbin=/bin
bindir=$(DESTDIR)$(prefix)/bin
@@ -14,7 +14,8 @@ gamesbindir=$(DESTDIR)$(prefix)$(gamesbin)
libexecdir=$(DESTDIR)$(prefix)/lib$(games)
datadir=$(DESTDIR)$(prefix)/share$(games)
docdir=$(DESTDIR)$(prefix)/share/doc
-mandir=$(DESTDIR)$(prefix)/share/man
+examplesdir=$(DESTDIR)$(prefix)/share/examples
+mandir=$(DESTDIR)$(prefix)/man
menudir=$(DESTDIR)$(prefix)/share/applications
icondir=$(DESTDIR)$(prefix)/share/icons/hicolor
pixmapdir=$(DESTDIR)$(prefix)/share/pixmaps
@@ -59,7 +60,7 @@ system-install-client: client
install -m755 $(appclient) $(libexecdir)/$(appname)/$(appname)
install -m755 install/nix/$(appsrcname).am \
$(gamesbindir)/$(appname)
- sed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
+ gsed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
-e 's,@DATADIR@,$(patsubst $(DESTDIR)%,%,$(datadir)),g' \
-e 's,@DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
-e 's,@APPNAME@,$(appname),g' \
@@ -77,7 +78,7 @@ system-install-server: server
$(libexecdir)/$(appname)/$(appname)-server
install -m755 install/nix/$(appsrcname)-server.am \
$(gamesbindir)/$(appname)-server
- sed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
+ gsed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
-e 's,@DATADIR@,$(patsubst $(DESTDIR)%,%,$(datadir)),g' \
-e 's,@DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
-e 's,@APPNAME@,$(appname),g' \
@@ -94,21 +95,21 @@ system-install-data:
system-install-docs: $(MANPAGES)
install -d $(mandir)/man6
install -d $(docdir)/$(appname)
- sed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
+ gsed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
-e 's,@DATADIR@,$(patsubst $(DESTDIR)%,%,$(datadir)),g' \
-e 's,@DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
-e 's,@APPNAME@,$(appname),g' \
-e 's,@CAPPNAME@,$(cappname),g' \
- ../doc/man/$(appsrcname).6.am | \
- gzip -9 -n -c > $(mandir)/man6/$(appname).6.gz
- sed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
+ ../doc/man/$(appsrcname).6.am \
+ > $(mandir)/man6/$(appname).6
+ gsed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
-e 's,@DATADIR@,$(patsubst $(DESTDIR)%,%,$(datadir)),g' \
-e 's,@DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
-e 's,@APPNAME@,$(appname),g' \
-e 's,@CAPPNAME@,$(cappname),g' \
- ../doc/man/$(appsrcname)-server.6.am | \
- gzip -9 -n -c > $(mandir)/man6/$(appname)-server.6.gz
- cp -r ../doc/examples $(docdir)/$(appname)/examples
+ ../doc/man/$(appsrcname)-server.6.am \
+ > $(mandir)/man6/$(appname)-server.6
+ cp -R ../doc/examples $(examplesdir)/$(appname)
cp ../doc/guidelines.txt $(docdir)/$(appname)/guidelines.txt
system-install-menus: icons
@@ -119,7 +120,7 @@ system-install-menus: icons
install -d $(icondir)/64x64/apps
install -d $(icondir)/128x128/apps
install -d $(pixmapdir)
- sed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
+ gsed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
-e 's,@DATADIR@,$(patsubst $(DESTDIR)%,%,$(datadir)),g' \
-e 's,@DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
-e 's,@APPNAME@,$(appname),g' \
@@ -144,47 +145,46 @@ system-install-cube2font: cube2font system-install-cub
system-install-cube2font-docs: ../doc/man/cube2font.1
install -d $(mandir)/man1
- gzip -9 -n -c < ../doc/man/cube2font.1 \
- > $(mandir)/man1/cube2font.1.gz
+ install -m644 ../doc/man/cube2font.1 $(mandir)/man1/cube2font.1
system-install: system-install-client system-install-server system-install-data system-install-docs system-install-menus
system-uninstall-client:
- @rm -fv $(libexecdir)/$(appname)/$(appname)
- @rm -fv $(libexecdir)/$(appname)/data
- @rm -fv $(libexecdir)/$(appname)/game
- @rm -fv $(gamesbindir)/$(appname)
+ @rm -f $(libexecdir)/$(appname)/$(appname)
+ @rm -f $(libexecdir)/$(appname)/data
+ @rm -f $(libexecdir)/$(appname)/game
+ @rm -f $(gamesbindir)/$(appname)
system-uninstall-server:
- @rm -fv $(libexecdir)/$(appname)/$(appname)-server
- @rm -fv $(gamesbindir)/$(appname)-server
+ @rm -f $(libexecdir)/$(appname)/$(appname)-server
+ @rm -f $(gamesbindir)/$(appname)-server
system-uninstall-data:
rm -rf $(datadir)/$(appname)/data
rm -rf $(datadir)/$(appname)/game
system-uninstall-docs:
- @rm -rfv $(docdir)/$(appname)/examples
- @rm -fv $(docdir)/$(appname)/guidelines.txt
- @rm -fv $(mandir)/man6/$(appname).6.gz
- @rm -fv $(mandir)/man6/$(appname)-server.6.gz
+ @rm -rf $(docdir)/$(appname)/examples
+ @rm -f $(docdir)/$(appname)/guidelines.txt
+ @rm -f $(mandir)/man6/$(appname).6
+ @rm -f $(mandir)/man6/$(appname)-server.6
system-uninstall-menus:
- @rm -fv $(menudir)/$(appname).desktop
- @rm -fv $(icondir)/16x16/apps/$(appname).png
- @rm -fv $(icondir)/32x32/apps/$(appname).png
- @rm -fv $(icondir)/48x48/apps/$(appname).png
- @rm -fv $(icondir)/64x64/apps/$(appname).png
- @rm -fv $(icondir)/128x128/apps/$(appname).png
- @rm -fv $(pixmapdir)/$(appname).xpm
+ @rm -f $(menudir)/$(appname).desktop
+ @rm -f $(icondir)/16x16/apps/$(appname).png
+ @rm -f $(icondir)/32x32/apps/$(appname).png
+ @rm -f $(icondir)/48x48/apps/$(appname).png
+ @rm -f $(icondir)/64x64/apps/$(appname).png
+ @rm -f $(icondir)/128x128/apps/$(appname).png
+ @rm -f $(pixmapdir)/$(appname).xpm
system-uninstall: system-uninstall-client system-uninstall-server system-uninstall-data system-uninstall-docs system-uninstall-menus
- -@rmdir -v $(libexecdir)/$(appname)
- -@rmdir -v $(datadir)/$(appname)
- -@rmdir -v $(docdir)/$(appname)
+ -@rmdir $(libexecdir)/$(appname)
+ -@rmdir $(datadir)/$(appname)
+ -@rmdir $(docdir)/$(appname)
system-uninstall-cube2font-docs:
- @rm -fv $(mandir)/man1/cube2font.1.gz
+ @rm -f $(mandir)/man1/cube2font.1
system-uninstall-cube2font: system-uninstall-cube2font-docs
- @rm -fv $(bindir)/bin/cube2font
+ @rm -f $(bindir)/bin/cube2font

View File

@ -0,0 +1,7 @@
Red Eclipse is a single-player and multi-player first-person
ego-shooter, built as a total conversion of Cube Engine 2,
which lends itself toward a balanced gameplay, completely at
the control of map makers, while maintaining a general theme
of agility in a variety of environments.
This package contains the datafiles needed to run client and server.

View File

@ -0,0 +1,7 @@
Red Eclipse is a single-player and multi-player first-person
ego-shooter, built as a total conversion of Cube Engine 2,
which lends itself toward a balanced gameplay, completely at
the control of map makers, while maintaining a general theme
of agility in a variety of environments.
This package contains the client and server binaries.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2013/04/29 01:50:57 jsg Exp $
bin/redeclipse
bin/redeclipse-server
lib/redeclipse/
lib/redeclipse/data
lib/redeclipse/game
@bin lib/redeclipse/redeclipse
@bin lib/redeclipse/redeclipse-server
@man man/man6/redeclipse-server.6
@man man/man6/redeclipse.6
share/applications/redeclipse.desktop
share/doc/redeclipse/
share/doc/redeclipse/guidelines.txt
share/examples/redeclipse/
share/examples/redeclipse/servinit.cfg
share/icons/hicolor/128x128/apps/redeclipse.png
share/icons/hicolor/16x16/apps/redeclipse.png
share/icons/hicolor/32x32/apps/redeclipse.png
share/icons/hicolor/48x48/apps/redeclipse.png
share/icons/hicolor/64x64/apps/redeclipse.png
share/pixmaps/
share/pixmaps/redeclipse.xpm
@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database