Ticket #52820: 0001-nettle-update-to-3.3.patch

File 0001-nettle-update-to-3.3.patch, 3.8 KB (added by dgilman (David Gilman), 7 years ago)
  • devel/nettle/Portfile

    From 018cf3abbeeafb709722b462dcb87a615a8dc301 Mon Sep 17 00:00:00 2001
    From: David Gilman <davidgilman1@gmail.com>
    Date: Mon, 24 Apr 2017 17:20:07 -0400
    Subject: [PATCH] nettle: update to 3.3
    
    This also uses the --enable-fat flag, which creates a library that can
    detect at runtime if an accelerated asm routine is available for your
    CPU and run it.
    
    Several changes had to be made to supporting scripts to pass the correct
    DYLD_LIBRARY_PATH down to the test suite.  All tests are passing
    correctly now on El Capitan+
    ---
     devel/nettle/Portfile                 | 11 +++++----
     devel/nettle/files/macosx-dylib.patch | 44 +++++++++++++++++++++++++++++++++++
     2 files changed, 50 insertions(+), 5 deletions(-)
     create mode 100644 devel/nettle/files/macosx-dylib.patch
    
    diff --git a/devel/nettle/Portfile b/devel/nettle/Portfile
    index 4cdfac738a..0a4e4c392a 100644
    a b PortSystem 1.0 
    44PortGroup           muniversal 1.0
    55
    66name                nettle
    7 version             3.1.1
     7version             3.3
    88categories          devel crypto
    99platforms           darwin
    1010maintainers         ryandesign openmaintainer
    long_description Nettle is a cryptographic library that is designed to fit \ 
    2727homepage            http://www.lysator.liu.se/~nisse/nettle/
    2828master_sites        gnu
    2929
    30 checksums           rmd160  4322aa783848619b9818c83753de56f5dc63a579 \
    31                     sha256  5fd4d25d64d8ddcb85d0d897572af73b05b4d163c6cc49438a5bfbb8ff293d4c
     30checksums           rmd160  7d535a12074b268f982ae111c07a0fcb6355909f \
     31                    sha256  46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e
    3232
    3333depends_lib         port:gmp
    3434
    35 patchfiles          no-fink.patch
     35patchfiles          no-fink.patch \
     36                    macosx-dylib.patch
    3637
    3738use_autoreconf      yes
    3839autoreconf.args     -fvi
    3940
    40 configure.args      --enable-shared --disable-openssl
     41configure.args      --enable-shared --disable-openssl --enable-fat
    4142
    4243test.run            yes
    4344test.target         check
  • new file devel/nettle/files/macosx-dylib.patch

    diff --git a/devel/nettle/files/macosx-dylib.patch b/devel/nettle/files/macosx-dylib.patch
    new file mode 100644
    index 0000000000..4fd5f14f83
    - +  
     1--- testsuite/dlopen-test.c.orig        2017-04-24 16:05:46.000000000 -0400
     2+++ testsuite/dlopen-test.c     2017-04-24 16:05:56.000000000 -0400
     3@@ -9,7 +9,7 @@
     4 main (int argc UNUSED, char **argv UNUSED)
     5 {
     6 #if HAVE_LIBDL
     7-  void *handle = dlopen ("../libnettle.so", RTLD_NOW);
     8+  void *handle = dlopen ("../libnettle.dylib", RTLD_NOW);
     9   int (*get_version)(void);
     10   if (!handle)
     11     {
     12
     13--- run-tests.orig      2017-04-24 16:43:46.000000000 -0400
     14+++ run-tests   2017-04-24 16:44:27.000000000 -0400
     15@@ -58,9 +58,9 @@
     16   testname=`basename "$1" .exe`
     17   testname=`basename "$testname" -test`
     18   if [ -z "$EMULATOR" ] || head -1 "$1" | grep '^#!' > /dev/null; then
     19-    "$1" $testflags
     20+    DYLD_LIBRARY_PATH=../.lib "$1" $testflags
     21   else
     22-    $EMULATOR "$1" $testflags
     23+    DYLD_LIBRARY_PATH=../.lib $EMULATOR "$1" $testflags
     24   fi
     25   case "$?" in
     26       0)
     27
     28--- examples/rsa-encrypt-test.orig      2017-04-24 16:48:35.000000000 -0400
     29+++ examples/rsa-encrypt-test   2017-04-24 16:49:07.000000000 -0400
     30@@ -7,12 +7,12 @@
     31 data="$srcdir/nettle-benchmark.c"
     32
     33 if [ -x rsa-encrypt$EXEEXT ] ; then
     34-  if $EMULATOR ./rsa-encrypt -r rsa-decrypt$EXEEXT testkey.pub < "$data" > testciphertext ; then
     35+  if DYLD_LIBRARY_PATH=../.lib $EMULATOR ./rsa-encrypt -r rsa-decrypt$EXEEXT testkey.pub < "$data" > testciphertext ; then
     36     :
     37   else
     38     exit 1
     39   fi
     40-  if $EMULATOR ./rsa-decrypt testkey < testciphertext > testcleartext ; then
     41+  if DYLD_LIBRARY_PATH=../.lib $EMULATOR ./rsa-decrypt testkey < testciphertext > testcleartext ; then
     42     :
     43   else
     44     exit 1