Репозиторий Sisyphus
Последнее обновление: 21 апреля 2019 | Пакетов: 17649 | Посещений: 13447941
en ru br
Репозитории ALT
S:4.07.1-alt3
5.1: 3.10.2-alt3.1
4.1: 3.10.2-alt3
4.0: 3.09.3-alt0.1
3.0: 3.08.1-alt1
www.altlinux.org/Changes

Группа :: Разработка/ML
Пакет: ocaml

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 


%add_findprov_lib_path /usr/lib/ocaml
%add_findprov_lib_path /usr/lib/ocaml/stublibs/
%add_findprov_lib_path /usr/lib/ocaml/labltk/
%add_findprov_lib_path /usr/lib/ocaml/threads/

Name: ocaml
Version: 3.08.1
Release: alt1

Summary: The Objective Caml compiler and programming environment

License: QPL & LGPL
Group: Development/ML
Packager: Vitaly Lugovsky <vsl at altlinux.ru>
Obsoletes: ocaml-emacs
AutoReq: yes, noshell
%set_verify_elf_method textrel=relaxed,rpath=relaxed

Url: http://caml.inria.fr/

Source0: ocaml-3.08.1.tar.bz2
Source1: ocaml-3.08-refman.html.tar.gz
Source2: ocaml-3.08-refman.pdf
Source4: %name.menu
Source5: http://caml.inria.fr/oreilly-book/ocaml-ora-book.pdf
Source7: ocamldoc.sty

# Malc's pathches from http://algol.prosalg.no/~malc/scaml/

#Patch2: ocaml-3.07+14-shared.patch.bz2
# Small and dirty patches.
Patch6: ocaml-3.04+7-private.patch
Patch7: ocaml-3.04+9-filename.patch
Patch8: ocaml-3.04+7-threadhack.patch
#Patch9: ocaml-3.04+10-odochack.patch
Patch11: ocaml-3.04+10-stdlibdoc.patch

Patch100: ocaml-3.07+14-man3o.patch

# Automatically added by buildreq on Tue Feb 25 2003

# Manually corrected (3.06s-alt3)
BuildRequires: XFree86-devel XFree86-libs latex2html libdb1-devel
BuildRequires: libgdbm-devel libncurses-devel libtcl libtk tcl-devel
BuildRequires: tetex-dvips tetex-latex tk-devel >= 8.4.0-alt1
# Needed for the shared libraries patch
BuildRequires: binutils

Requires: ocaml-runtime = %version-%release

%package doc
Summary: Documentation for OCaml
Group: Development/ML
Requires: %name = %version-%release

%package -n camlp4
Summary: Preprocessor for OCaml
Group: Development/ML
Requires: %name = %version-%release

%package -n labltk
Summary: Tk toolkit binding for OCaml
Group: Development/ML
Requires: %name = %version-%release, ocaml-graphics = %version-%release
Obsoletes: ocamltk, camltk
Provides: ocamltk = %version

%package -n ocaml-runtime
Summary: Runtime part of the OCaml system
Group: Development/ML
Provides: %_libdir/%name/stdlib.so

%package -n ocaml-graphics
Summary: Graphics module
Requires: ocaml-runtime = %version-%release
Group: Development/ML

%description
Objective Caml 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, Lex&Yacc
tools, a replay debugger, and a comprehensive library.

%description -l ru_RU.KOI8-R
Objective Caml - строго типизированный, объектно-ориентированный
функциональный язык из семейства языков ML.

В пакете ocaml представлено два компилятора - быстрый компилятор в байткоды
и оптимизирующий целевой (x86) компилятор; интерактивный интерпретатор,
аналоги утилит lex и yacc, отладчик с возможностью отката и мощная
стандартная библиотека.

%description doc -l ru_RU.KOI8-R
Документация к Objective Caml и предварительный вариант английского перевода
книги "Developing Applications with Objective Caml".

%description doc
Documentation for OCaml and O'Relly book translation

%description -n camlp4 -l ru_RU.KOI8-R
Препроцессор для Objective Caml (включает синтаксис Standard ML, Lisp-like,
Revised OCaml, ...).

