From 7aee82bdc7c35a2a33d64a417e373394061888aa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 14 Sep 2013 09:09:23 +0100 Subject: [PATCH] Rebuild for OCaml 4.01.0. - Enable debuginfo. - Remove bogus (and not accepted upstream) patch. --- ....16.0-avoid-queue-empty-in-gtkThread.patch | 41 ------------------- ocaml-lablgtk.spec | 19 +++++---- 2 files changed, 10 insertions(+), 50 deletions(-) delete mode 100644 lablgtk-2.16.0-avoid-queue-empty-in-gtkThread.patch diff --git a/lablgtk-2.16.0-avoid-queue-empty-in-gtkThread.patch b/lablgtk-2.16.0-avoid-queue-empty-in-gtkThread.patch deleted file mode 100644 index 5d07d36..0000000 --- a/lablgtk-2.16.0-avoid-queue-empty-in-gtkThread.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up lablgtk-2.16.0/src/gtkThread.ml.orig lablgtk-2.16.0/src/gtkThread.ml ---- lablgtk-2.16.0/src/gtkThread.ml.orig 2012-08-23 04:37:48.000000000 -0600 -+++ lablgtk-2.16.0/src/gtkThread.ml 2012-10-17 10:49:34.581065898 -0600 -@@ -28,8 +28,14 @@ open GtkMain - - let jobs : (unit -> unit) Queue.t = Queue.create () - let m = Mutex.create () -+type ('a, 'b) either = Left of 'a | Right of 'b - let with_jobs f = -- Mutex.lock m; let y = f jobs in Mutex.unlock m; y -+ Mutex.lock m; -+ let y = try Left (f jobs) with exn -> Right exn in -+ Mutex.unlock m; -+ match y with -+ | Left y -> y -+ | Right exn -> raise exn - - let loop_id = ref None - let reset () = loop_id := None -@@ -40,8 +46,6 @@ let cannot_sync () = - let gui_safe () = - not (Sys.os_type = "Win32") || !loop_id = Some(Thread.id (Thread.self ())) - --let has_jobs () = not (with_jobs Queue.is_empty) --let n_jobs () = with_jobs Queue.length - let do_next_job () = with_jobs Queue.take () - let has_timeout = ref false - let async j x = with_jobs -@@ -71,10 +75,10 @@ let sync f x = - let do_jobs_delay = ref 0.013;; - let set_do_jobs_delay d = do_jobs_delay := max 0. d;; - let do_jobs () = -- for i = 1 to n_jobs () do do_next_job () done; -+ let rec loop () = do_next_job (); loop () in -+ (try loop () with Queue.Empty -> ()); - true - -- - (* We check first whether there are some event pending, and run - some iterations. We then need to delay, thus focing a thread switch. *) - diff --git a/ocaml-lablgtk.spec b/ocaml-lablgtk.spec index 551a136..1ff520d 100644 --- a/ocaml-lablgtk.spec +++ b/ocaml-lablgtk.spec @@ -1,8 +1,6 @@ -%define debug_package %{nil} - Name: ocaml-lablgtk Version: 2.16.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Objective Caml interface to gtk+ @@ -11,9 +9,6 @@ License: LGPLv2 with exceptions URL: http://lablgtk.forge.ocamlcore.org/ Source: http://forge.ocamlcore.org/frs/download.php/979/lablgtk-%{version}.tar.gz -# Patch sent upstream 2011-07-27 by RWMJ. -Patch0: lablgtk-2.16.0-avoid-queue-empty-in-gtkThread.patch - ExcludeArch: sparc64 s390 s390x Obsoletes: lablgtk <= 2.6.0-7 @@ -71,14 +66,15 @@ developing applications that use %{name}. %prep %setup -q -n lablgtk-%{version} -%patch0 -p1 %build +# Parallel builds don't work. +unset MAKEFLAGS %configure --with-gl --enable-debug perl -pi -e "s|-O|$RPM_OPT_FLAGS|" src/Makefile -make world -make opt +make world CAMLOPT="ocamlopt.opt -g" +make opt CAMLOPT="ocamlopt.opt -g" make doc CAMLP4O="camlp4o -I %{_libdir}/ocaml/camlp4/Camlp4Parsers" @@ -147,6 +143,11 @@ find examples -name .cvsignore -exec rm {} \; %changelog +* Sat Sep 14 2013 Richard W.M. Jones - 2.16.0-5 +- Rebuild for OCaml 4.01.0. +- Enable debuginfo. +- Remove bogus (and not accepted upstream) patch. + * Sun Aug 4 2013 Richard W.M. Jones - 2.16.0-4 - gnome-panel is dead, apparently.