aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kohlbau <tobias@kohlbau.de>2017-04-04 12:21:26 +0200
committerTobias Kohlbau <tobias@kohlbau.de>2017-04-04 12:21:26 +0200
commit2b64dfd415ca92251b1515592d7e847f20b2dff3 (patch)
tree4ef2c466c4ef87505f278548f374c7d31d8eaa2b
parent8d9766200eed7ef5327fd65ed129c2176df62738 (diff)
downloadvcpkg-2b64dfd415ca92251b1515592d7e847f20b2dff3.tar.gz
vcpkg-2b64dfd415ca92251b1515592d7e847f20b2dff3.zip
[pqp] fixes wrong declaration of math functions
Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
-rw-r--r--ports/pqp/fix-math-functions.patch19
-rw-r--r--ports/pqp/portfile.cmake5
2 files changed, 24 insertions, 0 deletions
diff --git a/ports/pqp/fix-math-functions.patch b/ports/pqp/fix-math-functions.patch
new file mode 100644
index 000000000..6f81d1b2e
--- /dev/null
+++ b/ports/pqp/fix-math-functions.patch
@@ -0,0 +1,19 @@
+diff --git a/src/PQP_Compile.h b/src/PQP_Compile.h
+index f76c981..8a70710 100644
+--- a/src/PQP_Compile.h
++++ b/src/PQP_Compile.h
+@@ -44,10 +44,10 @@
+ // prevents compiler warnings when PQP_REAL is float
+
+ #include <math.h>
+-inline float sqrt(float x) { return (float)sqrt((double)x); }
+-inline float cos(float x) { return (float)cos((double)x); }
+-inline float sin(float x) { return (float)sin((double)x); }
+-inline float fabs(float x) { return (float)fabs((double)x); }
++//inline float sqrt(float x) { return (float)sqrt((double)x); }
++//inline float cos(float x) { return (float)cos((double)x); }
++//inline float sin(float x) { return (float)sin((double)x); }
++//inline float fabs(float x) { return (float)fabs((double)x); }
+
+ //-------------------------------------------------------------------------
+ //
diff --git a/ports/pqp/portfile.cmake b/ports/pqp/portfile.cmake
index 3ce851400..077d76d6a 100644
--- a/ports/pqp/portfile.cmake
+++ b/ports/pqp/portfile.cmake
@@ -11,6 +11,11 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-math-functions.patch"
+)
+
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(