pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
0ad: Update to 0.0.25b
Module Name: pkgsrc-wip
Committed By: Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By: micha
Date: Mon Dec 13 17:28:38 2021 +0100
Changeset: 9e781ca52fb5ad4c3624fd69d3e8b16bb45d6824
Modified Files:
0ad/Makefile.common
0ad/distinfo
0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h
0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h
0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h
0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h
0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp
0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h
0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp
Added Files:
0ad/patches/patch-build_premake_extern__libs5.lua
Removed Files:
0ad/patches/patch-build_premake_extern__libs4.lua
0ad/patches/patch-build_premake_premake4.lua
0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_nvcore.h
0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_poshlib_posh.h
0ad/patches/patch-libraries_source_nvtt_src_src_nvmath_nvmath.h
Log Message:
0ad: Update to 0.0.25b
New Features in Alpha 25
Pathfinding And Netcode Improvements - Improved Pathfinding, Performance And Reduced Game Lag
Order Restructuring - Players Can Now Push New Orders To The Front Of Their Production Queues
Improved Unit AI
New Biomes Incorporating New 2k Textures And Normal/Specular Maps
Initial Implementation Of Single Player Campaigns
GUI Improvements
Extended Graphics Options
Improved Mod Support And Game Filtering In The Multiplayer Lobby
Ongoing Civilization Balancing
Various Other Game Stability Bug Fixes And Speedups
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9e781ca52fb5ad4c3624fd69d3e8b16bb45d6824
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
0ad/Makefile.common | 2 +-
0ad/distinfo | 27 ++-
0ad/patches/patch-build_premake_extern__libs4.lua | 22 --
0ad/patches/patch-build_premake_extern__libs5.lua | 13 ++
0ad/patches/patch-build_premake_premake4.lua | 13 --
...source_fcollada_include_FCDocument_FCDocument.h | 16 +-
...rce_fcollada_include_FUtils_FUCriticalSection.h | 18 +-
...e_fcollada_src_FCollada_FCDocument_FCDocument.h | 18 +-
...collada_src_FCollada_FUtils_FUCriticalSection.h | 20 +-
...collada_src_FCollada_FUtils_FUStringBuilder.hpp | 229 +++++++--------------
...source_fcollada_src_FCollada_FUtils_Platforms.h | 6 +-
...-libraries_source_nvtt_src_src_nvcore_Debug.cpp | 18 --
...h-libraries_source_nvtt_src_src_nvcore_nvcore.h | 23 ---
...aries_source_nvtt_src_src_nvcore_poshlib_posh.h | 22 --
...h-libraries_source_nvtt_src_src_nvmath_nvmath.h | 22 --
15 files changed, 144 insertions(+), 325 deletions(-)
diffs:
diff --git a/0ad/Makefile.common b/0ad/Makefile.common
index 3ff672cca7..8f3a58676e 100644
--- a/0ad/Makefile.common
+++ b/0ad/Makefile.common
@@ -1,7 +1,7 @@
# $NetBSD$
# used by wip/0ad-data/Makefile
-DISTVERSION= 0ad-0.0.20-alpha-unix
+DISTVERSION= 0ad-0.0.25b-alpha-unix
CATEGORIES= games
MASTER_SITES= http://releases.wildfiregames.com/
EXTRACT_SUFX= .tar.xz
diff --git a/0ad/distinfo b/0ad/distinfo
index 9c1dd82ad8..eb9e71da4e 100644
--- a/0ad/distinfo
+++ b/0ad/distinfo
@@ -1,23 +1,20 @@
$NetBSD$
-RMD160 (0ad-0.0.20-alpha-unix-build.tar.xz) = 0f1283fe287f539f32fa0466f93b881aeca45dc9
-SHA512 (0ad-0.0.20-alpha-unix-build.tar.xz) = 786f92b74c2e0c64c07ef2f5578dcb5c753fb4fed7238d385bca23549805fcfaeecb9bfbfae809a2ac09a7dfc804455237346588099db347c28a3ff0ae284c43
-Size (0ad-0.0.20-alpha-unix-build.tar.xz) = 25610932 bytes
-SHA1 (patch-build_premake_extern__libs4.lua) = dfdbce501c9506ebfe9be2a5bdf30f5f7cdbb86b
-SHA1 (patch-build_premake_premake4.lua) = c160648a3891546471a4ac9c831071eab43b9296
+SHA1 (0ad-0.0.25b-alpha-unix-build.tar.xz) = 130444c15e29c7fa1333b8719ae7c7da36741a26
+RMD160 (0ad-0.0.25b-alpha-unix-build.tar.xz) = 295ad0f386df10cc95cee7dea889ccd43224dd1e
+SHA512 (0ad-0.0.25b-alpha-unix-build.tar.xz) = e8069897b97b381099ab5ec5868d27e96c699105b3307054d1bc7bf9236a537f02625ba9034892d91f3e951b4f95c9ce5fb75ed0a7c14b8a294882482fd9c1b4
+Size (0ad-0.0.25b-alpha-unix-build.tar.xz) = 75579956 bytes
+SHA1 (patch-build_premake_extern__libs5.lua) = 4a0c97a89945d0818fcb22ab09aa329160e727e8
SHA1 (patch-build_workspaces_clean-workspaces.sh) = fed7e867eb8e24e37860599269f9feb4d30c5a43
SHA1 (patch-build_workspaces_update-workspaces.sh) = 3e92f823e3204451522055a5f4cd2ee1d5819b2f
-SHA1 (patch-libraries_source_fcollada_include_FCDocument_FCDocument.h) = 9f60871e9f05784b10ba97efffe756ece473f9b2
-SHA1 (patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h) = 1ece7ae54c07515fdbca12f71c97add7c9e496e1
+SHA1 (patch-libraries_source_fcollada_include_FCDocument_FCDocument.h) = 96aef76c02ae4a3f47fdb7c31bf7d11490ba5d09
+SHA1 (patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h) = 285fa6568c5ec0ab26364ca2674e9d3e4171ed6b
SHA1 (patch-libraries_source_fcollada_include_FUtils_Platforms.h) = 32308e3fe673903b4b1a17c364840818136411b9
-SHA1 (patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h) = e7359366d4aa5f76feefe8c79768b341335a2c80
-SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h) = 55ee4470672e0e3a55bd208c0c1df9b6bedf604a
-SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp) = 8f9983120b63141ac3b342bc924d82748e23850d
-SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h) = d0dbefd34af4b87d24c486a6af19e05ae5231deb
-SHA1 (patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp) = e1f16fedfa6cc22be43e799415ce91d8d9e7305f
-SHA1 (patch-libraries_source_nvtt_src_src_nvcore_nvcore.h) = 2cd3f056b75172ae5e15404746374d627e78ba09
-SHA1 (patch-libraries_source_nvtt_src_src_nvcore_poshlib_posh.h) = b0759ead96db78237c5fa400cf320ab02e8b262b
-SHA1 (patch-libraries_source_nvtt_src_src_nvmath_nvmath.h) = 218723373dc9f117eca33960cac045acc0eee97a
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h) = ae1edd27218707be0ea77456569fcd262d9230d2
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h) = fd181f746bba33ceb917a5de4794296c229213fc
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp) = f71f1f361601b2ce561c00a811d33bce6735a06d
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h) = 6887cca8e6ff1765a6b666bd595f8bcb41c2a90f
+SHA1 (patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp) = 631a927c2aeba0a0aa7842402232420beb7eebd9
SHA1 (patch-source_graphics_TextureConverter.cpp) = d4e3920cd507468adc37dc92e27e6cbb50b5c5e2
SHA1 (patch-source_lib_secure__crt.cpp) = 1e56aa627c8f2343884968ab4ebd4b4eec73b777
SHA1 (patch-source_third__party_mikktspace_weldmesh.cpp) = 35df7dd5d5d2aa784ef03599a47cc69982ebe332
diff --git a/0ad/patches/patch-build_premake_extern__libs4.lua b/0ad/patches/patch-build_premake_extern__libs4.lua
deleted file mode 100644
index 2da0226f19..0000000000
--- a/0ad/patches/patch-build_premake_extern__libs4.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- build/premake/extern_libs4.lua.orig 2016-03-12 18:15:04.000000000 +0000
-+++ build/premake/extern_libs4.lua
-@@ -347,7 +347,7 @@ extern_lib_defs = {
- elseif os.is("macosx") then
- add_default_include_paths("iconv")
- defines { "LIBICONV_STATIC" }
-- elseif os.getversion().description == "FreeBSD" then
-+ elseif os.getversion().description == "NetBSD" then
- defines { "HAVE_ICONV_CONST" }
- defines { "ICONV_CONST=const" }
- end
-@@ -366,7 +366,7 @@ extern_lib_defs = {
- -- FreeBSD 10+ has iconv as a part of libc
- if os.is("bsd")
- and not (os.getversion().description == "FreeBSD" and os.getversion().majorversion >= 10
-- or os.getversion().description == "GNU/kFreeBSD") then
-+ or os.getversion().description == "GNU/kFreeBSD") and not os.getversion().description == "NetBSD" then
- add_default_links({
- bsd_names = { "iconv" },
- })
diff --git a/0ad/patches/patch-build_premake_extern__libs5.lua b/0ad/patches/patch-build_premake_extern__libs5.lua
new file mode 100644
index 0000000000..de40e0227b
--- /dev/null
+++ b/0ad/patches/patch-build_premake_extern__libs5.lua
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/premake/extern_libs5.lua.orig 2016-03-12 18:15:04.000000000 +0000
++++ build/premake/extern_libs5.lua
+@@ -347,7 +347,7 @@ extern_lib_defs = {
+ elseif os.is("macosx") then
+ add_default_include_paths("iconv")
+ defines { "LIBICONV_STATIC" }
+- elseif os.getversion().description == "FreeBSD" then
++ elseif os.getversion().description == "NetBSD" then
+ defines { "HAVE_ICONV_CONST" }
+ defines { "ICONV_CONST=const" }
+ end
diff --git a/0ad/patches/patch-build_premake_premake4.lua b/0ad/patches/patch-build_premake_premake4.lua
deleted file mode 100644
index c7886abd31..0000000000
--- a/0ad/patches/patch-build_premake_premake4.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- build/premake/premake4.lua.orig 2016-03-12 18:15:04.000000000 +0000
-+++ build/premake/premake4.lua
-@@ -398,6 +398,8 @@ function project_add_x11_dirs()
- includedirs {
- "/usr/X11R6/include/X11",
- "/usr/X11R6/include",
-+ "/usr/X11R7/include/X11",
-+ "/usr/X11R7/include",
- "/usr/local/include/X11",
- "/usr/local/include",
- "/usr/include/X11"
diff --git a/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h b/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h
index 112a472c3a..0b2517082b 100644
--- a/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h
+++ b/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h
@@ -3,11 +3,11 @@ $NetBSD$
--- libraries/source/fcollada/include/FCDocument/FCDocument.h.orig 2012-06-04 21:33:15.000000000 +0000
+++ libraries/source/fcollada/include/FCDocument/FCDocument.h
@@ -30,7 +30,7 @@
- #if defined(WIN32)
- template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */
- template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */
--#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
-+#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
- template <class T> class FCDLibrary; /**< Trick Doxygen. */
- template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */
- #endif // LINUX
+ #if defined(WIN32)
+ template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */
+-#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ template <class T> class FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */
+ #endif // LINUX
diff --git a/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h b/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h
index 076b771ecd..870d66a689 100644
--- a/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h
+++ b/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h
@@ -2,12 +2,12 @@ $NetBSD$
--- libraries/source/fcollada/include/FUtils/FUCriticalSection.h.orig 2012-06-04 21:33:15.000000000 +0000
+++ libraries/source/fcollada/include/FUtils/FUCriticalSection.h
-@@ -33,7 +33,7 @@ private:
- #elif defined(__APPLE__)
- //Do something here.
- MPCriticalRegionID criticalSection;
--#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
-+#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
- #else
- #warning "FUCriticalSection: Critical section not implemented for other platforms."
- #endif
+@@ -33,7 +33,7 @@
+ #elif defined(__APPLE__)
+ //Do something here.
+ MPCriticalRegionID criticalSection;
+-#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #else
+ #warning "FUCriticalSection: Critical section not implemented for other platforms."
+ #endif
diff --git a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h
index ff2278da89..72747b7c19 100644
--- a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h
+++ b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h
@@ -1,13 +1,13 @@
$NetBSD$
---- libraries/source/fcollada/src/FCollada/FCDocument/FCDocument.h.orig 2012-06-04 21:33:15.000000000 +0000
+--- libraries/source/fcollada/src/FCollada/FCDocument/FCDocument.h.orig
+++ libraries/source/fcollada/src/FCollada/FCDocument/FCDocument.h
@@ -30,7 +30,7 @@
- #if defined(WIN32)
- template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */
- template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */
--#elif defined(LINUX) || defined(__APPLE__) || defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
-+#elif defined(LINUX) || defined(__APPLE__) || defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
- template <class T> class FCDLibrary; /**< Trick Doxygen. */
- template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */
- #endif // LINUX
+ #if defined(WIN32)
+ template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */
+-#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ template <class T> class FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */
+ #endif // LINUX
diff --git a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h
index 88dfbaf26c..9e7d3df76e 100644
--- a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h
+++ b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h
@@ -1,13 +1,13 @@
$NetBSD$
---- libraries/source/fcollada/src/FCollada/FUtils/FUCriticalSection.h.orig 2012-06-04 21:33:15.000000000 +0000
+--- libraries/source/fcollada/src/FCollada/FUtils/FUCriticalSection.h.orig
+++ libraries/source/fcollada/src/FCollada/FUtils/FUCriticalSection.h
-@@ -33,7 +33,7 @@ private:
- #elif defined(__APPLE__)
- //Do something here.
- MPCriticalRegionID criticalSection;
--#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
-+#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
- #else
- #warning "FUCriticalSection: Critical section not implemented for other platforms."
- #endif
+@@ -33,7 +33,7 @@ private:
+ #elif defined(__APPLE__)
+ //Do something here.
+ MPCriticalRegionID criticalSection;
+-#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #else
+ #warning "FUCriticalSection: Critical section not implemented for other platforms."
+ #endif
diff --git a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp
index 1cb36c735f..06517a33c6 100644
--- a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp
+++ b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp
@@ -1,156 +1,85 @@
$NetBSD$
---- libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp.orig 2008-09-07 22:13:25.000000000 +0000
+--- libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp.orig 2021-08-25 14:44:24.000000000 +0000
+++ libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp
-@@ -26,62 +26,6 @@
- #define SAFE_DELETE_ARRAY(ptr) if (ptr != NULL) { delete [] ptr; ptr = NULL; }
- #endif
-
--template <class Char, class FloatType>
--void FloatToString(FloatType f, Char* sz)
--{
-- Char* buffer = sz + 1;
-- static const int digitCount = 6;
-- int decimal, sign;
--
-- // ecvt rounds the string for us: http://www.datafocus.com/docs/man3/ecvt.3.asp
-- char* end = ecvt(f, digitCount, &decimal, &sign);
--
-- if (sign != 0) (*buffer++) = '-';
-- int count = digitCount;
-- if (decimal > digitCount)
-- {
-- // We use the scientific notation: P.MeX
-- (*buffer++) = (*end++); // P is one character.
-- (*buffer++) = '.';
--
-- // Mantissa (cleaned for zeroes)
-- for (--count; count > 0; --count) if (end[count - 1] != '0') break;
-- for (int i = 0; i < count; ++i) (*buffer++) = (*end++);
-- if (buffer[-1] == '.') --buffer;
--
-- // Exponent
-- (*buffer++) = 'e';
-- uint32 exponent = decimal - 1; // X
-- if (exponent >= 10) (*buffer++) = (Char) ('0' + (exponent / 10));
-- (*buffer++) = (Char) ('0' + (exponent % 10));
-- (*buffer) = 0;
-- return;
-- }
-- else if (decimal > 0)
-- {
-- // Simple number: A.B
-- for (int i = 0; i < decimal; ++i) (*buffer++) = (*end++);
-- if (decimal < digitCount) (*buffer++) = '.';
-- count = digitCount - decimal;
-- }
-- else if (decimal < -digitCount)
-- {
-- // What case is this?
-- decimal = count = 0;
-- }
-- else if (decimal < 0 || (decimal == 0 && *end != '0'))
-- {
-- // Tiny number: 0.Me-X
-- (*buffer++) = '0'; (*buffer++) = '.';
-- for (int i = 0; i < -decimal; ++i) (*buffer++) = '0';
-- count = digitCount + decimal;
-- }
-- for (; count > 0; --count) if (end[count - 1] != '0') break;
-- for (int i = 0; i < count; ++i) (*buffer++) = (*end++);
-- if (decimal == 0 && count == 0) (*buffer++) = '0';
-- if (buffer[-1] == '.') --buffer;
-- (*buffer) = 0;
--}
-
- template <class Char>
- FUStringBuilderT<Char>::FUStringBuilderT(const String& sz)
-@@ -234,53 +178,46 @@ void FUStringBuilderT<Char>::append(cons
- template <class Char>
- void FUStringBuilderT<Char>::append(float f)
- {
--#ifdef WIN32
-- // use <float.h> _isnan method to detect the 1.#IND00 NaN.
-- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN() && !_isnan((double)f))
--#else
-- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN())
--#endif
-- {
-- if (IsEquivalent(f, 0.0f, std::numeric_limits<float>::epsilon())) append((Char)'0');
-- else
-- {
-- Char sz[128];
-- FloatToString(f, sz);
-- append(sz + 1);
-- }
-- }
-- else if (f == std::numeric_limits<float>::infinity())
-- { append((Char)'I'); append((Char)'N'); append((Char)'F'); }
-- else if (f == -std::numeric_limits<float>::infinity())
-- { append((Char)'-'); append((Char)'I'); append((Char)'N'); append((Char)'F'); }
-- else
-- { append((Char)'N'); append((Char)'a'); append((Char)'N'); }
-+ append((double)f);
- }
-
- template <class Char>
- void FUStringBuilderT<Char>::append(double f)
- {
--#ifdef WIN32
-- // use <float.h> _isnan method to detect the .#IND00 NaN.
-- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN() && !_isnan(f))
--#else
-- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN())
--#endif
-- {
-- if (IsEquivalent(f, 0.0, std::numeric_limits<double>::epsilon())) append((Char)'0');
-- else
-- {
-- Char sz[128];
-- FloatToString(f, sz);
-- append(sz + 1);
-- }
-- }
-- else if (f == std::numeric_limits<double>::infinity())
-- { append((Char)'I'); append((Char)'N'); append((Char)'F'); }
-- else if (f == -std::numeric_limits<double>::infinity())
-- { append((Char)'-'); append((Char)'I'); append((Char)'N'); append((Char)'F'); }
-- else
-- { append((Char)'N'); append((Char)'a'); append((Char)'N'); }
-+ if (f == -std::numeric_limits<double>::infinity()) {
-+ append("-INF");
-+ return;
-+ } else if (f == std::numeric_limits<double>::infinity()) {
-+ append("INF");
-+ return;
-+ } else if (f != f) {
-+ append("NaN");
-+ return;
-+ } else if (-std::numeric_limits<double>::epsilon() < f && f < std::numeric_limits<double>::epsilon()) {
-+ append("0.0E0");
-+ return;
-+ }
-+ if (f < 0.0) {
-+ f = -f;
-+ append('-');
-+ }
+@@ -174,46 +174,45 @@ void FUStringBuilderT<Char>::append(cons
+ template <class Char>
+ void FUStringBuilderT<Char>::append(float f)
+ {
+-#ifdef WIN32
+- // use <float.h> _isnan method to detect the 1.#IND00 NaN.
+- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN() && !_isnan((double)f))
+-#else
+- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN())
+-#endif
+- {
+- if (IsEquivalent(f, 0.0f, std::numeric_limits<float>::epsilon())) append((Char)'0');
+- else
+- for (Char c : ToXmlDouble(f))
+- append(c);
+- }
+- else if (f == std::numeric_limits<float>::infinity())
+- { append((Char)'I'); append((Char)'N'); append((Char)'F'); }
+- else if (f == -std::numeric_limits<float>::infinity())
+- { append((Char)'-'); append((Char)'I'); append((Char)'N'); append((Char)'F'); }
+- else
+- { append((Char)'N'); append((Char)'a'); append((Char)'N'); }
++ append((double)f);
+ }
+ template <class Char>
+ void FUStringBuilderT<Char>::append(double f)
+ {
+-#ifdef WIN32
+- // use <float.h> _isnan method to detect the .#IND00 NaN.
+- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN() && !_isnan(f))
+-#else
+- if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != std::numeric_limits<float>::signaling_NaN())
+-#endif
+- {
+- if (IsEquivalent(f, 0.0, std::numeric_limits<double>::epsilon())) append((Char)'0');
+- else
+- for (Char c : ToXmlDouble(f))
+- append(c);
+- }
+- else if (f == std::numeric_limits<double>::infinity())
+- { append((Char)'I'); append((Char)'N'); append((Char)'F'); }
+- else if (f == -std::numeric_limits<double>::infinity())
+- { append((Char)'-'); append((Char)'I'); append((Char)'N'); append((Char)'F'); }
++ if (f == -std::numeric_limits<double>::infinity()) {
++ append("-INF");
++ return;
++ } else if (f == std::numeric_limits<double>::infinity()) {
++ append("INF");
++ return;
++ } else if (f != f) {
++ append("NaN");
++ return;
++ } else if (-std::numeric_limits<double>::epsilon() < f && f < std::numeric_limits<double>::epsilon()) {
++ append("0.0E0");
++ return;
++ }
++ if (f < 0.0) {
++ f = -f;
++ append('-');
++ }
+
-+ int e = 0;
-+ if (f < 1.0)
-+ for (; f < 1.0; f *= 10.0)
-+ e--;
-+ else
-+ for (; f >= 10.0; f /= 10.0)
-+ e++;
++ int e = 0;
++ if (f < 1.0)
++ for (; f < 1.0; f *= 10.0)
++ e--;
+ else
+- { append((Char)'N'); append((Char)'a'); append((Char)'N'); }
++ for (; f >= 10.0; f /= 10.0)
++ e++;
+
-+ char tmp[10];
-+ sprintf(tmp, "%.6g", f);
-+ append(tmp);
-+ if (tmp[1] == 0) // only one digit, add missing part according canonical representation
-+ append(".0");
++ char tmp[10];
++ sprintf(tmp, "%.6g", f);
++ append(tmp);
++ if (tmp[1] == 0) // only one digit, add missing part according canonical representation
++ append(".0");
+
-+ sprintf(tmp, "E%d", e);
-+ append(tmp);
- }
-
- template <class Char>
++ sprintf(tmp, "E%d", e);
++ append(tmp);
+ }
+ template <class Char>
+ void FUStringBuilderT<Char>::append(const FMVector2& v)
diff --git a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h
index 6c574ba320..6c5eb78480 100644
--- a/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h
+++ b/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h
@@ -23,12 +23,12 @@ $NetBSD$
#include <stdlib.h>
#include <stdio.h>
-@@ -125,7 +125,7 @@ typedef uint8_t byte;
+@@ -125,7 +125,7 @@
#endif // PLATFORMS
// Important functions that some OSes have missing!
--#if defined(__APPLE__) || defined (LINUX) || defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
-+#if defined(__APPLE__) || defined (LINUX) || defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+-#if defined(__APPLE__) || defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#if defined(__APPLE__) || defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
inline char* strlower(char* str) { char* it = str; while (*it != 0) { *it = tolower(*it); ++it; } return str; }
inline wchar_t* wcslwr(wchar_t* str) { wchar_t* it = str; while (*it != 0) { *it = towlower(*it); ++it; } return str; }
inline int wcsicmp(const wchar_t* s1, const wchar_t* s2) { wchar_t c1 = *s1, c2 = *s2; while (c1 != 0 && c2 != 0) { if (c1 >= 'a' && c1 <= 'z') c1 -= 'a' + 'A'; if (c2 >= 'a' && c2 <= 'z') c2 -= 'a' + 'A'; if (c2 < c1) return -1; else if (c2 > c1) return 1; c1 = *(++s1); c2 = *(++s2); } return 0; }
diff --git a/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp b/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp
index 9f3d6cb925..605dca751f 100644
--- a/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp
+++ b/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp
@@ -2,24 +2,6 @@ $NetBSD$
--- libraries/source/nvtt/src/src/nvcore/Debug.cpp.orig 2015-07-21 15:53:21.000000000 +0000
+++ libraries/source/nvtt/src/src/nvcore/Debug.cpp
-@@ -27,7 +27,7 @@
- # include <signal.h>
- #endif
-
--#if NV_OS_LINUX || NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD
-+#if NV_OS_LINUX || NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_NETBSD || NV_OS_OPENBSD
- # include <unistd.h> // getpid
- #endif
-
-@@ -38,7 +38,7 @@
- # endif
- #endif
-
--#if NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD
-+#if NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_NETBSD || NV_OS_OPENBSD
- # include <sys/types.h>
- # include <sys/param.h>
- # include <sys/sysctl.h> // sysctl
@@ -213,6 +213,14 @@ namespace
ucontext_t * ucp = (ucontext_t *)secret;
return (void *)ucp->uc_mcontext.mc_eip;
diff --git a/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_nvcore.h b/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_nvcore.h
deleted file mode 100644
index c7326490a1..0000000000
--- a/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_nvcore.h
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
---- libraries/source/nvtt/src/src/nvcore/nvcore.h.orig 2015-07-21 15:53:21.000000000 +0000
-+++ libraries/source/nvtt/src/src/nvcore/nvcore.h
-@@ -41,6 +41,9 @@
- #elif defined POSH_OS_FREEBSD
- # define NV_OS_FREEBSD 1
- # define NV_OS_UNIX 1
-+#elif defined POSH_OS_NETBSD
-+# define NV_OS_NETBSD 1
-+# define NV_OS_UNIX 1
- #elif defined POSH_OS_OPENBSD
- # define NV_OS_OPENBSD 1
- # define NV_OS_UNIX 1
-@@ -187,7 +190,7 @@ typedef uint32 uint;
- #elif NV_CC_GNUC
- # if NV_OS_LINUX
- # include "DefsGnucLinux.h"
--# elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD
-+# elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_NETBSD || NV_OS_OPENBSD
- # include "DefsGnucDarwin.h"
- # elif NV_OS_MINGW
- # include "DefsGnucWin32.h"
diff --git a/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_poshlib_posh.h b/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_poshlib_posh.h
deleted file mode 100644
index b5e3eb53d2..0000000000
--- a/0ad/patches/patch-libraries_source_nvtt_src_src_nvcore_poshlib_posh.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- libraries/source/nvtt/src/src/nvcore/poshlib/posh.h.orig 2015-07-21 15:53:21.000000000 +0000
-+++ libraries/source/nvtt/src/src/nvcore/poshlib/posh.h
-@@ -298,6 +298,11 @@ Metrowerks:
- # define POSH_OS_STRING "FreeBSD"
- #endif
-
-+#if defined __NetBSD__
-+# define POSH_OS_NETBSD 1
-+# define POSH_OS_STRING "NetBSD"
-+#endif
-+
- #if defined __OpenBSD__
- # define POSH_OS_OPENBSD 1
- # define POSH_OS_STRING "OpenBSD"
-@@ -1018,5 +1023,3 @@ extern posh_i64_t POSH_ReadI64FromBig(
- #ifdef __cplusplus
- }
- #endif
--
--
diff --git a/0ad/patches/patch-libraries_source_nvtt_src_src_nvmath_nvmath.h b/0ad/patches/patch-libraries_source_nvtt_src_src_nvmath_nvmath.h
deleted file mode 100644
index 517a0e4312..0000000000
--- a/0ad/patches/patch-libraries_source_nvtt_src_src_nvmath_nvmath.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- libraries/source/nvtt/src/src/nvmath/nvmath.h.orig 2012-06-10 22:39:26.000000000 +0000
-+++ libraries/source/nvtt/src/src/nvmath/nvmath.h
-@@ -115,7 +115,7 @@ inline bool isFinite(const float f)
- {
- #if NV_OS_WIN32
- return _finite(f) != 0;
--#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD
-+#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_NETBSD || NV_OS_OPENBSD
- return isfinite(f);
- #elif NV_OS_LINUX
- return finitef(f);
-@@ -130,7 +130,7 @@ inline bool isNan(const float f)
- {
- #if NV_OS_WIN32
- return _isnan(f) != 0;
--#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD
-+#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_NETBSD || NV_OS_OPENBSD
- return isnan(f);
- #elif NV_OS_LINUX
- return isnanf(f);
Home |
Main Index |
Thread Index |
Old Index