-# allow pass CFLAGS, replace -O, -pg,-DPROFILING with $(CFAGS)
+# allow pass CFLAGS, replace -O, -pg,-DPROFILING with $(CFLAGS)
Makefiles=$(find . -type f -name Makefile\*)
%{__sed} -i -e 's@^CFLAGS[ \t]*=@override CFLAGS += @' $Makefiles
%{__sed} -i -e 's@\(^override CFLAGS += .*\)-O \(.*\)@\1\2@' $Makefiles
COBJS=startup.$(O) main.$(O) fail.$(O) roots.$(O) signals.$(O) signals_asm.$(O) \
misc.$(O) freelist.$(O) major_gc.$(O) minor_gc.$(O) memory.$(O) alloc.$(O) \
-diff -ur ocaml-3.11.0/byterun/Makefile ocaml-3.11.0.CFLAGS/byterun/Makefile
---- ocaml-3.11.0/byterun/Makefile 2008-11-08 17:29:02.000000000 +0100
-+++ ocaml-3.11.0.CFLAGS/byterun/Makefile 2009-02-16 12:18:01.212550815 +0100
+--- ocaml-3.12.0/byterun/Makefile 2008-11-08 17:29:02.000000000 +0100
++++ ocaml-3.12.0.CFLAGS/byterun/Makefile 2009-02-16 12:18:01.212550815 +0100
@@ -15,7 +15,7 @@
include Makefile.common
-CFLAGS=-DCAML_NAME_SPACE -O $(BYTECCCOMPOPTS) $(IFLEXDIR)
+override CFLAGS += -DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR)
- DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS)
+ DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR)
OBJS=$(COMMONOBJS) unix.o main.o
diff -ur ocaml-3.11.0/byterun/Makefile.nt ocaml-3.11.0.CFLAGS/byterun/Makefile.nt
COMPFLAGS=-I $(OTHERS)/win32unix -I $(OTHERS)/unix
THFLAGS=-I $(OTHERS)/systhreads -I $(OTHERS)/threads
-diff -ur ocaml-3.11.0/otherlibs/labltk/tkanim/Makefile ocaml-3.11.0.CFLAGS/otherlibs/labltk/tkanim/Makefile
---- ocaml-3.11.0/otherlibs/labltk/tkanim/Makefile 2007-12-12 15:09:45.000000000 +0100
-+++ ocaml-3.11.0.CFLAGS/otherlibs/labltk/tkanim/Makefile 2009-02-16 12:18:01.282552384 +0100
-@@ -4,7 +4,7 @@
- include ../support/Makefile.common
-
- COMPFLAGS=-I ../support -I ../camltk -I ../../unix -I ../../win32unix
--CCFLAGS=-I../../../byterun -I../support $(TK_DEFS) $(SHAREDCCCOMPOPTS)
-+override CCFLAGS += -I../../../byterun -I../support $(TK_DEFS) $(SHAREDCCCOMPOPTS) $(CFLAGS)
-
- all: tkanim.cma libtkanim.$(A)
- opt: tkanim.cmxa libtkanim.$(A)
-diff -ur ocaml-3.11.0/otherlibs/num/test/Makefile ocaml-3.11.0.CFLAGS/otherlibs/num/test/Makefile
---- ocaml-3.11.0/otherlibs/num/test/Makefile 2008-09-10 18:02:52.000000000 +0200
-+++ ocaml-3.11.0.CFLAGS/otherlibs/num/test/Makefile 2009-02-16 12:18:01.285892127 +0100
-@@ -18,7 +18,7 @@
- CAMLC=../../../boot/ocamlrun ../../../ocamlc -I ../../../stdlib -w A -warn-error A
- CAMLOPT=../../../boot/ocamlrun ../../../ocamlopt -I ../../../stdlib
- CC=$(BYTECC)
--CFLAGS=-I.. -I../../../byterun $(BYTECCCOMPOPTS)
-+override CFLAGS += -I.. -I../../../byterun $(BYTECCCOMPOPTS)
-
- test: test.byt test.opt test_pi
- if $(SUPPORTS_SHARED_LIBRARIES); \
-diff -ur ocaml-3.11.0/otherlibs/num/test/Makefile.nt ocaml-3.11.0.CFLAGS/otherlibs/num/test/Makefile.nt
---- ocaml-3.11.0/otherlibs/num/test/Makefile.nt 2004-04-01 15:10:12.000000000 +0200
-+++ ocaml-3.11.0.CFLAGS/otherlibs/num/test/Makefile.nt 2009-02-16 12:18:01.285892127 +0100
-@@ -18,7 +18,7 @@
- CAMLC=../../../boot/ocamlrun ../../../ocamlc -I ../../../stdlib -I ..
- CAMLOPT=../../../boot/ocamlrun ../../../ocamlopt -I ../../../stdlib -I ..
- CC=$(BYTECC)
--CFLAGS=-I.. $(BYTECCCOMPOPTS)
-+override CFLAGS += -I.. $(BYTECCCOMPOPTS)
-
- test: test.byt test.opt
- ../../../byterun/ocamlrun -I .. ./test.byt
-diff -ur ocaml-3.11.0/otherlibs/systhreads/Makefile ocaml-3.11.0.CFLAGS/otherlibs/systhreads/Makefile
---- ocaml-3.11.0/otherlibs/systhreads/Makefile 2008-07-15 17:31:32.000000000 +0200
-+++ ocaml-3.11.0.CFLAGS/otherlibs/systhreads/Makefile 2009-02-16 12:18:13.469214951 +0100
-@@ -35,7 +35,7 @@
+--- ocaml-3.12.0/otherlibs/systhreads/Makefile.orig 2010-04-27 09:55:08.000000000 +0200
++++ ocaml-3.12.0/otherlibs/systhreads/Makefile 2011-03-12 10:40:54.827415456 +0100
+@@ -33,7 +33,7 @@
$(MKLIB) -o threads $(BYTECODE_C_OBJS)
- posix_b.o: posix.c
+ st_stubs_b.o: st_stubs.c st_posix.h
- $(BYTECC) -O -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \
+ $(BYTECC) $(CFLAGS) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \
- -c posix.c
- mv posix.o posix_b.o
+ -c st_stubs.c
+ mv st_stubs.o st_stubs_b.o
-@@ -45,7 +45,7 @@
+@@ -43,7 +43,7 @@
$(AR) rc libthreadsnat.a $(NATIVECODE_C_OBJS)
- posix_n.o: posix.c
-- $(NATIVECC) -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c posix.c
-+ $(NATIVECC) $(CFLAGS) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c posix.c
- mv posix.o posix_n.o
+ st_stubs_n.o: st_stubs.c st_posix.h
+- $(NATIVECC) -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c st_stubs.c
++ $(NATIVECC) $(CFLAGS) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c st_stubs.c
+ mv st_stubs.o st_stubs_n.o
threads.cma: $(THREAD_OBJS)
diff -ur ocaml-3.11.0/otherlibs/systhreads/Makefile.nt ocaml-3.11.0.CFLAGS/otherlibs/systhreads/Makefile.nt
+++ /dev/null
-diff -ur ocaml-3.04/tools/objinfo.ml ocaml-3.04-/tools/objinfo.ml
---- ocaml-3.04/tools/objinfo.ml Mon Mar 27 14:18:09 2000
-+++ ocaml-3.04-/tools/objinfo.ml Wed May 8 11:30:02 2002
-@@ -62,6 +62,29 @@
- print_string name; print_newline())
- crcs
-
-+let print_opt_info ui =
-+ print_string " Unit name: "; print_string ui.Compilenv.ui_name;
-+ print_newline();
-+ print_string " Interfaces imported:"; print_newline();
-+ List.iter
-+ (fun (name, digest) ->
-+ print_string "\t"; print_digest digest; print_string "\t";
-+ print_string name; print_newline())
-+ ui.Compilenv.ui_imports_cmi;
-+ print_string " Infos imported:"; print_newline();
-+ List.iter
-+ (fun (name, digest) ->
-+ print_string "\t"; print_digest digest; print_string "\t";
-+ print_string name; print_newline())
-+ ui.Compilenv.ui_imports_cmx
-+
-+let print_opt_library_info lib =
-+ print_string " Extra C object files:";
-+ List.iter print_spaced_string lib.Compilenv.lib_ccobjs; print_newline();
-+ print_string " Extra C options:";
-+ List.iter print_spaced_string lib.Compilenv.lib_ccopts; print_newline();
-+ List.iter print_opt_info (List.map fst lib.Compilenv.lib_units)
-+
- let dump_obj filename =
- print_string "File "; print_string filename; print_newline();
- let ic = open_in_bin filename in
-@@ -86,6 +109,16 @@
- let crcs = input_value ic in
- close_in ic;
- print_intf_info name sign comps crcs
-+ end else
-+ if buffer = cmx_magic_number then begin
-+ let ui = (input_value ic : Compilenv.unit_infos) in
-+ close_in ic;
-+ print_opt_info ui
-+ end else
-+ if buffer = cmxa_magic_number then begin
-+ let li = (input_value ic : Compilenv.library_infos) in
-+ close_in ic;
-+ print_opt_library_info li
- end else begin
- prerr_endline "Not an object file"; exit 2
- end
%{!?with_x:%undefine with_tk}
%define p4ver 3.06
-%define sver 3.11
+%define sver 3.12
Summary: The Objective Caml compiler and programming environment
Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
Name: ocaml
-Version: 3.11.0
+Version: 3.12.0
Release: 1
Epoch: 1
License: distributable
Group: Development/Languages
Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.bz2
-# Source0-md5: 6ed1c3ed660a15408362242fa8fa4668
+# Source0-md5: bd92c8970767f412bc1e9a6c625b5ccf
Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.html.tar.gz
-# Source1-md5: bfb4ed960974159f4224014a979baf6d
+# Source1-md5: 93cd91f525441eb7e94cc49b9b64bab0
Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
-# Source2-md5: d01adeb1ab5ef0905f8656947f928b03
-Source3: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.html.tar.gz
-# Source3-md5: 21370bae4e7f6435b38aeb21db7ce8bb
-Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.dvi.gz
-# Source4-md5: 035915d1a530aa7ec9b194d9a7d258eb
-Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.html.tar.gz
-# Source5-md5: 96d8eb4ca5abd58c9a280ba59f73b192
-Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.dvi.gz
-# Source6-md5: fcd87c235109364242a0c9ccf176dff8
-Source7: http://www.ocaml.info/ocaml_sources/pure-fun-1.0.6.tar.bz2
-# Source7-md5: 94eac3fa1ac51b8ada344b04839cb43c
-Source8: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
-# Source8-md5: 77fa1da7375dea1393cc0b6cd802d7e1
-Source9: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
-# Source9-md5: 50fc2a3e3a38db78bd03d169379155de
+# Source2-md5: a9c17db6ffd400c5ea00c6d51cbf56bf
+Source3: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
+# Source3-md5: 8cf24c4f69c6f9c9f9cc1edb9b18f6cb
+Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.html.tar.gz
+# Source4-md5: 21370bae4e7f6435b38aeb21db7ce8bb
+Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.dvi.gz
+# Source5-md5: 035915d1a530aa7ec9b194d9a7d258eb
+Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.html.tar.gz
+# Source6-md5: 96d8eb4ca5abd58c9a280ba59f73b192
+Source7: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.dvi.gz
+# Source7-md5: fcd87c235109364242a0c9ccf176dff8
+Source8: http://www.ocaml.info/ocaml_sources/pure-fun-1.0.6.tar.bz2
+# Source8-md5: 94eac3fa1ac51b8ada344b04839cb43c
+Source9: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
+# Source9-md5: 77fa1da7375dea1393cc0b6cd802d7e1
Patch0: %{name}-db3.patch
-Patch1: %{name}-objinfo.patch
-Patch2: %{name}-CFLAGS.patch
-Patch3: %{name}-as_needed.patch
+Patch1: %{name}-CFLAGS.patch
+Patch2: %{name}-as_needed.patch
+Patch3: %{name}-gas.patch
URL: http://caml.inria.fr/
BuildRequires: db-devel >= 4.1
%{?with_tk:BuildRequires: tk-devel}
autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
%prep
-%setup -q -a1 -a3 -a5 -a9
+%setup -q -a1 -a3 -a4 -a6
mkdir examples
-tar xjf %{SOURCE7} -C examples
-tar xzf %{SOURCE8} -C examples
+tar xjf %{SOURCE8} -C examples
+tar xzf %{SOURCE9} -C examples
# order mess with docs somewhat
mkdir -p docs/html
mv htmlman docs/html/ocaml
cp %{SOURCE2} docs/ocaml.ps.gz
mv camlp4-%{p4ver}-manual.html docs/html/camlp4
-cp %{SOURCE4} docs/camlp4.ps.gz
+cp %{SOURCE5} docs/camlp4.ps.gz
mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
-cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
+cp %{SOURCE7} docs/camlp4-tutorial.ps.gz
%patch0 -p1
%patch1 -p1
%patch2 -p1
ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
# shutup checkfiles
-rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
-rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
# install info pages
cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
%clean
rm -rf $RPM_BUILD_ROOT
-%post doc-info -p /sbin/postshell
+%post doc-info -p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}
-%postun doc-info -p /sbin/postshell
+%postun doc-info -p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}
%files
%defattr(644,root,root,755)
%doc LICENSE Changes README Upgrading
+%attr(755,root,root) %{_bindir}/addlabels
%attr(755,root,root) %{_bindir}/ocaml*
+%attr(755,root,root) %{_bindir}/scrapelabels
%{?with_tk:%exclude %{_bindir}/ocamlbrowser}
%exclude %{_bindir}/ocamlrun
-%attr(755,root,root) %{_bindir}/*labels
%{_includedir}/caml
%{_libdir}/%{name}/caml
%{_libdir}/%{name}/threads
%{_libdir}/%{name}/ocamldoc/*.hva
%attr(755,root,root) %{_libdir}/%{name}/expunge
%attr(755,root,root) %{_libdir}/%{name}/extract_crc
-%attr(755,root,root) %{_libdir}/%{name}/*labels
-%{_mandir}/man1/*ocaml*
+%attr(755,root,root) %{_libdir}/%{name}/objinfo_helper
+%{_mandir}/man1/ocaml*
+%exclude %{_mandir}/man1/ocamlrun.1*
%files runtime
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
%if %{with tk}
%exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
-%exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
%endif
+%{_mandir}/man1/ocamlrun.1*
%files lib-source
%defattr(644,root,root,755)
%files labltk
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
-%attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
%files labltk-devel
%defattr(644,root,root,755)