%description -n camlp4
Preprocessor for OCaml

%description -n labltk
Tk toolkit binding for OCaml

%description -n ocaml-runtime
Runtime part for the both bytecode and some native compiled
binaries.

%description -n ocaml-graphics
Graphics and LablTk runtime.

%prep
%setup -q -T -b 0
%setup -q -T -D -a 1

#%patch1 -p1

#%patch2 -p1

%patch100 -p1


# %patch6 -p1

%patch7 -p1
%patch8 -p1
#%patch9 -p1
%patch11 -p1

# grrr ...

#%__cat <<EOF |ed - emacs/Makefile
#%s|\(--batch \)|\1--no-site-file |
#wq
#EOF

cp %SOURCE2 %SOURCE5 ./

## replace a bootstrap compiler

#(cd boot; bzcat %SOURCE6 | tar -xvvf -)

%build
%add_optflags -DUSE_NON_CONST
./configure -with-pthread -bindir %_bindir -libdir %_libdir/ocaml -mandir %_mandir
make BYTECCCOMPOPTS="%optflags" NATIVECCCOMPOPTS="%optflags" world
make BYTECCCOMPOPTS="%optflags" NATIVECCCOMPOPTS="%optflags" ocamlopt

## A dirty hack related to the unresolved problem in the 3.07+6 build

## process (missed dependencies).
(cd stdlib; make std_exit.cmx)
(cd stdlib; make stdlib.cmxa)
#####


make BYTECCCOMPOPTS="%optflags" NATIVECCCOMPOPTS="%optflags" opt opt.opt
cp %SOURCE7 ./ocamldoc/
(cd ocamldoc; make stdlib_man stdlib.ps)
mv ocamldoc/stdlib.ps ./
mv ocamldoc/stdlib.pdf ./

%install
make install BINDIR=%buildroot%_bindir LIBDIR=%buildroot%_libdir/ocaml MANDIR=%buildroot%_mandir
mkdir -p %buildroot%_libdir/ocaml/site-lib/

# (cd emacs; make install install-ocamltags BINDIR=%buildroot%_bindir EMACSDIR=%buildroot%_datadir/emacs/site-lisp)


perl -pi -e "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%_libdir/ocaml/ld.conf

## only keep the binary versions (which are much faster, and have no drawbacks (?))

#for i in $RPM_BUILD_ROOT%_bindir/*.opt ; do
#  nonopt=`echo $i | sed "s/.opt$//"`
#  rm -f $nonopt
#  ln -s `basename $i` $nonopt
#done


rm -f $RPM_BUILD_ROOT%_bindir/ocamlc
rm -f $RPM_BUILD_ROOT%_bindir/ocamlopt
ln -s ocamlc.opt $RPM_BUILD_ROOT%_bindir/ocamlc
ln -s ocamlopt.opt $RPM_BUILD_ROOT%_bindir/ocamlopt

#install -d $RPM_BUILD_ROOT%_sysconfdir/emacs/site-start.d

#cat <<EOF >$RPM_BUILD_ROOT%_sysconfdir/emacs/site-start.d/%name.el
#(require 'caml-font)
#(autoload 'caml-mode "caml" "Caml editing mode" t)
#(add-to-list 'auto-mode-alist '("\\\\.mli?$" . caml-mode))
#EOF

# menu (kept in case we want to use it again one day)

install -d $RPM_BUILD_ROOT%_menudir
install -m 644 %SOURCE4 $RPM_BUILD_ROOT%_menudir/%name


#(cd $RPM_BUILD_ROOT/usr/lib/ocaml/;

