diff --git a/ports/gmp/CONTROL b/ports/gmp/CONTROL new file mode 100644 index 0000000000..54fe0fe2c3 --- /dev/null +++ b/ports/gmp/CONTROL @@ -0,0 +1,5 @@ +Source: gmp +Version: 6.2.0 +Homepage: https://gmplib.org/ +Description: The GNU Multiple Precision Arithmetic Library +Build-Depends: vs-yasm (windows) \ No newline at end of file diff --git a/ports/gmp/portfile.cmake b/ports/gmp/portfile.cmake new file mode 100644 index 0000000000..be12772d09 --- /dev/null +++ b/ports/gmp/portfile.cmake @@ -0,0 +1,107 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/gmp + REF e140dfc8668e96d7e56cbd46467945adcc6b3cc4 #v6.2.0 + SHA512 3b646c142447946bb4556db01214ff130da917bc149946b8cf086f3b01e1cc3d664b941a30a42608799c14461b2f29e4b894b72915d723bd736513c8914729b7 + HEAD_REF master + PATCHES vs.build.patch + runtime.patch + prefix.patch + ) + vcpkg_find_acquire_program(YASM) + get_filename_component(YASM_DIR "${YASM}" DIRECTORY) + vcpkg_add_to_path(${YASM_DIR}) + set(ENV{YASMPATH} ${YASM_DIR}/) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURATION_RELEASE ReleaseDLL) + set(CONFIGURATION_DEBUG DebugDLL) + else() + set(CONFIGURATION_RELEASE Release) + set(CONFIGURATION_DEBUG Debug) + endif() + + if(VCPKG_TARGET_IS_UWP) + string(APPEND CONFIGURATION_RELEASE WinRT) + string(APPEND CONFIGURATION_DEBUG WinRT) + endif() + + #Setup YASM integration + set(_file "${SOURCE_PATH}/SMP/libgmp.vcxproj") + file(READ "${_file}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already replaced by another triplet + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + STRING(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" _contents "${_contents}") + STRING(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" _contents "${_contents}") + else() + STRING(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" _contents "${_contents}") + STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + + vcpkg_install_msbuild( + USE_VCPKG_INTEGRATION + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH SMP/libgmp.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} + LICENSE_SUBPATH COPYING.LESSERv3 + TARGET Rebuild + RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG} + SKIP_CLEAN + ) + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include") + set(PACKAGE_VERSION 6.2.0) + set(PACKAGE_NAME gmp) + set(prefix "${CURRENT_INSTALLED_DIR}") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/include") + set(LIBS -lgmp) + configure_file("${SOURCE_PATH}/gmp.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gmp.pc" @ONLY) + configure_file("${SOURCE_PATH}/gmpxx.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gmpxx.pc" @ONLY) + set(prefix "${CURRENT_INSTALLED_DIR}/debug") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/../include") + set(LIBS -lgmpd) + configure_file("${SOURCE_PATH}/gmp.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmp.pc" @ONLY) + configure_file("${SOURCE_PATH}/gmpxx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmpxx.pc" @ONLY) + vcpkg_fixup_pkgconfig() +else() + vcpkg_download_distfile( + ARCHIVE + URLS https://gmplib.org/download/gmp/gmp-6.2.0.tar.xz + FILENAME gmp-6.2.0.tar.xz + SHA512 a066f0456f0314a1359f553c49fc2587e484ff8ac390ff88537266a146ea373f97a1c0ba24608bf6756f4eab11c9056f103c8deb99e5b57741b4f7f0ec44b90c) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF gmp-6.2.0 + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS ${OPTIONS} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + # # Handle copyright + file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() + + diff --git a/ports/gmp/prefix.patch b/ports/gmp/prefix.patch new file mode 100644 index 0000000000..611c73763f --- /dev/null +++ b/ports/gmp/prefix.patch @@ -0,0 +1,38 @@ +diff --git a/SMP/libgmp.vcxproj b/SMP/libgmp.vcxproj +index 2c5b8cdc6..157215394 100644 +--- a/SMP/libgmp.vcxproj ++++ b/SMP/libgmp.vcxproj +@@ -1574,14 +1574,14 @@ + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd ++ gmpd + $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd ++ gmpd + $(ProjectDir)..\msvc\ + Clean + MSB8012 +@@ -1630,14 +1630,14 @@ + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp ++ gmp + $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp ++ gmp + $(ProjectDir)..\msvc\ + Clean + MSB8012 diff --git a/ports/gmp/runtime.patch b/ports/gmp/runtime.patch new file mode 100644 index 0000000000..b2f15d2605 --- /dev/null +++ b/ports/gmp/runtime.patch @@ -0,0 +1,68 @@ +diff --git a/SMP/libgmp.vcxproj b/SMP/libgmp.vcxproj +index 3c774be11..e8919240b 100644 +--- a/SMP/libgmp.vcxproj ++++ b/SMP/libgmp.vcxproj +@@ -1846,6 +1846,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1929,6 +1930,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2190,6 +2192,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2278,6 +2281,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2549,6 +2553,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2638,6 +2643,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2916,6 +2922,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3011,6 +3018,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreadedDLL + + + true diff --git a/ports/gmp/vs.build.patch b/ports/gmp/vs.build.patch new file mode 100644 index 0000000000..69aba99398 --- /dev/null +++ b/ports/gmp/vs.build.patch @@ -0,0 +1,165 @@ +diff --git a/SMP/libgmp.vcxproj b/SMP/libgmp.vcxproj +index b4e06ae42..442d82c51 100644 +--- a/SMP/libgmp.vcxproj ++++ b/SMP/libgmp.vcxproj +@@ -1559,114 +1559,114 @@ + + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd ++ gmpd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd_winrt ++ gmpd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + libgmpd +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ libgmpd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmpd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmpd_winrt ++ gmpd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmpd +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmpd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ gmpd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp ++ gmp + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp_winrt ++ gmp + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + libgmp +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp_winrt +- $(ProjectDir)..\..\..\msvc\ ++ libgmp ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmp + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmp_winrt ++ gmp + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmp +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmp_winrt +- $(ProjectDir)..\..\..\msvc\ ++ gmp ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + +diff --git a/gmp.pc.in b/gmp.pc.in +index bf1c799ad..d0c81be91 100644 +--- a/gmp.pc.in ++++ b/gmp.pc.in +@@ -8,4 +8,4 @@ Description: GNU Multiple Precision Arithmetic Library + URL: https://gmplib.org + Version: @PACKAGE_VERSION@ + Cflags: -I${includedir} +-Libs: -L${libdir} -lgmp ++Libs: -L${libdir} @LIBS@ +diff --git a/gmpxx.pc.in b/gmpxx.pc.in +index 181cc70c6..2b697ceab 100644 +--- a/gmpxx.pc.in ++++ b/gmpxx.pc.in +@@ -9,4 +9,4 @@ URL: https://gmplib.org + Version: @PACKAGE_VERSION@ + Requires: gmp + Cflags: -I${includedir} +-Libs: -L${libdir} -lgmpxx ++Libs: -L${libdir} @LIBS@ diff --git a/ports/nettle/CONTROL b/ports/nettle/CONTROL new file mode 100644 index 0000000000..8cbe448678 --- /dev/null +++ b/ports/nettle/CONTROL @@ -0,0 +1,5 @@ +Source: nettle +Version: 3.5.1 +Homepage: https://git.lysator.liu.se/nettle/nettle +Description: Nettle is a low-level cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space. +Build-Depends: gmp, vs-yasm (windows) \ No newline at end of file diff --git a/ports/nettle/gmp.patch b/ports/nettle/gmp.patch new file mode 100644 index 0000000000..b732e0360d --- /dev/null +++ b/ports/nettle/gmp.patch @@ -0,0 +1,273 @@ +diff --git a/SMP/config.h b/SMP/config.h +index 5e59a1daa..c5a658954 100644 +--- a/SMP/config.h ++++ b/SMP/config.h +@@ -101,7 +101,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++//#define HAVE_UNISTD_H 1 + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_VALGRIND_MEMCHECK_H */ +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index cdf309639..9d37146a4 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -1325,7 +1325,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1457,7 +1457,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -1585,7 +1585,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1715,7 +1715,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2368,7 +2368,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2641,7 +2641,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle_winrt.lib;gmp_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2915,7 +2915,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -3186,7 +3186,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle_winrt.lib;gmp_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 9ea0d8ea7..56583e10f 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -968,7 +968,7 @@ + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmpd.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1091,7 +1091,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmpd_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1212,7 +1212,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmpd.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1335,7 +1335,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmpd_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1463,7 +1463,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 5.1 + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmpd.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1595,7 +1595,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x86\$(RootNamespace).winmd + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmpd_winrt.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1721,7 +1721,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 6.1 + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmpd.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1851,7 +1851,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x64\$(RootNamespace).winmd + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmpd_winrt.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1979,7 +1979,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2108,7 +2108,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2235,7 +2235,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2364,7 +2364,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2498,7 +2498,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 5.1 + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmp.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2632,7 +2632,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 5.1 + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2770,7 +2770,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x86\$(RootNamespace).winmd + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2908,7 +2908,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x86\$(RootNamespace).winmd + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3041,7 +3041,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 6.1 + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmp.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3174,7 +3174,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 6.1 + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3311,7 +3311,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x64\$(RootNamespace).winmd + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3448,7 +3448,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x64\$(RootNamespace).winmd + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include diff --git a/ports/nettle/name.dir.patch b/ports/nettle/name.dir.patch new file mode 100644 index 0000000000..753aaff5af --- /dev/null +++ b/ports/nettle/name.dir.patch @@ -0,0 +1,567 @@ +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index 9f741e240..5bb05b359 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -670,142 +670,142 @@ + + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd ++ hogweedd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd_winrt ++ hogweedd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd +- $(ProjectDir)..\..\..\msvc\ ++ hogweedd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweedd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweedd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweedd_winrt ++ hogweedd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweedd +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweedd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweedd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed ++ hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed_winrt ++ hogweed + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt ++ hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt ++ hogweed + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + +@@ -826,7 +826,7 @@ + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettled.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -950,7 +950,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettled_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1072,7 +1072,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettled.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1196,7 +1196,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettled_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1325,7 +1325,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1457,7 +1457,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -1585,7 +1585,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1715,7 +1715,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -1845,7 +1845,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1975,7 +1975,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2103,7 +2103,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2233,7 +2233,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2368,7 +2368,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2503,7 +2503,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2641,7 +2641,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2780,7 +2780,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2915,7 +2915,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -3049,7 +3049,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -3186,7 +3186,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -3324,7 +3324,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 56583e10f..665e8ef4e 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -812,142 +812,142 @@ + + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled ++ nettled + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled_winrt ++ nettled + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled +- $(ProjectDir)..\..\..\msvc\ ++ nettled ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettled ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettled + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettled_winrt ++ nettled + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettled +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettled_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettled ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle ++ nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle_winrt ++ nettle + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt ++ nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt ++ nettle + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + +diff --git a/hogweed.pc.in b/hogweed.pc.in +index 97fb9d46a..ce977c02e 100644 +--- a/hogweed.pc.in ++++ b/hogweed.pc.in +@@ -13,7 +13,7 @@ URL: http://www.lysator.liu.se/~nisse/nettle + Version: @PACKAGE_VERSION@ + Requires: @IF_NOT_SHARED@ nettle + Requires.private: @IF_SHARED@ nettle +-Libs: -L${libdir} -lhogweed @IF_NOT_SHARED@ @LIBS@ ++Libs: -L${libdir} @HOGWEED@ @IF_NOT_SHARED@ @LIBS@ + Libs.private: @IF_SHARED@ @LIBS@ + Cflags: -I${includedir} + +diff --git a/nettle.pc.in b/nettle.pc.in +index eb0020caa..6e3ed1e4f 100644 +--- a/nettle.pc.in ++++ b/nettle.pc.in +@@ -7,5 +7,6 @@ Name: Nettle + Description: Nettle low-level cryptographic library (symmetric algorithms) + URL: http://www.lysator.liu.se/~nisse/nettle + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lnettle ++Requires.private: gmp ++Libs: -L${libdir} @LIBS@ + Cflags: -I${includedir} diff --git a/ports/nettle/portfile.cmake b/ports/nettle/portfile.cmake new file mode 100644 index 0000000000..c599f2d7c4 --- /dev/null +++ b/ports/nettle/portfile.cmake @@ -0,0 +1,133 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/nettle + REF 1d0a6e64e01458fdf37eaf5d90975deb52c3da41 #v3.5.1 + SHA512 6124fbd223e6519d88290c3f4e3b8cc399e038c9c77cfec38e6ab17b075846e662fd0360d62c132c882536489c8a865795f64059e2d2b21467f65d90320e5c39 + HEAD_REF master + PATCHES gmp.patch + name.dir.patch + runtime.nettle.patch + runtime.hogweed.patch + ) + vcpkg_find_acquire_program(YASM) + get_filename_component(YASM_DIR "${YASM}" DIRECTORY) + vcpkg_add_to_path(${YASM_DIR}) + set(ENV{YASMPATH} ${YASM_DIR}/) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURATION_RELEASE ReleaseDLL) + set(CONFIGURATION_DEBUG DebugDLL) + else() + set(CONFIGURATION_RELEASE Release) + set(CONFIGURATION_DEBUG Debug) + endif() + + if(VCPKG_TARGET_IS_UWP) + string(APPEND CONFIGURATION_RELEASE WinRT) + string(APPEND CONFIGURATION_DEBUG WinRT) + endif() + + #Setup YASM integration + set(_file "${SOURCE_PATH}/SMP/libnettle.vcxproj") + file(READ "${_file}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already replaced by another triplet + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + STRING(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" _contents "${_contents}") + STRING(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" _contents "${_contents}") + else() + STRING(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" _contents "${_contents}") + STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + set(_file "${SOURCE_PATH}/SMP/libhogweed.vcxproj") + file(READ "${_file}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already replaced by another triplet + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + STRING(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" _contents "${_contents}") + STRING(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" _contents "${_contents}") + else() + STRING(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" _contents "${_contents}") + STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + + vcpkg_install_msbuild( + USE_VCPKG_INTEGRATION + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH SMP/libnettle.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} + LICENSE_SUBPATH COPYING.LESSERv3 + TARGET Rebuild + RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG} + SKIP_CLEAN + ) + + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include") + set(PACKAGE_VERSION 3.5.1) + set(prefix "${CURRENT_INSTALLED_DIR}") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/include") + set(LIBS -lnettle -lgmp) + configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/nettle.pc" @ONLY) + set(HOGWEED -lhogweed) + set(LIBS -lnettle) + configure_file("${SOURCE_PATH}/hogweed.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libhogweed.pc" @ONLY) + set(prefix "${CURRENT_INSTALLED_DIR}/debug") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/../include") + set(LIBS -lnettled -lgmpd) + configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/nettle.pc" @ONLY) + set(LIBS -lnettled) + set(HOGWEED -lhogweedd) + configure_file("${SOURCE_PATH}/hogweed.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libhogweed.pc" @ONLY) + vcpkg_fixup_pkgconfig() +else() + vcpkg_from_gitlab( + GITLAB_URL https://git.lysator.liu.se/ + OUT_SOURCE_PATH SOURCE_PATH + REPO nettle/nettle + REF ee5d62898cf070f08beedc410a8d7c418588bd95 #v3.5.1 + SHA512 881912548f4abb21460f44334de11439749c8a055830849a8beb4332071d11d9196d9eecaeba5bf822819d242356083fba91eb8719a64f90e41766826e6d75e1 + HEAD_REF master # branch name + #PATCHES example.patch #patch name + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --disable-documentation + ${OPTIONS} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + # # Handle copyright + file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() +endif() + + diff --git a/ports/nettle/runtime.hogweed.patch b/ports/nettle/runtime.hogweed.patch new file mode 100644 index 0000000000..a096b77b7b --- /dev/null +++ b/ports/nettle/runtime.hogweed.patch @@ -0,0 +1,84 @@ +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index 3f400af81..e5758ea27 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -1066,6 +1066,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1190,6 +1191,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1574,6 +1576,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -1703,6 +1706,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2097,6 +2101,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2227,6 +2232,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2902,6 +2908,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3036,6 +3043,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3172,6 +3180,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3310,6 +3319,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true diff --git a/ports/nettle/runtime.nettle.patch b/ports/nettle/runtime.nettle.patch new file mode 100644 index 0000000000..33d147eded --- /dev/null +++ b/ports/nettle/runtime.nettle.patch @@ -0,0 +1,84 @@ +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 54f686af6..05b903ab9 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -1206,6 +1206,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1329,6 +1330,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1710,6 +1712,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -1838,6 +1841,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2229,6 +2233,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2358,6 +2363,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -3028,6 +3034,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3161,6 +3168,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + true +@@ -3296,6 +3304,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3433,6 +3442,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + true diff --git a/ports/vs-yasm/CONTROL b/ports/vs-yasm/CONTROL new file mode 100644 index 0000000000..68f7328a9c --- /dev/null +++ b/ports/vs-yasm/CONTROL @@ -0,0 +1,5 @@ +Source: vs-yasm +Version: 0.5.0 +Homepage: https://github.com/ShiftMediaProject/VSYASM +Description: Provides Visual Studio integration for the YASM assembler. +Supports: windows & !arm \ No newline at end of file diff --git a/ports/vs-yasm/portfile.cmake b/ports/vs-yasm/portfile.cmake new file mode 100644 index 0000000000..341f66ca51 --- /dev/null +++ b/ports/vs-yasm/portfile.cmake @@ -0,0 +1,19 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/VSYASM + REF deb50d9f18e8461538468339d508cdf240e64897 #v0.5 + SHA512 04627546020d33e5ea91f74b09c5ce3b817dce5f6ae4548c3b4148daa82fbd837c81675ac8730d3ca1cdf91fefa8bb23eec76d1bcd02c03dda1203d0c261178d + HEAD_REF master +) + +set(_files yasm.props yasm.targets yasm.xml) +foreach(_file ${_files}) + file(INSTALL "${SOURCE_PATH}/${_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/") +endforeach() +set(_file "${CURRENT_PACKAGES_DIR}/share/${PORT}/yasm.props") +file(READ "${_file}" _contents) +string(REPLACE "$(VCInstallDir)" "" _contents "${_contents}") +file(WRITE "${_file}" "${_contents}") + +configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_install_msbuild.cmake b/scripts/cmake/vcpkg_install_msbuild.cmake index db2874a9ff..01bf49f029 100644 --- a/scripts/cmake/vcpkg_install_msbuild.cmake +++ b/scripts/cmake/vcpkg_install_msbuild.cmake @@ -136,6 +136,7 @@ function(vcpkg_install_msbuild) /p:VCPkgLocalAppDataDisabled=true /p:UseIntelMKL=No /p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION} + /p:VcpkgTriplet=${TARGET_TRIPLET} /m )