[packages/ocaml-augeas] up to 0.6

atler atler at pld-linux.org
Tue Jun 13 17:57:14 CEST 2023


commit 86edc6d87dfd633aac90f11d6e7807a16be448c9
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Jun 13 17:56:04 2023 +0200

    up to 0.6
    
    - while there's no official tarball for 0.6, there is 0.6 tag in
      git repository. use tarball from fedora
    - patch from fedora to fix build with ocaml >= 4.09

 ocaml-4.09.patch               | 35 +++++++++++++++++++++++++++++++++++
 ocaml-augeas-cflags.patch      | 10 ----------
 ocaml-augeas-no-ocamlopt.patch |  2 +-
 ocaml-augeas.spec              | 19 ++++++++++---------
 4 files changed, 46 insertions(+), 20 deletions(-)
---
diff --git a/ocaml-augeas.spec b/ocaml-augeas.spec
index b272ea5..3c5129d 100644
--- a/ocaml-augeas.spec
+++ b/ocaml-augeas.spec
@@ -9,17 +9,18 @@
 Summary:	Augeas binding for OCaml
 Summary(pl.UTF-8):	Wiązania augeasa dla OCamla
 Name:		ocaml-augeas
-Version:	0.4
-Release:	3
+Version:	0.6
+Release:	1
 License:	LGPL v2+
 Group:		Libraries
-Source0:	http://download.augeas.net/ocaml/%{name}-%{version}.tar.gz
-# Source0-md5:	c18c3c794e945336acda222046f8416b
-Patch0:		%{name}-cflags.patch
-Patch1:		%{name}-no-ocamlopt.patch
+Source0:	http://people.redhat.com/~rjones/augeas/files/%{name}-%{version}.tar.gz
+# Source0-md5:	16837f2caf4764e46068a58e5b9d6c9b
+Patch0:		%{name}-no-ocamlopt.patch
+Patch1:		ocaml-4.09.patch
 URL:		http://augeas.net/
-BuildRequires:	augeas-devel
+BuildRequires:	augeas-devel >= 1.2.0
 BuildRequires:	autoconf
+BuildRequires:	libxml2-devel
 BuildRequires:	ocaml >= 3.04-7
 BuildRequires:	ocaml-findlib
 BuildRequires:	pkgconfig
@@ -51,8 +52,8 @@ biblioteki augeas.
 
 %prep
 %setup -q
-%patch0 -p1
-%{!?with_ocaml_opt:%patch1 -p1}
+%{!?with_ocaml_opt:%patch0 -p1}
+%patch1 -p1
 
 %build
 %{__autoconf}
diff --git a/ocaml-4.09.patch b/ocaml-4.09.patch
new file mode 100644
index 0000000..22c5ed9
--- /dev/null
+++ b/ocaml-4.09.patch
@@ -0,0 +1,35 @@
+From 1cf5aef99b26a46529ca797547c0b49627fffe78 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Sat, 7 Dec 2019 11:08:54 +0000
+Subject: [PATCH 2/2] caml_named_value returns const value pointer in OCaml
+ 4.09+
+
+---
+ augeas-c.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/augeas-c.c b/augeas-c.c
+index 9217017..679bcb5 100644
+--- a/augeas-c.c
++++ b/augeas-c.c
+@@ -86,7 +86,7 @@ static const int error_map_len = sizeof error_map / sizeof error_map[0];
+ static void
+ raise_error_and_maybe_close (augeas_t t, const char *msg, bool close_handle)
+ {
+-  value *exn = caml_named_value ("Augeas.Error");
++  const value *exn = caml_named_value ("Augeas.Error");
+   value args[5];
+   const int code = aug_error (t);
+   const char *aug_err_msg;
+@@ -132,7 +132,7 @@ raise_error_and_maybe_close (augeas_t t, const char *msg, bool close_handle)
+ static void
+ raise_init_error (const char *msg)
+ {
+-  value *exn = caml_named_value ("Augeas.Error");
++  const value *exn = caml_named_value ("Augeas.Error");
+   value args[5];
+ 
+   args[0] = caml_alloc (1, 0);
+-- 
+2.23.0
+
diff --git a/ocaml-augeas-cflags.patch b/ocaml-augeas-cflags.patch
deleted file mode 100644
index 337e369..0000000
--- a/ocaml-augeas-cflags.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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]))
diff --git a/ocaml-augeas-no-ocamlopt.patch b/ocaml-augeas-no-ocamlopt.patch
index 86a24e4..2292e6d 100644
--- a/ocaml-augeas-no-ocamlopt.patch
+++ b/ocaml-augeas-no-ocamlopt.patch
@@ -7,5 +7,5 @@
 -all:	mlaugeas.cma mlaugeas.cmxa test_augeas
 +all:	mlaugeas.cma test_augeas
  
- mlaugeas.cma: augeas_c.o augeas.cmo
+ mlaugeas.cma: augeas-c.o augeas.cmo
  	ocamlmklib $(LDFLAGS) $(LIBS) -o mlaugeas $^
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocaml-augeas.git/commitdiff/86edc6d87dfd633aac90f11d6e7807a16be448c9



More information about the pld-cvs-commit mailing list