From a989b0d6993cec9efc79549377f13a11c15d2378 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 17 Jun 2015 14:57:25 +0100 Subject: [PATCH] Add a hack to make it compile with latest gnutls 3.4.2. --- ocaml-ocamlnet.spec | 9 +++++++++ ocamlnet-4.0.3-gnutls.patch | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ocamlnet-4.0.3-gnutls.patch diff --git a/ocaml-ocamlnet.spec b/ocaml-ocamlnet.spec index 17d7981..035957f 100644 --- a/ocaml-ocamlnet.spec +++ b/ocaml-ocamlnet.spec @@ -18,6 +18,10 @@ License: BSD URL: http://projects.camlcity.org/projects/ocamlnet.html Source0: http://download.camlcity.org/download/ocamlnet-%{version}.tar.gz +# This is a hack to make it compile with gnutls 3.4.2. Not a good fix. +# 2015-06-17: Asked upstream if they have any better ideas. +Patch1: ocamlnet-4.0.3-gnutls.patch + ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.12.1-3 @@ -130,7 +134,11 @@ unset MAKEFLAGS -enable-tcl \ -enable-zip +# Ugly hack to apply the patch to a generated file :-( +make all ||: +patch -p1 < %{patches} make all + %if %opt make opt %endif @@ -223,6 +231,7 @@ echo -e '-b /usr/bin/netplex-admin\n-b /usr/bin/ocamlrpcgen' \ %changelog * Wed Jun 17 2015 Richard W.M. Jones - 4.0.3-3 - Bump release and rebuild. +- Add a hack to make it compile with latest gnutls 3.4.2. * Wed Jun 17 2015 Richard W.M. Jones - 4.0.3-2 - ocaml-4.02.2 rebuild. diff --git a/ocamlnet-4.0.3-gnutls.patch b/ocamlnet-4.0.3-gnutls.patch new file mode 100644 index 0000000..92b287d --- /dev/null +++ b/ocamlnet-4.0.3-gnutls.patch @@ -0,0 +1,14 @@ +--- ocamlnet-4.0.3.old/src/nettls-gnutls/nettls_gnutls_bindings_stubs.c 2015-06-17 14:44:42.016525239 +0100 ++++ ocamlnet-4.0.3/src/nettls-gnutls/nettls_gnutls_bindings_stubs.c 2015-06-17 14:55:34.252866764 +0100 +@@ -2847,9 +2847,11 @@ + #ifdef HAVE_ENUM_GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA + case GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA: return Val_long(93721039); + #endif ++#if 0 + #ifdef HAVE_ENUM_GNUTLS_SUPPLEMENTAL_UNKNOWN + case GNUTLS_SUPPLEMENTAL_UNKNOWN: return Val_long(785140586); + #endif ++#endif + default: break; + }; + failwith("wrap_gnutls_supplemental_data_format_type_t: unexpected value");