]> git.pld-linux.org Git - packages/ocaml.git/blobdiff - ocaml.spec
- ocaml-x11graphics* Obsoletes moved to ocaml-graphics*
[packages/ocaml.git] / ocaml.spec
index 679e244690170f7143352fefce243ec3db5d9393..f1b8781d047d446a8fa54c6522cf9910a3294ff3 100644 (file)
@@ -1,57 +1,52 @@
 #
 # Conditional build:
-%bcond_without emacs           # emacs subpackage
-%bcond_without x               # X11 support
 %bcond_without ocaml_opt       # native, optimized compiler
 
 # ppc64, sparc64 and x32 variants not supported currently
 # alpha, hppa, ia64, mips removed since 4.00
-%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
 %undefine      with_ocaml_opt
 %endif
 
-%define                sver    4.02
+%define                sver    4.12
 
 Summary:       The Objective Caml compiler and programming environment
 Summary(pl.UTF-8):     Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
 Name:          ocaml
-Version:       4.02.3
-Release:       3
+Version:       4.12.0
+Release:       5
 Epoch:         1
 License:       QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library)
 Group:         Development/Languages
-Source0:       http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.xz
-# Source0-md5: 9115706e30dad644f8dec9dfb459a9ab
-Source1:       http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman-html.tar.gz
-# Source1-md5: 915a1949f7af7186e16354e9682dc1e5
-Source2:       http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
-# Source2-md5: e85016fa23b6525d1d10da06010fd90a
-Source3:       http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
-# Source3-md5: 265b7db123e925e8b7b70ca2266b4206
+Source0:       http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{version}.tar.xz
+# Source0-md5: 7343cd398d477001db2c3f2ac92e12ea
+Source1:       http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{sver}-refman-html.tar.gz
+# Source1-md5: 1bda3d0a46328a985c817d551423e2c6
+Source3:       http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{sver}-refman.info.tar.gz
+# Source3-md5: c808dbbe35a6cc5d14da6c3b2f175d2c
 Source4:       https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz
 # Source4-md5: 0a6ff033df78d0880fe4883ace025ebe
 # note: dead URL
 Source5:       http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
 # Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1
-Patch1:                %{name}-CFLAGS.patch
-Patch2:                %{name}-as_needed.patch
-Patch3:                x32.patch
-URL:           http://caml.inria.fr/
-%{?with_x:BuildRequires:       xorg-lib-libX11-devel}
-%if %{with emacs}
-BuildRequires: sed >= 4.0
-BuildRequires: emacs
-BuildRequires: emacs-common
-%endif
+Patch0:                %{name}-10266.patch
+Patch1:                %{name}-info.patch
+URL:           https://www.ocaml.org/
 Requires:      %{name}-runtime = %{epoch}:%{version}-%{release}
 Provides:      ocaml-bytes-devel
 Provides:      ocaml-ocamldoc
-Obsoletes:     ocaml-ocamldoc
-Obsoletes:     ocaml-bytes-devel
+Obsoletes:     ocaml-bytes-devel < 1.4
+Obsoletes:     ocaml-doc-ps < 1:4.12
+Obsoletes:     ocaml-emacs < 1:4.12
+Obsoletes:     ocaml-ocamldoc <= pre4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                specflags       -fno-strict-aliasing
 
+%if %{without ocaml_opt}
+%define                _noautoreq      Backend_intf Inlining_decision_intf Simplify_boxed_integer_ops_intf
+%endif
+
 %description
 Objective Caml is a high-level, strongly-typed, functional and
 object-oriented programming language from the ML family of languages.
@@ -66,10 +61,10 @@ OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
 językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
 języków ML.
 
-Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
-oraz optymalizujący kompilator do kodu natywnego), interaktywne
-środowisko pracy, narzędzia do tworzenia analizatorów leksykalnych
-oraz składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
+Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu oraz
+optymalizujący kompilator do kodu natywnego), interaktywne środowisko
+pracy, narzędzia do tworzenia analizatorów leksykalnych oraz
+składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
 biblioteki.
 
 %package runtime
@@ -97,8 +92,8 @@ This sources come helpful during debugging of user programs with
 ocamldebug.
 
 %description lib-source -l pl.UTF-8
-Źródła te są przydatne przy odpluskwianiu programów użytkownika
-użyciem ocamldebug.
+Źródła te są przydatne przy odpluskwianiu programów użytkownika z
+użyciem ocamldebug.
 
 %package doc-html
 Summary:       HTML documentation for OCaml
