Index: branches/2018Q1/games/spring/Makefile =================================================================== --- branches/2018Q1/games/spring/Makefile (revision 463538) +++ branches/2018Q1/games/spring/Makefile (revision 463539) @@ -1,115 +1,113 @@ # Created by: Dmitry Marakasov # $FreeBSD$ PORTNAME= spring PORTVERSION= 98.0 PORTREVISION= 9 CATEGORIES= games MASTER_SITES= SF/springrts/springrts/${PORTNAME}-${PORTVERSION} \ http://springrts.com/dl/ DISTNAME= ${PORTNAME}_${PORTVERSION}_src MAINTAINER= amdmi3@FreeBSD.org COMMENT= Project aiming to create a new and versatile RTS Engine LICENSE= GPLv2 -BROKEN_FreeBSD_10= fails to build with boost 1.65, see bug 220762 - LIB_DEPENDS= libfreetype.so:print/freetype2 \ libboost_thread.so:devel/boost-libs \ libIL.so:graphics/devil \ libogg.so:audio/libogg \ libvorbis.so:audio/libvorbis BUILD_DEPENDS= 7z:archivers/p7zip # XXX: it should be possible to build it on i386, investigate # (currently link fails on undefined reference to __sync_fetch_and_add_8) ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= relies on x86 floating-point math and amd64 atomic ops USE_SDL= sdl2 USE_GL= gl glu glew USE_XORG= x11 xcursor USE_LDCONFIG= yes DOS2UNIX_GLOB= *.h *.hpp *.cpp USES= cmake compiler:c++11-lib dos2unix openal:al tar:lzma USES+= desktop-file-utils shared-mime-info CMAKE_ARGS= -DDATADIR:STRING="share/${PORTNAME}" \ -DAI_TYPES:STRING="NATIVE" \ -DDOCDIR:STRING="share/doc/${PORTNAME}" \ -DCREATE_MAN_PAGES:BOOL=false \ -DUSE_TCMALLOC:BOOL=false \ -DUSE_LIBSQUISH:BOOL=false \ -DUNITSYNC_PYTHON_WRAPPER:BOOL=false WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION} # Do not exctract bundled copies of header files for 3rd-party packages: EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude ${WRKSRC:T}/include # The check-target fails right now: https://springrts.com/mantis/view.php?id=4736 TEST_TARGET= check PORTDOCS= * PORTDATA= * OPTIONS_DEFINE= MANPAGES PR_DOWNLOADER DOCS OPTIONS_DEFAULT=MANPAGES PR_DOWNLOADER OPTIONS_SUB= yes HTMLDOCS_DESC= Build and install HTML documentation PR_DOWNLOADER_DESC= Map and game downloader MANPAGES_CMAKE_ON= -DCREATE_MAN_PAGES:BOOL=true -DMANDIR:STRING="man" MANPAGES_CMAKE_OFF= -DCREATE_MAN_PAGES:BOOL=false MANPAGES_BUILD_DEPENDS= 7z:archivers/p7zip \ asciidoc:textproc/asciidoc \ xsltproc:textproc/libxslt \ ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \ bash:shells/bash MANPAGES_DOCS_ON= -DUSERDOCS_PLAIN:BOOL=true MANPAGES_DOCS_OFF= -DUSERDOCS_PLAIN:BOOL=false CXXFLAGS+= -Wno-deprecated # Too much noise PR_DOWNLOADER_LIB_DEPENDS=libcurl.so:ftp/curl .include .if defined(WITH_SYNC_DEBUG) CFLAGS= # empty CXXFLAGS= # empty CMAKE_ARGS+= -DTRACE_SYNC=true -DSYNCDEBUG=true CMAKE_BUILD_TYPE=DEBUG2 .endif .if ! ${PORT_OPTIONS:MPR_DOWNLOADER} post-extract: @${RM} ${WRKSRC}/tools/pr-downloader/CMakeLists.txt .endif post-patch: @${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e 's|/etc/\(spring/datadir\)|${PREFIX}/\1|g' \ ${WRKSRC}/rts/System/FileSystem/DataDirLocater.cpp @${REINPLACE_CMD} -e 's|x1F3F|x0F3F|g' \ ${WRKSRC}/rts/System/Sync/FPUCheck.cpp @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/rts/build/cmake/*.cmake @${REINPLACE_CMD} -e 's|execinfo|/usr/lib/libexecinfo.so|' \ ${WRKSRC}/rts/CMakeLists.txt \ ${WRKSRC}/rts/builds/dedicated/CMakeLists.txt @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \ ${WRKSRC}/rts/System/Platform/Misc.cpp @${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}&|' \ ${WRKSRC}/doc/manpages/make_manpages.sh .if ! ${PORT_OPTIONS:MMANPAGES} @${REINPLACE_CMD} -e '/set(CREATE_MAN_PAGES)/ d' \ ${WRKSRC}/doc/CMakeLists.txt .endif pre-build: cd ${WRKSRC} && ${MAKE_CMD} generateVersionFiles .include Index: branches/2018Q1/games/spring/files/patch-math =================================================================== --- branches/2018Q1/games/spring/files/patch-math (revision 463538) +++ branches/2018Q1/games/spring/files/patch-math (revision 463539) @@ -1,186 +1,196 @@ +++ rts/aGui/GuiElement.h 2015-04-08 15:06:26 -0400 @@ -4,4 +4,5 @@ #define GUIELEMENT_H +#include #include #include ++++ rts/lib/streflop/SMath.h +@@ -16,6 +16,8 @@ + #ifndef STREFLOP_MATH_H + #define STREFLOP_MATH_H + ++#include ++ + // just in case, should already be included + #include "streflop.h" + +++ rts/Sim/Weapons/LaserCannon.cpp 2015-04-07 20:49:52 -0400 @@ -1,4 +1,6 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "LaserCannon.h" #include "WeaponDef.h" +++ rts/Sim/Weapons/FlameThrower.cpp 2015-04-07 20:50:46 -0400 @@ -1,4 +1,6 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "FlameThrower.h" #include "WeaponDef.h" +++ rts/Sim/Weapons/MissileLauncher.cpp 2015-04-07 20:53:21 -0400 @@ -1,4 +1,6 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "MissileLauncher.h" #include "WeaponDef.h" +++ rts/Sim/Weapons/EmgCannon.cpp 2015-04-07 20:57:50 -0400 @@ -1,4 +1,6 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "EmgCannon.h" #include "WeaponDef.h" +++ rts/Sim/Units/Groups/GroupHandler.cpp 2015-04-08 16:24:53 -0400 @@ -2,4 +2,6 @@ #include + +#include #include +++ rts/Sim/Weapons/TorpedoLauncher.cpp 2015-04-08 16:26:07 -0400 @@ -1,4 +1,6 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "TorpedoLauncher.h" #include "WeaponDef.h" +++ rts/Game/Camera.cpp 2015-04-08 16:27:30 -0400 @@ -1,4 +1,5 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include #include +++ rts/Game/InMapDraw.cpp 2015-04-08 16:44:34 -0400 @@ -1,6 +1,7 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ -#include "SDL_mouse.h" -#include "SDL_keyboard.h" +#include +#include +#include #include "InMapDraw.h" +++ rts/Game/PreGame.cpp 2015-04-08 16:45:50 -0400 @@ -1,4 +1,5 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include #include #include +++ rts/Game/UI/MiniMap.cpp 2015-04-08 16:47:16 -0400 @@ -1,4 +1,5 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include #include #include +++ rts/Rendering/GL/myGL.cpp 2015-04-08 16:51:02 -0400 @@ -1,4 +1,5 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include #include #include +++ rts/System/Input/Joystick.cpp 2015-04-08 16:54:28 -0400 @@ -1,4 +1,6 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "InputHandler.h" #include "Joystick.h" +++ rts/System/SpringApp.cpp 2015-04-08 16:59:02 -0400 @@ -1,4 +1,6 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "System/Input/InputHandler.h" +++ rts/Sim/Projectiles/WeaponProjectiles/LargeBeamLaserProjectile.cpp 2015-04-07 20:42:45 -0400 @@ -10,4 +10,5 @@ #include "System/myMath.h" #include //memset +#include // floor CR_BIND_DERIVED(CLargeBeamLaserProjectile, CWeaponProjectile, (ProjectileParams())) --- rts/System/Sync/SyncedFloat3.h 2014-10-07 20:09:51 UTC +++ rts/System/Sync/SyncedFloat3.h 2015-04-24 08:44:31 -0400 @@ -13,4 +13,6 @@ #include "System/FastMath.h" //SSE (I)SQRT +#include + /** * @brief SyncedFloat3 class @@ -614,7 +616,7 @@ void AssertNaNs() const { - assert(!math::isnan(x) && !math::isinf(x)); - assert(!math::isnan(y) && !math::isinf(y)); - assert(!math::isnan(z) && !math::isinf(z)); + assert(!isnanf(x) && !__isinff(x)); + assert(!isnanf(y) && !__isinff(y)); + assert(!isnanf(z) && !__isinff(z)); } +++ rts/Sim/Path/IPathController.cpp 2015-04-08 18:59:04 -0400 @@ -1,3 +1,5 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include + #include "IPathController.hpp" #include "Sim/Units/Unit.h" @@ -27,8 +29,8 @@ const float rawSpeedDiff = (targetSpeed * targetSpeedSign) - (currentSpeed * currentSpeedSign); - const float absSpeedDiff = math::fabs(rawSpeedDiff); + const float absSpeedDiff = fabsf(rawSpeedDiff); // need to clamp, game-supplied values can be much larger than |speedDiff| - const float modAccRate = std::min(absSpeedDiff, maxAccRate); - const float modDecRate = std::min(absSpeedDiff, maxDecRate); + const float modAccRate = fminf(absSpeedDiff, maxAccRate); + const float modDecRate = fminf(absSpeedDiff, maxDecRate); const float deltaSpeed = mix(modAccRate, -modDecRate, (rawSpeedDiff < 0.0f)); @@ -66,6 +68,6 @@ static float TurnAccelerationSign(float turnBrakeDist, short curDeltaHeading, short newDeltaHeading) { - const bool b0 = (turnBrakeDist >= std::abs(curDeltaHeading)); - const bool b1 = (std::abs(newDeltaHeading) <= std::abs(curDeltaHeading)); + const bool b0 = (turnBrakeDist >= abs(curDeltaHeading)); + const bool b1 = (abs(newDeltaHeading) <= abs(curDeltaHeading)); const bool b2 = (Sign(curDeltaHeading) != Sign(newDeltaHeading)); @@ -86,5 +88,5 @@ const short curDeltaHeading = newHeading - short(oldHeading + (*curTurnSpeed) * (maxTurnAccel / maxTurnSpeed)); - const float minTurnAccel = std::min(float(std::abs(curDeltaHeading)), maxTurnAccel); + const float minTurnAccel = fminf(float(abs(curDeltaHeading)), maxTurnAccel); const float rawTurnAccel = Clamp(Sign(curDeltaHeading) * maxTurnAccel, -minTurnAccel, minTurnAccel); const float newTurnSpeed = Clamp((*curTurnSpeed) + rawTurnAccel * (1 - owner->IsInAir()), -maxTurnSpeed, maxTurnSpeed); +++ rts/Sim/Projectiles/Unsynced/BitmapMuzzleFlame.cpp 2015-04-08 20:20:52 -0400 @@ -1,4 +1,5 @@ /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ +#include #include "BitmapMuzzleFlame.h" @@ -61,5 +62,5 @@ const float ilength = length * (igrowth + 1.0f); - const float3 udir = (std::fabs(dir.dot(UpVector)) >= 0.99f)? FwdVector: UpVector; + const float3 udir = (fabsf(dir.dot(UpVector)) >= 0.99f)? FwdVector: UpVector; const float3 xdir = (dir.cross(udir)).SafeANormalize(); const float3 ydir = (dir.cross(xdir)).SafeANormalize(); Index: branches/2018Q1 =================================================================== --- branches/2018Q1 (revision 463538) +++ branches/2018Q1 (revision 463539) Property changes on: branches/2018Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r463537