Date: Fri, 24 Apr 2015 22:39:02 +0000 (UTC) From: Mikhail Teterin <mi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384691 - in head/games/spring: . files Message-ID: <201504242239.t3OMd20S067506@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mi Date: Fri Apr 24 22:39:01 2015 New Revision: 384691 URL: https://svnweb.freebsd.org/changeset/ports/384691 Log: Unbreak and upgrade to the latest availble version -- 0.98. Approved by: maintainer Added: head/games/spring/files/patch-math (contents, props changed) head/games/spring/files/patch-remove-unused-vars (contents, props changed) head/games/spring/files/patch-rts-System-Platform-CpuID (contents, props changed) head/games/spring/files/patch-rts-System-Platform-Linux-CrashHandler (contents, props changed) head/games/spring/files/patch-rts-System-Platform-Misc (contents, props changed) head/games/spring/files/patch-rts-build-cmake-Util (contents, props changed) head/games/spring/files/patch-rts-lib-headlessStubs-glstub (contents, props changed) head/games/spring/files/patch-use-system-sdl (contents, props changed) Deleted: head/games/spring/files/patch-AI-Skirmish-KAIK-AIClasses.hpp head/games/spring/files/patch-AI-Skirmish-KAIK-AttackHandler.cpp head/games/spring/files/patch-AI-Skirmish-KAIK-BuildUp.cpp head/games/spring/files/patch-AI-Skirmish-KAIK-DGunController.cpp head/games/spring/files/patch-AI-Skirmish-KAIK-DefenseMatrix.cpp head/games/spring/files/patch-AI-Skirmish-KAIK-KAIK.cpp head/games/spring/files/patch-AI-Skirmish-KAIK-Logger.cpp head/games/spring/files/patch-AI-Skirmish-KAIK-Logger.h head/games/spring/files/patch-AI-Skirmish-KAIK-MetalMap.cpp head/games/spring/files/patch-AI-Skirmish-KAIK-Unit.cpp head/games/spring/files/patch-CMakeLists.txt head/games/spring/files/patch-rts-CMakeLists.txt head/games/spring/files/patch-rts-Rendering-Shaders-ShaderStates.h head/games/spring/files/patch-rts-Sim-Misc-DefinitionTag.h head/games/spring/files/patch-rts-System-Platform-Linux-CrashHandler.cpp head/games/spring/files/patch-rts-System-Platform-Misc.cpp head/games/spring/files/patch-rts-System-Platform-Threading.cpp head/games/spring/files/patch-rts-System-Rectangle.h head/games/spring/files/patch-rts-System-creg-creg.h head/games/spring/files/patch-rts-build-cmake-FindAsciiDoc.cmake head/games/spring/files/patch-rts-builds-dedicated-CMakeLists.txt head/games/spring/files/patch-rts-lib-assimp-code-STEPFile.h head/games/spring/files/patch-rts-lib-gml-gmlcls.h head/games/spring/files/patch-rts-lib-gml-speedy-tls.cpp head/games/spring/files/patch-rts-lib-headlessStubs-CMakeLists.txt head/games/spring/files/patch-rts-lib-minizip-CMakeLists.txt head/games/spring/files/patch-tools-pr-downloader-src-lib-pugixml-pugixml.hpp head/games/spring/files/patch-tools-pr-downloader-src-lib-xmlrpc++-src-base64.h head/games/spring/files/patch-tools__unitsync__test__CMakeLists.txt Modified: head/games/spring/Makefile head/games/spring/distinfo head/games/spring/pkg-plist Modified: head/games/spring/Makefile ============================================================================== --- head/games/spring/Makefile Fri Apr 24 22:02:31 2015 (r384690) +++ head/games/spring/Makefile Fri Apr 24 22:39:01 2015 (r384691) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= spring -PORTVERSION= 94.1 -PORTREVISION= 7 +PORTVERSION= 98.0 CATEGORIES= games MASTER_SITES= SF/springrts/springrts/${PORTNAME}-${PORTVERSION} \ http://springrts.com/dl/ @@ -18,34 +17,36 @@ LIB_DEPENDS= libfreetype.so:${PORTSDIR}/ libboost_thread.so:${PORTSDIR}/devel/boost-libs \ libIL.so:${PORTSDIR}/graphics/devil \ libogg.so:${PORTSDIR}/audio/libogg \ - libvorbis.so:${PORTSDIR}/audio/libvorbis \ - libexecinfo.so:${PORTSDIR}/devel/libexecinfo + libvorbis.so:${PORTSDIR}/audio/libvorbis BUILD_DEPENDS= 7z:${PORTSDIR}/archivers/p7zip -BROKEN= Fails to build -DEPRECATED= Broken for more than 6 months -EXPIRATION_DATE= 2015-05-30 -# 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= sdl +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 +USES= execinfo 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 \ - -DUNITSYNC_PYTHON_WRAPPER:BOOL=false \ - -DCUSTOM_CFLAGS:BOOL=true + -DUSE_TCMALLOC:BOOL=false \ + -DUSE_LIBSQUISH:BOOL=false \ + -DUNITSYNC_PYTHON_WRAPPER:BOOL=false WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION} +.if exists(/usr/lib/libexecinfo.so) +LEI_PREFIX= /usr +.else +LEI_PREFIX= ${LOCALBASE} +.endif + +# 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 + PORTDOCS= * PORTDATA= * @@ -65,9 +66,14 @@ MANPAGES_BUILD_DEPENDS= 7z:${PORTSDIR}/a bash:${PORTSDIR}/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:${PORTSDIR}/ftp/curl +# The check-target fails right now: https://springrts.com/mantis/view.php?id=4736 +check test xregression-test: build + ${MAKE} -C ${WRKSRC} check + .include <bsd.port.options.mk> .if defined(WITH_SYNC_DEBUG) @@ -90,7 +96,7 @@ post-patch: ${WRKSRC}/rts/System/Sync/FPUCheck.cpp @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/rts/build/cmake/*.cmake - @${REINPLACE_CMD} -e 's|execinfo|${LOCALBASE}/lib/libexecinfo.so|' \ + @${REINPLACE_CMD} -e 's|execinfo|${LEI_PREFIX}/lib/libexecinfo.so|' \ ${WRKSRC}/rts/CMakeLists.txt \ ${WRKSRC}/rts/builds/dedicated/CMakeLists.txt @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \ Modified: head/games/spring/distinfo ============================================================================== --- head/games/spring/distinfo Fri Apr 24 22:02:31 2015 (r384690) +++ head/games/spring/distinfo Fri Apr 24 22:39:01 2015 (r384691) @@ -1,2 +1,2 @@ -SHA256 (spring_94.1_src.tar.gz) = 26da7271baa8b3dd57022541d98e6a4841084d749788b698c4f8a914cf9e7004 -SIZE (spring_94.1_src.tar.gz) = 11793404 +SHA256 (spring_98.0_src.tar.lzma) = 9137a8a35b42dd622c107c3b26525dc40d8b6e0dca0ce4a87c9fef005328823b +SIZE (spring_98.0_src.tar.lzma) = 9114659 Added: head/games/spring/files/patch-math ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-math Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,186 @@ ++++ rts/aGui/GuiElement.h 2015-04-08 15:06:26 -0400 +@@ -4,4 +4,5 @@ + #define GUIELEMENT_H + ++#include <cmath> + #include <list> + #include <SDL_events.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 <cmath> ++ + #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 <cmath> ++ + #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 <cmath> ++ + #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 <cmath> ++ + #include "EmgCannon.h" + #include "WeaponDef.h" ++++ rts/Sim/Units/Groups/GroupHandler.cpp 2015-04-08 16:24:53 -0400 +@@ -2,4 +2,6 @@ + + #include <boost/cstdint.hpp> ++ ++#include <cmath> + #include <SDL_keycode.h> + ++++ 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 <cmath> ++ + #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 <cmath> + #include <string.h> + ++++ 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 <cmath> ++#include <SDL_mouse.h> ++#include <SDL_keyboard.h> + + #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 <cmath> + #include <map> + #include <SDL_keycode.h> ++++ 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 <cmath> + #include <SDL_keycode.h> + #include <SDL_mouse.h> ++++ 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 <cmath> + #include <vector> + #include <string> ++++ 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 <cmath> ++ + #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 <cmath> ++ + #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 <cstring> //memset ++#include <cmath> // 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 <math.h> ++ + /** + * @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 <math.h> ++ + #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 <math.h> + + #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(); Added: head/games/spring/files/patch-remove-unused-vars ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-remove-unused-vars Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,156 @@ +From + +https://github.com/spring/KAIK/commit/42fec4393483d9c0dd049ca84bd230988c2fbdb6 + +--- AI/Skirmish/KAIK/CommandTracker.h ++++ AI/Skirmish/KAIK/CommandTracker.h +@@ -15,7 +15,7 @@ class CCommandTracker { + ai(aic), + maxCmdsPerFrame(0), + peakCmdFrame(0), +- avgCmdSize(0.0f), ++ //avgCmdSize(0.0f), + totalCmdSize(0), + totalNumCmds(0) { + } +@@ -31,7 +31,7 @@ class CCommandTracker { + int maxCmdsPerFrame; + int peakCmdFrame; + +- float avgCmdSize; ++ //float avgCmdSize; + int totalCmdSize; + int totalNumCmds; + }; +--- AI/Skirmish/KAIK/KAIK.cpp ++++ AI/Skirmish/KAIK/KAIK.cpp +@@ -107,7 +107,6 @@ void CKAIK::UnitFinished(int unitID) { + + void CKAIK::UnitDestroyed(int unitID, int attackerUnitID) { + if (ai->Initialized()) { +- attackerUnitID = attackerUnitID; + ai->econTracker->UnitDestroyed(unitID); + + if (ai->GetUnit(unitID)->groupID != -1) { +@@ -151,10 +150,6 @@ void CKAIK::UnitDamaged(int unitID, int attackerID, float damage, float3 dir) { + if (ai->GetUnit(unitID)->isDead) { + return; + } +- +- attackerID = attackerID; +- dir = dir; +- + ai->econTracker->UnitDamaged(unitID, damage); + } + } +@@ -169,25 +164,25 @@ void CKAIK::UnitMoveFailed(int unitID) { + + void CKAIK::EnemyEnterLOS(int enemyUnitID) { + if (ai->Initialized()) { +- enemyUnitID = enemyUnitID; ++ //TODO + } + } + + void CKAIK::EnemyLeaveLOS(int enemyUnitID) { + if (ai->Initialized()) { +- enemyUnitID = enemyUnitID; ++ //TODO + } + } + + void CKAIK::EnemyEnterRadar(int enemyUnitID) { + if (ai->Initialized()) { +- enemyUnitID = enemyUnitID; ++ //TODO + } + } + + void CKAIK::EnemyLeaveRadar(int enemyUnitID) { + if (ai->Initialized()) { +- enemyUnitID = enemyUnitID; ++ //TODO + } + } + +@@ -201,9 +196,6 @@ void CKAIK::EnemyDestroyed(int enemyUnitID, int attackerUnitID) { + void CKAIK::EnemyDamaged(int enemyUnitID, int attackerUnitID, float damage, float3 dir) { + if (ai->Initialized()) { + ai->thm->EnemyDamaged(enemyUnitID, attackerUnitID); +- +- damage = damage; +- dir = dir; + } + } + +@@ -222,7 +214,6 @@ void CKAIK::EnemyFinished(int enemyUnitID) { + + void CKAIK::RecvChatMessage(const char* msg, int player) { + if (ai->Initialized()) { +- player = player; + + if ((msg = strstr(msg, "KAIK::")) == NULL) { + return; +--- AI/Skirmish/KAIK/MetalMap.cpp ++++ AI/Skirmish/KAIK/MetalMap.cpp +@@ -219,8 +219,6 @@ void CMetalMap::GetMetalPoints() { + } + } + +- // comment out for debug +- TotalMetal = TotalMetal; + } + + // set that spot's metal making ability (divide by cells to values are small) +--- AI/Skirmish/KAIK/MetalMap.h ++++ AI/Skirmish/KAIK/MetalMap.h +@@ -36,7 +36,7 @@ class CMetalMap { + int TempMetal; + int coordx; + int coordy; +- int Minradius; ++ //int Minradius; + int MinMetalForSpot; + int XtractorRadius; // in metal map units + int DoubleRadius; // in metal map units +--- AI/Skirmish/KAIK/MicroPather.cpp ++++ AI/Skirmish/KAIK/MicroPather.cpp +@@ -60,7 +60,7 @@ using namespace NSMicroPather; + class OpenQueueBH { + public: + +- OpenQueueBH(AIClasses* ai, PathNode** heapArray): ai(ai), size(0) { ++ OpenQueueBH(AIClasses* ai, PathNode** heapArray): size(0) { + this->heapArray = heapArray; + } + +@@ -174,7 +174,6 @@ class OpenQueueBH { + + private: + PathNode** heapArray; +- AIClasses* ai; + int size; + }; + +--- AI/Skirmish/KAIK/Unit.cpp ++++ AI/Skirmish/KAIK/Unit.cpp +@@ -93,8 +93,7 @@ bool CUNIT::CanAttack(int otherUnit) const { + return false; + } + +-bool CUNIT::CanAttackMe(int otherUnit) const { +- otherUnit = otherUnit; ++bool CUNIT::CanAttackMe(int /*otherUnit*/) const { + // TODO: the function above, in reverse + return true; + } +--- AI/Skirmish/KAIK/UnitHandler.cpp ++++ AI/Skirmish/KAIK/UnitHandler.cpp +@@ -117,7 +117,6 @@ void CUnitHandler::IdleUnitUpdate(int frame) { + } + + void CUnitHandler::UnitMoveFailed(int unitID) { +- unitID = unitID; + } + + // called when unit nanoframe first created Added: head/games/spring/files/patch-rts-System-Platform-CpuID ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-rts-System-Platform-CpuID Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,11 @@ +Obtained from: http://www.viva64.com/en/b/0293/ + +--- rts/System/Platform/CpuID.cpp 2014-10-07 16:09:51 -0400 ++++ rts/System/Platform/CpuID.cpp 2015-04-07 20:23:18 -0400 +@@ -142,5 +142,5 @@ + ExecCPUID(&eax, &ebx, &ecx, &edx); + +- if ((ebx && 0xFFFF) == 0) ++ if ((ebx & 0xFFFF) == 0) + return; + Added: head/games/spring/files/patch-rts-System-Platform-Linux-CrashHandler ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-rts-System-Platform-Linux-CrashHandler Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,8 @@ ++++ rts/System/Platform/Linux/CrashHandler.cpp 2015-04-08 20:09:33 -0400 +@@ -344,5 +344,5 @@ + boost::this_thread::sleep(boost::posix_time::seconds(10)); + #if defined(__GNUC__) +- std::_Exit(-1); ++ _Exit(-1); + #else + std::quick_exit(-1); Added: head/games/spring/files/patch-rts-System-Platform-Misc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-rts-System-Platform-Misc Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,9 @@ ++++ rts/System/Platform/Misc.cpp 2015-04-08 20:05:21 -0400 +@@ -226,5 +226,6 @@ + mib[2] = KERN_PROC_PATHNAME; + mib[3] = -1; +- char buf[PATH_MAX]; ++ long maxpath = pathconf("/", _PC_PATH_MAX); ++ char buf[maxpath]; + size_t cb = sizeof(buf); + int err = sysctl(mib, 4, buf, &cb, NULL, 0); Added: head/games/spring/files/patch-rts-build-cmake-Util ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-rts-build-cmake-Util Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,28 @@ +Obtained via: https://springrts.com/mantis/view.php?id=4679 + +From 9e0db5f602407de4e7875ca85761b41782c1bb9c Mon Sep 17 00:00:00 2001 +From: Johan Rehnberg <cleanrock@gmail.com> +Date: Wed, 31 Dec 2014 11:35:19 +0100 +Subject: [PATCH] fix GetListOfSubModules to support GLOB returning both "//" + and "/" + +I needed this when building on archlinux with cmake 3.1.0 where GLOB returns "/" + +... + +--- rts/build/cmake/Util.cmake ++++ rts/build/cmake/Util.cmake +@@ -166,10 +166,11 @@ EndFunction (MakeGlobal) + # Find all CMakeLists.txt files in sub-directories + Macro (GetListOfSubModules list_var) + File(GLOB ${list_var} RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" FOLLOW_SYMLINKS "${CMAKE_CURRENT_SOURCE_DIR}/*/CMakeLists.txt") +- + # Strip away the "/CMakeLists.txt" parts, so we end up with just a list of dirs, + # for example: AAI;RAI;KAIK +- String(REPLACE "//CMakeLists.txt" "" ${list_var} "${${list_var}}") ++ # GLOB can prefix with "//" or "/" (perhaps changed in cmake 3.1.0), this double replace will support both "//" and "/" ++ String(REPLACE "/CMakeLists.txt" "" ${list_var} "${${list_var}}") ++ String(REPLACE "/" "" ${list_var} "${${list_var}}") + EndMacro (GetListOfSubModules list_var) + + Added: head/games/spring/files/patch-rts-lib-headlessStubs-glstub ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-rts-lib-headlessStubs-glstub Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,13 @@ +Submitted upstream: + + https://springrts.com/mantis/view.php?id=4731 + +--- rts/lib/headlessStubs/glstub.c 2014-10-07 16:09:52 -0400 ++++ rts/lib/headlessStubs/glstub.c 2015-04-08 14:03:33 -0400 +@@ -131,5 +131,5 @@ + GLAPI void APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint *params) {} + GLAPI void APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {} +-GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length) {} ++GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) {} + + GLAPI void APIENTRY glUniform1fARB(GLint location, GLfloat v0) {} Added: head/games/spring/files/patch-use-system-sdl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/spring/files/patch-use-system-sdl Fri Apr 24 22:39:01 2015 (r384691) @@ -0,0 +1,93 @@ +--- rts/builds/dedicated/CMakeLists.txt 2014-10-07 16:09:51 -0400 ++++ rts/builds/dedicated/CMakeLists.txt 2015-04-08 15:27:03 -0400 +@@ -43,19 +43,6 @@ + ENDIF (UNIX AND NOT MINGW) + +-IF (MINGW OR APPLE) +- # Windows: +- # We still need these header files, +- # even if we are not going to link with SDL. +- # We have them available anyway (mingwlibs). +- # OS X: +- # Cocoa requires the SDL libary, whenever the SDL headers are used, +- # due to some #define magic, which is practically impossible to workaround. +- FIND_PACKAGE(SDL2 REQUIRED) +- INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) +-ELSE (MINGW OR APPLE) +- # Use a direct copy of the GL and SDL headers, +- # as these may not be available on headless systems. +- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/SDL2) +-ENDIF (MINGW OR APPLE) ++FIND_PACKAGE(SDL2 REQUIRED) ++INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) + + +--- rts/builds/headless/CMakeLists.txt 2014-10-07 16:09:51 -0400 ++++ rts/builds/headless/CMakeLists.txt 2015-04-08 16:31:25 -0400 +@@ -14,22 +14,7 @@ + + include_directories(${OPENAL_INCLUDE_DIR}) +-IF (MINGW OR APPLE) +- # Windows: +- # We still need these header files, +- # even if we are not going to link with gl, glu and SDL. +- # We have them available anyway (mingwlibs). +- # OS X: +- # Cocoa requires the SDL libary, whenever the SDL headers are used, +- # due to some #define magic, which is practically impossible to workaround. +- FIND_PACKAGE(OpenGL REQUIRED) +- FIND_PACKAGE(SDL2 REQUIRED) +- INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) +-ELSE (MINGW OR APPLE) +- # Use a direct copy of the GL and SDL headers, +- # as these may not be available on headless systems. +- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) +- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/SDL2) +-ENDIF (MINGW OR APPLE) + ++FIND_PACKAGE(SDL2 REQUIRED) ++INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) + + # headlessstubs are our stubs that replace libGL, libGLU, libGLEW, libSDL (yes really!) +--- rts/lib/headlessStubs/CMakeLists.txt 2014-10-07 16:09:52 -0400 ++++ rts/lib/headlessStubs/CMakeLists.txt 2015-04-08 14:40:20 -0400 +@@ -7,16 +7,6 @@ + ) + +-IF (WIN32) +- # We still need these header files, +- # even if we are not going to link with SDL. +- # We have them available anyway (mingwlibs). +- FIND_PACKAGE(SDL2 REQUIRED) +- INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) +-ELSE (WIN32) +- # Use a direct copy of the GL and SDL headers, +- # as these may not be available on headless systems. +- INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/include) +- INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/include/SDL2) +-ENDIF (WIN32) ++FIND_PACKAGE(SDL2 REQUIRED) ++INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) + + ADD_LIBRARY(headlessStubs STATIC EXCLUDE_FROM_ALL ${headlessStubsSources}) +--- tools/unitsync/CMakeLists.txt 2014-10-07 16:09:52 -0400 ++++ tools/unitsync/CMakeLists.txt 2015-04-08 16:10:11 -0400 +@@ -22,16 +22,6 @@ + ENDIF (WIN32) + +-IF (MINGW) +- # We still need these header files, +- # even if we are not going to link with SDL. +- # We have them available anyway (mingwlibs). +- FIND_PACKAGE(SDL2 REQUIRED) +- INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) +-ELSE (MINGW) +- # Use a direct copy of the GL and SDL headers, +- # as these may not be available on headless systems. +- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/SDL2) +-ENDIF (MINGW) +- ++FIND_PACKAGE(SDL2 REQUIRED) ++INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR}) + + ADD_DEFINITIONS(-DUNITSYNC) Modified: head/games/spring/pkg-plist ============================================================================== --- head/games/spring/pkg-plist Fri Apr 24 22:02:31 2015 (r384690) +++ head/games/spring/pkg-plist Fri Apr 24 22:39:01 2015 (r384691) @@ -2,14 +2,10 @@ bin/spring bin/spring-dedicated bin/spring-headless -bin/spring-multithreaded -%%PR_DOWNLOADER%%lib/libpr-downloader_shared.so -%%PR_DOWNLOADER%%lib/libpr-downloader_static.a -lib/libspringserver.so lib/libunitsync.so %%MANPAGES%%man/man6/spring-dedicated.6.gz %%MANPAGES%%man/man6/spring-headless.6.gz -%%MANPAGES%%man/man6/spring-multithreaded.6.gz +%%MANPAGES%%man/man6/spring-legacy.6.gz %%MANPAGES%%man/man6/spring.6.gz share/applications/spring.desktop share/mime/packages/spring.xml
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504242239.t3OMd20S067506>