From a1071e314ead665fd70d8205acf09da3f07865df Mon Sep 17 00:00:00 2001 From: GĂ©rard Milmeister Date: Jan 04 2008 18:47:48 +0000 Subject: patch for building with tcl/tk 8.5 --- diff --git a/ocaml-3.10.0-tclver.patch b/ocaml-3.10.0-tclver.patch new file mode 100644 index 0000000..dd6d48c --- /dev/null +++ b/ocaml-3.10.0-tclver.patch @@ -0,0 +1,35 @@ +diff -up ocaml-3.10.0/otherlibs/labltk/support/cltkImg.c.tclver ocaml-3.10.0/otherlibs/labltk/support/cltkImg.c +--- ocaml-3.10.0/otherlibs/labltk/support/cltkImg.c.tclver 2008-01-04 18:56:47.000000000 +0100 ++++ ocaml-3.10.0/otherlibs/labltk/support/cltkImg.c 2008-01-04 19:06:45.000000000 +0100 +@@ -98,7 +98,7 @@ camltk_setimgdata_native (value imgname, + pib.offset[0] = 0; + pib.offset[1] = 1; + pib.offset[2] = 2; +- Tk_PhotoPutBlock(ph,&pib,Int_val(x),Int_val(y),Int_val(w),Int_val(h) ++ Tk_PhotoPutBlock(cltclinterp,ph,&pib,Int_val(x),Int_val(y),Int_val(w),Int_val(h) + #if (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4 || TK_MAJOR_VERSION > 8) + , TK_PHOTO_COMPOSITE_SET + #endif +diff -up ocaml-3.10.0/otherlibs/labltk/tkanim/tkAnimGIF.c.tclver ocaml-3.10.0/otherlibs/labltk/tkanim/tkAnimGIF.c +--- ocaml-3.10.0/otherlibs/labltk/tkanim/tkAnimGIF.c.tclver 2008-01-04 19:08:28.000000000 +0100 ++++ ocaml-3.10.0/otherlibs/labltk/tkanim/tkAnimGIF.c 2008-01-04 19:08:37.000000000 +0100 +@@ -334,7 +334,7 @@ FileReadGIF(interp, f, fileName, formatS + goto error; + } + } +- Tk_PhotoPutBlock(photoHandle, &block, 0, 0, imageWidth, imageHeight ++ Tk_PhotoPutBlock(interp, photoHandle, &block, 0, 0, imageWidth, imageHeight + #if (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4 || TK_MAJOR_VERSION > 8) + , TK_PHOTO_COMPOSITE_SET + #endif +diff -up ocaml-3.10.0/configure.tclver ocaml-3.10.0/configure +--- ocaml-3.10.0/configure.tclver 2008-01-04 18:37:25.000000000 +0100 ++++ ocaml-3.10.0/configure 2008-01-04 18:38:54.000000000 +0100 +@@ -1342,6 +1342,7 @@ if test $has_tk = true; then + 8.2) tclmaj=8 tclmin=2 tkmaj=8 tkmin=2 ;; + 8.3) tclmaj=8 tclmin=3 tkmaj=8 tkmin=3 ;; + 8.4) tclmaj=8 tclmin=4 tkmaj=8 tkmin=4 ;; ++ 8.5) tclmaj=8 tclmin=5 tkmaj=8 tkmin=5 ;; + *) echo "This version is not known."; has_tk=false ;; + esac + else diff --git a/ocaml.spec b/ocaml.spec index 42c46e5..4bf8712 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,6 +1,6 @@ Name: ocaml Version: 3.10.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Objective Caml compiler and programming environment @@ -15,6 +15,7 @@ Source4: ocaml-find-requires.sh Source5: ocaml-find-provides.sh Patch0: ocaml-rpath.patch Patch1: ocaml-user-cflags.patch +Patch2: ocaml-3.10.0-tclver.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel BuildRequires: gdbm-devel @@ -184,8 +185,9 @@ man pages and info files. %setup -q -T -b 0 %setup -q -T -D -a 1 %setup -q -T -D -a 3 -%patch0 -p1 +%patch0 -p1 -b .rpath %patch1 -p1 -b .cflags +%patch2 -p1 -b .tclver cp %{SOURCE2} refman.pdf @@ -427,6 +429,9 @@ fi %changelog +* Fri Jan 4 2008 Gerard Milmeister - 3.10.0-8 +- patch for building with tcl/tk 8.5 + * Thu Sep 6 2007 Richard W.M. Jones - 3.10.0-7 - Run chrpath to delete rpaths used on some of the stublibs. - Ignore Parsetree module in dependency calculation.