From: Jakub Bogusz Date: Mon, 20 Jul 2015 19:36:30 +0000 (+0200) Subject: - added ocaml_opt bcond X-Git-Tag: auto/th/camlp5-6.12-2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcamlp5.git;a=commitdiff_plain;h=bfe7d50f23963f8fe4d25835c009a55fcc4a8f24;hp=1aebc93e53aadbb376b4051de86ea83f3189e531;ds=sidebyside - added ocaml_opt bcond --- diff --git a/camlp5.spec b/camlp5.spec index 7692f16..dfea02b 100644 --- a/camlp5.spec +++ b/camlp5.spec @@ -1,3 +1,12 @@ +# +# Conditional build: +%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) + +# not yet available on x32 (ocaml 4.02.1), update when upstream will support it +%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 +%undefine with_ocaml_opt +%endif + Summary: Objective Caml Preprocessor Summary(pl.UTF-8): Preprocesor OCamla Name: camlp5 @@ -64,9 +73,6 @@ Preprocesor OCamla - dokumentacja HTML. cp %{SOURCE1} doc/camlp4.pdf -#cp ocaml_src/lib/versdep/4.02.{1,2}.ml -#cp -a ocaml_stuff/4.02.{1,2} - %build ./configure \ -bindir %{_bindir} \ @@ -74,7 +80,7 @@ cp %{SOURCE1} doc/camlp4.pdf -mandir %{_mandir}/man1 \ -transitional -%{__make} -j1 world.opt +%{__make} -j1 world%{?with_ocaml_opt:.opt} %{__make} -j1 -C doc/htmlp %install @@ -86,9 +92,9 @@ rm -rf $RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT%{_mandir} # broken build system -for f in camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.1 ocpp5.1 \ - camlp5o.1 camlp5r.1 camlp5sch.1 mkcamlp5.opt.1 ; do - rm -f $RPM_BUILD_ROOT%{_mandir}/man1/$f +for f in mkcamlp5.1 ocpp5.1 camlp5o.1 camlp5r.1 camlp5sch.1 \ + %{?with_ocaml_opt:camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.opt.1} ; do + %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/$f echo '.so camlp5.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f done