aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-04-05 14:32:52 -0700
committerGitHub <noreply@github.com>2017-04-05 14:32:52 -0700
commit2cbd3ed45a08d8c8ab16e8c2311dbcb1787baa50 (patch)
tree3e5cd9d493cb40763ac04341666c5808aca6d530
parent7dbc8931634a19368cad0432a3585641b93cfc33 (diff)
parent32e0645848b96a54830d7611cb6bfbc53aa70f89 (diff)
downloadvcpkg-2cbd3ed45a08d8c8ab16e8c2311dbcb1787baa50.tar.gz
vcpkg-2cbd3ed45a08d8c8ab16e8c2311dbcb1787baa50.zip
Merge pull request #895 from tobiaskohlbau/pqp
[pqp] fixes wrong declaration of math functions
-rw-r--r--ports/pqp/CONTROL2
-rw-r--r--ports/pqp/fix-math-functions.patch19
-rw-r--r--ports/pqp/portfile.cmake5
3 files changed, 25 insertions, 1 deletions
diff --git a/ports/pqp/CONTROL b/ports/pqp/CONTROL
index 89995bb92..8b9882631 100644
--- a/ports/pqp/CONTROL
+++ b/ports/pqp/CONTROL
@@ -1,3 +1,3 @@
Source: pqp
-Version: 1.3
+Version: 1.3-1
Description: a proximity query package
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(