From 33d7e9977f894a60aae3988cfdc65112bc472e1a Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 2 Mar 2023 21:02:04 +0100 Subject: [PATCH] [nettle] Cleanup, fix cross-builds (#29942) --- ports/nettle/ccas.patch | 40 +++++++++ ports/nettle/compile.patch | 4 +- ports/nettle/fix-InstallLibPath.patch | 36 -------- ports/nettle/fix-libdir.patch | 12 +++ ports/nettle/flags.patch | 13 --- ports/nettle/host-tools.patch | 115 ++++++++++++++++++++++++++ ports/nettle/portfile.cmake | 51 +++++------- ports/nettle/remove_gmpd.patch | 44 ---------- ports/nettle/vcpkg.json | 1 + ports/nettle/yasm.patch | 37 +-------- versions/baseline.json | 2 +- versions/n-/nettle.json | 5 ++ 12 files changed, 196 insertions(+), 164 deletions(-) create mode 100644 ports/nettle/ccas.patch delete mode 100644 ports/nettle/fix-InstallLibPath.patch create mode 100644 ports/nettle/fix-libdir.patch delete mode 100644 ports/nettle/flags.patch create mode 100644 ports/nettle/host-tools.patch delete mode 100644 ports/nettle/remove_gmpd.patch diff --git a/ports/nettle/ccas.patch b/ports/nettle/ccas.patch new file mode 100644 index 0000000000..087081a33b --- /dev/null +++ b/ports/nettle/ccas.patch @@ -0,0 +1,40 @@ +diff --git a/Makefile.in b/Makefile.in +index d00b565..c465d0b 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -294,7 +294,7 @@ libhogweed.a: $(hogweed_OBJS) + + %.$(OBJEXT): %.asm $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4 + $(M4) $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4 $< >$*.s +- $(COMPILE) -c $*.s ++ $(COMPILE_AS) -c $*.s + + %.$(OBJEXT): %.c + $(COMPILE) -c $< \ +diff --git a/config.make.in b/config.make.in +index f8e1f74..4668884 100644 +--- a/config.make.in ++++ b/config.make.in +@@ -73,6 +73,8 @@ TEST_SHLIB_DIR = ${abs_top_builddir}/.lib + # flags before CPPFLAGS and LDFLAGS. While EXTRA_CFLAGS are added at the end. + + COMPILE = $(CC) $(PRE_CPPFLAGS) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(DEP_FLAGS) ++CCAS = @CCAS@ ++COMPILE_AS = $(CCAS) $(PRE_CPPFLAGS) $(CPPFLAGS) $(DEFS) $(ASMFLAGS) $(DEP_FLAGS) + COMPILE_CXX = $(CXX) $(PRE_CPPFLAGS) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DEP_FLAGS) + LINK = $(CC) $(CFLAGS) $(PRE_LDFLAGS) $(LDFLAGS) + LINK_CXX = $(CXX) $(CXXFLAGS) $(PRE_LDFLAGS) $(LDFLAGS) +diff --git a/configure.ac b/configure.ac +index 1012718..8db139d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -118,6 +118,9 @@ LSH_RPATH_INIT([`echo $with_lib_path | sed 's/:/ /g'` \ + + # Checks for programs. + AC_PROG_CC ++# Copied from gmp ++test -n "$CCAS" || CCAS='$(CC)' ++AC_SUBST(CCAS) + + NETTLE_CHECK_IFUNC + diff --git a/ports/nettle/compile.patch b/ports/nettle/compile.patch index 2aa1891c81..9303c2a9d6 100644 --- a/ports/nettle/compile.patch +++ b/ports/nettle/compile.patch @@ -32,8 +32,8 @@ index b65ff4960..3887d0c8f 100644 # For building the various *data.c programs. -lm needed for shadata. %$(EXEEXT_FOR_BUILD): %.c -- $(CC_FOR_BUILD) $< $(CFLAGS) -lm -o $@ -+ $(CC_FOR_BUILD) $< $(CFLAGS) -o $@ +- $(CC_FOR_BUILD) $< -lm -o $@ ++ $(COMPILE) $(PRE_LDFLAGS) $(LDFLAGS) $(LIBS) $< -o $@ # Explicit dependency. eccdata$(EXEEXT_FOR_BUILD): mini-gmp.c mini-gmp.h diff --git a/ports/nettle/fix-InstallLibPath.patch b/ports/nettle/fix-InstallLibPath.patch deleted file mode 100644 index d42a280679..0000000000 --- a/ports/nettle/fix-InstallLibPath.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 90ea1ea..58cfe88 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -354,25 +354,25 @@ if test "x$ABI" != xstandard ; then - else - # The dash builtin pwd tries to be "helpful" and remember - # symlink names. Use -P option, and hope it's portable enough. -- test -d /usr/lib${ABI} \ -- && (cd /usr/lib${ABI} && pwd -P | grep >/dev/null "/lib${ABI}"'$') \ -- && libdir='${exec_prefix}/'"lib${ABI}" -+ test -d /usr/lib \ -+ && (cd /usr/lib && pwd -P | grep >/dev/null "/lib"'$') \ -+ && libdir='${exec_prefix}/'"lib" - fi - ;; - # On freebsd, it seems 32-bit libraries are in lib32, - # and 64-bit in lib. Don't know about "kfreebsd", does - # it follow the Linux fhs conventions? - *:freebsd*:32) -- libdir='${exec_prefix}/lib32' -+ libdir='${exec_prefix}/lib' - ;; - *:freebsd*:64) - libdir='${exec_prefix}/lib' - ;; - *:irix*:32) -- libdir='${exec_prefix}/lib32' -+ libdir='${exec_prefix}/lib' - ;; - *:irix*:64) -- libdir='${exec_prefix}/lib64' -+ libdir='${exec_prefix}/lib' - ;; - *) - AC_MSG_WARN([Don't know where to install $ABI-bit libraries on this system.]); dnl ' diff --git a/ports/nettle/fix-libdir.patch b/ports/nettle/fix-libdir.patch new file mode 100644 index 0000000000..e1edc66ff2 --- /dev/null +++ b/ports/nettle/fix-libdir.patch @@ -0,0 +1,12 @@ +diff --git a/configure.ac b/configure.ac +index f4d9e90..1012718 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -351,6 +351,7 @@ if test "x$ABI" != xstandard ; then + if test "$libdir" = '${exec_prefix}/lib' ; then + # Try setting a better default + case "$host_cpu:$host_os:$ABI" in ++ *) ;; # $libdir is okay for vcpkg + *:solaris*:32|*:sunos*:32) + libdir='${exec_prefix}/lib' + ;; diff --git a/ports/nettle/flags.patch b/ports/nettle/flags.patch deleted file mode 100644 index 990bd6d3e2..0000000000 --- a/ports/nettle/flags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile.in b/Makefile.in -index e5ccfc7..922aa0c 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -309,7 +309,7 @@ $(LIBHOGWEED_FORLINK): $(hogweed_OBJS) $(LIBNETTLE_FORLINK) - - # For building the various *data.c programs. -lm needed for shadata. - %$(EXEEXT_FOR_BUILD): %.c -- $(CC_FOR_BUILD) $< -lm -o $@ -+ $(CC_FOR_BUILD) $< $(CFLAGS) -lm -o $@ - - # Explicit dependency. - eccdata$(EXEEXT_FOR_BUILD): mini-gmp.c mini-gmp.h diff --git a/ports/nettle/host-tools.patch b/ports/nettle/host-tools.patch new file mode 100644 index 0000000000..4708357657 --- /dev/null +++ b/ports/nettle/host-tools.patch @@ -0,0 +1,115 @@ +diff --git a/Makefile.in b/Makefile.in +index 3a12fb4..d00b565 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,3 +1,6 @@ ++# Using native tools, either this build or from host triplet ++HOST_TOOLS_PREFIX ?= . ++ + # Nettle Makefile + + @SET_MAKE@ +@@ -335,11 +338,11 @@ des_headers = rotors.h keymap.h + # Generate DES headers. + $(des_headers): desdata.stamp + f="$(srcdir)/`basename $@`"; \ +- ./desdata$(EXEEXT_FOR_BUILD) $(@F) > $${f}T; \ ++ $(HOST_TOOLS_PREFIX)/desdata$(EXEEXT_FOR_BUILD) $(@F) > $${f}T; \ + test -s $${f}T && mv -f $${f}T $$f + +-desdata.stamp: desdata.c +- $(MAKE) desdata$(EXEEXT_FOR_BUILD) ++./desdata$(EXEEXT_FOR_BUILD): desdata.c ++desdata.stamp: $(HOST_TOOLS_PREFIX)/desdata$(EXEEXT_FOR_BUILD) + echo stamp > desdata.stamp + + des.$(OBJEXT): des.c des.h $(des_headers) +@@ -352,7 +355,7 @@ des.$(OBJEXT): des.c des.h $(des_headers) + # k = 11, c = 6, S = 192, T = 44 ( 33 A + 11 D) 9 KB + # k = 16, c = 6, S = 128, T = 48 ( 32 A + 16 D) 6 KB + ecc-secp192r1.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) secp192r1 8 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) secp192r1 8 6 $(NUMB_BITS) > $@T && mv $@T $@ + + # Some reasonable choices for 224: + # k = 16, c = 7, S = 256, T = 48 ( 32 A + 16 D) ~16 KB +@@ -360,7 +363,7 @@ ecc-secp192r1.h: eccdata.stamp + # k = 13, c = 6, S = 192, T = 52 ( 39 A + 13 D) ~12 KB + # k = 9, c = 5, S = 160, T = 54 ( 45 A + 9 D) ~10 KB + ecc-secp224r1.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) secp224r1 16 7 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) secp224r1 16 7 $(NUMB_BITS) > $@T && mv $@T $@ + + # Some reasonable choices for 256: + # k = 9, c = 6, S = 320, T = 54 ( 45 A + 9 D) 20 KB +@@ -368,7 +371,7 @@ ecc-secp224r1.h: eccdata.stamp + # k = 19, c = 7, S = 256, T = 57 ( 38 A + 19 D) 16 KB + # k = 15, c = 6, S = 192, T = 60 ( 45 A + 15 D) 12 KB + ecc-secp256r1.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) secp256r1 11 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) secp256r1 11 6 $(NUMB_BITS) > $@T && mv $@T $@ + + # Some reasonable choices for 384: + # k = 16, c = 6, S = 256, T = 80 ( 64 A + 16 D) 24 KB +@@ -379,7 +382,7 @@ ecc-secp256r1.h: eccdata.stamp + # k = 16, c = 5, S = 160, T = 96 ( 80 A + 16 D) 15 KB + # k = 32, c = 6, S = 128, T = 96 ( 64 A + 32 D) 12 KB + ecc-secp384r1.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) secp384r1 32 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) secp384r1 32 6 $(NUMB_BITS) > $@T && mv $@T $@ + + # Some reasonable choices for 521: + # k = 29, c = 6, S = 192, T = 116 ( 87 A + 29 D) ~27 KB +@@ -387,14 +390,14 @@ ecc-secp384r1.h: eccdata.stamp + # k = 44, c = 6, S = 128, T = 132 ( 88 A + 44 D) ~18 KB + # k = 35, c = 5, S = 96, T = 140 (105 A + 35 D) ~14 KB + ecc-secp521r1.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) secp521r1 44 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) secp521r1 44 6 $(NUMB_BITS) > $@T && mv $@T $@ + + # Parameter choices mostly the same as for ecc-secp256r1.h. + ecc-curve25519.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) curve25519 11 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) curve25519 11 6 $(NUMB_BITS) > $@T && mv $@T $@ + + ecc-curve448.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) curve448 38 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) curve448 38 6 $(NUMB_BITS) > $@T && mv $@T $@ + + # Some reasonable choices for 256: + # k = 9, c = 6, S = 320, T = 54 ( 45 A + 9 D) 20 KB +@@ -402,7 +405,7 @@ ecc-curve448.h: eccdata.stamp + # k = 19, c = 7, S = 256, T = 57 ( 38 A + 19 D) 16 KB + # k = 15, c = 6, S = 192, T = 60 ( 45 A + 15 D) 12 KB + ecc-gost-gc256b.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) gost_gc256b 11 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) gost_gc256b 11 6 $(NUMB_BITS) > $@T && mv $@T $@ + + # Some reasonable choices for 512: + # k = 22, c = 6, S = 256, T = 110 ( 88 A + 22 D) 32 KB +@@ -411,10 +414,10 @@ ecc-gost-gc256b.h: eccdata.stamp + # k = 43, c = 6, S = 128, T = 129 ( 86 A + 43 D) 16 KB + # k = 35, c = 5, S = 96, T = 140 (105 A + 35 D) 12 KB + ecc-gost-gc512a.h: eccdata.stamp +- ./eccdata$(EXEEXT_FOR_BUILD) gost_gc512a 43 6 $(NUMB_BITS) > $@T && mv $@T $@ ++ $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) gost_gc512a 43 6 $(NUMB_BITS) > $@T && mv $@T $@ + +-eccdata.stamp: eccdata.c +- $(MAKE) eccdata$(EXEEXT_FOR_BUILD) ++./eccdata$(EXEEXT_FOR_BUILD): eccdata.c ++eccdata.stamp: $(HOST_TOOLS_PREFIX)/eccdata$(EXEEXT_FOR_BUILD) + echo stamp > eccdata.stamp + + ecc-curve25519.$(OBJEXT): ecc-curve25519.h +diff --git a/aclocal.m4 b/aclocal.m4 +index 8822c18..1d218a0 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -378,6 +378,7 @@ if AC_TRY_EVAL(gmp_compile); then + if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&AC_FD_CC 2>&1; then + cc_for_build_works=yes + fi ++ cc_for_build_works=yes # forced + fi + rm -f conftest* a.out b.out a.exe a_out.exe + AC_MSG_RESULT($cc_for_build_works) diff --git a/ports/nettle/portfile.cmake b/ports/nettle/portfile.cmake index 329cbddc13..bb091cafaa 100644 --- a/ports/nettle/portfile.cmake +++ b/ports/nettle/portfile.cmake @@ -1,9 +1,8 @@ -vcpkg_list(SET patches) +vcpkg_list(SET extra_patches) if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) - vcpkg_list(SET patches + vcpkg_list(APPEND extra_patches yasm.patch # the asm changes are a downgrade to an older version - compile.patch - libname-windows.patch # Apply common libtool rules for lib naming. + libname-windows.patch # libtool rules for lib naming, exports ) endif() @@ -15,15 +14,18 @@ vcpkg_from_gitlab( SHA512 0130d14195274eeec11e8299793e3037f4b84d8fb4b5c5c9392b63ee693ed5713434070744b1a44e14a6a5090d655917c1dd296e2011cd99e3c316ef5d8ee395 HEAD_REF master PATCHES - fix-InstallLibPath.patch - flags.patch - ${patches} + fix-libdir.patch + compile.patch + host-tools.patch + ccas.patch + ${extra_patches} ) +vcpkg_list(SET OPTIONS) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_list(SET OPTIONS --disable-static) + vcpkg_list(APPEND OPTIONS --disable-static) else() - vcpkg_list(SET OPTIONS --disable-shared) + vcpkg_list(APPEND OPTIONS --disable-shared) endif() if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) @@ -42,30 +44,19 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) endif() 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{HOST_TOOLS_PREFIX} "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}") endif() vcpkg_configure_make( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" AUTOCONFIG OPTIONS + ${OPTIONS} --disable-documentation --disable-openssl - ${OPTIONS} + "gmp_cv_prog_exeext_for_build=${VCPKG_HOST_EXECUTABLE_SUFFIX}" ) -set(tool_names des ecc) # aes gcm sha twofish? -list(TRANSFORM tool_names APPEND "data") -list(TRANSFORM tool_names APPEND "${VCPKG_HOST_EXECUTABLE_SUFFIX}") - -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() if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") # def files are created by running 'llvm-nm | findstr /R /C:"[RT] _*nettle_"' on the static build and replacing '00[0-9abcdef]+ [RT]' with spaces @@ -98,19 +89,15 @@ endif() vcpkg_install_make() if(NOT VCPKG_CROSSCOMPILING) + set(tool_names desdata eccdata) # aes gcm sha twofish? list(TRANSFORM tool_names PREPEND "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/") + list(TRANSFORM tool_names APPEND "${VCPKG_HOST_EXECUTABLE_SUFFIX}") file(COPY ${tool_names} DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}") + vcpkg_copy_tool_dependencies("${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") -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() +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYINGv3") diff --git a/ports/nettle/remove_gmpd.patch b/ports/nettle/remove_gmpd.patch deleted file mode 100644 index a248d81e24..0000000000 --- a/ports/nettle/remove_gmpd.patch +++ /dev/null @@ -1,44 +0,0 @@ -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 e9f7830bdb..b400238a76 100644 --- a/ports/nettle/vcpkg.json +++ b/ports/nettle/vcpkg.json @@ -1,6 +1,7 @@ { "name": "nettle", "version": "3.7.3", + "port-version": 1, "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", "license": null, diff --git a/ports/nettle/yasm.patch b/ports/nettle/yasm.patch index 4fa449f32f..5ea10abbaf 100644 --- a/ports/nettle/yasm.patch +++ b/ports/nettle/yasm.patch @@ -1,43 +1,8 @@ -diff --git a/Makefile.in b/Makefile.in -index b65ff4960..3887d0c8f 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -291,7 +291,7 @@ libhogweed.a: $(hogweed_OBJS) - - %.$(OBJEXT): %.asm $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4 - $(M4) $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4 $< >$*.s -- $(COMPILE) -c $*.s -+ $(COMPILE_AS) -o $*.$(OBJEXT) $*.s - - %.$(OBJEXT): %.c - $(COMPILE) -c $< \ -diff --git a/config.make.in b/config.make.in -index f8e1f74ef..3ae593385 100644 ---- a/config.make.in -+++ b/config.make.in -@@ -73,6 +73,7 @@ TEST_SHLIB_DIR = ${abs_top_builddir}/.lib - # flags before CPPFLAGS and LDFLAGS. While EXTRA_CFLAGS are added at the end. - - COMPILE = $(CC) $(PRE_CPPFLAGS) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(DEP_FLAGS) -+COMPILE_AS = $(CCAS) $(PRE_CPPFLAGS) $(CPPFLAGS) $(DEFS) $(ASMFLAGS) $(DEP_FLAGS) - COMPILE_CXX = $(CXX) $(PRE_CPPFLAGS) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DEP_FLAGS) - LINK = $(CC) $(CFLAGS) $(PRE_LDFLAGS) $(LDFLAGS) - LINK_CXX = $(CXX) $(CXXFLAGS) $(PRE_LDFLAGS) $(LDFLAGS) diff --git a/configure.ac b/configure.ac index e95f1c825..1d7ef36bb 100644 --- a/configure.ac +++ b/configure.ac -@@ -118,6 +118,9 @@ LSH_RPATH_INIT([`echo $with_lib_path | sed 's/:/ /g'` \ - - # Checks for programs. - AC_PROG_CC -+# Copied from gmp -+test -n "$CCAS" || CCAS="$CC -c" -+AC_SUBST(CCAS) - - NETTLE_CHECK_IFUNC - -@@ -302,7 +305,7 @@ ABI=standard +@@ -302,7 +302,7 @@ ABI=standard case "$host_cpu" in [x86_64 | amd64]) AC_TRY_COMPILE([ diff --git a/versions/baseline.json b/versions/baseline.json index 217ed194af..895565fe0e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5382,7 +5382,7 @@ }, "nettle": { "baseline": "3.7.3", - "port-version": 0 + "port-version": 1 }, "networkdirect-sdk": { "baseline": "2.0.1", diff --git a/versions/n-/nettle.json b/versions/n-/nettle.json index 4506192453..c4a28cf34a 100644 --- a/versions/n-/nettle.json +++ b/versions/n-/nettle.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a8247971cc43c88dabb2b1bc2b6e34adafc451f5", + "version": "3.7.3", + "port-version": 1 + }, { "git-tree": "17fa323aae2ecee658549bd9a8951a2ce6c9880a", "version": "3.7.3",