Remove -Werror from compiler flags. Fixes FTBFS (RHBZ#1106613).

- Move configure into build section (instead of prep).
- Use global instead of define.
This commit is contained in:
Richard W.M. Jones 2014-06-18 15:12:22 +01:00
parent ac69898da8
commit 6d78d452e3
2 changed files with 24 additions and 5 deletions

View File

@ -0,0 +1,10 @@
--- bin_prot-2.0.9/myocamlbuild.ml.old 2014-06-18 15:09:21.737703940 +0100
+++ bin_prot-2.0.9/myocamlbuild.ml 2014-06-18 15:09:32.988696920 +0100
@@ -517,7 +517,6 @@
"-pedantic";
"-Wextra";
"-Wunused";
- "-Werror";
"-Wno-long-long";
]
in

View File

@ -1,16 +1,19 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define dlnode 822
%global dlnode 822
Name: ocaml-bin-prot
Version: 2.0.9
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Read and write OCaml values in a type-safe binary protocol
License: LGPLv2+ with exceptions
URL: http://forge.ocamlcore.org/projects/bin-prot
Source0: http://forge.ocamlcore.org/frs/download.php/%{dlnode}/bin_prot-%{version}.tar.gz
# Remove -Werror from flags.
Patch1: ocaml-bin-prot-2.0.9-remove-Werror.patch
BuildRequires: ocaml >= 3.12.0
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
@ -46,6 +49,10 @@ developing applications that use %{name}.
%prep
%setup -q -n bin_prot-%{version}
%patch1 -p1
%build
ocaml setup.ml -configure --prefix %{_prefix} \
--libdir %{_libdir} \
--libexecdir %{_libexecdir} \
@ -57,9 +64,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \
--localstatedir %{_localstatedir} \
--sharedstatedir %{_sharedstatedir} \
--destdir $RPM_BUILD_ROOT
%build
ocaml setup.ml -build
@ -98,6 +102,11 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
%changelog
* Wed Jun 18 2014 Richard W.M. Jones <rjones@redhat.com> - 2.0.9-8
- Remove -Werror from compiler flags. Fixes FTBFS (RHBZ#1106613).
- Move configure into build section (instead of prep).
- Use global instead of define.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.9-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild