diff --git a/ports/gmp/adddef.patch b/ports/gmp/adddef.patch deleted file mode 100644 index c2276ffc10b2d6..00000000000000 --- a/ports/gmp/adddef.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/SMP/libgmp.def b/SMP/libgmp.def -index 289f0e2d1..632274ab2 100644 ---- a/SMP/libgmp.def -+++ b/SMP/libgmp.def -@@ -16,6 +16,7 @@ __gmp_randclear - __gmp_urandomb_ui - __gmp_urandomm_ui - __gmp_asprintf -+__gmp_vasprintf - __gmp_fprintf - __gmp_printf - __gmp_snprintf diff --git a/ports/gmp/msvc_symbol.patch b/ports/gmp/msvc_symbol.patch new file mode 100644 index 00000000000000..c416595b30e655 --- /dev/null +++ b/ports/gmp/msvc_symbol.patch @@ -0,0 +1,28 @@ +diff --git a/configure.ac b/configure.ac +index cafdb3c71..bd92bc4bb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2703,8 +2703,8 @@ Use "--disable-static --enable-shared" to build just a DLL.]) + # + if test "$enable_shared" = yes; then + GMP_LDFLAGS="$GMP_LDFLAGS -no-undefined -Wl,--export-all-symbols" +- LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmp-3.dll.def" +- LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmpxx-3.dll.def" ++ #LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmp-3.dll.def" ++ #LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmpxx-3.dll.def" + LIBGMP_DLL=1 + fi + ;; +diff --git a/gmp-h.in b/gmp-h.in +index 3d449d427..18a03b753 100644 +--- a/gmp-h.in ++++ b/gmp-h.in +@@ -398,7 +398,7 @@ typedef __mpq_struct *mpq_ptr; + + /* Microsoft's C compiler accepts __inline */ + #ifdef _MSC_VER +-#define __GMP_EXTERN_INLINE __inline ++#define __GMP_EXTERN_INLINE static __inline + #endif + + /* Recent enough Sun C compilers want "inline" */ diff --git a/ports/gmp/portfile.cmake b/ports/gmp/portfile.cmake index 6007ad9c60dd3b..b4acb3047bfb94 100644 --- a/ports/gmp/portfile.cmake +++ b/ports/gmp/portfile.cmake @@ -2,116 +2,78 @@ if(EXISTS "${CURRENT_INSTALLED_DIR}/include/gmp.h" OR "${CURRENT_INSTALLED_DIR}/ message(FATAL_ERROR "Can't build ${PORT} if mpir is installed. Please remove mpir, and try install ${PORT} again if you need it.") endif() -if(VCPKG_TARGET_IS_WINDOWS) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO ShiftMediaProject/gmp - REF 0018c44e8dfcc3b64b43e0aea4b3f419f0b65fd0 #v6.2.1-2 - SHA512 2405e2536ca9fe0b890f44f54c936ac0e4b5a9ebe6a19e1c48a9c21b7211d2a1b45865852e3c65a98a6735216a4e27bea75c0fd6e52efeed4baecd95da9895a5 - HEAD_REF master - PATCHES - vs.build.patch - runtime.patch - adddef.patch - ) +vcpkg_download_distfile( + ARCHIVE + URLS https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz + FILENAME gmp-6.2.1.tar.xz + SHA512 c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84 +) - yasm_tool_helper(OUT_VAR YASM) - file(TO_NATIVE_PATH "${YASM}" YASM) +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(PATCHES yasm.patch + msvc_symbol.patch) +endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(CONFIGURATION_RELEASE ReleaseDLL) - set(CONFIGURATION_DEBUG DebugDLL) - else() - set(CONFIGURATION_RELEASE Release) - set(CONFIGURATION_DEBUG Debug) - endif() +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF gmp-6.2.1 + PATCHES + ${PATCHES} + tools.patch +) - if(VCPKG_TARGET_IS_UWP) - string(APPEND CONFIGURATION_RELEASE WinRT) - string(APPEND CONFIGURATION_DEBUG WinRT) +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(ENV{CCAS} "${CURRENT_HOST_INSTALLED_DIR}/tools/yasm/yasm${VCPKG_HOST_EXECUTABLE_SUFFIX}") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(asmflag win64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(asmflag win32) endif() + set(ENV{ASMFLAGS} "-Xvc -f ${asmflag} -pgas -rraw") + set(OPTIONS ac_cv_func_memset=yes + "gmp_cv_asm_w32=.word" + ) + +endif() - #Setup YASM integration - set(_porjectfile) - if(VCPKG_TARGET_IS_UWP) - set(_porjectfile "${SOURCE_PATH}/SMP/libgmp_winrt.vcxproj") - else() - set(_porjectfile "${SOURCE_PATH}/SMP/libgmp.vcxproj") - endif() - set(_file "${_porjectfile}") - file(READ "${_file}" _contents) - string(REPLACE [[]] - "" - _contents "${_contents}") - string(REPLACE [[]] - "" - _contents "${_contents}") - file(WRITE "${_file}" "${_contents}") +if(VCPKG_CROSSCOMPILING) + # Silly trick to make configure accept CC_FOR_BUILD but in reallity CC_FOR_BUILD is deactivated. + set(ENV{CC_FOR_BUILD} "touch a.out | touch conftest${VCPKG_HOST_EXECUTABLE_SUFFIX} | true") + set(ENV{CPP_FOR_BUILD} "touch a.out | touch conftest${VCPKG_HOST_EXECUTABLE_SUFFIX} | true") +endif() - 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 - OPTIONS "/p:YasmPath=${YASM}" - ) - 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.1) - 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() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gmp.h" - "#if defined(DLL_EXPORT) && defined(NO_ASM)" - "#if 1") - endif() -else() - vcpkg_download_distfile( - ARCHIVE - URLS https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz - FILENAME gmp-6.2.1.tar.xz - SHA512 c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84 - ) +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + OPTIONS + ${OPTIONS} + --enable-cxx +) - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF gmp-6.2.1 - PATCHES - tools.patch - ) +set(tool_names bases fac fib jacobitab psqr trialdivtab) +list(TRANSFORM tool_names PREPEND "gen-") +list(TRANSFORM tool_names APPEND "${VCPKG_HOST_EXECUTABLE_SUFFIX}") - vcpkg_configure_make( - SOURCE_PATH ${SOURCE_PATH} - AUTOCONFIG - OPTIONS - --enable-cxx - ) +if(VCPKG_CROSSCOMPILING) + list(TRANSFORM tool_names PREPEND "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}/") + file(COPY ${tool_names} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/" ) + if(NOT VCPKG_BUILD_TYPE) + file(COPY ${tool_names} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/" ) + endif() +endif() - vcpkg_install_make() - vcpkg_fixup_pkgconfig() - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_install_make() - # # Handle copyright - file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +if(NOT VCPKG_CROSSCOMPILING) + list(TRANSFORM tool_names PREPEND "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/") + file(COPY ${tool_names} DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}" ) endif() + +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) + diff --git a/ports/gmp/runtime.patch b/ports/gmp/runtime.patch deleted file mode 100644 index f219e3dc740043..00000000000000 --- a/ports/gmp/runtime.patch +++ /dev/null @@ -1,180 +0,0 @@ -diff --git a/SMP/smp.props b/SMP/smp.props -index fc70bd8..d515523 100644 ---- a/SMP/smp.props -+++ b/SMP/smp.props -@@ -86,7 +86,7 @@ - - - -- lib$(RootNamespace)d -+ $(RootNamespace)d - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -94,7 +94,7 @@ - MSB8012 - - -- lib$(RootNamespace)d -+ $(RootNamespace)d - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -118,7 +118,7 @@ - MSB8012 - - -- lib$(RootNamespace) -+ $(RootNamespace) - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -126,7 +126,7 @@ - MSB8012 - - -- lib$(RootNamespace) -+ $(RootNamespace) - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -159,6 +159,7 @@ - $(OutDir)\lib\x86\$(TargetName).pdb - false - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreadedDebug - - - $(OutDir)\lib\x86\$(TargetName)$(TargetExt) -@@ -177,6 +178,7 @@ - $(OutDir)\lib\x64\$(TargetName).pdb - false - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreadedDebug - - - $(OutDir)\lib\x64\$(TargetName)$(TargetExt) -@@ -196,6 +198,7 @@ - $(IntDir)$(TargetName).pdb - false - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreadedDebugDLL - - - $(OutDir)\bin\x86\$(TargetName)$(TargetExt) -@@ -219,6 +222,7 @@ - $(IntDir)$(TargetName).pdb - false - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreadedDebugDLL - - - $(OutDir)\bin\x64\$(TargetName)$(TargetExt) -@@ -248,6 +252,7 @@ - SingleFile - $(OutDir)\lib\x86\$(TargetName).pdb - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreaded - - - $(OutDir)\lib\x86\$(TargetName)$(TargetExt) -@@ -273,6 +278,7 @@ - SingleFile - $(OutDir)\lib\x64\$(TargetName).pdb - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreaded - - - $(OutDir)\lib\x64\$(TargetName)$(TargetExt) -@@ -297,6 +303,7 @@ - $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) - $(IntDir)$(TargetName).pdb - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreadedDLL - - - true -@@ -328,6 +335,7 @@ - $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) - $(IntDir)$(TargetName).pdb - 4113;%(TreatSpecificWarningsAsErrors) -+ MultiThreadedDLL - - - true -diff --git a/SMP/smp_winrt.props b/SMP/smp_winrt.props -index cb5f090..19b2b8d 100644 ---- a/SMP/smp_winrt.props -+++ b/SMP/smp_winrt.props -@@ -97,7 +97,7 @@ - - - -- lib$(RootNamespace)d_winrt -+ l$(RootNamespace)d - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -105,7 +105,7 @@ - MSB8012 - - -- lib$(RootNamespace)d_winrt -+ $(RootNamespace)d - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -113,7 +113,7 @@ - MSB8012 - - -- $(RootNamespace)d_winrt -+ $(RootNamespace)d - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -121,7 +121,7 @@ - MSB8012 - - -- $(RootNamespace)d_winrt -+ $(RootNamespace)d - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -129,7 +129,7 @@ - MSB8012 - - -- lib$(RootNamespace)_winrt -+ $(RootNamespace) - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -137,7 +137,7 @@ - MSB8012 - - -- lib$(RootNamespace)_winrt -+ $(RootNamespace) - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -145,7 +145,7 @@ - MSB8012 - - -- $(RootNamespace)_winrt -+ $(RootNamespace) - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated -@@ -153,7 +153,7 @@ - MSB8012 - - -- $(RootNamespace)_winrt -+ $(RootNamespace) - $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated diff --git a/ports/gmp/vcpkg.json b/ports/gmp/vcpkg.json index 972a4d67f6f998..8393feed120dcb 100644 --- a/ports/gmp/vcpkg.json +++ b/ports/gmp/vcpkg.json @@ -1,15 +1,14 @@ { "name": "gmp", - "version-string": "6.2.1", - "port-version": 8, + "version": "6.2.1", + "port-version": 9, "description": "The GNU Multiple Precision Arithmetic Library", "homepage": "https://gmplib.org", "supports": "!(windows & (arm | arm64))", "dependencies": [ { - "name": "vs-yasm", - "host": true, - "platform": "windows" + "name": "gmp", + "host": true }, { "name": "yasm", diff --git a/ports/gmp/vs.build.patch b/ports/gmp/vs.build.patch deleted file mode 100644 index 4c04d0c1659645..00000000000000 --- a/ports/gmp/vs.build.patch +++ /dev/null @@ -1,172 +0,0 @@ -diff --git a/SMP/smp.props b/SMP/smp.props -index e2ed214..fc70bd8 100644 ---- a/SMP/smp.props -+++ b/SMP/smp.props -@@ -87,7 +87,7 @@ - - - lib$(RootNamespace)d -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -95,7 +95,7 @@ - - - lib$(RootNamespace)d -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -103,7 +103,7 @@ - - - $(RootNamespace)d -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -111,7 +111,7 @@ - - - $(RootNamespace)d -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -119,7 +119,7 @@ - - - lib$(RootNamespace) -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -127,7 +127,7 @@ - - - lib$(RootNamespace) -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -135,7 +135,7 @@ - - - $(RootNamespace) -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -143,7 +143,7 @@ - - - $(RootNamespace) -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -diff --git a/SMP/smp_winrt.props b/SMP/smp_winrt.props -index 9b453a5..cb5f090 100644 ---- a/SMP/smp_winrt.props -+++ b/SMP/smp_winrt.props -@@ -98,7 +98,7 @@ - - - lib$(RootNamespace)d_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -106,7 +106,7 @@ - - - lib$(RootNamespace)d_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -114,7 +114,7 @@ - - - $(RootNamespace)d_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -122,7 +122,7 @@ - - - $(RootNamespace)d_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -130,7 +130,7 @@ - - - lib$(RootNamespace)_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -138,7 +138,7 @@ - - - lib$(RootNamespace)_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -146,7 +146,7 @@ - - - $(RootNamespace)_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -@@ -154,7 +154,7 @@ - - - $(RootNamespace)_winrt -- $(ProjectDir)..\..\..\msvc\ -+ $(ProjectDir)..\msvc\ - $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ - $(ProjectDir)obj\Generated - Clean -diff --git a/gmp.pc.in b/gmp.pc.in -index bf1c799..d0c81be 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 181cc70..2b697ce 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/gmp/yasm.patch b/ports/gmp/yasm.patch new file mode 100644 index 00000000000000..8ea6ac35659291 --- /dev/null +++ b/ports/gmp/yasm.patch @@ -0,0 +1,83 @@ +diff --git a/acinclude.m4 b/acinclude.m4 +index 86175ce42..8228d20dc 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -1649,7 +1649,7 @@ AC_DEFUN([GMP_TRY_ASSEMBLE], + [cat >conftest.s <&AC_FD_CC + ifelse([$2],,:,[$2]) +@@ -2382,7 +2382,7 @@ for tmp_underscore in "" "_"; do + ${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix + addl $ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx + EOF +- gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&AC_FD_CC && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&AC_FD_CC" ++ gmp_compile="$CCAS $CPPFLAGS $ASMFLAGS $lt_prog_compiler_pic conftest.s >&AC_FD_CC && $CC $CPPFLAGS $ASMFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&AC_FD_CC" + if AC_TRY_EVAL(gmp_compile); then + if test "$tmp_underscore" = "_"; then + gmp_cv_asm_x86_got_underscore=yes +@@ -2556,7 +2556,7 @@ movq-bug) + AC_MSG_WARN([+----------------------------------------------------------]) + AC_MSG_WARN([| WARNING WARNING WARNING]) + AC_MSG_WARN([| Host CPU has MMX code, but the assembler]) +- AC_MSG_WARN([| $CCAS $CFLAGS $CPPFLAGS]) ++ AC_MSG_WARN([| $CCAS $CPPFLAGS $ASMFLAGS]) + AC_MSG_WARN([| has the Solaris 2.6 and 2.7 bug where register to register]) + AC_MSG_WARN([| movq operands are reversed.]) + AC_MSG_WARN([| Non-MMX replacements will be used.]) +diff --git a/mpn/Makeasm.am b/mpn/Makeasm.am +index 5d7306c22..75692128d 100644 +--- a/mpn/Makeasm.am ++++ b/mpn/Makeasm.am +@@ -32,7 +32,7 @@ + # COMPILE minus CC. + # + COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ASMFLAGS) ++ $(CPPFLAGS) $(ASMFLAGS) + + # Flags used for preprocessing (in ansi2knr rules). + # +diff --git a/mpn/Makefile.in b/mpn/Makefile.in +index 2bc061012..59c805976 100644 +--- a/mpn/Makefile.in ++++ b/mpn/Makefile.in +@@ -403,7 +403,7 @@ EXTRA_DIST = asm-defs.m4 cpp-ccas m4-ccas $(TARG_DIST) + # COMPILE minus CC. + # + COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ASMFLAGS) ++ $(CPPFLAGS) $(ASMFLAGS) + + + # Flags used for preprocessing (in ansi2knr rules). +diff --git a/tests/Makefile.in b/tests/Makefile.in +index 9742a4016..430603cef 100644 +--- a/tests/Makefile.in ++++ b/tests/Makefile.in +@@ -666,7 +666,7 @@ SUBDIRS = . devel mpn mpz mpq mpf rand misc cxx + # COMPILE minus CC. + # + COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ASMFLAGS) ++ $(CPPFLAGS) $(ASMFLAGS) + + + # Flags used for preprocessing (in ansi2knr rules). +diff --git a/tune/Makefile.in b/tune/Makefile.in +index f82cd13e2..351bcd9b1 100644 +--- a/tune/Makefile.in ++++ b/tune/Makefile.in +@@ -549,7 +549,7 @@ TUNE_MPN_SRCS_BASIC = div_qr_2.c bdiv_q.c bdiv_qr.c \ + # COMPILE minus CC. + # + COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ASMFLAGS) ++ $(CPPFLAGS) $(ASMFLAGS) + + + # Flags used for preprocessing (in ansi2knr rules). diff --git a/ports/mpc/gmpd.patch b/ports/mpc/gmpd.patch deleted file mode 100644 index b08625777c365f..00000000000000 --- a/ports/mpc/gmpd.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index ab3da6092..2533df1d8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -151,7 +151,9 @@ AC_CHECK_FUNCS([dup dup2],, - - AC_CHECK_LIB([gmp], [__gmpz_init], - [LIBS="-lgmp $LIBS"], -- [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared).])]) -+ [AC_CHECK_LIB([gmpd], [__gmpz_init], -+ [LIBS="-lgmpd $LIBS"], -+ [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared).])])]) - - AC_MSG_CHECKING(for MPFR) - LIBS="-lmpfr $LIBS" diff --git a/ports/mpc/portfile.cmake b/ports/mpc/portfile.cmake index 66aeb9f18fd987..7ecd9b325bca0d 100644 --- a/ports/mpc/portfile.cmake +++ b/ports/mpc/portfile.cmake @@ -7,7 +7,6 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - PATCHES gmpd.patch ) vcpkg_configure_make( diff --git a/ports/mpc/vcpkg.json b/ports/mpc/vcpkg.json index 2c8e38d1da1f30..9f79c44a801646 100644 --- a/ports/mpc/vcpkg.json +++ b/ports/mpc/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mpc", - "version-string": "1.2.0", - "port-version": 1, + "version": "1.2.0", + "port-version": 2, "description": "GNU MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.", "homepage": "http://www.multiprecision.org/mpc/", "dependencies": [ diff --git a/ports/mpfr/gmpd.patch b/ports/mpfr/gmpd.patch deleted file mode 100644 index d34027d36496b1..00000000000000 --- a/ports/mpfr/gmpd.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index ea92c1f97..9621a70e5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -693,8 +693,9 @@ See 'config.log' for details (search for GMP_NUMB_BITS).])], - - dnl Check if we can link with GMP - AC_CHECK_LIB(gmp, __gmpz_init, [LIBS="-lgmp $LIBS"], -+ [AC_CHECK_LIB(gmpd, __gmpz_init, [LIBS="-lgmpd $LIBS"], - [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared). --Please read the INSTALL file -- see "In case of problem".])]) -+Please read the INSTALL file -- see "In case of problem".])])]) - - dnl Check for corresponding 'gmp.h' and libgmp - AC_MSG_CHECKING(if gmp.h version and libgmp version are the same) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index 59354a99e5b050..83354d7d93a4a1 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -13,7 +13,6 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE "${ARCHIVE}" PATCHES - gmpd.patch dll.patch src-only.patch ) @@ -27,10 +26,6 @@ vcpkg_configure_make( vcpkg_install_make() vcpkg_copy_pdbs() - -if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/mpfr.pc" AND VCPKG_TARGET_IS_WINDOWS) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/mpfr.pc" " -lgmp" " -lgmpd") -endif() vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/mpfr/vcpkg.json b/ports/mpfr/vcpkg.json index 2033a12bb1551d..195d7efbee3d6a 100644 --- a/ports/mpfr/vcpkg.json +++ b/ports/mpfr/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mpfr", - "version-string": "4.1.0", - "port-version": 3, + "version": "4.1.0", + "port-version": 4, "description": "The MPFR library is a C library for multiple-precision floating-point computations with correct rounding", "homepage": "https://www.mpfr.org", "license": "LGPL-3.0-or-later", diff --git a/ports/nettle/gmp.patch b/ports/nettle/gmp.patch index c54298a28c5288..b9eec5e1e64935 100644 --- a/ports/nettle/gmp.patch +++ b/ports/nettle/gmp.patch @@ -20,7 +20,7 @@ index 476f7a7..308bd0b 100644 libhogweed.def - nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) -+ nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled_winrt.lib;gmp.lib;%(AdditionalDependencies) /IGNORE:4006,4221,4078 %(AdditionalOptions) @@ -29,7 +29,7 @@ index 476f7a7..308bd0b 100644 libhogweed.def - nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) -+ nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled_winrt.lib;gmp.lib;%(AdditionalDependencies) /IGNORE:4006,4221,4078 %(AdditionalOptions) @@ -136,7 +136,7 @@ index cb650ab..188f67a 100644 libnettle.def - gmpd_winrt.lib;%(AdditionalDependencies) -+ gmpd.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) mkdir "$(OutDir)"\include @@ -145,7 +145,7 @@ index cb650ab..188f67a 100644 libnettle.def - gmpd_winrt.lib;%(AdditionalDependencies) -+ gmpd.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) mkdir "$(OutDir)"\include diff --git a/ports/nettle/name.dir.patch b/ports/nettle/name.dir.patch index 834a0440978740..ff1ce206afd115 100644 --- a/ports/nettle/name.dir.patch +++ b/ports/nettle/name.dir.patch @@ -82,8 +82,8 @@ index 308bd0b..a436c69 100644 libhogweed.def -- nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) -+ nettled.lib;gmpd.lib;%(AdditionalDependencies) +- nettled_winrt.lib;gmp.lib;%(AdditionalDependencies) ++ nettled.lib;gmp.lib;%(AdditionalDependencies) /IGNORE:4006,4221,4078 %(AdditionalOptions) @@ -91,8 +91,8 @@ index 308bd0b..a436c69 100644 libhogweed.def -- nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) -+ nettled.lib;gmpd.lib;%(AdditionalDependencies) +- nettled_winrt.lib;gmp.lib;%(AdditionalDependencies) ++ nettled.lib;gmp.lib;%(AdditionalDependencies) /IGNORE:4006,4221,4078 %(AdditionalOptions) diff --git a/ports/nettle/portfile.cmake b/ports/nettle/portfile.cmake index 731017de7be79d..5f0fba4f24163d 100644 --- a/ports/nettle/portfile.cmake +++ b/ports/nettle/portfile.cmake @@ -9,6 +9,7 @@ if(VCPKG_TARGET_IS_WINDOWS) gmp.patch name.dir.patch runtime.patch + remove_gmpd.patch ) include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake) @@ -88,7 +89,7 @@ if(VCPKG_TARGET_IS_WINDOWS) set(exec_prefix "\${prefix}") set(libdir "\${prefix}/lib") set(includedir "\${prefix}/../include") - set(LIBS "-lnettled -lgmpd") + set(LIBS "-lnettled -lgmp") configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/nettle.pc" @ONLY) set(LIBS -lnettled) set(HOGWEED -lhogweedd) diff --git a/ports/nettle/remove_gmpd.patch b/ports/nettle/remove_gmpd.patch new file mode 100644 index 00000000000000..a248d81e2422c1 --- /dev/null +++ b/ports/nettle/remove_gmpd.patch @@ -0,0 +1,44 @@ +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 51fa24113..5d418b53e 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -245,7 +245,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- gmpd.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -359,7 +359,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- gmpd.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index 8f2f433bc..dae3458d8 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -247,7 +247,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -362,7 +362,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + diff --git a/ports/nettle/vcpkg.json b/ports/nettle/vcpkg.json index 1a653be5ff7681..87833d1211cc79 100644 --- a/ports/nettle/vcpkg.json +++ b/ports/nettle/vcpkg.json @@ -1,7 +1,7 @@ { "name": "nettle", - "version-string": "3.6", - "port-version": 1, + "version": "3.6", + "port-version": 2, "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.", "homepage": "https://git.lysator.liu.se/nettle/nettle", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 03f7ab5515e427..c118670f5f1da7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2534,7 +2534,7 @@ }, "gmp": { "baseline": "6.2.1", - "port-version": 8 + "port-version": 9 }, "gmsh": { "baseline": "4.9.0", @@ -4570,11 +4570,11 @@ }, "mpc": { "baseline": "1.2.0", - "port-version": 1 + "port-version": 2 }, "mpfr": { "baseline": "4.1.0", - "port-version": 3 + "port-version": 4 }, "mpg123": { "baseline": "1.29.2", @@ -4758,7 +4758,7 @@ }, "nettle": { "baseline": "3.6", - "port-version": 1 + "port-version": 2 }, "networkdirect-sdk": { "baseline": "2.0.1", diff --git a/versions/g-/gmp.json b/versions/g-/gmp.json index 85c94f62f43b64..9505d80d19d521 100644 --- a/versions/g-/gmp.json +++ b/versions/g-/gmp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7b9a71843073bf4a86bb64ddf219c9900ebb3dbd", + "version": "6.2.1", + "port-version": 9 + }, { "git-tree": "8d09c9addf60d381cabe4c565cb59b27f5b2bdc7", "version-string": "6.2.1", diff --git a/versions/m-/mpc.json b/versions/m-/mpc.json index 209ac786cb76a8..da45380dc8aaac 100644 --- a/versions/m-/mpc.json +++ b/versions/m-/mpc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c38230459b115da37fe9fe0161c7462de85549d5", + "version": "1.2.0", + "port-version": 2 + }, { "git-tree": "8ef4f1423bd95ed6bbe514de46fc9f4c8884ae5e", "version-string": "1.2.0", diff --git a/versions/m-/mpfr.json b/versions/m-/mpfr.json index 65d2472d1ca639..e3316b5bb20f4f 100644 --- a/versions/m-/mpfr.json +++ b/versions/m-/mpfr.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "af50e086428e7b7b1e1e5969a296a770a32ff88d", + "version": "4.1.0", + "port-version": 4 + }, { "git-tree": "9f38beb4c3179d0b08008af901d05c2a70afaa1b", "version-string": "4.1.0", diff --git a/versions/n-/nettle.json b/versions/n-/nettle.json index 00096cd8d2ec10..07261c08a58e40 100644 --- a/versions/n-/nettle.json +++ b/versions/n-/nettle.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2d7735edc12e985fbe6bae0489a8c01ff18413cd", + "version": "3.6", + "port-version": 2 + }, { "git-tree": "87e3211d256198eb00d854b24b2043efb0fe892d", "version-string": "3.6",