vcpkg/ports/vcpkg-tool-gyp-next/portfile.cmake

22 lines
829 B
CMake
Raw Normal View History

[nss] Add new ports nspr and nss (#21281) * [nspr] Add new port 4.33 * [nss] Add new port 3.73.1 * [nss] Add new port 3.73.1 * Improve code * Add supports field * improve code * version * Update doc * [nss] Switch to gyp-nss fork to fix msvc 17 build * [nss] Improve code * [nss] Bump version to 3.74 * [nspr] Add new port 4.33 * [nss] Add new port 3.73.1 * improve code * Update doc * [nss] Switch to gyp-nss fork to fix msvc 17 build * [nss] Improve code * [nss] Bump to 3.74 * [nss] Bump to 3.75 * [nss] Fix mpi.h confusion When GYP generates rules for ninja, it puts nspr include dirs before nss's own include dirs. When the msmpi package is installed, this causes mpi.h from msmpi to be found, instead of multi-precision integer library that comes bundled with nss. This patch uses nspr headers from include/nspr subdirectory which sidesteps the mpi.h from the include root * [nss] add quotes around paths Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [nss] remove debug versions of tools * [nspr] Remove redundant environment variable assignments * Add dependencies vcpkg-tool-mozbuild and vcpkg-tool-gyp-nss * clean doc * version * Remove unnecessary vcpkg_crosscompiling block on vcpkg-tool-gyp-nss. Guard for VCPKG_BUILD_TYPE Improve error reporting for unsupported VCPKG_TARGET_ARCHITECTURE Declare support for x64 rather than !x86 (given that the URI in question only has x64 binaries) Fix version numbers to use 'version'. Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2022-03-22 08:49:12 +08:00
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
set(PROGNAME gyp-next)
set(GIT_REF ac262fe82453c4e8dc47529338d157eb0b5ec0fb)
set(ARCHIVE gyp-next-${GIT_REF})
[nss] Add new ports nspr and nss (#21281) * [nspr] Add new port 4.33 * [nss] Add new port 3.73.1 * [nss] Add new port 3.73.1 * Improve code * Add supports field * improve code * version * Update doc * [nss] Switch to gyp-nss fork to fix msvc 17 build * [nss] Improve code * [nss] Bump version to 3.74 * [nspr] Add new port 4.33 * [nss] Add new port 3.73.1 * improve code * Update doc * [nss] Switch to gyp-nss fork to fix msvc 17 build * [nss] Improve code * [nss] Bump to 3.74 * [nss] Bump to 3.75 * [nss] Fix mpi.h confusion When GYP generates rules for ninja, it puts nspr include dirs before nss's own include dirs. When the msmpi package is installed, this causes mpi.h from msmpi to be found, instead of multi-precision integer library that comes bundled with nss. This patch uses nspr headers from include/nspr subdirectory which sidesteps the mpi.h from the include root * [nss] add quotes around paths Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [nss] remove debug versions of tools * [nspr] Remove redundant environment variable assignments * Add dependencies vcpkg-tool-mozbuild and vcpkg-tool-gyp-nss * clean doc * version * Remove unnecessary vcpkg_crosscompiling block on vcpkg-tool-gyp-nss. Guard for VCPKG_BUILD_TYPE Improve error reporting for unsupported VCPKG_TARGET_ARCHITECTURE Declare support for x64 rather than !x86 (given that the URI in question only has x64 binaries) Fix version numbers to use 'version'. Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2022-03-22 08:49:12 +08:00
vcpkg_download_distfile(ARCHIVE_PATH
URLS "https://github.com/nodejs/gyp-next/archive/${GIT_REF}.zip"
SHA512 5607762ab4ec7d67c09518832365bfa897e3d71b891d7ad8ec27cc41322c0f1113cd45048990d497d683cc4d02d98ed17f4f672f4e10f64736ee1e2af1578bd1
[nss] Add new ports nspr and nss (#21281) * [nspr] Add new port 4.33 * [nss] Add new port 3.73.1 * [nss] Add new port 3.73.1 * Improve code * Add supports field * improve code * version * Update doc * [nss] Switch to gyp-nss fork to fix msvc 17 build * [nss] Improve code * [nss] Bump version to 3.74 * [nspr] Add new port 4.33 * [nss] Add new port 3.73.1 * improve code * Update doc * [nss] Switch to gyp-nss fork to fix msvc 17 build * [nss] Improve code * [nss] Bump to 3.74 * [nss] Bump to 3.75 * [nss] Fix mpi.h confusion When GYP generates rules for ninja, it puts nspr include dirs before nss's own include dirs. When the msmpi package is installed, this causes mpi.h from msmpi to be found, instead of multi-precision integer library that comes bundled with nss. This patch uses nspr headers from include/nspr subdirectory which sidesteps the mpi.h from the include root * [nss] add quotes around paths Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [nss] remove debug versions of tools * [nspr] Remove redundant environment variable assignments * Add dependencies vcpkg-tool-mozbuild and vcpkg-tool-gyp-nss * clean doc * version * Remove unnecessary vcpkg_crosscompiling block on vcpkg-tool-gyp-nss. Guard for VCPKG_BUILD_TYPE Improve error reporting for unsupported VCPKG_TARGET_ARCHITECTURE Declare support for x64 rather than !x86 (given that the URI in question only has x64 binaries) Fix version numbers to use 'version'. Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2022-03-22 08:49:12 +08:00
FILENAME "${ARCHIVE}.zip"
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools")
vcpkg_execute_in_download_mode(
COMMAND "${CMAKE_COMMAND}" -E tar xzf "${ARCHIVE_PATH}"
WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools"
)
file(GLOB_RECURSE folders "${CURRENT_PACKAGES_DIR}/tools/*" LIST_DIRECTORIES true)
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/${ARCHIVE}" "${CURRENT_PACKAGES_DIR}/tools/gyp-next")