From ae0ef8a47bc035a0af4656ac1e221d1bcb17bc2d Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Fri, 18 Feb 2022 13:41:10 -0500 Subject: [PATCH 1/8] [libcpplocate] New port --- ports/libcpplocate/fix-install-paths.patch | 78 +++++++++++++ ports/libcpplocate/fix-windows-uwp.patch | 129 +++++++++++++++++++++ ports/libcpplocate/portfile.cmake | 41 +++++++ ports/libcpplocate/vcpkg.json | 17 +++ 4 files changed, 265 insertions(+) create mode 100644 ports/libcpplocate/fix-install-paths.patch create mode 100644 ports/libcpplocate/fix-windows-uwp.patch create mode 100644 ports/libcpplocate/portfile.cmake create mode 100644 ports/libcpplocate/vcpkg.json diff --git a/ports/libcpplocate/fix-install-paths.patch b/ports/libcpplocate/fix-install-paths.patch new file mode 100644 index 00000000000000..5c48ae7ab5562b --- /dev/null +++ b/ports/libcpplocate/fix-install-paths.patch @@ -0,0 +1,78 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 670964e..f19361e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -123,35 +123,18 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU + endif() + + # Installation paths +-if(UNIX AND SYSTEM_DIR_INSTALL) +- # Install into the system (/usr/bin or /usr/local/bin) +- set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ +- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake +- set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ +- set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ +- set(INSTALL_BIN "bin") # /usr/[local]/bin +- set(INSTALL_SHARED "lib") # /usr/[local]/lib +- set(INSTALL_LIB "lib") # /usr/[local]/lib +- set(INSTALL_INCLUDE "include") # /usr/[local]/include +- set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ +- set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications +- set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps +- set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) +-else() +- # Install into local directory +- set(INSTALL_ROOT ".") # ./ +- set(INSTALL_CMAKE "cmake") # ./cmake +- set(INSTALL_EXAMPLES ".") # ./ +- set(INSTALL_DATA ".") # ./ +- set(INSTALL_BIN ".") # ./ +- set(INSTALL_SHARED "lib") # ./lib +- set(INSTALL_LIB "lib") # ./lib +- set(INSTALL_INCLUDE "include") # ./include +- set(INSTALL_DOC "doc") # ./doc +- set(INSTALL_SHORTCUTS "misc") # ./misc +- set(INSTALL_ICONS "misc") # ./misc +- set(INSTALL_INIT "misc") # ./misc +-endif() ++set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ ++set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake ++set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ ++set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ ++set(INSTALL_BIN "bin") # /usr/[local]/bin ++set(INSTALL_SHARED "lib") # /usr/[local]/lib ++set(INSTALL_LIB "lib") # /usr/[local]/lib ++set(INSTALL_INCLUDE "include") # /usr/[local]/include ++set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ ++set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications ++set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps ++set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) + + # Set runtime path + set(CMAKE_SKIP_BUILD_RPATH FALSE) # Add absolute path to all dependencies for BUILD +diff --git a/cpplocate-config.cmake b/cpplocate-config.cmake +index 8693fa4..cdb2828 100644 +--- a/cpplocate-config.cmake ++++ b/cpplocate-config.cmake +@@ -26,7 +26,7 @@ macro(find_modules PREFIX) + if(TARGET ${module_name}) + set(MODULE_FOUND TRUE) + else() +- find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake") ++ find_module("${CMAKE_CURRENT_LIST_DIR}/${module_name}-export.cmake") + endif() + endforeach(module_name) + endmacro() +diff --git a/liblocate-config.cmake b/liblocate-config.cmake +index 3bf4823..7245353 100644 +--- a/liblocate-config.cmake ++++ b/liblocate-config.cmake +@@ -25,7 +25,7 @@ macro(find_modules PREFIX) + if(TARGET ${module_name}) + set(MODULE_FOUND TRUE) + else() +- find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake") ++ find_module("${CMAKE_CURRENT_LIST_DIR}/${module_name}-export.cmake") + endif() + endforeach(module_name) + endmacro() diff --git a/ports/libcpplocate/fix-windows-uwp.patch b/ports/libcpplocate/fix-windows-uwp.patch new file mode 100644 index 00000000000000..41beb8e4d8ed9a --- /dev/null +++ b/ports/libcpplocate/fix-windows-uwp.patch @@ -0,0 +1,129 @@ +diff --git a/source/liblocate/source/liblocate.c b/source/liblocate/source/liblocate.c +index 2e53d56..3022b0c 100644 +--- a/source/liblocate/source/liblocate.c ++++ b/source/liblocate/source/liblocate.c +@@ -12,7 +12,7 @@ + #define _GNU_SOURCE + #define __USE_GNU + #include +-#elif defined(SYSTEM_WINDOWS) ++#elif defined(_WINDOWS) + #include + #elif defined(SYSTEM_SOLARIS) + #include +@@ -61,7 +61,7 @@ void getExecutablePath(char ** path, unsigned int * pathLength) + // Copy contents to caller, create caller ownership + copyToStringOutParameter(exePath, len, path, pathLength); + +-#elif defined SYSTEM_WINDOWS ++#elif defined _WINDOWS + + // Preallocate MAX_PATH (e.g., 4095) characters and hope the executable path isn't longer (including null byte) + char exePath[MAX_PATH]; +@@ -248,7 +248,7 @@ void getLibraryPath(void * symbol, char ** path, unsigned int * pathLength) + return; + } + +-#if defined SYSTEM_WINDOWS ++#if defined _WINDOWS + + char systemPath[MAX_PATH]; + systemPath[0] = '\0'; +@@ -446,7 +446,7 @@ void pathSeparator(char * sep) + { + if (sep != 0x0) + { +-#ifdef SYSTEM_WINDOWS ++#ifdef _WINDOWS + *sep = '\\'; + #else + *sep = '/'; +@@ -462,7 +462,7 @@ void libPrefix(char ** prefix, unsigned int * prefixLength) + return; + } + +-#if defined SYSTEM_WINDOWS || defined SYSTEM_DARWIN ++#if defined _WINDOWS || defined SYSTEM_DARWIN + copyToStringOutParameter("", 0, prefix, prefixLength); + #else + copyToStringOutParameter("lib", 3, prefix, prefixLength); +@@ -477,7 +477,7 @@ void libExtension(char ** extension, unsigned int * extensionLength) + return; + } + +-#if defined SYSTEM_WINDOWS ++#if defined _WINDOWS + copyToStringOutParameter("dll", 3, extension, extensionLength); + #elif defined SYSTEM_DARWIN + copyToStringOutParameter("dylib", 5, extension, extensionLength); +@@ -494,7 +494,7 @@ void libExtensions(char *** extensions, unsigned int ** extensionLengths, unsign + return; + } + +-#if defined SYSTEM_WINDOWS ++#if defined _WINDOWS + *extensionCount = 1; + *extensions = (char **)malloc(sizeof(char *) * *extensionCount); + *extensionLengths = (unsigned int *)malloc(sizeof(unsigned int) * *extensionCount); +@@ -521,7 +521,7 @@ void homeDir(char ** dir, unsigned int * dirLength) + return; + } + +- #ifdef SYSTEM_WINDOWS ++ #ifdef _WINDOWS + + char * homeDrive, * homePath; + unsigned int homeDriveLen, homePathLen; +@@ -594,7 +594,7 @@ void configDir(char ** dir, unsigned int * dirLength, const char * application, + char * configPath; + unsigned int configPathLen; + +- #if defined SYSTEM_WINDOWS ++ #if defined _WINDOWS + char * appData; + unsigned int appDataLen; + getEnv("APPDATA", 7, &appData, &appDataLen); +diff --git a/source/liblocate/source/utils.c b/source/liblocate/source/utils.c +index d185c17..10b1d71 100644 +--- a/source/liblocate/source/utils.c ++++ b/source/liblocate/source/utils.c +@@ -4,7 +4,7 @@ + #include + #include + +-#ifdef SYSTEM_WINDOWS ++#ifdef _WINDOWS + #define WIN32_LEAN_AND_MEAN + #include + #else +@@ -18,7 +18,7 @@ + #define unixPathDelim '/' + #define unixPathsDelim ':' + +-#ifdef SYSTEM_WINDOWS ++#ifdef _WINDOWS + #define pathDelim '\\' + #define pathsDelim ';' + #else +@@ -242,7 +242,7 @@ unsigned char fileExists(const char * path, unsigned int pathLength) + { + (void)pathLength; + +-#ifdef SYSTEM_WINDOWS ++#ifdef _WINDOWS + + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + return (GetFileAttributesExA(path, GetFileExInfoStandard, &fileInfo) != 0); +diff --git a/source/tests/liblocate-test/utils_test.cpp b/source/tests/liblocate-test/utils_test.cpp +index 0395652..72b6c22 100644 +--- a/source/tests/liblocate-test/utils_test.cpp ++++ b/source/tests/liblocate-test/utils_test.cpp +@@ -213,7 +213,7 @@ TEST_F(utils_test, getEnv_NoEnv) + + TEST_F(utils_test, getEnv_Value) + { +-#ifdef SYSTEM_WINDOWS ++#ifdef _WINDOWS + const char * key = "OS"; + const unsigned int keyLength = strlen(key); + diff --git a/ports/libcpplocate/portfile.cmake b/ports/libcpplocate/portfile.cmake new file mode 100644 index 00000000000000..1ebaf6cb8614ca --- /dev/null +++ b/ports/libcpplocate/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cginternals/cpplocate + REF 23aeb69c23848ff52456179374b9dfc1ede357bf # 2.3.0 in CMakeLists.txt "META_VERSION_*" + SHA512 3ab7074a30b089574f12e44842e4894788e5a19ad2a496c5e8307c479b378171974087ff3050e6dffe6e4fc2c2873310cefb191cb1a41bd6c0a83e32ba46ddcc + HEAD_REF master + PATCHES + fix-install-paths.patch + fix-windows-uwp.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DOPTION_BUILD_TESTS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME cpplocate + CONFIG_PATH share/cpplocate/cmake/cpplocate + DO_NOT_DELETE_PARENT_CONFIG_PATH +) + +vcpkg_cmake_config_fixup( + PACKAGE_NAME liblocate + CONFIG_PATH share/cpplocate/cmake/liblocate +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/cpplocate/cmake") + +# Patched liblocate config file needs moving to the correct directory +file(RENAME + "${CURRENT_PACKAGES_DIR}/share/cpplocate/liblocate-config.cmake" + "${CURRENT_PACKAGES_DIR}/share/liblocate/liblocate-config.cmake" +) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libcpplocate/vcpkg.json b/ports/libcpplocate/vcpkg.json new file mode 100644 index 00000000000000..e6d78dd5ef4438 --- /dev/null +++ b/ports/libcpplocate/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libcpplocate", + "version-semver": "2.3.0", + "description": "Cross-platform C++ library providing tools for applications to locate themselves, their data assets as well as dependent modules.", + "homepage": "https://cpplocate.org/", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} From c8d5589ea8f63e266882a42fe6c41a8d348b3b82 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Sun, 20 Feb 2022 15:46:32 -0500 Subject: [PATCH 2/8] UWP unsupported Errors that I don't know how to fix and personally unfamiliar with UWP. Maybe someone else knows how to fix/support it --- ports/libcpplocate/fix-windows-uwp.patch | 129 ----------------------- ports/libcpplocate/portfile.cmake | 1 - ports/libcpplocate/vcpkg.json | 1 + 3 files changed, 1 insertion(+), 130 deletions(-) delete mode 100644 ports/libcpplocate/fix-windows-uwp.patch diff --git a/ports/libcpplocate/fix-windows-uwp.patch b/ports/libcpplocate/fix-windows-uwp.patch deleted file mode 100644 index 41beb8e4d8ed9a..00000000000000 --- a/ports/libcpplocate/fix-windows-uwp.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff --git a/source/liblocate/source/liblocate.c b/source/liblocate/source/liblocate.c -index 2e53d56..3022b0c 100644 ---- a/source/liblocate/source/liblocate.c -+++ b/source/liblocate/source/liblocate.c -@@ -12,7 +12,7 @@ - #define _GNU_SOURCE - #define __USE_GNU - #include --#elif defined(SYSTEM_WINDOWS) -+#elif defined(_WINDOWS) - #include - #elif defined(SYSTEM_SOLARIS) - #include -@@ -61,7 +61,7 @@ void getExecutablePath(char ** path, unsigned int * pathLength) - // Copy contents to caller, create caller ownership - copyToStringOutParameter(exePath, len, path, pathLength); - --#elif defined SYSTEM_WINDOWS -+#elif defined _WINDOWS - - // Preallocate MAX_PATH (e.g., 4095) characters and hope the executable path isn't longer (including null byte) - char exePath[MAX_PATH]; -@@ -248,7 +248,7 @@ void getLibraryPath(void * symbol, char ** path, unsigned int * pathLength) - return; - } - --#if defined SYSTEM_WINDOWS -+#if defined _WINDOWS - - char systemPath[MAX_PATH]; - systemPath[0] = '\0'; -@@ -446,7 +446,7 @@ void pathSeparator(char * sep) - { - if (sep != 0x0) - { --#ifdef SYSTEM_WINDOWS -+#ifdef _WINDOWS - *sep = '\\'; - #else - *sep = '/'; -@@ -462,7 +462,7 @@ void libPrefix(char ** prefix, unsigned int * prefixLength) - return; - } - --#if defined SYSTEM_WINDOWS || defined SYSTEM_DARWIN -+#if defined _WINDOWS || defined SYSTEM_DARWIN - copyToStringOutParameter("", 0, prefix, prefixLength); - #else - copyToStringOutParameter("lib", 3, prefix, prefixLength); -@@ -477,7 +477,7 @@ void libExtension(char ** extension, unsigned int * extensionLength) - return; - } - --#if defined SYSTEM_WINDOWS -+#if defined _WINDOWS - copyToStringOutParameter("dll", 3, extension, extensionLength); - #elif defined SYSTEM_DARWIN - copyToStringOutParameter("dylib", 5, extension, extensionLength); -@@ -494,7 +494,7 @@ void libExtensions(char *** extensions, unsigned int ** extensionLengths, unsign - return; - } - --#if defined SYSTEM_WINDOWS -+#if defined _WINDOWS - *extensionCount = 1; - *extensions = (char **)malloc(sizeof(char *) * *extensionCount); - *extensionLengths = (unsigned int *)malloc(sizeof(unsigned int) * *extensionCount); -@@ -521,7 +521,7 @@ void homeDir(char ** dir, unsigned int * dirLength) - return; - } - -- #ifdef SYSTEM_WINDOWS -+ #ifdef _WINDOWS - - char * homeDrive, * homePath; - unsigned int homeDriveLen, homePathLen; -@@ -594,7 +594,7 @@ void configDir(char ** dir, unsigned int * dirLength, const char * application, - char * configPath; - unsigned int configPathLen; - -- #if defined SYSTEM_WINDOWS -+ #if defined _WINDOWS - char * appData; - unsigned int appDataLen; - getEnv("APPDATA", 7, &appData, &appDataLen); -diff --git a/source/liblocate/source/utils.c b/source/liblocate/source/utils.c -index d185c17..10b1d71 100644 ---- a/source/liblocate/source/utils.c -+++ b/source/liblocate/source/utils.c -@@ -4,7 +4,7 @@ - #include - #include - --#ifdef SYSTEM_WINDOWS -+#ifdef _WINDOWS - #define WIN32_LEAN_AND_MEAN - #include - #else -@@ -18,7 +18,7 @@ - #define unixPathDelim '/' - #define unixPathsDelim ':' - --#ifdef SYSTEM_WINDOWS -+#ifdef _WINDOWS - #define pathDelim '\\' - #define pathsDelim ';' - #else -@@ -242,7 +242,7 @@ unsigned char fileExists(const char * path, unsigned int pathLength) - { - (void)pathLength; - --#ifdef SYSTEM_WINDOWS -+#ifdef _WINDOWS - - WIN32_FILE_ATTRIBUTE_DATA fileInfo; - return (GetFileAttributesExA(path, GetFileExInfoStandard, &fileInfo) != 0); -diff --git a/source/tests/liblocate-test/utils_test.cpp b/source/tests/liblocate-test/utils_test.cpp -index 0395652..72b6c22 100644 ---- a/source/tests/liblocate-test/utils_test.cpp -+++ b/source/tests/liblocate-test/utils_test.cpp -@@ -213,7 +213,7 @@ TEST_F(utils_test, getEnv_NoEnv) - - TEST_F(utils_test, getEnv_Value) - { --#ifdef SYSTEM_WINDOWS -+#ifdef _WINDOWS - const char * key = "OS"; - const unsigned int keyLength = strlen(key); - diff --git a/ports/libcpplocate/portfile.cmake b/ports/libcpplocate/portfile.cmake index 1ebaf6cb8614ca..f5c6068d3941ab 100644 --- a/ports/libcpplocate/portfile.cmake +++ b/ports/libcpplocate/portfile.cmake @@ -6,7 +6,6 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-install-paths.patch - fix-windows-uwp.patch ) vcpkg_cmake_configure( diff --git a/ports/libcpplocate/vcpkg.json b/ports/libcpplocate/vcpkg.json index e6d78dd5ef4438..3dbe9db2e63091 100644 --- a/ports/libcpplocate/vcpkg.json +++ b/ports/libcpplocate/vcpkg.json @@ -4,6 +4,7 @@ "description": "Cross-platform C++ library providing tools for applications to locate themselves, their data assets as well as dependent modules.", "homepage": "https://cpplocate.org/", "license": "MIT", + "supports": "!uwp", "dependencies": [ { "name": "vcpkg-cmake", From 0fe471dd29dc77c3db9ee56b0099e2cd3964c026 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Sun, 20 Feb 2022 15:49:12 -0500 Subject: [PATCH 3/8] Add version --- versions/baseline.json | 4 ++++ versions/l-/libcpplocate.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/l-/libcpplocate.json diff --git a/versions/baseline.json b/versions/baseline.json index 647960ed332a2f..cd5bf694330006 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3396,6 +3396,10 @@ "baseline": "1.4.1", "port-version": 1 }, + "libcpplocate": { + "baseline": "2.3.0", + "port-version": 0 + }, "libcrafter": { "baseline": "1.0", "port-version": 2 diff --git a/versions/l-/libcpplocate.json b/versions/l-/libcpplocate.json new file mode 100644 index 00000000000000..b77e65a9a98033 --- /dev/null +++ b/versions/l-/libcpplocate.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "c2242946dfa4ae8c741e154747f28f6548332514", + "version-semver": "2.3.0", + "port-version": 0 + } + ] +} From 9a2953141d2ebd2f80d2d5cbeaf8af59485b7248 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 22 Feb 2022 10:08:42 -0500 Subject: [PATCH 4/8] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> --- ports/libcpplocate/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/libcpplocate/portfile.cmake b/ports/libcpplocate/portfile.cmake index f5c6068d3941ab..2cb11b22dae4cd 100644 --- a/ports/libcpplocate/portfile.cmake +++ b/ports/libcpplocate/portfile.cmake @@ -9,12 +9,13 @@ vcpkg_from_github( ) vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DOPTION_BUILD_TESTS=OFF + -DOPTION_BUILD_TESTS=OFF ) vcpkg_cmake_install() +vcpkg_copy_pdbs() vcpkg_cmake_config_fixup( PACKAGE_NAME cpplocate From eaa957cb51f1c7c6903c0613d37c080a3bc26837 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 22 Feb 2022 10:31:24 -0500 Subject: [PATCH 5/8] Simplify patch --- ports/libcpplocate/fix-install-paths.patch | 51 +++------------------- 1 file changed, 6 insertions(+), 45 deletions(-) diff --git a/ports/libcpplocate/fix-install-paths.patch b/ports/libcpplocate/fix-install-paths.patch index 5c48ae7ab5562b..62d4722c2ce94d 100644 --- a/ports/libcpplocate/fix-install-paths.patch +++ b/ports/libcpplocate/fix-install-paths.patch @@ -1,55 +1,16 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 670964e..f19361e 100644 +index 854214c..9c4d98a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -123,35 +123,18 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU +@@ -124,7 +124,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU endif() # Installation paths -if(UNIX AND SYSTEM_DIR_INSTALL) -- # Install into the system (/usr/bin or /usr/local/bin) -- set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ -- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake -- set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ -- set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ -- set(INSTALL_BIN "bin") # /usr/[local]/bin -- set(INSTALL_SHARED "lib") # /usr/[local]/lib -- set(INSTALL_LIB "lib") # /usr/[local]/lib -- set(INSTALL_INCLUDE "include") # /usr/[local]/include -- set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ -- set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications -- set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps -- set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) --else() -- # Install into local directory -- set(INSTALL_ROOT ".") # ./ -- set(INSTALL_CMAKE "cmake") # ./cmake -- set(INSTALL_EXAMPLES ".") # ./ -- set(INSTALL_DATA ".") # ./ -- set(INSTALL_BIN ".") # ./ -- set(INSTALL_SHARED "lib") # ./lib -- set(INSTALL_LIB "lib") # ./lib -- set(INSTALL_INCLUDE "include") # ./include -- set(INSTALL_DOC "doc") # ./doc -- set(INSTALL_SHORTCUTS "misc") # ./misc -- set(INSTALL_ICONS "misc") # ./misc -- set(INSTALL_INIT "misc") # ./misc --endif() -+set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ -+set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake -+set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ -+set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ -+set(INSTALL_BIN "bin") # /usr/[local]/bin -+set(INSTALL_SHARED "lib") # /usr/[local]/lib -+set(INSTALL_LIB "lib") # /usr/[local]/lib -+set(INSTALL_INCLUDE "include") # /usr/[local]/include -+set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ -+set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications -+set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps -+set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) - - # Set runtime path - set(CMAKE_SKIP_BUILD_RPATH FALSE) # Add absolute path to all dependencies for BUILD ++if(1) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ + set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake diff --git a/cpplocate-config.cmake b/cpplocate-config.cmake index 8693fa4..cdb2828 100644 --- a/cpplocate-config.cmake From 0960846e2c937a387f93b2e5e2aa4d6fa0eadd44 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 22 Feb 2022 10:32:15 -0500 Subject: [PATCH 6/8] Update version --- versions/l-/libcpplocate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libcpplocate.json b/versions/l-/libcpplocate.json index b77e65a9a98033..2298526bd9ffb3 100644 --- a/versions/l-/libcpplocate.json +++ b/versions/l-/libcpplocate.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c2242946dfa4ae8c741e154747f28f6548332514", + "git-tree": "9f21e1bbd16d704cb664adbfb082852f71b6efdb", "version-semver": "2.3.0", "port-version": 0 } From 8a894a4fe1011bcf6d4242652745600d618e13d8 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Sun, 27 Feb 2022 14:34:37 -0500 Subject: [PATCH 7/8] Use tagged v2.3.0 --- ports/libcpplocate/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libcpplocate/portfile.cmake b/ports/libcpplocate/portfile.cmake index 2cb11b22dae4cd..963700fcb8cbcd 100644 --- a/ports/libcpplocate/portfile.cmake +++ b/ports/libcpplocate/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cginternals/cpplocate - REF 23aeb69c23848ff52456179374b9dfc1ede357bf # 2.3.0 in CMakeLists.txt "META_VERSION_*" - SHA512 3ab7074a30b089574f12e44842e4894788e5a19ad2a496c5e8307c479b378171974087ff3050e6dffe6e4fc2c2873310cefb191cb1a41bd6c0a83e32ba46ddcc + REF v2.3.0 + SHA512 4028d552d0c3c0161d5dd5aea27bb22f0c61297a4b461a067c082cfcf84e3a709c9895453e750d819433529089011c2512293b2064c42bb5ba11f957eebc2206 HEAD_REF master PATCHES fix-install-paths.patch From 357d6c9a59323b63c240545ea6471f982d9f4c23 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Sun, 27 Feb 2022 14:35:38 -0500 Subject: [PATCH 8/8] Update version --- versions/l-/libcpplocate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libcpplocate.json b/versions/l-/libcpplocate.json index 2298526bd9ffb3..ae128c72087af7 100644 --- a/versions/l-/libcpplocate.json +++ b/versions/l-/libcpplocate.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9f21e1bbd16d704cb664adbfb082852f71b6efdb", + "git-tree": "5f15b69e558a8774ebbc5bde4f5ddf70da27611c", "version-semver": "2.3.0", "port-version": 0 }