@@ -111,17 +106,6 @@ HTML documentation for OCaml.
 %description doc-html -l pl.UTF-8
 Dokumentacja dla OCamla w formacie HTML.
 
-%package doc-ps
-Summary:       PostScript documentation for OCaml
-Summary(pl.UTF-8):     Dokumentacja dla OCamla w formacie PostScript
-Group:         Development/Tools
-
-%description doc-ps
-PostScript documentation for OCaml.
-
-%description doc-ps -l pl.UTF-8
-Dokumentacja dla OCamla w formacie PostScript.
-
 %package doc-info
 Summary:       Info documentation for OCaml
 Summary(pl.UTF-8):     Dokumentacja info dla OCamla
@@ -133,57 +117,13 @@ Info documentation for OCaml.
 %description doc-info -l pl.UTF-8
 Dokumentacja info dla OCamla.
 
-%package emacs
-Summary:       Emacs mode for OCaml
-Summary(pl.UTF-8):     Tryb OCamla dla Emacsa
-Group:         Development/Tools
-Requires:      %{name} = %{epoch}:%{version}-%{release}
-
-%description emacs
-Emacs mode files for Objective Caml language.
-
-%description emacs -l pl.UTF-8
-Pliki trybu OCamla dla Emacsa.
-
-%package x11graphics
-Summary:       X11 graphic output for OCaml
-Summary(pl.UTF-8):     Dostęp do X11 dla OCamla
-Group:         Development/Libraries
-Requires:      %{name} = %{epoch}:%{version}-%{release}
-
-%description x11graphics
-x11graphics module gives OCaml program access to drawing in X11
-windows. This package contains files needed to run bytecode OCaml
-programs using x11graphics.
-
-%description x11graphics -l pl.UTF-8
-Moduł x11graphics daje programom napisanym w OCamlu możliwość
-korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
-potrzebne do uruchamiania programów używających x11graphics.
-
-%package x11graphics-devel
-Summary:       X11 graphic output for OCaml
-Summary(pl.UTF-8):     Dostęp do X11 dla OCamla
-Group:         Development/Libraries
-Requires:      %{name}-x11graphics = %{epoch}:%{version}-%{release}
-
-%description x11graphics-devel
-x11graphics module gives OCaml program access to drawing in X11
-windows. This package contains files needed to develop OCaml programs
-using x11graphics.
-
-%description x11graphics-devel -l pl.UTF-8
-Moduł x11graphics daje programom napisanym w OCamlu możliwość
-korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
-niezbędne do tworzenia programów używających x11graphics.
-
 %package compiler-objects
 Summary:       Compiled parts of OCaml compiler
 Summary(pl.UTF-8):     Skompilowane części kompilatora OCamla
 Group:         Development/Languages
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Provides:      ocaml-devel
-Obsoletes:     ocaml-devel
+Obsoletes:     ocaml-devel < 3.06-3
 
 %description compiler-objects
 This package contains *.cmi and *.cmo files being parts of OCaml
@@ -219,84 +159,60 @@ This packages contains sources for Okasaki's Purely Functional
 Datastructures in OCaml, along with some contributions.
 
 %description examples -l pl.UTF-8
-Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
-autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
+Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych autorstwa
+Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
 
 %prep
 %setup -q -a1 -a3
+%patch0 -p1
+gunzip infoman/ocaml.info.gz
+%patch1 -p1
+
 mkdir examples
 tar xzf %{SOURCE4} -C examples
 tar xzf %{SOURCE5} -C examples
 # order mess with docs somewhat
 mkdir -p docs/html
-mv htmlman docs/html/ocaml
-cp %{SOURCE2} docs/ocaml.ps.gz
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+%{__mv} htmlman docs/html/ocaml
 
 %build
-cp -f /usr/share/automake/config.sub config/gnu
-./configure \
-       -host %{_target_platform} \
-       -cc "%{__cc}" \
-       -bindir %{_bindir} \
-       -libdir %{_libdir}/%{name} \
-       -mandir %{_mandir}/man1 \
-       -with-pthread \
-       -x11lib %{_libdir}
-
-%{__make} -j1 world bootstrap %{?with_ocaml_opt:opt.opt} \
-       CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT"
-
-%{__make} -C tools objinfo \
-       CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT" -j1
+%configure \
+       AS=%{__as} \
+       ASPP="%{__cc} -c" \
+       --libdir=%{_libdir}/ocaml \
+       %{!?with_ocaml_opt:--disable-native-compiler}
+
+%{__make} world
+%{__make} bootstrap
+%if %{with ocaml_opt}
+%{__make} opt
+%{__make} opt.opt
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
-install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
 
 %{__make} install \
