aboutsummaryrefslogtreecommitdiffstats
path: root/games/aquaria
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2015-09-18 11:24:57 +0800
committerjbeich <jbeich@FreeBSD.org>2015-09-18 11:24:57 +0800
commit59e8f159f915daf11dfffd71814e1319033fe937 (patch)
treeee108a15a01cd925c7d44ce134f39064f25de5a9 /games/aquaria
parent728833124f597e9316a31fc0858fb81456785df7 (diff)
downloadfreebsd-ports-gnome-59e8f159f915daf11dfffd71814e1319033fe937.tar.gz
freebsd-ports-gnome-59e8f159f915daf11dfffd71814e1319033fe937.tar.zst
freebsd-ports-gnome-59e8f159f915daf11dfffd71814e1319033fe937.zip
games/aquaria: add new port
PR: 195815 The game follows Naija, a mermaid-like woman, as she explores the underwater world of Aquaria. Along her journey, she learns about both the history of the world and her own past. The gameplay focuses on a combination of swimming, singing and combat, through which Naija can interact with the world. Naija's songs can move items, affect plants and animals, and change her physical appearance into other forms. These forms have different abilities, such as firing projectiles at hostile creatures or passing through barriers inaccessible to her in her natural form. -- Wikipedia This package provides only game engine. Proprietary game data files have to be obtained separately. https://github.com/AquariaOSE/Aquaria
Diffstat (limited to 'games/aquaria')
-rw-r--r--games/aquaria/Makefile64
-rw-r--r--games/aquaria/distinfo2
-rw-r--r--games/aquaria/files/patch-BBGE_RenderObject.cpp17
-rw-r--r--games/aquaria/files/patch-CMakeLists.txt39
-rw-r--r--games/aquaria/files/patch-ExternalLibs_minihttp.cpp10
-rw-r--r--games/aquaria/files/patch-system-ftgl111
-rw-r--r--games/aquaria/files/pkg-message.in12
-rw-r--r--games/aquaria/pkg-descr14
8 files changed, 269 insertions, 0 deletions
diff --git a/games/aquaria/Makefile b/games/aquaria/Makefile
new file mode 100644
index 000000000000..69b5153b3399
--- /dev/null
+++ b/games/aquaria/Makefile
@@ -0,0 +1,64 @@
+# $FreeBSD$
+
+PORTNAME= aquaria
+PORTVERSION= 1.002
+DISTVERSIONPREFIX= OSE-v
+CATEGORIES= games
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= Underwater 2D fantasy action-adventure (game engine)
+
+LICENSE= GPLv2 # or any later version
+
+BUILD_DEPENDS= ${LOCALBASE}/include/glm/glm.hpp:${PORTSDIR}/math/glm
+LIB_DEPENDS= libvorbisfile.so:${PORTSDIR}/audio/libvorbis \
+ libftgl.so:${PORTSDIR}/graphics/ftgl \
+ libpng.so:${PORTSDIR}/graphics/png \
+ libtinyxml2.so:${PORTSDIR}/textproc/tinyxml2
+
+USE_GITHUB= yes
+GH_ACCOUNT= AquariaOSE
+GH_PROJECT= Aquaria
+
+USES= cmake lua:51 ninja openal pkgconfig
+EXCLUDE= AL FTGL GL SDL* freetype2 glm glpng/png glpng/zlib \
+ libogg-* libvorbis-* lua-* tinyxml2*
+EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ExternalLibs/,}
+CMAKE_ARGS+= -DAQUARIA_DEFAULT_DATA_DIR="${DATADIR}" \
+ -DAQUARIA_INTERNAL_FREETYPE=off \
+ -DAQUARIA_INTERNAL_FTGL=off \
+ -DAQUARIA_INTERNAL_LUA=off \
+ -DAQUARIA_INTERNAL_OGGVORBIS=off \
+ -DAQUARIA_INTERNAL_OPENAL=off \
+ -DAQUARIA_INTERNAL_PNG=off \
+ -DAQUARIA_INTERNAL_SDL=off \
+ -DAQUARIA_INTERNAL_TINYXML2=off \
+ -DAQUARIA_INTERNAL_ZLIB=off
+LDFLAGS+= -Wl,--as-needed # avoid overlinking (vorbis deps)
+SUB_FILES= pkg-message
+PLIST_FILES= bin/aquaria
+PORTDATA= *
+
+DESKTOP_ENTRIES="${GH_PROJECT}" \
+ "" \
+ "${DATADIR}/${PORTNAME}.png" \
+ "${PORTNAME}" \
+ "Game;ArcadeGame;" \
+ ""
+
+OPTIONS_DEFINE= DEBUG SDL2
+OPTIONS_DEFAULT=SDL2
+
+SDL2_DESC= Use SDL 2.x instead of SDL 1.2.x
+SDL2_CMAKE_ON= -DAQUARIA_USE_SDL2=on
+SDL2_USE= SDL=sdl2
+SDL2_USE_OFF= SDL=sdl
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+.for d in game_scripts files
+ (cd ${WRKSRC}/${d} && ${COPYTREE_SHARE} \
+ "." ${STAGEDIR}${DATADIR}/override)
+.endfor
+
+.include <bsd.port.mk>
diff --git a/games/aquaria/distinfo b/games/aquaria/distinfo
new file mode 100644
index 000000000000..9bd038181ca1
--- /dev/null
+++ b/games/aquaria/distinfo
@@ -0,0 +1,2 @@
+SHA256 (AquariaOSE-Aquaria-OSE-v1.002_GH0.tar.gz) = 15333eb0a90dd12cfbd234cbbd4d4eed01e4f8801a3dbebdef90702c7eb24455
+SIZE (AquariaOSE-Aquaria-OSE-v1.002_GH0.tar.gz) = 5737047
diff --git a/games/aquaria/files/patch-BBGE_RenderObject.cpp b/games/aquaria/files/patch-BBGE_RenderObject.cpp
new file mode 100644
index 000000000000..0674198b24dd
--- /dev/null
+++ b/games/aquaria/files/patch-BBGE_RenderObject.cpp
@@ -0,0 +1,17 @@
+https://github.com/AquariaOSE/Aquaria/pull/19
+
+--- BBGE/RenderObject.cpp.orig 2015-08-16 13:19:19 UTC
++++ BBGE/RenderObject.cpp
+@@ -316,10 +316,9 @@ static glm::mat4 matrixChain(const Rende
+ );
+
+ if (ro->isfh())
+- tranformMatrix *= glm::rotate(180.0f, 0.0f, 1.0f, 0.0f);
+-
+- tranformMatrix *= glm::translate(ro->internalOffset.x, ro->internalOffset.y, 0.0f);
++ tranformMatrix *= glm::rotate(180.0f, glm::vec3(0.0f, 1.0f, 0.0f));
+
++ tranformMatrix *= glm::translate(glm::vec3(ro->internalOffset.x, ro->internalOffset.y, 0.0f));
+ return tranformMatrix;
+ }
+ #else
diff --git a/games/aquaria/files/patch-CMakeLists.txt b/games/aquaria/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..5b9a654bdffc
--- /dev/null
+++ b/games/aquaria/files/patch-CMakeLists.txt
@@ -0,0 +1,39 @@
+--- CMakeLists.txt.orig 2015-08-16 13:19:19 UTC
++++ CMakeLists.txt
+@@ -227,6 +227,7 @@ endif (NOT OPENAL_FOUND)
+
+ OPTION(AQUARIA_INTERNAL_TINYXML2 "Always use included TinyXML2 library" ${WIN32_TRUE})
+ if(NOT AQUARIA_INTERNAL_TINYXML2)
++ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+ find_package(TinyXML2)
+ endif(NOT AQUARIA_INTERNAL_TINYXML2)
+ if (AQUARIA_INTERNAL_TINYXML2 OR NOT TINYXML2_FOUND)
+@@ -316,6 +317,10 @@ ELSE(AQUARIA_DEMO_BUILD)
+ ADD_DEFINITIONS(-DAQUARIA_BUILD_SCENEEDITOR=1)
+ ENDIF(AQUARIA_DEMO_BUILD)
+
++IF(CMAKE_BUILD_TYPE STREQUAL "Release")
++ ADD_DEFINITIONS(-DNDEBUG)
++ message(STATUS "This is a release build.")
++ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release")
+ IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ ADD_DEFINITIONS(-D_DEBUG) # MSVC defines this in debug mode by default, gcc/mingw do not
+ message(STATUS "This is a debug build.")
+@@ -341,7 +346,7 @@ IF(UNIX AND NOT HAIKU)
+ ADD_DEFINITIONS(-DLUA_USE_ULONGJMP=1)
+ ENDIF()
+
+-IF(CMAKE_COMPILER_IS_GNUCC)
++IF(AQUARIA_CRUFT)
+ ADD_DEFINITIONS(-pipe -fsigned-char)
+ #ADD_DEFINITIONS(-Wall)
+
+@@ -367,7 +372,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
+ SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
+ SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+-ENDIF(CMAKE_COMPILER_IS_GNUCC)
++ENDIF(AQUARIA_CRUFT)
+
+ CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
+ IF(HAVE_STRCASECMP)
diff --git a/games/aquaria/files/patch-ExternalLibs_minihttp.cpp b/games/aquaria/files/patch-ExternalLibs_minihttp.cpp
new file mode 100644
index 000000000000..054941b83bd2
--- /dev/null
+++ b/games/aquaria/files/patch-ExternalLibs_minihttp.cpp
@@ -0,0 +1,10 @@
+--- ExternalLibs/minihttp.cpp.orig 2015-08-16 13:19:19 UTC
++++ ExternalLibs/minihttp.cpp
+@@ -32,6 +32,7 @@
+ # include <sys/types.h>
+ # include <unistd.h>
+ # include <fcntl.h>
++# include <netinet/in.h>
+ # include <sys/socket.h>
+ # include <netdb.h>
+ # define SOCKET_ERROR (-1)
diff --git a/games/aquaria/files/patch-system-ftgl b/games/aquaria/files/patch-system-ftgl
new file mode 100644
index 000000000000..04651935d9f7
--- /dev/null
+++ b/games/aquaria/files/patch-system-ftgl
@@ -0,0 +1,111 @@
+diff --git BBGE/TTFFont.h BBGE/TTFFont.h
+index 364cfb5..b23438a 100644
+--- BBGE/TTFFont.h
++++ BBGE/TTFFont.h
+@@ -24,11 +24,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ #include "Base.h"
+ #include "BaseText.h"
+
++#ifdef AQUARIA_INTERNAL_FTGL
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+
+ #include "FTGL.h"
+ #include "FTGLTextureFont.h"
++#else
++#include <FTGL/ftgl.h>
++#endif
+
+ struct TTFFont
+ {
+diff --git CMakeLists.txt CMakeLists.txt
+index 07dca08..059cb94 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -235,6 +235,20 @@ if (AQUARIA_INTERNAL_TINYXML2 OR NOT TINYXML2_FOUND)
+ set(TINYXML2_SRCS "${EXTLIBDIR}/tinyxml2.cpp")
+ endif (AQUARIA_INTERNAL_TINYXML2 OR NOT TINYXML2_FOUND)
+
++### FTGL
++
++OPTION(AQUARIA_INTERNAL_FTGL "Always use included FTGL library" TRUE)
++if(NOT AQUARIA_INTERNAL_FTGL)
++ find_package(FTGL)
++endif(NOT AQUARIA_INTERNAL_FTGL)
++if(FTGL_FOUND)
++ set(FREETYPE_INCLUDE_DIRS)
++else(FTGL_FOUND)
++ message(STATUS "Using internal copy of FTGL")
++ set(FTGL_INCLUDE_DIRS "${FTGLDIR}/include")
++ ADD_DEFINITIONS(-DAQUARIA_INTERNAL_FTGL=1)
++endif(FTGL_FOUND)
++
+ ################ End of external libraries
+
+ INCLUDE_DIRECTORIES(${BBGEDIR})
+@@ -242,7 +256,7 @@ INCLUDE_DIRECTORIES(${BBGEDIR}/GL)
+ INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
+ INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${SRCDIR})
+-INCLUDE_DIRECTORIES(${FTGLDIR}/include)
++INCLUDE_DIRECTORIES(${FTGL_INCLUDE_DIRS})
+ INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
+ INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${OGGVORBIS_INCLUDE_DIRS})
+@@ -740,11 +754,13 @@ ELSE(PNG_FOUND)
+ SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${PNG_SRCS})
+ ENDIF(PNG_FOUND)
+
++IF(NOT FTGL_FOUND)
+ IF(FREETYPE_FOUND)
+ SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${FREETYPE_LIBRARIES})
+ ELSE(FREETYPE_FOUND)
+ SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${FREETYPE2_SRCS})
+ ENDIF(FREETYPE_FOUND)
++ENDIF(NOT FTGL_FOUND)
+
+ IF(LUA51_FOUND)
+ SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${LUA_LIBRARIES})
+@@ -764,10 +780,15 @@ ELSE(TINYXML2_FOUND)
+ SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${TINYXML2_SRCS})
+ ENDIF(TINYXML2_FOUND)
+
++IF(FTGL_FOUND)
++ SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${FTGL_LIBRARIES})
++ELSE(FTGL_FOUND)
++ SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${FTGL_SRCS})
++ENDIF(FTGL_FOUND)
++
+ ADD_EXECUTABLE(aquaria ${EXETYPE}
+ ${AQUARIA_SRCS}
+ ${BBGE_SRCS}
+- ${FTGL_SRCS}
+ ${OPTIONAL_SRCS}
+ )
+ TARGET_LINK_LIBRARIES(aquaria ${OPTIONAL_LIBS})
+diff --git cmake/Modules/FindFTGL.cmake cmake/Modules/FindFTGL.cmake
+new file mode 100644
+index 0000000..9c9d61d
+--- /dev/null
++++ cmake/Modules/FindFTGL.cmake
+@@ -0,0 +1,20 @@
++# - Try to find FTGL
++# Once done this will define
++# FTGL_FOUND - System has FTGL
++# FTGL_INCLUDE_DIRS - The FTGL include directories
++# FTGL_LIBRARIES - The libraries needed to use FTGL
++# FTGL_DEFINITIONS - Compiler switches required for using FTGL
++
++find_package(PkgConfig)
++pkg_check_modules(PC_FTGL QUIET ftgl)
++set(FTGL_INCLUDE_DIRS ${PC_FTGL_INCLUDE_DIRS})
++set(FTGL_DEFINITIONS ${PC_FTGL_CFLAGS_OTHER})
++
++find_library(FTGL_LIBRARY ftgl
++ HINTS ${PC_FTGL_LIBDIR} ${PC_FTGL_LIBRARY_DIRS})
++set(FTGL_LIBRARIES ${FTGL_LIBRARY})
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(FTGL DEFAULT_MSG FTGL_LIBRARIES FTGL_INCLUDE_DIRS)
++
++mark_as_advanced(FTGL_LIBRARIES FTGL_INCLUDE_DIRS)
diff --git a/games/aquaria/files/pkg-message.in b/games/aquaria/files/pkg-message.in
new file mode 100644
index 000000000000..5dc51cb78c37
--- /dev/null
+++ b/games/aquaria/files/pkg-message.in
@@ -0,0 +1,12 @@
+The following method was only tested with Aquaria release from Humble
+Indie Bundle. In order to play the game copy data files under
+%%DATADIR%% or specify the path to them via environment variable e.g.,
+
+ $ unzip aquaria-lnx-humble-bundle.mojo.run
+ $ tar cf - -Cdata . | tar xof - -C%%DATADIR%%
+ $ aquaria
+
+or
+
+ $ cp -R %%DATADIR%%/override /path/to/aquaria/data/
+ $ AQUARIA_DATA_PATH=/path/to/aquaria/data aquaria
diff --git a/games/aquaria/pkg-descr b/games/aquaria/pkg-descr
new file mode 100644
index 000000000000..fae26d56f7c0
--- /dev/null
+++ b/games/aquaria/pkg-descr
@@ -0,0 +1,14 @@
+The game follows Naija, a mermaid-like woman, as she explores the
+underwater world of Aquaria. Along her journey, she learns about both
+the history of the world and her own past. The gameplay focuses on a
+combination of swimming, singing and combat, through which Naija can
+interact with the world. Naija's songs can move items, affect plants
+and animals, and change her physical appearance into other
+forms. These forms have different abilities, such as firing
+projectiles at hostile creatures or passing through barriers
+inaccessible to her in her natural form. -- Wikipedia
+
+This package provides only game engine. Proprietary game data files
+have to be obtained separately.
+
+WWW: https://github.com/AquariaOSE/Aquaria