From 49b685990e333275d79e285708aeae1e082721a0 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Jul 21 2015 13:31:17 +0000 Subject: Possibly better way to enable bytecode builds. Don't disable the -data subpackage this time. --- diff --git a/camomile-0.8.5-bytecode.patch b/camomile-0.8.5-bytecode.patch new file mode 100644 index 0000000..8aabe29 --- /dev/null +++ b/camomile-0.8.5-bytecode.patch @@ -0,0 +1,11 @@ +--- camomile-0.8.5/Makefile.in.orig 2015-07-21 14:28:26.837692955 +0100 ++++ camomile-0.8.5/Makefile.in 2015-07-21 14:28:47.560716204 +0100 +@@ -70,7 +70,7 @@ + # Generic targets + ################# + +-all : byte $(OCAMLBEST) opt unidata unimaps charmap_data locale_data ++all : byte $(OCAMLBEST) unidata unimaps charmap_data locale_data + + # Build the library + ################### diff --git a/ocaml-camomile.spec b/ocaml-camomile.spec index 83bc018..bdb1a92 100644 --- a/ocaml-camomile.spec +++ b/ocaml-camomile.spec @@ -2,7 +2,7 @@ Name: ocaml-camomile Version: 0.8.5 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Unicode library for OCaml # Several files are MIT and UCD licensed, but the overall work is LGPLv2+ @@ -15,6 +15,9 @@ Source0: http://downloads.sourceforge.net/camomile/camomile-%{version}.ta # Use ocamlopt -g option to enable debuginfo. Patch1: camomile-0.8.3-enable-debug.patch +# Don't compile native code when ocamlopt not detected. +Patch2: camomile-0.8.5-bytecode.patch + BuildRequires: ocaml >= 3.12.1-12 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc @@ -38,7 +41,6 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. -%if %opt %package data Summary: Data files for %{name} Requires: %{name} = %{version}-%{release} @@ -47,24 +49,20 @@ Requires: %{name} = %{version}-%{release} %description data The %{name}-data package contains data files for developing applications that use %{name}. -%endif %prep %setup -q -n camomile-%{version} %patch1 -p1 +%patch2 -p1 %build # Parallel builds don't work. unset MAKEFLAGS ./configure --prefix=%{_prefix} --datadir=%{_datadir} --libdir=%{_libdir} -%if %opt make -%else -make byte -%endif make dochtml make man @@ -108,18 +106,15 @@ cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %{_libdir}/ocaml/camomile/*.mli -%if %opt %files data %defattr(-,root,root,-) %doc README %{_datadir}/camomile/ -%endif %changelog -* Tue Jul 21 2015 Richard W.M. Jones - 0.8.5-11 +* Tue Jul 21 2015 Richard W.M. Jones - 0.8.5-12 - Enable bytecode builds. -- Disable the ocaml-camomile-data package on bytecode builds. * Tue Jun 23 2015 Richard W.M. Jones - 0.8.5-10 - Bump release and rebuild.