From owner-svn-ports-head@freebsd.org Fri Sep 18 03:25:00 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D6919CD358; Fri, 18 Sep 2015 03:25:00 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 614FE1BAC; Fri, 18 Sep 2015 03:25:00 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I3P0M8089610; Fri, 18 Sep 2015 03:25:00 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I3OvmQ089581; Fri, 18 Sep 2015 03:24:57 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201509180324.t8I3OvmQ089581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 18 Sep 2015 03:24:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r397212 - in head/games: . aquaria aquaria/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 03:25:00 -0000 Author: jbeich Date: Fri Sep 18 03:24:57 2015 New Revision: 397212 URL: https://svnweb.freebsd.org/changeset/ports/397212 Log: 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 Added: head/games/aquaria/ head/games/aquaria/Makefile (contents, props changed) head/games/aquaria/distinfo (contents, props changed) head/games/aquaria/files/ head/games/aquaria/files/patch-BBGE_RenderObject.cpp (contents, props changed) head/games/aquaria/files/patch-CMakeLists.txt (contents, props changed) head/games/aquaria/files/patch-ExternalLibs_minihttp.cpp (contents, props changed) head/games/aquaria/files/patch-system-ftgl (contents, props changed) head/games/aquaria/files/pkg-message.in (contents, props changed) head/games/aquaria/pkg-descr (contents, props changed) Modified: head/games/Makefile (contents, props changed) Modified: head/games/Makefile ============================================================================== --- head/games/Makefile Fri Sep 18 02:29:49 2015 (r397211) +++ head/games/Makefile Fri Sep 18 03:24:57 2015 (r397212) @@ -43,6 +43,7 @@ SUBDIR += aop SUBDIR += apoolGL SUBDIR += apricots + SUBDIR += aquaria SUBDIR += arkanoidsb SUBDIR += armagetron SUBDIR += arx-libertatis Added: head/games/aquaria/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/Makefile Fri Sep 18 03:24:57 2015 (r397212) @@ -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 Added: head/games/aquaria/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/distinfo Fri Sep 18 03:24:57 2015 (r397212) @@ -0,0 +1,2 @@ +SHA256 (AquariaOSE-Aquaria-OSE-v1.002_GH0.tar.gz) = 15333eb0a90dd12cfbd234cbbd4d4eed01e4f8801a3dbebdef90702c7eb24455 +SIZE (AquariaOSE-Aquaria-OSE-v1.002_GH0.tar.gz) = 5737047 Added: head/games/aquaria/files/patch-BBGE_RenderObject.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/files/patch-BBGE_RenderObject.cpp Fri Sep 18 03:24:57 2015 (r397212) @@ -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 Added: head/games/aquaria/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/files/patch-CMakeLists.txt Fri Sep 18 03:24:57 2015 (r397212) @@ -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) Added: head/games/aquaria/files/patch-ExternalLibs_minihttp.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/files/patch-ExternalLibs_minihttp.cpp Fri Sep 18 03:24:57 2015 (r397212) @@ -0,0 +1,10 @@ +--- ExternalLibs/minihttp.cpp.orig 2015-08-16 13:19:19 UTC ++++ ExternalLibs/minihttp.cpp +@@ -32,6 +32,7 @@ + # include + # include + # include ++# include + # include + # include + # define SOCKET_ERROR (-1) Added: head/games/aquaria/files/patch-system-ftgl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/files/patch-system-ftgl Fri Sep 18 03:24:57 2015 (r397212) @@ -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 + #include FT_FREETYPE_H + + #include "FTGL.h" + #include "FTGLTextureFont.h" ++#else ++#include ++#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) Added: head/games/aquaria/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/files/pkg-message.in Fri Sep 18 03:24:57 2015 (r397212) @@ -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 Added: head/games/aquaria/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/aquaria/pkg-descr Fri Sep 18 03:24:57 2015 (r397212) @@ -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