[packages/glslang] fix C++ isinf() usage

jajcus jajcus at pld-linux.org
Tue Feb 23 14:27:27 CET 2016


commit 375a8283fc74c12d6127b0b7ea3ef3af8e62634a
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Tue Feb 23 14:26:59 2016 +0100

    fix C++ isinf() usage
    
    Release: 2

 glslang.spec |  4 +++-
 isinf.patch  | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/glslang.spec b/glslang.spec
index 9f8b148..3f6e958 100644
--- a/glslang.spec
+++ b/glslang.spec
@@ -8,11 +8,12 @@
 Summary:	Khronos reference front-end for GLSL and ESSL
 Name:		glslang
 Version:	3.0.s%{snap}
-Release:	1
+Release:	2
 License:	BSD-like
 Group:		Applications/Graphics
 Source0:	https://github.com/KhronosGroup/glslang/archive/%{commit}/%{name}-%{version}.tar.gz
 # Source0-md5:	784d37f2f27bc3ca54b47003745553f0
+Patch0:		isinf.patch
 URL:		https://github.com/KhronosGroup/glslang
 BuildRequires:	cmake
 BuildRequires:	bison
@@ -32,6 +33,7 @@ A front-end library for programmatic parsing of GLSL/ESSL into an AST.
 
 %prep
 %setup -qn %{name}-%{commit}
+%patch0 -p1
 
 %build
 install -d build
diff --git a/isinf.patch b/isinf.patch
new file mode 100644
index 0000000..b9b9b2e
--- /dev/null
+++ b/isinf.patch
@@ -0,0 +1,15 @@
+diff -dur -x '*~' glslang-0967748fbce0773625dcba0f1185e1dd79092c0d.orig/glslang/MachineIndependent/intermOut.cpp glslang-0967748fbce0773625dcba0f1185e1dd79092c0d/glslang/MachineIndependent/intermOut.cpp
+--- glslang-0967748fbce0773625dcba0f1185e1dd79092c0d.orig/glslang/MachineIndependent/intermOut.cpp	2016-02-19 20:21:50.000000000 +0100
++++ glslang-0967748fbce0773625dcba0f1185e1dd79092c0d/glslang/MachineIndependent/intermOut.cpp	2016-02-23 14:23:01.000000000 +0100
+@@ -48,10 +48,8 @@
+ bool is_positive_infinity(double x) {
+ #ifdef _MSC_VER
+   return _fpclass(x) == _FPCLASS_PINF;
+-#elif defined __ANDROID__
+-  return std::isinf(x) && (x >= 0);
+ #else
+-  return isinf(x) && (x >= 0);
++  return std::isinf(x) && (x >= 0);
+ #endif
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glslang.git/commitdiff/375a8283fc74c12d6127b0b7ea3ef3af8e62634a



More information about the pld-cvs-commit mailing list