From 15bfe91414f0b240ec81474e3089da20a7e33a9e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 24 Aug 2014 09:43:48 +0100 Subject: [PATCH] Fix for broken configure tests. --- ocaml-ocamlnet.spec | 10 +++++- ocamlnet-3.7.4-fix-configure.patch | 50 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 ocamlnet-3.7.4-fix-configure.patch diff --git a/ocaml-ocamlnet.spec b/ocaml-ocamlnet.spec index b083272..084d297 100644 --- a/ocaml-ocamlnet.spec +++ b/ocaml-ocamlnet.spec @@ -11,13 +11,16 @@ Name: ocaml-ocamlnet Version: 3.7.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Network protocols for OCaml License: BSD URL: http://projects.camlcity.org/projects/ocamlnet.html Source0: http://download.camlcity.org/download/ocamlnet-%{version}.tar.gz +# Fix for broken configure tests. +Patch1: ocamlnet-3.7.4-fix-configure.patch + ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.12.1-3 @@ -109,6 +112,8 @@ files for developing applications that use %{name}-nethttpd. %prep %setup -q -n ocamlnet-%{version} +%patch1 -p1 + %build # Parallel builds don't work: @@ -217,6 +222,9 @@ echo -e '-b /usr/bin/netplex-admin\n-b /usr/bin/ocamlrpcgen' \ %changelog +* Sun Aug 23 2014 Richard W.M. Jones - 3.7.4-7 +- Fix for broken configure tests. + * Sat Aug 23 2014 Richard W.M. Jones - 3.7.4-6 - Bump release and rebuild. diff --git a/ocamlnet-3.7.4-fix-configure.patch b/ocamlnet-3.7.4-fix-configure.patch new file mode 100644 index 0000000..9b3b8eb --- /dev/null +++ b/ocamlnet-3.7.4-fix-configure.patch @@ -0,0 +1,50 @@ +--- ocamlnet-3.7.4/configure.old 2014-08-24 09:41:14.270683502 +0100 ++++ ocamlnet-3.7.4/configure 2014-08-24 09:41:52.120685932 +0100 +@@ -682,11 +682,11 @@ + + printf "%s" "Checking whether lablgtk2 has GMain.Io.remove... " + mkdir -p tmp +- cat <tmp/gtk.ml ++ cat <tmp/gtktest.ml + let _ = GMain.Io.remove;; + EOF + +- if ocamlfind ocamlc -package lablgtk2 -c tmp/gtk.ml >/dev/null 2>/dev/null; ++ if ocamlfind ocamlc -package lablgtk2 -c tmp/gtktest.ml >/dev/null 2>/dev/null; + then + echo "yes" + else +@@ -697,21 +697,21 @@ + + printf "%s" "Checking whether lablgtk2 has GMain.Io.add_watch with list support... " + mkdir -p tmp +- cat <<'EOF' >tmp/gtk.ml ++ cat <<'EOF' >tmp/gtktest.ml + open GMain.Io + let _ = (add_watch : cond:condition list -> callback:(condition list -> bool) -> ?prio:int -> channel -> id);; + exit 0 + EOF + # Note: this newer API is never broken in the sense checked below, i.e. + # such lablgtk2 versions do not exist. +- if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtk.ml >/dev/null 2>/dev/null && tmp/gtk; then ++ if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtktest.ml >/dev/null 2>/dev/null && tmp/gtk; then + echo "yes" + gtk2_io_add_watch_supports_lists="-ppopt -DGTK2_IO_ADD_WATCH_SUPPORTS_LISTS" + else + echo "no" + printf "%s" "Checking whether lablgtk2's GMain.Io.add_watch is broken... " + mkdir -p tmp +- cat <<'EOF' >tmp/gtk.ml ++ cat <<'EOF' >tmp/gtktest.ml + GMain.Main.init();; + let ch = GMain.Io.channel_of_descr (Unix.stdout) in + let w = GMain.Io.add_watch +@@ -724,7 +724,7 @@ + else + exit 1 + EOF +- if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtk.ml >/dev/null 2>/dev/null && tmp/gtk; then ++ if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtktest.ml >/dev/null 2>/dev/null && tmp/gtk; then + echo "no" + else + echo "yes"