aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-08-29 15:42:45 -0700
committerGitHub <noreply@github.com>2017-08-29 15:42:45 -0700
commitd1d01075adf025690eeceffc2fc41f9a1a27982b (patch)
tree67327e5facb1629e2dccd6e44423b157ac5ee667
parent27d5f57cdba744d8039b7bbf780efe5623ceaacb (diff)
parentd7d571cb3edd3d8d86110e480c515aa912727452 (diff)
downloadvcpkg-d1d01075adf025690eeceffc2fc41f9a1a27982b.tar.gz
vcpkg-d1d01075adf025690eeceffc2fc41f9a1a27982b.zip
Merge pull request #1709 from Mixaill/ccd
[libccd/ccd] rename from libccd to ccd, refactor
-rw-r--r--ports/ccd/0001_fix_symbols_export.patch39
-rw-r--r--ports/ccd/CONTROL (renamed from ports/libccd/CONTROL)4
-rw-r--r--ports/ccd/portfile.cmake30
-rw-r--r--ports/libccd/portfile.cmake41
4 files changed, 71 insertions, 43 deletions
diff --git a/ports/ccd/0001_fix_symbols_export.patch b/ports/ccd/0001_fix_symbols_export.patch
new file mode 100644
index 000000000..f9c47d79b
--- /dev/null
+++ b/ports/ccd/0001_fix_symbols_export.patch
@@ -0,0 +1,39 @@
+From 05b5718a364ac525c8766387bd74faf852f98589 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 27 Aug 2017 03:39:53 +0300
+Subject: [PATCH] win32: export additional symbols, fixes FCL build on MSVC
+
+---
+ src/ccd/vec3.h | 2 +-
+ src/support.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ccd/vec3.h b/src/ccd/vec3.h
+index b0c1b33..014531c 100644
+--- a/src/ccd/vec3.h
++++ b/src/ccd/vec3.h
+@@ -93,7 +93,7 @@ typedef struct _ccd_vec3_t ccd_vec3_t;
+ /**
+ * Holds origin (0,0,0) - this variable is meant to be read-only!
+ */
+-extern ccd_vec3_t *ccd_vec3_origin;
++extern _ccd_export ccd_vec3_t *ccd_vec3_origin;
+
+ /**
+ * Array of points uniformly distributed on unit sphere.
+diff --git a/src/support.h b/src/support.h
+index 3372f5e..2e75df7 100644
+--- a/src/support.h
++++ b/src/support.h
+@@ -37,7 +37,7 @@ _ccd_inline void ccdSupportCopy(ccd_support_t *, const ccd_support_t *s);
+ * Computes support point of obj1 and obj2 in direction dir.
+ * Support point is returned via supp.
+ */
+-void __ccdSupport(const void *obj1, const void *obj2,
++_ccd_export void __ccdSupport(const void *obj1, const void *obj2,
+ const ccd_vec3_t *dir, const ccd_t *ccd,
+ ccd_support_t *supp);
+
+--
+2.12.2.windows.2
+
diff --git a/ports/libccd/CONTROL b/ports/ccd/CONTROL
index 3a3a0252d..16f16ea0b 100644
--- a/ports/libccd/CONTROL
+++ b/ports/ccd/CONTROL
@@ -1,3 +1,3 @@
-Source: libccd
-Version: 2.0.0
+Source: ccd
+Version: 2.0.0-1
Description: Library for collision detection between two convex shapes
diff --git a/ports/ccd/portfile.cmake b/ports/ccd/portfile.cmake
new file mode 100644
index 000000000..0ce278220
--- /dev/null
+++ b/ports/ccd/portfile.cmake
@@ -0,0 +1,30 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO danfis/libccd
+ REF 64f02f741ac94fccd0fb660a5bffcbe6d01d9939
+ SHA512 901b09d57e119e4661b3556bbefe5a4d58cb843bff5c76ee3952fe379ff183c878a04e86e6192006c11012309c6e93d42319e9d606abdf7ad723f6d8afeea47f
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_fix_symbols_export.patch)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/ccd")
+
+file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccd RENAME copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
diff --git a/ports/libccd/portfile.cmake b/ports/libccd/portfile.cmake
deleted file mode 100644
index 963000ec5..000000000
--- a/ports/libccd/portfile.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
-include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libccd-16b9379fb6e8610566fe5e1396166daf7106f165)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/danfis/libccd/archive/16b9379fb6e8610566fe5e1396166daf7106f165.zip"
- FILENAME "libccd-16b9379fb6e8610566fe5e1396166daf7106f165.zip"
- SHA512 6cb3ea713f1b1ac1bf48c9ee7e14cb85b3ec5c822ce239330913edc00cb84c846b49ec090cbfa226ef8de70bac97199eb2bf4c651225e3cfc6f6a9dd441aa7db
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
-)
-
-vcpkg_install_cmake()
-
-# Avoid a copy of file in debug
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
-# Handle copyright
-file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libccd RENAME copyright)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
-
-# Miscellaneous cleanup
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ccd)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ccd)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
-
-vcpkg_copy_pdbs() \ No newline at end of file