-       BINDIR=$RPM_BUILD_ROOT%{_bindir} \
-       LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
-       MANDIR=$RPM_BUILD_ROOT%{_mandir}
+       DESTDIR=$RPM_BUILD_ROOT
 
 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
 %{_libdir}/%{name}/stublibs
 %{_libdir}/%{name}
 EOF
 
-%if %{with emacs}
-%{__make} -C emacs install \
-       DESTDIR=$RPM_BUILD_ROOT \
-       EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp" \
-       EMACS="emacs"
-%endif
-
-# symlink .opt versions of compilers (if present)
-for f in ocamlc ocamlopt ocamldoc ocamllex; do
-       if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
-               mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
-                       $RPM_BUILD_ROOT%{_bindir}/$f.byte
-               ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
-       fi
-done
-
 # move includes to the proper place
-mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/caml $RPM_BUILD_ROOT%{_includedir}/caml
 # but leave compatibility symlink
-ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
+ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml
 
 # compiled sources of compiler, needed by some programs
-for f in {asm,byte}comp parsing typing utils ; do
+for f in %{?with_ocaml_opt:asmcomp} bytecomp parsing typing utils ; do
        install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
        cp $f/*.{cmi,cmo} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
        %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f}
 done
 
-# this isn't installed by default, but is useful
-install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
 
@@ -304,7 +220,8 @@ ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
 
 # install info pages
-cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
+cp -p infoman/ocaml.info $RPM_BUILD_ROOT%{_infodir}
+cp -p infoman/ocaml.info.body-*.gz $RPM_BUILD_ROOT%{_infodir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -317,60 +234,94 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc Changes LICENSE README
+%doc Changes LICENSE README.adoc
 %attr(755,root,root) %{_bindir}/addlabels
 %attr(755,root,root) %{_bindir}/ocaml
-%attr(755,root,root) %{_bindir}/ocamlbuild*
 %attr(755,root,root) %{_bindir}/ocamlc
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.*}
+%attr(755,root,root) %{_bindir}/ocamlc.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.opt}
+%attr(755,root,root) %{_bindir}/ocamlcmt
 %attr(755,root,root) %{_bindir}/ocamlcp
+%attr(755,root,root) %{_bindir}/ocamlcp.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.opt}
 %attr(755,root,root) %{_bindir}/ocamldebug
-%attr(755,root,root) %{_bindir}/ocamldep*
-%attr(755,root,root) %{_bindir}/ocamldoc*
-%attr(755,root,root) %{_bindir}/ocamllex*
+%attr(755,root,root) %{_bindir}/ocamldep
+%attr(755,root,root) %{_bindir}/ocamldep.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.opt}
+%attr(755,root,root) %{_bindir}/ocamldoc
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.opt}
+%attr(755,root,root) %{_bindir}/ocamllex
+%attr(755,root,root) %{_bindir}/ocamllex.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.opt}
 %attr(755,root,root) %{_bindir}/ocamlmklib
+%attr(755,root,root) %{_bindir}/ocamlmklib.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.opt}
 %attr(755,root,root) %{_bindir}/ocamlmktop
+%attr(755,root,root) %{_bindir}/ocamlmktop.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.opt}
 %attr(755,root,root) %{_bindir}/ocamlobjinfo
+%attr(755,root,root) %{_bindir}/ocamlobjinfo.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.opt}
 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt}
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.*}
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.byte}
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.opt}
 %attr(755,root,root) %{_bindir}/ocamloptp
+%attr(755,root,root) %{_bindir}/ocamloptp.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.opt}
 %attr(755,root,root) %{_bindir}/ocamlprof
+%attr(755,root,root) %{_bindir}/ocamlprof.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.opt}
 %attr(755,root,root) %{_bindir}/ocamlyacc
 %attr(755,root,root) %{_bindir}/scrapelabels
 %{_includedir}/caml
 %{_libdir}/%{name}/caml
-%{_libdir}/%{name}/compiler-libs
-%{_libdir}/%{name}/threads
-%dir %{_libdir}/%{name}/vmthreads
-%dir %{_libdir}/%{name}/vmthreads/*.cm*
-%dir %{_libdir}/%{name}/vmthreads/*.a
+%dir %{_libdir}/%{name}/compiler-libs
+%{_libdir}/%{name}/compiler-libs/*.cm*
+%{_libdir}/%{name}/compiler-libs/ocaml*.a
+%{?with_ocaml_opt:%{_libdir}/%{name}/compiler-libs/*.o}
+%dir %{_libdir}/%{name}/ocamldoc
+%{_libdir}/%{name}/ocamldoc/*.hva
+%dir %{_libdir}/%{name}/threads
+%{_libdir}/%{name}/threads/*.cm*
+%{_libdir}/%{name}/threads/threads.a
 %{_libdir}/%{name}/*.a
 %{?with_ocaml_opt:%{_libdir}/%{name}/*.o}
 %{_libdir}/%{name}/*.cm*
-%exclude %{_libdir}/%{name}/*graphics*
 %{_libdir}/%{name}/Makefile.config
 %{_libdir}/%{name}/ld.conf
 %{_libdir}/%{name}/camlheader
+%{_libdir}/%{name}/camlheaderd
+%{_libdir}/%{name}/camlheaderi
 %{_libdir}/%{name}/camlheader_ur
-%{_libdir}/%{name}/ocamlbuild
-%dir %{_libdir}/%{name}/ocamldoc
-%{_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}/objinfo_helper
-%{_mandir}/man1/ocaml*
-%exclude %{_mandir}/man1/ocamlrun.1*
+%{_mandir}/man1/ocaml.1*
+%{_mandir}/man1/ocamlc.1*
+%{?with_ocaml_opt:%{_mandir}/man1/ocamlc.opt.1*}
+%{_mandir}/man1/ocamlcp.1*
+%{_mandir}/man1/ocamldebug.1*
+%{_mandir}/man1/ocamldep.1*
+%{_mandir}/man1/ocamldoc.1*
+%{_mandir}/man1/ocamllex.1*
+%{_mandir}/man1/ocamlmktop.1*
+%{?with_ocaml_opt:%{_mandir}/man1/ocamlopt.1*}
+%{?with_ocaml_opt:%{_mandir}/man1/ocamlopt.opt.1*}
+%{_mandir}/man1/ocamloptp.1*
+%{_mandir}/man1/ocamlprof.1*
+%{_mandir}/man1/ocamlyacc.1*
 
 %files runtime
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/ocamlrun
+%attr(755,root,root) %{_bindir}/ocamlrund
+%attr(755,root,root) %{_bindir}/ocamlruni
 %dir %{_libdir}/%{name}
-%{_libdir}/%{name}/VERSION
-%dir %{_libdir}/%{name}/site-lib
-%dir %{_libdir}/%{name}/stublibs
-%attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
-%exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
+%{_libdir}/%{name}/eventlog_metadata
 %{?with_ocaml_opt:%attr(755,root,root) %{_libdir}/%{name}/libasmrun_shared.so}
+%dir %{_libdir}/%{name}/stublibs
+%attr(755,root,root) %{_libdir}/%{name}/stublibs/dllcamlstr.so
+%attr(755,root,root) %{_libdir}/%{name}/stublibs/dllthreads.so
+%attr(755,root,root) %{_libdir}/%{name}/stublibs/dllunix.so
 %attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
 %{_mandir}/man1/ocamlrun.1*
 
@@ -378,42 +329,18 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/%{name}/*.ml
 %{_libdir}/%{name}/*.mli
-%{_libdir}/%{name}/*/*.mli
+%{_libdir}/%{name}/compiler-libs/*.mli
+%{_libdir}/%{name}/ocamldoc/*.mli
+%{_libdir}/%{name}/threads/*.mli
 
 %files doc-html
 %defattr(644,root,root,755)
 %doc docs/html/ocaml/*
 
-%files doc-ps
-%defattr(644,root,root,755)
-%doc docs/*.ps.gz
-
 %files doc-info
 %defattr(644,root,root,755)
 %{_infodir}/ocaml.info*
 
-# they are poor, html is much better
-#%files manpages
-#%%{_mandir}/man3/*
-
-%if %{with emacs}
-%files emacs
-%defattr(644,root,root,755)
-%{_datadir}/emacs/site-lisp/*.el*
-%endif
-
-%if %{with x}
-%files x11graphics
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
-
-%files x11graphics-devel
-%defattr(644,root,root,755)
-%{_libdir}/%{name}/graphics*.cm*
-%{?with_ocaml_opt:%{_libdir}/%{name}/graphics.a}
-%{_libdir}/%{name}/libgraphics.a
-%endif
-
 %files compiler-objects
 %defattr(644,root,root,755)
 %{_libdir}/%{name}/compiler
This page took 0.069297 seconds and 4 git commands to generate.