summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/cryptlib/files')
-rw-r--r--dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch104
-rw-r--r--dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch52
2 files changed, 156 insertions, 0 deletions
diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch
index 3a0e558bd0de..6fbbe0a561cd 100644
--- a/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch
+++ b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch
@@ -24,3 +24,107 @@ index 9a23592..c90dbc1 100644
--
2.10.2
+From 188dce32ea9c58271c8ce48ab02a3b255498bf9f Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 05:08:47 +0200
+Subject: [PATCH] build: allow specify additional CFLAGS
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makefile b/makefile
+index cb9884c..827a78a 100644
+--- a/makefile
++++ b/makefile
+@@ -90,7 +90,7 @@ DYLIBNAME = lib$(PROJ).$(MAJ).$(MIN).dylib
+ # Further cc flags are gathered dynamically at runtime via the ccopts.sh
+ # script.
+
+-CFLAGS = -c -D__UNIX__ -DNDEBUG -I.
++CFLAGS = -c -D__UNIX__ -DNDEBUG -I. $(EXTRA_CFLAGS)
+ CFLAGS_ANALYSE = -c -D__UNIX__ -I.
+ CFLAGS_COVERAGE = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1 --coverage -fprofile-arcs -ftest-coverage
+ CFLAGS_DEBUG = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O0
+--
+2.10.2
+
+From 3a084f090f12ebc65cef7b14aeaa28257dacaaaa Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 06:19:51 +0200
+Subject: [PATCH] build: ccopts: detect mutex using pre-processor
+
+this required for proper cross compile detection.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ tools/ccopts.sh | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/tools/ccopts.sh b/tools/ccopts.sh
+index e506c6c..8cc87ff 100644
+--- a/tools/ccopts.sh
++++ b/tools/ccopts.sh
+@@ -324,13 +324,14 @@ fi
+ # tend to be somewhat hit-and-miss but we at least indicate their presence
+ # via a define.
+
+-if [ -f /usr/include/pthread.h ] ; then
+- if [ "$(grep -c PTHREAD_MUTEX_RECURSIVE /usr/include/pthread.h)" -gt 0 ] ; then
+- CCARGS="$CCARGS -DHAS_RECURSIVE_MUTEX" ;
+- fi ;
+- if [ "$(grep -c PTHREAD_MUTEX_ROBUST /usr/include/pthread.h)" -gt 0 ] ; then
+- CCARGS="$CCARGS -DHAS_ROBUST_MUTEX" ;
+- fi ;
++PTHREAD_OUT="$(echo "#include <pthread.h>" | ${CC} -E - 2> /dev/null)"
++if [ $? -eq 0 ]; then
++ if echo "${PTHREAD_OUT}" | grep -q PTHREAD_MUTEX_RECURSIVE; then
++ CCARGS="$CCARGS -DHAS_RECURSIVE_MUTEX"
++ fi
++ if echo "${PTHREAD_OUT}" | grep -q PTHREAD_MUTEX_ROBUST; then
++ CCARGS="$CCARGS -DHAS_ROBUST_MUTEX"
++ fi
+ fi
+
+ # If we're not using gcc, we're done. This isn't as simple as a straight
+--
+2.10.2
+
+From 489a81e89103a7a3c653b9e95e279eefa1514c51 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 06:28:03 +0200
+Subject: [PATCH] build: ccopts: support disable of autodetection
+
+requires for cross-compile and explicit predictable build.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ tools/ccopts.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/ccopts.sh b/tools/ccopts.sh
+index 8cc87ff..296bc80 100644
+--- a/tools/ccopts.sh
++++ b/tools/ccopts.sh
+@@ -150,7 +150,7 @@ case $OSNAME in
+ HASDYNLOAD=1 ;
+ fi ;;
+ esac
+-if [ $HASDYNLOAD -gt 0 ] ; then
++if [ -z $DISABLE_AUTODETECT ] && [ $HASDYNLOAD -gt 0 ] ; then
+ if [ -f /usr/include/sql.h ] ; then
+ echo "ODBC interface detected, enabling ODBC support." >&2 ;
+ CCARGS="$CCARGS -DHAS_ODBC" ;
+@@ -181,7 +181,7 @@ if [ $HASDYNLOAD -gt 0 ] ; then
+ CCARGS="$CCARGS -DNCIPHER_PKCS11" ;
+ fi
+ fi
+-if [ -d /usr/include/event2 ] && [ -f /usr/include/event2/event.h ] ; then
++if [ -z $DISABLE_AUTODETECT ] && [ -d /usr/include/event2 ] && [ -f /usr/include/event2/event.h ] ; then
+ echo " (Enabling use of libevent)." >&2 ;
+ CCARGS="$CCARGS -DHAS_LIBEVENT" ;
+ fi
+--
+2.10.2
+
diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch
new file mode 100644
index 000000000000..f18bc96be108
--- /dev/null
+++ b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch
@@ -0,0 +1,52 @@
+From c25dad21f5b1db106e4fe42f38a0dac6290b8a41 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 05:48:54 +0200
+Subject: [PATCH] tests: disable online tests
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ test/testfunc.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/test/testfunc.c b/test/testfunc.c
+index 79d7148..017a4a8 100644
+--- a/test/testfunc.c
++++ b/test/testfunc.c
+@@ -1119,6 +1119,7 @@ BOOLEAN testSessions( void )
+ }
+ if( !testSessionAttributes() )
+ return( FALSE );
++#if 0
+ if( !testSessionSSH() )
+ return( FALSE );
+ if( !testSessionSSHPubkeyAuth() )
+@@ -1127,6 +1128,7 @@ BOOLEAN testSessions( void )
+ return( FALSE );
+ if( !testSessionSSHExec() )
+ return( FALSE );
++#endif
+ if( !testSessionSSL() )
+ return( FALSE );
+ if( !testSessionSSLLocalSocket() )
+@@ -1147,14 +1149,18 @@ BOOLEAN testSessions( void )
+ if( !testSessionTLS12ClientCert() )
+ return( FALSE );
+ #endif /* 0 */
++#if 0
+ if( !testSessionOCSP() )
+ return( FALSE );
++#endif
++#if 0
+ if( !testSessionTSP() )
+ return( FALSE );
+ if( !testSessionEnvTSP() )
+ return( FALSE );
+ if( !testSessionCMP() )
+ return( FALSE );
++#endif
+
+ return( TRUE );
+ }
+--
+2.10.2
+