aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2012-05-25 07:05:33 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2012-05-25 07:05:33 +0000
commit8beed3b01c9463a29b0fa2e5b44c596cb7531656 (patch)
treeb5cdc83b6c933cd811c4948139da0852bd05dabc /games
parent91c1992b0dd658c1574968b6d4625bef960f9f30 (diff)
downloadports-8beed3b01c9463a29b0fa2e5b44c596cb7531656.tar.gz
ports-8beed3b01c9463a29b0fa2e5b44c596cb7531656.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/0ad/Makefile78
-rw-r--r--games/0ad/distinfo4
-rw-r--r--games/0ad/files/patch-build-premake-premake4-build-gmake.unix-Premake4.make32
-rw-r--r--games/0ad/files/patch-build-premake-premake4.lua25
-rw-r--r--games/0ad/files/patch-build-resources-0ad.desktop11
-rw-r--r--games/0ad/files/patch-build-resources-0ad.sh7
-rw-r--r--games/0ad/files/patch-libraries-fcollada-src-FCollada-FUtils-FUStringBuilder.hpp45
-rw-r--r--games/0ad/files/patch-libraries-nvtt-src-src-nvtt-squish-CMakeLists.txt11
-rw-r--r--games/0ad/files/patch-libraries-spidermonkey-build.sh14
-rw-r--r--games/0ad/files/patch-source-lib-sysdep-os-unix-x-x.cpp16
-rw-r--r--games/0ad/files/patch-source-tools-atlas-AtlasObject-AtlasObjectJS.cpp11
-rw-r--r--games/0ad/pkg-descr16
-rw-r--r--games/0ad/pkg-plist17
-rw-r--r--games/Makefile1
14 files changed, 288 insertions, 0 deletions
diff --git a/games/0ad/Makefile b/games/0ad/Makefile
new file mode 100644
index 000000000000..e51461e70892
--- /dev/null
+++ b/games/0ad/Makefile
@@ -0,0 +1,78 @@
+# New ports collection makefile for: 0ad
+# Date created: 13 Jan 2012
+# Whom: Guido Falsi <mad@madpilot.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= 0ad
+DISTVERSION= alpha.10
+CATEGORIES= games
+MASTER_SITES= SF/zero-ad/releases
+DISTFILES= ${PORTNAME}-${SVNREV}-alpha-unix-build.tar.xz \
+ ${PORTNAME}-${SVNREV}-alpha-unix-data.tar.xz
+
+MAINTAINER= madpilot@FreeBSD.org
+COMMENT= Real-time strategy (RTS) game of ancient warfare
+
+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
+ zip:${PORTSDIR}/archivers/zip \
+ cmake:${PORTSDIR}/devel/cmake
+LIB_DEPENDS= boost_thread:${PORTSDIR}/devel/boost-libs \
+ execinfo:${PORTSDIR}/devel/libexecinfo \
+ png:${PORTSDIR}/graphics/png \
+ ogg:${PORTSDIR}/audio/libogg \
+ vorbis:${PORTSDIR}/audio/libvorbis \
+ curl:${PORTSDIR}/ftp/curl \
+ gamin-1:${PORTSDIR}/devel/gamin
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${SVNREV}-alpha
+BUILD_WRKSRC= ${WRKSRC}/build/workspaces/gcc
+MAKE_ARGS= config=release
+USE_GMAKE= yes
+USE_XZ= yes
+USE_SDL= sdl
+USE_GNOME= libxml2 gtk20
+USE_GL= gl
+USE_OPENAL= al
+USE_DOS2UNIX= yes
+DOS2UNIX_REGEX= .*\.[ch]p{0,2}
+MAKE_JOBS_SAFE= yes
+
+USE_WX= 2.8
+WX_COMPS= wx:lib
+WX_UNICODE= yes
+MAKE_ENV+= JOBS=${_MAKE_JOBS}
+
+SVNREV= r11863
+
+PORTDATA= *
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 800067
+BROKEN= Does not compile on 7.x: Requires wcsnlen(3)
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ ${WRKSRC}/build/premake/premake4.lua
+ @${REINPLACE_CMD} 's,^\(Exec=\)/usr/local,\1${PREFIX},' \
+ ${WRKSRC}/build/resources/0ad.desktop
+
+pre-build:
+ (cd ${WRKSRC}/build/workspaces && ${SETENV} ${MAKE_ENV} ./update-workspaces.sh --bindir=${PREFIX}/bin --datadir=${DATADIR} --libdir=${PREFIX}/lib/${PORTNAME})
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/pyrogenesis ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/build/resources/0ad.sh ${PREFIX}/bin/0ad
+ ${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/ActorEditor ${PREFIX}/bin
+ ${MKDIR} ${PREFIX}/lib/${PORTNAME}
+ (cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libAtlasUI.so libCollada.so libenet.so.1 libmozjs185-ps-release.so.1.0 libnvcore.so libnvimage.so libnvmath.so libnvtt.so ${PREFIX}/lib/${PORTNAME})
+ ${MKDIR} ${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.desktop ${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.png ${PREFIX}/share/pixmaps
+ ${MKDIR} ${DATADIR}
+ (cd ${WRKSRC}/binaries/data && ${COPYTREE_SHARE} "config mods tests tools" ${DATADIR})
+
+.include <bsd.port.post.mk>
diff --git a/games/0ad/distinfo b/games/0ad/distinfo
new file mode 100644
index 000000000000..96bc20218483
--- /dev/null
+++ b/games/0ad/distinfo
@@ -0,0 +1,4 @@
+SHA256 (0ad-r11863-alpha-unix-build.tar.xz) = 46c08d380ce098d3d8f577d04d602bb245dfbb7f7da7b1ad009e7a0d4751435f
+SIZE (0ad-r11863-alpha-unix-build.tar.xz) = 8657204
+SHA256 (0ad-r11863-alpha-unix-data.tar.xz) = 76702023402361d27b61eea37034b08e9e19b282e4cdd69954495d2dd087b90a
+SIZE (0ad-r11863-alpha-unix-data.tar.xz) = 310994700
diff --git a/games/0ad/files/patch-build-premake-premake4-build-gmake.unix-Premake4.make b/games/0ad/files/patch-build-premake-premake4-build-gmake.unix-Premake4.make
new file mode 100644
index 000000000000..0b73356e7210
--- /dev/null
+++ b/games/0ad/files/patch-build-premake-premake4-build-gmake.unix-Premake4.make
@@ -0,0 +1,32 @@
+--- build/premake/premake4/build/gmake.unix/Premake4.make.orig 2012-01-12 01:03:37.000000000 +0100
++++ build/premake/premake4/build/gmake.unix/Premake4.make 2012-05-03 16:24:21.478971350 +0200
+@@ -24,12 +24,12 @@
+ TARGETDIR = ../../bin/release
+ TARGET = $(TARGETDIR)/premake4
+ DEFINES += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+- INCLUDES += -I../../src/host/lua-5.1.4/src
++ INCLUDES += -I../../src/host/lua-5.1.4/src -I$(LOCALBASE)/include/wx-2.8
+ CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
+ CFLAGS += $(CPPFLAGS) -Wall -Os
+ CXXFLAGS += $(CFLAGS)
+ LDFLAGS += -s -rdynamic
+- LIBS += -lm -ldl
++ LIBS += -lm
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+ LDDEPS +=
+ LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(LDDEPS) $(LIBS)
+@@ -46,12 +46,12 @@
+ TARGETDIR = ../../bin/debug
+ TARGET = $(TARGETDIR)/premake4
+ DEFINES += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+- INCLUDES += -I../../src/host/lua-5.1.4/src
++ INCLUDES += -I../../src/host/lua-5.1.4/src -I$(LOCALBASE)/include/wx-2.8
+ CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
+ CFLAGS += $(CPPFLAGS) -Wall -g
+ CXXFLAGS += $(CFLAGS)
+ LDFLAGS += -rdynamic
+- LIBS += -lm -ldl
++ LIBS += -lm
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+ LDDEPS +=
+ LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(LDDEPS) $(LIBS)
diff --git a/games/0ad/files/patch-build-premake-premake4.lua b/games/0ad/files/patch-build-premake-premake4.lua
new file mode 100644
index 000000000000..e03163ab788e
--- /dev/null
+++ b/games/0ad/files/patch-build-premake-premake4.lua
@@ -0,0 +1,25 @@
+--- build/premake/premake4.lua.orig 2012-02-21 21:27:25.000000000 +0100
++++ build/premake/premake4.lua 2012-05-17 23:23:30.211530880 +0200
+@@ -215,7 +215,6 @@
+
+ -- enable security features (stack checking etc) that shouldn't have
+ -- a significant effect on performance and can catch bugs
+- "-fstack-protector-all",
+ "-D_FORTIFY_SOURCE=2",
+
+ -- always enable strict aliasing (useful in debug builds because of the warnings)
+@@ -276,11 +275,11 @@
+ -- X11 includes may be installed in one of a gadzillion of three places
+ -- Famous last words: "You can't include too much! ;-)"
+ includedirs {
+- "/usr/X11R6/include/X11",
+- "/usr/X11R6/include",
++ "%%LOCALBASE%%/X11",
++ "%%LOCALBASE%%/include",
+ "/usr/include/X11"
+ }
+- libdirs { "/usr/X11R6/lib" }
++ libdirs { "%%LOCALBASE%%/lib" }
+
+ if _OPTIONS["bindir"] then
+ defines { "INSTALLED_BINDIR=" .. _OPTIONS["bindir"] }
diff --git a/games/0ad/files/patch-build-resources-0ad.desktop b/games/0ad/files/patch-build-resources-0ad.desktop
new file mode 100644
index 000000000000..38618af30d52
--- /dev/null
+++ b/games/0ad/files/patch-build-resources-0ad.desktop
@@ -0,0 +1,11 @@
+--- build/resources/0ad.desktop.orig 2010-10-08 16:08:54.000000000 +0200
++++ build/resources/0ad.desktop 2012-05-10 15:27:23.306790356 +0200
+@@ -3,7 +3,7 @@
+ Name=0 A.D.
+ Comment=A real-time strategy game of ancient warfare
+ Comment[it]=Videogioco strategico in tempo reale di guerre antiche
+-Exec=/usr/bin/0ad
++Exec=/usr/local/bin/0ad
+ Icon=0ad
+ Terminal=false
+ Type=Application
diff --git a/games/0ad/files/patch-build-resources-0ad.sh b/games/0ad/files/patch-build-resources-0ad.sh
new file mode 100644
index 000000000000..81bd3f0f30d8
--- /dev/null
+++ b/games/0ad/files/patch-build-resources-0ad.sh
@@ -0,0 +1,7 @@
+--- build/resources/0ad.sh.orig 2010-08-15 14:23:11.000000000 +0200
++++ build/resources/0ad.sh 2012-05-10 15:17:57.136470711 +0200
+@@ -1,3 +1,3 @@
+ #!/bin/sh
+
+-/usr/bin/pyrogenesis "$@"
++/usr/local/bin/pyrogenesis "$@"
diff --git a/games/0ad/files/patch-libraries-fcollada-src-FCollada-FUtils-FUStringBuilder.hpp b/games/0ad/files/patch-libraries-fcollada-src-FCollada-FUtils-FUStringBuilder.hpp
new file mode 100644
index 000000000000..3d3e3802d9af
--- /dev/null
+++ b/games/0ad/files/patch-libraries-fcollada-src-FCollada-FUtils-FUStringBuilder.hpp
@@ -0,0 +1,45 @@
+--- libraries/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp.orig 2012-05-21 22:08:59.267251130 +0200
++++ libraries/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp 2012-05-21 22:13:05.450463479 +0200
+@@ -18,6 +18,42 @@
+ #include <float.h>
+ #endif
+
++#ifdef __FreeBSD__
++// ecvt is not included in FreeBSD's stdlib
++// http://forum.pellesc.de/index.php?PHPSESSID=0c4srgu3vrs19ali5459jehdh3&topic=2103.msg7797#msg7797
++char *ecvt(double value, int ndigit, int *decpt, int *sign)
++{
++ static char buffer[348];
++ static const int n = sizeof(buffer)/sizeof(buffer[0])-1;
++ ptrdiff_t pd;
++ int len;
++ int zeros=0;
++ if (ndigit > n) ndigit=n;
++ while (value > -1.0 && value < 1.0 ) {
++ value*=10.0;
++ zeros++;
++ }
++ sprintf(buffer,"%.*f",DBL_DIG,value);
++ len=strlen(buffer);
++ if (buffer[0]=='-') {
++ memmove(buffer, buffer+1, --len);
++ buffer[len]='\0';
++ *sign=1;
++ }
++ else *sign = 0;
++ pd=strchr(buffer,'.')-buffer;
++ memmove(buffer+pd,buffer+pd+1,--len-pd);
++ buffer[len]='\0';
++ *decpt=(int)pd-zeros;
++ if (len >= ndigit) buffer[ndigit]='\0';
++ else {
++ memset(buffer+len,'0',ndigit-len);
++ buffer[ndigit]='\0';
++ }
++ return buffer;
++}
++#endif
++
+ #ifdef WIN32
+ #define ecvt _ecvt
+ #endif // WIN32
diff --git a/games/0ad/files/patch-libraries-nvtt-src-src-nvtt-squish-CMakeLists.txt b/games/0ad/files/patch-libraries-nvtt-src-src-nvtt-squish-CMakeLists.txt
new file mode 100644
index 000000000000..192bc5930d07
--- /dev/null
+++ b/games/0ad/files/patch-libraries-nvtt-src-src-nvtt-squish-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- libraries/nvtt/src/src/nvtt/squish/CMakeLists.txt.orig 2012-05-17 23:33:39.561531637 +0200
++++ libraries/nvtt/src/src/nvtt/squish/CMakeLists.txt 2012-05-17 23:33:51.665531705 +0200
+@@ -22,7 +22,4 @@
+
+ ADD_LIBRARY(squish STATIC ${SQUISH_SRCS})
+
+-IF(CMAKE_COMPILER_IS_GNUCXX)
+- SET_TARGET_PROPERTIES(squish PROPERTIES COMPILE_FLAGS -fPIC)
+-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+-
++SET_TARGET_PROPERTIES(squish PROPERTIES COMPILE_FLAGS -fPIC)
diff --git a/games/0ad/files/patch-libraries-spidermonkey-build.sh b/games/0ad/files/patch-libraries-spidermonkey-build.sh
new file mode 100644
index 000000000000..ef671b4c5d3c
--- /dev/null
+++ b/games/0ad/files/patch-libraries-spidermonkey-build.sh
@@ -0,0 +1,14 @@
+--- libraries/spidermonkey/build.sh.orig 2012-01-31 01:06:56.000000000 +0100
++++ libraries/spidermonkey/build.sh 2012-05-03 15:49:34.640969629 +0200
+@@ -49,6 +49,11 @@
+
+ cd js-1.8.5/js/src
+
++cp jsnativestack.cpp jsnativestack.cpp.orig
++sed 's/# include <pthread_np.h>/#pragma GCC visibility push(default)\
++#include <pthread_np.h>\
++#pragma GCC visibility pop/' jsnativestack.cpp.orig >jsnativestack.cpp
++
+ # We want separate debug/release versions of the library, so we have to change
+ # the LIBRARY_NAME for each build.
+ # (We use perl instead of sed so that it works with MozillaBuild on Windows,
diff --git a/games/0ad/files/patch-source-lib-sysdep-os-unix-x-x.cpp b/games/0ad/files/patch-source-lib-sysdep-os-unix-x-x.cpp
new file mode 100644
index 000000000000..8ca964a6a19c
--- /dev/null
+++ b/games/0ad/files/patch-source-lib-sysdep-os-unix-x-x.cpp
@@ -0,0 +1,16 @@
+--- source/lib/sysdep/os/unix/x/x.cpp.orig 2012-05-18 13:26:07.715192771 +0200
++++ source/lib/sysdep/os/unix/x/x.cpp 2012-05-18 13:26:35.139193906 +0200
+@@ -40,10 +40,10 @@
+
+ #define Cursor X__Cursor
+
+-#include <Xlib.h>
++#include <X11/Xlib.h>
+ #include <stdlib.h>
+-#include <Xatom.h>
+-#include <Xcursor/Xcursor.h>
++#include <X11/Xatom.h>
++#include <X11/Xcursor/Xcursor.h>
+
+ #include "SDL.h"
+ #include "SDL_syswm.h"
diff --git a/games/0ad/files/patch-source-tools-atlas-AtlasObject-AtlasObjectJS.cpp b/games/0ad/files/patch-source-tools-atlas-AtlasObject-AtlasObjectJS.cpp
new file mode 100644
index 000000000000..fed2ce4707be
--- /dev/null
+++ b/games/0ad/files/patch-source-tools-atlas-AtlasObject-AtlasObjectJS.cpp
@@ -0,0 +1,11 @@
+--- source/tools/atlas/AtlasObject/AtlasObjectJS.cpp.orig 2012-05-21 22:49:25.624250443 +0200
++++ source/tools/atlas/AtlasObject/AtlasObjectJS.cpp 2012-05-21 22:49:28.429250717 +0200
+@@ -24,7 +24,7 @@
+ # pragma warning(disable:4996) // deprecated CRT
+ #endif
+
+-#include "wx/log.h"
++#include "wx-2.8/wx/log.h"
+
+ #include <sstream>
+
diff --git a/games/0ad/pkg-descr b/games/0ad/pkg-descr
new file mode 100644
index 000000000000..bc418696ccd1
--- /dev/null
+++ b/games/0ad/pkg-descr
@@ -0,0 +1,16 @@
+0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
+real-time strategy (RTS) game of ancient warfare. In short, it is
+a historically-based war/economy game that allows players to relive
+or rewrite the history of Western civilizations, focusing on the
+years between 500 B.C. and 500 A.D. The project is highly ambitious,
+involving state-of-the-art 3D graphics, detailed artwork, sound,
+and a flexible and powerful custom-built game engine.
+
+The game has been in development by Wildfire Games (WFG), a group
+of volunteer, hobbyist game developers, since 2001. The code and
+data are available under the GPL license, and the art, sound and
+documentation are available under CC-BY-SA. In short, we consider
+0 A.D. an educational celebration of game development and ancient
+history.
+
+WWW: http://wildfiregames.com/0ad/
diff --git a/games/0ad/pkg-plist b/games/0ad/pkg-plist
new file mode 100644
index 000000000000..d31c5174a031
--- /dev/null
+++ b/games/0ad/pkg-plist
@@ -0,0 +1,17 @@
+bin/pyrogenesis
+bin/0ad
+bin/ActorEditor
+lib/0ad/libAtlasUI.so
+lib/0ad/libCollada.so
+lib/0ad/libenet.so.1
+lib/0ad/libmozjs185-ps-release.so.1.0
+lib/0ad/libnvcore.so
+lib/0ad/libnvimage.so
+lib/0ad/libnvmath.so
+lib/0ad/libnvtt.so
+share/applications/0ad.desktop
+share/pixmaps/0ad.png
+@exec mkdir -p %D/%%DATADIR%%/mods/_test.minimal/art/meshes
+@exec mkdir -p %D/%%DATADIR%%/mods/_test.minimal/art/actors
+@dirrm lib/0ad
+@dirrmtry share/applications
diff --git a/games/Makefile b/games/Makefile
index 84d962d9bead..a198ecacbda0 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -3,6 +3,7 @@
COMMENT = Games
+ SUBDIR += 0ad
SUBDIR += 0verkill
SUBDIR += 3dc
SUBDIR += 3dpong