[packages/camlp5] - added ocaml_opt bcond

qboosh qboosh at pld-linux.org
Mon Jul 20 21:35:10 CEST 2015


commit bfe7d50f23963f8fe4d25835c009a55fcc4a8f24
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jul 20 21:36:30 2015 +0200

    - added ocaml_opt bcond

 camlp5.spec | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
---
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
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/camlp5.git/commitdiff/bfe7d50f23963f8fe4d25835c009a55fcc4a8f24



More information about the pld-cvs-commit mailing list