The package rpms/ocaml-curl.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ocaml-curl.git/commit/?id=8c6ecf1....
Change:
+%ifarch %{ocaml_native_compiler}
Thanks.
Full change:
============
commit 8c6ecf19fd39b0e8210600a0757431e848d302a1
Author: Jerry James <loganjerry(a)gmail.com>
Date: Thu Apr 16 15:24:50 2020 -0600
New upstream version 0.9.1.
- Remove all patches; they have been upstreamed.
- Change source URL to include the package name.
- BR ocaml-lwt-ppx-devel instead of ocaml-lwt-devel.
- Invoke ocamlmklib with -g and $RPM_LD_FLAGS.
- BR ocaml-ocamldoc and build documentation.
diff --git a/.gitignore b/.gitignore
index 1e83c7c..f0062bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
-ocurl-0.5.1.tgz
-/ocurl-0.5.3.tgz
-/ocurl-0.7.5.tar.gz
+/ocurl-*.tgz
+/ocurl-*.tar.gz
/0.7.9.tar.gz
/0.8.2.tar.gz
/0.9.0.tar.gz
diff --git a/0001-include-all-caml-headers-under-CAML_NAME_SPACE-fix-3.patch
b/0001-include-all-caml-headers-under-CAML_NAME_SPACE-fix-3.patch
deleted file mode 100644
index d09ec85..0000000
--- a/0001-include-all-caml-headers-under-CAML_NAME_SPACE-fix-3.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 967609e2e7861321bded926308a98011b787eadf Mon Sep 17 00:00:00 2001
-From: ygrek <ygrek(a)autistici.org>
-Date: Sat, 28 Dec 2019 17:22:26 +0200
-Subject: [PATCH 1/4] include all caml headers under CAML_NAME_SPACE (fix #36)
-
----
- curl-helper.c | 2 +-
- opam | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/curl-helper.c b/curl-helper.c
-index 76099ee..7a26282 100644
---- a/curl-helper.c
-+++ b/curl-helper.c
-@@ -9,7 +9,6 @@
- #include <string.h>
- #include <stdlib.h>
- #include <stdarg.h>
--#include <caml/config.h>
- #ifdef HAS_UNISTD
- #include <unistd.h>
- #endif
-@@ -20,6 +19,7 @@
- #ifndef CAML_NAME_SPACE
- #define CAML_NAME_SPACE
- #endif
-+#include <caml/config.h>
- #include <caml/alloc.h>
- #include <caml/memory.h>
- #include <caml/mlvalues.h>
-diff --git a/opam b/opam
-index e099833..1d25fc4 100644
---- a/opam
-+++ b/opam
-@@ -18,6 +18,7 @@ install: [
- [make "install"]
- ]
- depends: [
-+ "ocaml" {>= "4.02.0"}
- "ocamlfind" {build}
- "base-unix"
- "conf-libcurl"
---
-2.24.1
-
diff --git a/0002-examples-use-thread-as-requested-by-ocamlfind.patch
b/0002-examples-use-thread-as-requested-by-ocamlfind.patch
deleted file mode 100644
index ab23e7a..0000000
--- a/0002-examples-use-thread-as-requested-by-ocamlfind.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 652f1d57006fe8dba488ceacb4a4f20ee8408061 Mon Sep 17 00:00:00 2001
-From: ygrek <ygrek(a)autistici.org>
-Date: Sat, 28 Dec 2019 17:37:23 +0200
-Subject: [PATCH 2/4] examples: use -thread as requested by ocamlfind
-
-fixes compatibility with Lwt 5.0.0
----
- examples/Makefile.in | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/examples/Makefile.in b/examples/Makefile.in
-index b4c6573..8a9e46c 100644
---- a/examples/Makefile.in
-+++ b/examples/Makefile.in
-@@ -46,16 +46,16 @@ endif
- all: $(TARGETS)
-
- test_lwt: ../curl.cma ../curl_lwt.cmo test_lwt.ml
-- $(FINDLIB) c -custom -linkpkg -package $(LWT_UNIX),$(LWT_PPX) $(LFLAGS) $^ -o $@
-+ $(FINDLIB) c -thread -custom -linkpkg -package $(LWT_UNIX),$(LWT_PPX) $(LFLAGS) $^ -o
$@
-
- test_lwt.opt: ../curl.cmxa ../curl_lwt.cmx test_lwt.ml
-- $(FINDLIB) opt -linkpkg -package $(LWT_UNIX),$(LWT_PPX) $(LFLAGS) $^ -o $@
-+ $(FINDLIB) opt -thread -linkpkg -package $(LWT_UNIX),$(LWT_PPX) $(LFLAGS) $^ -o $@
-
- test_lwt_unit: ../curl.cma ../curl_lwt.cmo test_lwt_unit.ml
-- $(FINDLIB) c -custom -linkpkg -package $(LWT_UNIX) $(LFLAGS) $^ -o $@
-+ $(FINDLIB) c -thread -custom -linkpkg -package $(LWT_UNIX) $(LFLAGS) $^ -o $@
-
- test_lwt_unit.opt: ../curl.cmxa ../curl_lwt.cmx test_lwt_unit.ml
-- $(FINDLIB) opt -linkpkg -package $(LWT_UNIX) $(LFLAGS) $^ -o $@
-+ $(FINDLIB) opt -thread -linkpkg -package $(LWT_UNIX) $(LFLAGS) $^ -o $@
-
- oput: ../curl.cma oput.ml
- $(FINDLIB) c -custom -package bytes,unix -linkpkg $(LFLAGS) $^ -o $@
---
-2.24.1
-
diff --git a/0003-properly-fix-CAML_NAME_SPACE-issue.patch
b/0003-properly-fix-CAML_NAME_SPACE-issue.patch
deleted file mode 100644
index aa5b8da..0000000
--- a/0003-properly-fix-CAML_NAME_SPACE-issue.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 298b9e5a226a8dc9ecbee3800621a0e2f6d6b689 Mon Sep 17 00:00:00 2001
-From: ygrek <ygrek(a)autistici.org>
-Date: Mon, 30 Dec 2019 12:30:55 +0200
-Subject: [PATCH 3/4] properly fix CAML_NAME_SPACE issue
-
-https://github.com/ygrek/ocurl/commit/967609e2e7861321bded926308a98011b787eadf#r36609085
----
- curl-helper.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/curl-helper.c b/curl-helper.c
-index 7a26282..a010a21 100644
---- a/curl-helper.c
-+++ b/curl-helper.c
-@@ -5,10 +5,16 @@
- *** Copyright (c) 2009, ygrek, <ygrek(a)autistici.org>
- ***/
-
-+#ifndef CAML_NAME_SPACE
-+#define CAML_NAME_SPACE
-+#endif
-+
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <stdarg.h>
-+
-+#include <caml/config.h> /* defines HAS_UNISTD */
- #ifdef HAS_UNISTD
- #include <unistd.h>
- #endif
-@@ -16,10 +22,6 @@
- #define CURL_DISABLE_TYPECHECK
- #include <curl/curl.h>
-
--#ifndef CAML_NAME_SPACE
--#define CAML_NAME_SPACE
--#endif
--#include <caml/config.h>
- #include <caml/alloc.h>
- #include <caml/memory.h>
- #include <caml/mlvalues.h>
---
-2.24.1
-
diff --git a/0004-use-thread-for-curl_lwt-too.patch
b/0004-use-thread-for-curl_lwt-too.patch
deleted file mode 100644
index 28ac98c..0000000
--- a/0004-use-thread-for-curl_lwt-too.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 41e0d213b1ba8b29b485e01fecc9c1ea99a631c0 Mon Sep 17 00:00:00 2001
-From: ygrek <ygrek(a)autistici.org>
-Date: Mon, 30 Dec 2019 12:31:53 +0200
-Subject: [PATCH 4/4] use -thread for curl_lwt too
-
----
- Makefile.in | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 531c986..fc35ca4 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -101,13 +101,13 @@ curl.cmxs: curl.cmxa
- $(OCAMLOPT) -shared -linkall -I . $< -o $@
-
- curl_lwt.cmo: curl_lwt.ml
-- $(FINDLIB) c -package lwt.unix -c $(FLAGS) $< -o $@
-+ $(FINDLIB) c -thread -package lwt.unix -c $(FLAGS) $< -o $@
-
- curl_lwt.cmx: curl_lwt.ml
-- $(FINDLIB) opt -package lwt.unix -c $(FLAGS) $< -o $@
-+ $(FINDLIB) opt -thread -package lwt.unix -c $(FLAGS) $< -o $@
-
- curl_lwt.cmxs: curl_lwt.cmx
-- $(FINDLIB) opt -shared -linkall -package lwt.unix $< -o $@
-+ $(FINDLIB) opt -thread -shared -linkall -package lwt.unix $< -o $@
-
- curl_lwt.cmi: curl_lwt.mli
- $(FINDLIB) c -package lwt -c $(FLAGS) $< -o $@
---
-2.24.1
-
diff --git a/ocaml-curl.spec b/ocaml-curl.spec
index 3de416c..95705d0 100644
--- a/ocaml-curl.spec
+++ b/ocaml-curl.spec
@@ -1,27 +1,17 @@
-%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
-%global debug_package %{nil}
-
Name: ocaml-curl
-Version: 0.9.0
-Release: 3%{?dist}
+Version: 0.9.1
+Release: 1%{?dist}
Summary: OCaml Curl library (ocurl)
License: MIT
URL:
http://ocurl.forge.ocamlcore.org/
-Source0:
https://github.com/ygrek/ocurl/archive/%{version}.tar.gz
-
-# All upstream patches since 0.9.0 was released. Required to fix
-# various OCaml header problems that affect OCaml 4.10.
-Patch0001: 0001-include-all-caml-headers-under-CAML_NAME_SPACE-fix-3.patch
-Patch0002: 0002-examples-use-thread-as-requested-by-ocamlfind.patch
-Patch0003: 0003-properly-fix-CAML_NAME_SPACE-issue.patch
-Patch0004: 0004-use-thread-for-curl_lwt-too.patch
+Source0:
https://github.com/ygrek/ocurl/archive/%{version}/ocurl-%{version}.tar.gz
-BuildRequires: ocaml >= 3.10.0-7
+BuildRequires: ocaml >= 4.02.0
+BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-findlib-devel
BuildRequires: curl-devel >= 7.28.0
-BuildRequires: ocaml-lwt-devel
-BuildRequires: libev-devel
+BuildRequires: ocaml-lwt-ppx-devel
BuildRequires: gawk
# Explicitly require Curl (fixes #711261). Since ocaml-curl uses
@@ -45,13 +35,15 @@ developing applications that use %{name}.
%prep
-%setup -q -n ocurl-%{version}
-%autopatch -p1
+%autosetup -p1 -n ocurl-%{version}
# Files in the archive have spurious +x mode.
find -type f | xargs chmod 0644
chmod 0755 configure install-sh
+# Link with debuginfo and RPM_LD_FLAGS
+sed -i "s|\$(OCAMLMKLIB)|& -g -ldopt '$RPM_LD_FLAGS'|" Makefile.in
+
%build
# Parallel builds don't work.
@@ -65,6 +57,7 @@ CFLAGS="%{optflags} -fPIC" \
%configure --libdir=%{_libdir} --with-findlib
make
+make doc
%install
@@ -80,9 +73,8 @@ make -C examples clean
%files
%license COPYING
%{_libdir}/ocaml/curl
-%if %opt
+%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/curl/*.a
-#%exclude %{_libdir}/ocaml/curl/*.o
%exclude %{_libdir}/ocaml/curl/*.cmx
%exclude %{_libdir}/ocaml/curl/*.cmxa
%endif
@@ -92,10 +84,9 @@ make -C examples clean
%files devel
-%doc examples/*
-%if %opt
+%doc doc examples
+%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/curl/*.a
-#%{_libdir}/ocaml/curl/*.o
%{_libdir}/ocaml/curl/*.cmx
%{_libdir}/ocaml/curl/*.cmxa
%endif
@@ -103,6 +94,14 @@ make -C examples clean
%changelog
+* Thu Apr 16 2020 Jerry James <loganjerry(a)gmail.com> - 0.9.1-1
+- New upstream version 0.9.1.
+- Remove all patches; they have been upstreamed.
+- Change source URL to include the package name.
+- BR ocaml-lwt-ppx-devel instead of ocaml-lwt-devel.
+- Invoke ocamlmklib with -g and $RPM_LD_FLAGS.
+- BR ocaml-ocamldoc and build documentation.
+
* Sat Apr 04 2020 Richard W.M. Jones <rjones(a)redhat.com> - 0.9.0-3
- Update all OCaml dependencies for RPM 4.16.
diff --git a/sources b/sources
index 1f7fd6c..25e6445 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (0.9.0.tar.gz) =
9de5c5400b221c0527d03ccc6a3c4a1d26c26081a89d7bc10c999a2b79dcafd931721363fee76e9afa203a416726c21f5c3b609aa9e8e4a85b7fd63233d00bc4
+SHA512 (ocurl-0.9.1.tar.gz) =
f4acb596f213ce57e749c9805225330b532e17718f3b228745b438cd1fe6d89b37e56d401a11c329107729dd0e6bdd4a425d547f9a83dabe32edbf18aca585b5