aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/pqp
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/pqp')
-rw-r--r--vcpkg/ports/pqp/CMakeLists.txt24
-rw-r--r--vcpkg/ports/pqp/LICENSE32
-rw-r--r--vcpkg/ports/pqp/fix-math-functions.patch17
-rw-r--r--vcpkg/ports/pqp/portfile.cmake25
-rw-r--r--vcpkg/ports/pqp/vcpkg.json17
5 files changed, 115 insertions, 0 deletions
diff --git a/vcpkg/ports/pqp/CMakeLists.txt b/vcpkg/ports/pqp/CMakeLists.txt
new file mode 100644
index 0000000..418beb8
--- /dev/null
+++ b/vcpkg/ports/pqp/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.0)
+project(pqp)
+
+set(CMAKE_CXX_STANDARD 11)
+
+set(SOURCE_CUSTOM_DIR "PQP_v1.3")
+include_directories(${SOURCE_CUSTOM_DIR}/src)
+
+file(GLOB SRCS
+ "${SOURCE_CUSTOM_DIR}/src/*.cpp")
+file(GLOB HDRS
+ "${SOURCE_CUSTOM_DIR}/src/*.h")
+
+add_library(pqp STATIC ${SRCS})
+
+install(TARGETS pqp EXPORT pqpConfig
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+foreach (file ${HDRS})
+ get_filename_component(dir ${file} DIRECTORY)
+ install(FILES ${file} DESTINATION include/ CONFIGURATIONS Release)
+endforeach()
diff --git a/vcpkg/ports/pqp/LICENSE b/vcpkg/ports/pqp/LICENSE
new file mode 100644
index 0000000..2d4e481
--- /dev/null
+++ b/vcpkg/ports/pqp/LICENSE
@@ -0,0 +1,32 @@
+Copyright 1999 University of North Carolina at Chapel Hill.
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for educational, research, and non-profit purposes, without fee,
+and without a written agreement is hereby granted, provided that the above
+copyright notice and the following three paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE TO
+ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL SPECIFICALLY DISCLAIMS ANY
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED
+HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT
+CHAPEL HILL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ENHANCEMENTS, OR MODIFICATIONS.
+
+The authors may be contacted via:
+
+US Mail: Eric Larsen, Stefan Gottschalk
+ Department of Computer Science
+ Sitterson Hall, CB #3175
+ University of North Carolina
+ Chapel Hill, NC 27599-3175
+
+Phone: (919) 962-1749
+
+Email: geom@cs.unc.edu \ No newline at end of file
diff --git a/vcpkg/ports/pqp/fix-math-functions.patch b/vcpkg/ports/pqp/fix-math-functions.patch
new file mode 100644
index 0000000..51a4f15
--- /dev/null
+++ b/vcpkg/ports/pqp/fix-math-functions.patch
@@ -0,0 +1,17 @@
+--- a/PQP_v1.3/src/PQP_Compile.h
++++ b/PQP_v1.3/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/vcpkg/ports/pqp/portfile.cmake b/vcpkg/ports/pqp/portfile.cmake
new file mode 100644
index 0000000..dc88ab0
--- /dev/null
+++ b/vcpkg/ports/pqp/portfile.cmake
@@ -0,0 +1,25 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://gamma.cs.unc.edu/software/downloads/SSV/pqp-1.3.tar.gz"
+ FILENAME "pqp-1.3.tar.gz"
+ SHA512 baad7b050b13a6d13de5110cdec443048a3543b65b0d3b30d1b5f737b46715052661f762ef71345d39978c0c788a30a3a935717664806b4729722ee3594ebdc1
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ PATCHES
+ fix-math-functions.patch
+)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+# Handle copyright
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/pqp/vcpkg.json b/vcpkg/ports/pqp/vcpkg.json
new file mode 100644
index 0000000..6658fe6
--- /dev/null
+++ b/vcpkg/ports/pqp/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "pqp",
+ "version": "1.3",
+ "port-version": 8,
+ "description": "a proximity query package",
+ "homepage": "https://gamma.cs.unc.edu/SSV/",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}