|
@@ -1,125 +1,190 @@
|
|
|
Name: ocaml
|
|
|
-Summary: The Objective Caml compiler and programming environment
|
|
|
-Summary(ja): Objective Caml コンパイラとプログラミング環境
|
|
|
-Version: 3.12.1
|
|
|
+Summary: OCaml compiler and programming environment
|
|
|
+Summary(ja): OCaml コンパイラとプログラミング環境
|
|
|
+Version: 4.02.1
|
|
|
Release: 1%{?_dist_release}
|
|
|
-Source0: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-%{version}.tar.bz2
|
|
|
-Source1: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.12-refman.html.tar.gz
|
|
|
-Source2: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.12-refman.ps.gz
|
|
|
-Source3: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.12-refman.info.tar.gz
|
|
|
-Source4: ocaml-info-entry
|
|
|
+Source0: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-%{version}.tar.xz
|
|
|
+Source1: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman-html.tar.gz
|
|
|
+Source2: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman.pdf
|
|
|
+Source3: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman.info.tar.gz
|
|
|
+Source4: ocamlbyteinfo.ml
|
|
|
|
|
|
# Vine Source(s)
|
|
|
Source10: caml-mode-install.sh
|
|
|
Source11: caml-mode-remove.sh
|
|
|
|
|
|
-License: QPL/LGPL
|
|
|
+License: QPL and (LGPLv2+ with exceptions)
|
|
|
Group: Development/Languages
|
|
|
URL: http://caml.inria.fr/
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
-BuildRequires: ncurses-devel gdbm-devel emacsen
|
|
|
-BuildRequires: libX11-devel
|
|
|
-BuildRequires: tk tcl expect thread
|
|
|
-Provides: ocaml(runtime) = %{version}
|
|
|
-Requires(post): install-info
|
|
|
-Requires(preun): install-info
|
|
|
+# Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
|
|
|
+BuildRequires: binutils-devel
|
|
|
+BuildRequires: ncurses-devel
|
|
|
+BuildRequires: gdbm-devel
|
|
|
+BuildRequires: emacs
|
|
|
+BuildRequires: gawk
|
|
|
+BuildRequires: perl
|
|
|
+BuildRequires: util-linux
|
|
|
+BuildRequires: libICE-devel
|
|
|
+BuildRequires: libSM-devel
|
|
|
+BuildRequires: libX11-devel
|
|
|
+BuildRequires: libXaw-devel
|
|
|
+BuildRequires: libXext-devel
|
|
|
+BuildRequires: libXft-devel
|
|
|
+BuildRequires: libXmu-devel
|
|
|
+BuildRequires: libXrender-devel
|
|
|
+BuildRequires: libXt-devel
|
|
|
+BuildRequires: mesa-libGL-devel
|
|
|
+BuildRequires: mesa-libGLU-devel
|
|
|
+BuildRequires: chrpath
|
|
|
+
|
|
|
+Requires: gcc
|
|
|
+Requires: rpm-build >= 4.8.0
|
|
|
+Requires: util-linux
|
|
|
+
|
|
|
+Provides: ocaml(runtime) = %{version}
|
|
|
+Provides: ocaml(compiler) = %{version}
|
|
|
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
-
|
|
|
Packager: inagaki, kenta
|
|
|
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
-%global __ocaml_requires_opts -c -f %{buildroot}%{_bindir}/ocamlobjinfo
|
|
|
-%global __ocaml_provides_opts -f %{buildroot}%{_bindir}/ocamlobjinfo
|
|
|
+%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo'
|
|
|
+%global __ocaml_provides_opts -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo'
|
|
|
|
|
|
%description
|
|
|
-Objective Caml is a high-level, strongly-typed, functional and
|
|
|
-object-oriented programming language from the ML family of languages.
|
|
|
+OCaml is a high-level, strongly-typed, functional and object-oriented
|
|
|
+programming language from the ML family of languages.
|
|
|
|
|
|
This package comprises two batch compilers (a fast bytecode compiler
|
|
|
and an optimizing native-code compiler), an interactive toplevel system,
|
|
|
-parsing tools (Lex,Yacc,Camlp4), a replay debugger, a documentation generator,
|
|
|
+parsing tools (Lex,Yacc), a replay debugger, a documentation generator,
|
|
|
and a comprehensive library.
|
|
|
|
|
|
%description -l ja
|
|
|
-Object Caml は ML 系言語の方言で、高水準で強い型付けを備えた関数型と
|
|
|
+OCaml は ML 系言語の方言で、高水準で強い型付けを備えた関数型と
|
|
|
オブジェクト指向を併せ持ったプログラミング言語です。
|
|
|
このパッケージには、2 つのバッチコンパイラ (コンパイル速度が高速な
|
|
|
バイトコードコンパイラと最適化を行なうネイティブコードコンパイラ)、
|
|
|
-トップレベル対話環境、構文解析ツール (Lex, Yac, Camlp4)、リプレイ
|
|
|
-デバッガ、ドキュメント生成ツール、そして広範囲に渡るライブラリが含まれて
|
|
|
-います。
|
|
|
-
|
|
|
-%package labltk
|
|
|
-Summary: Tk bindings for Objective Caml
|
|
|
-Summary(ja): Objective Caml の Tk バインディング
|
|
|
-Group: Development/Languages
|
|
|
+トップレベル対話環境、構文解析ツール (Lex, Yacc)、リプレイデバッガ、
|
|
|
+ドキュメント生成ツール、そして広範囲に渡るライブラリが含まれています。
|
|
|
+
|
|
|
+#%package labltk
|
|
|
+#Summary: Tk bindings for Objective Caml
|
|
|
+#Summary(ja): Objective Caml の Tk バインディング
|
|
|
+#Group: Development/Languages
|
|
|
+#Requires: ocaml = %{version}-%{release}
|
|
|
+#Requires: tk tcl
|
|
|
+#Obsoletes: labltk <= %{version}
|
|
|
+#
|
|
|
+#%description labltk
|
|
|
+#A library for interfacing Objective Caml with the scripting language
|
|
|
+#Tcl/Tk. It include the OCamlBrowser code editor / library browser.
|
|
|
+#
|
|
|
+#%package camlp4
|
|
|
+#Summary: Pre-Processor-Pretty-Printer for OCaml
|
|
|
+#Group: Development/Languages
|
|
|
+#Requires: ocaml = %{version}-%{release}
|
|
|
+#Obsoletes: camlp4 <= %{version}
|
|
|
+#
|
|
|
+#%description camlp4
|
|
|
+#Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
|
|
|
+#file and printing some result on standard output.
|
|
|
+
|
|
|
+%package docs
|
|
|
+Summary: Documentation for OCaml
|
|
|
+Summary(ja): OCaml のドキュメント
|
|
|
+Group: Documentation
|
|
|
Requires: ocaml = %{version}-%{release}
|
|
|
-Requires: tk tcl
|
|
|
-Obsoletes: labltk <= %{version}
|
|
|
+Requires(post): /sbin/install-info
|
|
|
+Requires(preun): /sbin/install-info
|
|
|
|
|
|
-%description labltk
|
|
|
-A library for interfacing Objective Caml with the scripting language
|
|
|
-Tcl/Tk. It include the OCamlBrowser code editor / library browser.
|
|
|
+%description docs
|
|
|
+OCaml is a high-level, strongly-typed, functional and object-oriented
|
|
|
+programming language from the ML family of languages.
|
|
|
|
|
|
-%package camlp4
|
|
|
-Summary: Pre-Processor-Pretty-Printer for OCaml
|
|
|
-Group: Development/Languages
|
|
|
-Requires: ocaml = %{version}-%{release}
|
|
|
-Obsoletes: camlp4 <= %{version}
|
|
|
+This package contains documentation in PDF and HTML format as well as
|
|
|
+man pages and info files.
|
|
|
+
|
|
|
+
|
|
|
+%package source
|
|
|
+Summary: Source code for OCaml libraries
|
|
|
+Summary(ja): OCaml ライブラリのソースコード
|
|
|
+Group: Development/Libraries
|
|
|
+Requires: ocaml = %{version}-%{release}
|
|
|
+
|
|
|
+%description source
|
|
|
+Source code for OCaml libraries.
|
|
|
|
|
|
-%description camlp4
|
|
|
-Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
|
|
|
-file and printing some result on standard output.
|
|
|
|
|
|
%package mode
|
|
|
-Summary: Emacs mode for Objective Caml
|
|
|
-Summary(ja): Objective Caml の Emacs mode
|
|
|
-Group: Applications/Editors/Emacs
|
|
|
-Requires: ocaml = %{version}-%{release}
|
|
|
-Requires(post): emacs, emacsen-common
|
|
|
-Requires(preun): emacs, emacsen-common
|
|
|
-Obsoletes: ocaml-emacs <= %{version}
|
|
|
+Summary: Emacs mode for OCaml
|
|
|
+Summary(ja): OCaml 用 Emacs mode
|
|
|
+Group: Applications/Editors/Emacs
|
|
|
+Requires: ocaml = %{version}-%{release}
|
|
|
+Requires: emacsen-common
|
|
|
+Requires: emacs
|
|
|
+Obsoletes: ocaml-emacs <= %{version}
|
|
|
|
|
|
%description mode
|
|
|
-Emacs mode for Objective Caml.
|
|
|
+Emacs mode for OCaml.
|
|
|
|
|
|
%description -l ja mode
|
|
|
-Objective Caml 用の Emacs mode です.
|
|
|
+OCaml 用の Emacs mode です.
|
|
|
|
|
|
|
|
|
%prep
|
|
|
-%setup -q -T -b 0
|
|
|
-%setup -q -T -D -a 1
|
|
|
-%setup -q -T -D -a 3
|
|
|
-cp %{SOURCE2} refman.ps.gz
|
|
|
-cp %{SOURCE4} infoman/ocaml-info-entry
|
|
|
+%setup -q -T -b 0 -n %{name}-%{version}
|
|
|
+%setup -q -T -D -a 1 -n %{name}-%{version}
|
|
|
+%setup -q -T -D -a 3 -n %{name}-%{version}
|
|
|
+cp %{SOURCE2} refman.pdf
|
|
|
|
|
|
%build
|
|
|
-./configure -cc "%{__cc} %{optflags}" -with-pthread \
|
|
|
+# make -jN (N > 1) breaks the build. Therefore we cannot use
|
|
|
+# %{?_smp_mflags} nor MAKEFLAGS.
|
|
|
+unset MAKEFLAGS
|
|
|
+
|
|
|
+CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
|
|
|
+./configure \
|
|
|
-bindir %{_bindir} \
|
|
|
-libdir %{_libdir}/ocaml \
|
|
|
- -mandir %{_mandir} \
|
|
|
- -prefix %{_prefix}
|
|
|
+ -x11lib %{_libdir} \
|
|
|
+ -x11include %{_includedir} \
|
|
|
+ -mandir %{_mandir}/man1 \
|
|
|
+ -no-curses
|
|
|
make world opt opt.opt
|
|
|
-(cd infoman; gzip -cd ocaml.info.gz >> ocaml-info-entry; mv ocaml-info-entry ocaml.info; gzip -f ocaml.info)
|
|
|
+make -C emacs ocamltags
|
|
|
+#(cd infoman; gzip -cd ocaml.info.gz >> ocaml-info-entry; mv ocaml-info-entry ocaml.info; gzip -f ocaml.info)
|
|
|
# for dumpobj, objinfo
|
|
|
-(cd tools; make dumpobj; make objinfo; cd ..)
|
|
|
+#(cd tools; make dumpobj; make objinfo; cd ..)
|
|
|
+
|
|
|
+# Currently these tools are supplied by Debian, but are expected
|
|
|
+# to go upstream at some point.
|
|
|
+includes="-nostdlib -I stdlib -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I otherlibs/unix -I otherlibs/str -I otherlibs/dynlink"
|
|
|
+boot/ocamlrun ./ocamlc $includes dynlinkaux.cmo %{SOURCE4} -o ocamlbyteinfo
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
-make install BINDIR=$RPM_BUILD_ROOT%{_bindir} LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml MANDIR=$RPM_BUILD_ROOT%{_mandir}
|
|
|
-
|
|
|
-mv $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf.orig
|
|
|
-sed -e "s|^%{buildroot}||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf.orig > $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
|
|
|
-rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf.orig
|
|
|
-(mkdir -p $RPM_BUILD_ROOT%{_infodir}; cd infoman; cp ocaml*.gz $RPM_BUILD_ROOT%{_infodir})
|
|
|
-# for dumpobj, objinfo
|
|
|
-(cd tools; install dumpobj objinfo $RPM_BUILD_ROOT%{_bindir})
|
|
|
+make install \
|
|
|
+ BINDIR=$RPM_BUILD_ROOT%{_bindir} \
|
|
|
+ LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
|
|
|
+ MANDIR=$RPM_BUILD_ROOT%{_mandir}
|
|
|
+perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
|
|
|
+
|
|
|
+(
|
|
|
+ # install info files
|
|
|
+ mkdir -p $RPM_BUILD_ROOT%{_infodir};
|
|
|
+ cd infoman; cp ocaml*.gz $RPM_BUILD_ROOT%{_infodir}
|
|
|
+)
|
|
|
+(
|
|
|
+ # for dumpobj, objinfo
|
|
|
+ cd tools;
|
|
|
+ install dumpobj objinfo $RPM_BUILD_ROOT%{_bindir}
|
|
|
+)
|
|
|
|
|
|
# for Emacs Lisp
|
|
|
make -C emacs install install-ocamltags BINDIR=$RPM_BUILD_ROOT%{_bindir} \
|
|
@@ -132,6 +197,12 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/emacsen-common/packages/remove
|
|
|
|
|
|
%_removeemacsenscript caml-mode %{SOURCE11}
|
|
|
|
|
|
+# Remove rpaths from stublibs .so files.
|
|
|
+chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so
|
|
|
+
|
|
|
+install -m 0755 ocamlbyteinfo $RPM_BUILD_ROOT%{_bindir}
|
|
|
+
|
|
|
+find $RPM_BUILD_ROOT -name .ignore -delete
|
|
|
|
|
|
# Disable build root strip policy:
|
|
|
# executables generated by ocamlc -custom MUST NOT BE STRIPPED
|
|
@@ -139,11 +210,23 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/emacsen-common/packages/remove
|
|
|
# in the distribution is generated by ocamlc -custom, so leave default.
|
|
|
# %define __spec_install_post /usr/lib/rpm/brp-compress
|
|
|
|
|
|
+
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
-%post
|
|
|
-/sbin/install-info %{_infodir}/ocaml.info %{_infodir}/dir
|
|
|
+
|
|
|
+%post docs
|
|
|
+/sbin/install-info \
|
|
|
+ --entry="* ocaml: (ocaml). The OCaml compiler and programming environment" \
|
|
|
+ --section="Programming Languages" \
|
|
|
+ %{_infodir}/%{name}.info \
|
|
|
+ %{_infodir}/dir 2>/dev/null || :
|
|
|
+
|
|
|
+
|
|
|
+%preun docs
|
|
|
+if [ $1 -eq 0 ]; then
|
|
|
+ /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
|
|
|
+fi
|
|
|
|
|
|
%post mode
|
|
|
if [ "$1" = 2 ]; then
|
|
@@ -155,10 +238,6 @@ fi
|
|
|
|
|
|
%_emacsenPackageInstall caml-mode
|
|
|
|
|
|
-%preun
|
|
|
-if [ $1 = 0 ]; then
|
|
|
- /sbin/install-info --delete %{_infodir}/ocaml.info %{_infodir}/dir
|
|
|
-fi
|
|
|
|
|
|
%preun mode
|
|
|
if [ "$1" = 0 ]; then
|
|
@@ -171,40 +250,49 @@ fi
|
|
|
|
|
|
%files
|
|
|
%defattr(-, root, root)
|
|
|
-%doc README LICENSE refman.ps.gz htmlman
|
|
|
+%doc README LICENSE
|
|
|
%{_bindir}/*
|
|
|
-%{_mandir}/man1/*
|
|
|
-%{_mandir}/man3/*
|
|
|
%{_libdir}/ocaml
|
|
|
-%{_infodir}/*
|
|
|
### in ocaml-camlp4
|
|
|
-%exclude %{_bindir}/camlp4*
|
|
|
-%exclude %{_bindir}/mkcamlp4
|
|
|
-%exclude %{_libdir}/ocaml/camlp4/
|
|
|
+#%exclude %{_bindir}/camlp4*
|
|
|
+#%exclude %{_bindir}/mkcamlp4
|
|
|
+#%exclude %{_libdir}/ocaml/camlp4/
|
|
|
### in ocaml-labltk
|
|
|
-%exclude %{_bindir}/labltk
|
|
|
-%exclude %{_bindir}/ocamlbrowser
|
|
|
-%exclude %{_libdir}/ocaml/labltk/
|
|
|
-%exclude %{_libdir}/ocaml/stublibs/dlllabltk.so
|
|
|
+#%exclude %{_bindir}/labltk
|
|
|
+#%exclude %{_bindir}/ocamlbrowser
|
|
|
+#%exclude %{_libdir}/ocaml/labltk/
|
|
|
+#%exclude %{_libdir}/ocaml/stublibs/dlllabltk.so
|
|
|
### in ocaml-mode
|
|
|
%exclude %{_bindir}/ocamltags
|
|
|
+### in ocaml-source
|
|
|
+%exclude %{_libdir}/ocaml/*.ml
|
|
|
+
|
|
|
+#%files camlp4
|
|
|
+#%defattr(-, root, root, 0755)
|
|
|
+#%{_bindir}/camlp4*
|
|
|
+#%{_bindir}/mkcamlp4
|
|
|
+#%dir %{_libdir}/ocaml/
|
|
|
+#%{_libdir}/ocaml/camlp4/
|
|
|
+
|
|
|
+#%files labltk
|
|
|
+#%defattr(-, root, root, 0755)
|
|
|
+#%doc otherlibs/labltk/examples_*tk
|
|
|
+#%{_bindir}/labltk
|
|
|
+#%{_bindir}/ocamlbrowser
|
|
|
+#%dir %{_libdir}/ocaml/
|
|
|
+#%dir %{_libdir}/ocaml/stublibs/
|
|
|
+#%{_libdir}/ocaml/labltk/
|
|
|
+#%{_libdir}/ocaml/stublibs/dlllabltk.so
|
|
|
+
|
|
|
+%files docs
|
|
|
+%doc refman.pdf htmlman
|
|
|
+%{_infodir}/*
|
|
|
+%{_mandir}/man1/*
|
|
|
+%{_mandir}/man3/*
|
|
|
|
|
|
-%files camlp4
|
|
|
-%defattr(-, root, root, 0755)
|
|
|
-%{_bindir}/camlp4*
|
|
|
-%{_bindir}/mkcamlp4
|
|
|
-%dir %{_libdir}/ocaml/
|
|
|
-%{_libdir}/ocaml/camlp4/
|
|
|
-
|
|
|
-%files labltk
|
|
|
-%defattr(-, root, root, 0755)
|
|
|
-%doc otherlibs/labltk/examples_*tk
|
|
|
-%{_bindir}/labltk
|
|
|
-%{_bindir}/ocamlbrowser
|
|
|
-%dir %{_libdir}/ocaml/
|
|
|
-%dir %{_libdir}/ocaml/stublibs/
|
|
|
-%{_libdir}/ocaml/labltk/
|
|
|
-%{_libdir}/ocaml/stublibs/dlllabltk.so
|
|
|
+%files source
|
|
|
+%doc LICENSE
|
|
|
+%{_libdir}/ocaml/*.ml
|
|
|
|
|
|
%files mode
|
|
|
%defattr(-, root, root, 0755)
|
|
@@ -213,12 +301,22 @@ fi
|
|
|
%dir %{_datadir}/emacs/
|
|
|
%dir %{_datadir}/emacs/site-lisp/caml-mode
|
|
|
%{_datadir}/emacs/site-lisp/caml-mode/*.el
|
|
|
-#{_datadir}/emacs/site-lisp/caml-mode/*.elc
|
|
|
+%{_datadir}/emacs/site-lisp/caml-mode/*.elc
|
|
|
%{_prefix}/lib/emacsen-common/packages/install/caml-mode
|
|
|
%{_prefix}/lib/emacsen-common/packages/remove/caml-mode
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Sun Jan 25 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.02.1-1
|
|
|
+- new upstream relase
|
|
|
+- spilt documents to docs subpackage
|
|
|
+- spilt *.ml to source subpackage
|
|
|
+- added SOURCE4
|
|
|
+
|
|
|
+* Tue May 15 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.12.1-2
|
|
|
+- fixed SOURCEs URL typo
|
|
|
+- updated SOURCE1
|
|
|
+
|
|
|
* Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> 3.12.1-1
|
|
|
- new upstream version 3.12.1
|
|
|
- rebuild with rpm-4.9.1.2
|