[packages/ocaml-augeas] - added cflags patch (fixes build with augeas requiring libxml2 headers in include path) - added oca
qboosh
qboosh at pld-linux.org
Sat Jul 18 22:51:48 CEST 2015
commit 42ceb2a3a6d1869ceeb9476627b6255281371201
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jul 18 22:53:03 2015 +0200
- added cflags patch (fixes build with augeas requiring libxml2 headers in include path)
- added ocaml_opt bcond
ocaml-augeas-cflags.patch | 10 ++++++++++
ocaml-augeas.spec | 26 +++++++++++++++++++++++---
2 files changed, 33 insertions(+), 3 deletions(-)
---
diff --git a/ocaml-augeas.spec b/ocaml-augeas.spec
index b50f390..568941b 100644
--- a/ocaml-augeas.spec
+++ b/ocaml-augeas.spec
@@ -1,4 +1,11 @@
# TODO: optflags?
+#
+# Conditional build:
+%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
+
+%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%undefine with_ocaml_opt
+%endif
Summary: Augeas binding for OCaml
Summary(pl.UTF-8): Wiązania augeasa dla OCamla
Name: ocaml-augeas
@@ -8,10 +15,13 @@ License: LGPL v2+
Group: Libraries
Source0: http://download.augeas.net/ocaml/%{name}-%{version}.tar.gz
# Source0-md5: c18c3c794e945336acda222046f8416b
+Patch0: %{name}-cflags.patch
URL: http://augeas.net/
BuildRequires: augeas-devel
+BuildRequires: autoconf
BuildRequires: ocaml >= 3.04-7
BuildRequires: ocaml-findlib
+BuildRequires: pkgconfig
%requires_eq ocaml-runtime
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -40,8 +50,11 @@ biblioteki augeas.
%prep
%setup -q
+%patch0 -p1
%build
+%{__autoconf}
+%{__autoheader}
%configure
%{__make} -j1
@@ -50,7 +63,10 @@ biblioteki augeas.
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{augeas,stublibs}
-install augeas.{cmi,cmx} libmlaugeas.a mlaugeas.{a,cma,cmxa} $RPM_BUILD_ROOT%{_libdir}/ocaml/augeas
+install augeas.cmi libmlaugeas.a mlaugeas.cma $RPM_BUILD_ROOT%{_libdir}/ocaml/augeas
+%if %{with ocaml_opt}
+install augeas.cmx mlaugeas.{a,cmxa} $RPM_BUILD_ROOT%{_libdir}/ocaml/augeas
+%endif
install dllmlaugeas.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
install -D META $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/augeas/META
@@ -65,8 +81,12 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc augeas.mli
%dir %{_libdir}/ocaml/augeas
-%{_libdir}/ocaml/augeas/augeas.cm[ix]
+%{_libdir}/ocaml/augeas/augeas.cmi
%{_libdir}/ocaml/augeas/libmlaugeas.a
+%{_libdir}/ocaml/augeas/mlaugeas.cma
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/augeas/augeas.cmx
%{_libdir}/ocaml/augeas/mlaugeas.a
-%{_libdir}/ocaml/augeas/mlaugeas.cm[ax]*
+%{_libdir}/ocaml/augeas/mlaugeas.cmxa
+%endif
%{_libdir}/ocaml/site-lib/augeas
diff --git a/ocaml-augeas-cflags.patch b/ocaml-augeas-cflags.patch
new file mode 100644
index 0000000..337e369
--- /dev/null
+++ b/ocaml-augeas-cflags.patch
@@ -0,0 +1,10 @@
+--- ocaml-augeas-0.4/configure.ac.orig 2008-05-07 09:33:05.000000000 +0200
++++ ocaml-augeas-0.4/configure.ac 2015-07-18 22:07:48.833074482 +0200
+@@ -41,6 +41,7 @@
+ AC_CHECK_LIB(augeas,aug_init,
+ [],
+ AC_MSG_ERROR([You must install the Augeas library]))
++CFLAGS="$CFLAGS $(pkg-config --cflags augeas)"
+ AC_CHECK_HEADER([augeas.h],
+ [],
+ AC_MSG_ERROR([You must install the Augeas development package]))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-augeas.git/commitdiff/42ceb2a3a6d1869ceeb9476627b6255281371201
More information about the pld-cvs-commit
mailing list