# export OOPT=$RPM_BUILD_DIR/ocaml-%version/ocamlopt.opt;
# export OOCMD=" -ccopt -L. -ccopt -Wl,-rpath=/usr/lib/ocaml/:. -ccopt -Wl,-rpath-link=/usr/lib/ocaml/:. -shared -nolinkstd ";
# $OOPT $OOCMD -o stdlib.so stdlib.cmxa -linkall;
# $OOPT $OOCMD -o unix.so stdlib.so.cmxa unix.cmxa -linkall;
# $OOPT $OOCMD -o bigarray.so stdlib.so.cmxa bigarray.cmxa -linkall;
# $OOPT $OOCMD -o nums.so stdlib.so.cmxa nums.cmxa -linkall;
# $OOPT $OOCMD -o str.so stdlib.so.cmxa str.cmxa -linkall;
# $OOPT $OOCMD -o graphics.so stdlib.so.cmxa graphics.cmxa -linkall;
# $OOPT $OOCMD -o dbm.so stdlib.so.cmxa dbm.cmxa -linkall;
# $OOPT $OOCMD -o threads/threads.so stdlib.so.cmxa threads/threads.cmxa -linkall;
# $OOPT $OOCMD -ccopt -L./labltk/ -o labltk/labltk.so stdlib.so.cmxa labltk/labltk.cmxa -linkall;
# $OOPT $OOCMD -ccopt -L./labltk/ -o labltk/jpflib.so stdlib.so.cmxa labltk/jpflib.cmxa -linkall;
# $OOPT $OOCMD -ccopt -L./labltk/ -o labltk/frxlib.so stdlib.so.cmxa labltk/frxlib.cmxa -linkall;
# $OOPT $OOCMD -ccopt -L./labltk/ -o labltk/tkanim.so stdlib.so.cmxa labltk/tkanim.cmxa -linkall
#)

export EXCLUDE_FROM_STRIP="ocamlc ocamlopt camlp4o camlp4r"

rm -f %name.list
n="labltk|camlp4|ocamlbrowser|stublibs|ocamlrun|ld.conf"
(cd $RPM_BUILD_ROOT ; find usr/bin ! -type d -printf "/%%p\n" | egrep -v $n) >> %name.list
(cd $RPM_BUILD_ROOT ; find usr/lib/ocaml ! -type d ! -name '*.so' -printf "/%%p\n" | egrep -v $n | egrep -v "graphics") >> %name.list
#(cd $RPM_BUILD_ROOT ; find usr/lib/ocaml   -type d -printf "%%%%dir /%%p\n" | egrep -v $n) >> %name.list
(cd $RPM_BUILD_ROOT ; find usr/lib/ocaml -name '*.so' -printf "/%%p\n" | egrep -v "labltk|camlp4|tkanim|jpflib|frxlib|graphics") > run.list
(cd $RPM_BUILD_ROOT ; find usr/lib/ocaml/labltk/ ! -name '*.so' -printf "/%%p\n") > labltk.list
(cd $RPM_BUILD_ROOT ; find usr/lib/ocaml -name '*.so' -printf "/%%p\n" | egrep "labltk|camlp4|tkanim|jpflib|frxlib|graphics") > rungrph.list

%files -f %name.list
%doc Changes LICENSE README
%_libdir/menu/ocaml
%_mandir/man1/ocaml*
%_mandir/man1/ocpp*
%_mandir/man3o/*
# %_datadir/emacs/site-lisp/*
# %config(noreplace) %_sysconfdir/emacs/site-start.d/*


%files doc
%doc htmlman/* stdlib.ps stdlib.pdf ocaml-3.08-refman.pdf ocaml-ora-book.pdf

%files -n ocaml-runtime -f run.list
%_bindir/ocamlrun
%dir %_libdir/ocaml
%dir %_libdir/ocaml/stublibs
%dir %_libdir/ocaml/site-lib
%_libdir/ocaml/ld.conf

%files -n ocaml-graphics -f rungrph.list
%_libdir/ocaml/stublibs/dllgraphics.so
%_libdir/ocaml/stublibs/dlllabltk.so
%_libdir/ocaml/stublibs/dlltkanim.so
%_libdir/ocaml/graphics*
%_libdir/ocaml/libgraphics.a

%files -n labltk -f labltk.list
%doc otherlibs/labltk/README otherlibs/labltk/examples_labltk otherlibs/labltk/examples_camltk
%_bindir/*labltk*
%_bindir/ocamlbrowser

%files -n camlp4
%_mandir/man?/*camlp4*
%_bindir/*camlp4*
%_libdir/ocaml/camlp4

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin