From df37e12e34a945a26d65789055eff774a70075ff Mon Sep 17 00:00:00 2001 From: Lily <47812810+LilyWangL@users.noreply.github.com> Date: Mon, 28 Sep 2020 09:27:49 +0800 Subject: [nettle] Fix build error on Linux (#13523) * [nettle] Fix build error on Linux * [nettle] Fix build error on Linux * [nettle] Fix build error on Linux --- ports/nettle/CONTROL | 3 ++- ports/nettle/fix-InstallLibPath.patch | 36 +++++++++++++++++++++++++++++++++++ ports/nettle/portfile.cmake | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 ports/nettle/fix-InstallLibPath.patch diff --git a/ports/nettle/CONTROL b/ports/nettle/CONTROL index c6e3e3735..48c42597e 100644 --- a/ports/nettle/CONTROL +++ b/ports/nettle/CONTROL @@ -1,5 +1,6 @@ Source: nettle -Version: 3.5.1-2 +Version: 3.5.1 +Port-Version: 3 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/fix-InstallLibPath.patch b/ports/nettle/fix-InstallLibPath.patch new file mode 100644 index 000000000..363cda9ba --- /dev/null +++ b/ports/nettle/fix-InstallLibPath.patch @@ -0,0 +1,36 @@ +diff --git a/configure.ac b/configure.ac +index 3547cae..e13a5bf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -366,25 +366,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/portfile.cmake b/ports/nettle/portfile.cmake index cd50ea19c..9ba1cf511 100644 --- a/ports/nettle/portfile.cmake +++ b/ports/nettle/portfile.cmake @@ -106,7 +106,7 @@ else() REF ee5d62898cf070f08beedc410a8d7c418588bd95 #v3.5.1 SHA512 881912548f4abb21460f44334de11439749c8a055830849a8beb4332071d11d9196d9eecaeba5bf822819d242356083fba91eb8719a64f90e41766826e6d75e1 HEAD_REF master # branch name - #PATCHES example.patch #patch name + PATCHES fix-InstallLibPath.patch ) vcpkg_configure_make( -- cgit v1.2.3