Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
120194755f | ||
|
9f37d48f97 | ||
|
45609011b5 | ||
|
d08ba7e55c | ||
|
7ed43d2500 | ||
|
7e09b735b9 | ||
|
91f732ac01 | ||
|
07d77efe6e | ||
|
e3b5464165 | ||
|
9844c75643 | ||
|
d1d73c8e93 | ||
|
844fb35d68 | ||
|
39ec9fec7e | ||
|
23141998e7 | ||
|
76babfc7c0 |
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,5 +1,3 @@
|
||||
release-1.2.21.tar.bz2
|
||||
/release-1.2.24.tar.bz2
|
||||
/bin-prot-2.0.6.tar.gz
|
||||
/bin-prot-2.0.7.tar.gz
|
||||
/bin_prot-2.0.9.tar.gz
|
||||
/release-*.tar.bz2
|
||||
/bin-prot-*.tar.gz
|
||||
/bin_prot-*.tar.gz
|
||||
|
@ -1,61 +0,0 @@
|
||||
diff -ur bin_prot-2.0.9.old/lib/common.ml bin_prot-2.0.9/lib/common.ml
|
||||
--- bin_prot-2.0.9.old/lib/common.ml 2012-03-15 19:59:16.000000000 +0000
|
||||
+++ bin_prot-2.0.9/lib/common.ml 2017-11-18 12:44:52.543443638 +0000
|
||||
@@ -165,7 +165,7 @@
|
||||
else unsafe_blit_string_buf ~src_pos str ~dst_pos buf ~len)
|
||||
|
||||
external unsafe_blit_buf_string :
|
||||
- src_pos : int -> buf -> dst_pos : int -> string -> len : int -> unit
|
||||
+ src_pos : int -> buf -> dst_pos : int -> bytes -> len : int -> unit
|
||||
= "bin_prot_blit_buf_string_stub" "noalloc"
|
||||
|
||||
let blit_buf_string ?src_pos buf ?dst_pos str ~len =
|
||||
@@ -176,12 +176,12 @@
|
||||
else if len = 0 then (
|
||||
if src_pos > Array1.dim buf then
|
||||
invalid_arg "Bin_prot.Common.blit_buf_string: src_pos > buf_len";
|
||||
- if dst_pos > String.length str then
|
||||
+ if dst_pos > Bytes.length str then
|
||||
invalid_arg "Bin_prot.Common.blit_buf_string: src_pos > str_len")
|
||||
else (
|
||||
if src_pos + len > Array1.dim buf then
|
||||
invalid_arg "Bin_prot.Common.blit_buf_string: src_pos + len > buf_len"
|
||||
- else if dst_pos + len > String.length str then
|
||||
+ else if dst_pos + len > Bytes.length str then
|
||||
invalid_arg "Bin_prot.Common.blit_buf_string: src_pos + len > str_len"
|
||||
else unsafe_blit_buf_string ~src_pos buf ~dst_pos str ~len)
|
||||
|
||||
diff -ur bin_prot-2.0.9.old/lib/common.mli bin_prot-2.0.9/lib/common.mli
|
||||
--- bin_prot-2.0.9.old/lib/common.mli 2012-03-15 19:59:16.000000000 +0000
|
||||
+++ bin_prot-2.0.9/lib/common.mli 2017-11-18 12:45:38.015421813 +0000
|
||||
@@ -63,7 +63,7 @@
|
||||
*)
|
||||
|
||||
val blit_buf_string :
|
||||
- ?src_pos : int -> buf -> ?dst_pos : int -> string -> len : int -> unit
|
||||
+ ?src_pos : int -> buf -> ?dst_pos : int -> bytes -> len : int -> unit
|
||||
(** [blit_buf_string ?src_pos src ?dst_pos dst ~len] blits [len]
|
||||
bytes of the source buffer [src] starting at position [src_pos]
|
||||
to string [dst] starting at position [dst_pos].
|
||||
@@ -181,5 +181,5 @@
|
||||
= "bin_prot_blit_string_buf_stub" "noalloc"
|
||||
|
||||
external unsafe_blit_buf_string :
|
||||
- src_pos : int -> buf -> dst_pos : int -> string -> len : int -> unit
|
||||
+ src_pos : int -> buf -> dst_pos : int -> bytes -> len : int -> unit
|
||||
= "bin_prot_blit_buf_string_stub" "noalloc"
|
||||
diff -ur bin_prot-2.0.9.old/lib/read_ml.ml bin_prot-2.0.9/lib/read_ml.ml
|
||||
--- bin_prot-2.0.9.old/lib/read_ml.ml 2012-03-15 19:59:16.000000000 +0000
|
||||
+++ bin_prot-2.0.9/lib/read_ml.ml 2017-11-18 12:47:01.188381893 +0000
|
||||
@@ -225,9 +225,9 @@
|
||||
let next = pos + len in
|
||||
check_next buf next;
|
||||
pos_ref := next;
|
||||
- let str = String.create len in
|
||||
+ let str = Bytes.create len in
|
||||
unsafe_blit_buf_string ~src_pos:pos buf ~dst_pos:0 str ~len;
|
||||
- str
|
||||
+ Bytes.to_string str
|
||||
|
||||
let bin_read_char (buf : buf) ~pos_ref =
|
||||
let pos = safe_get_pos buf pos_ref in
|
@ -1,11 +0,0 @@
|
||||
--- bin_prot-2.0.9.old/myocamlbuild.ml 2018-06-20 20:39:23.831032731 +0100
|
||||
+++ bin_prot-2.0.9/myocamlbuild.ml 2018-06-20 20:39:59.613139344 +0100
|
||||
@@ -471,7 +471,7 @@
|
||||
|
||||
# 473 "myocamlbuild.ml"
|
||||
(* OASIS_STOP *)
|
||||
-# 465 myocamlbuild.ml
|
||||
+# 465 "myocamlbuild.ml"
|
||||
|
||||
(* We probably will want to set this up in the `configure` script at some
|
||||
point.*)
|
@ -1,14 +0,0 @@
|
||||
--- bin_prot-2.0.9/lib/common_stubs.h.orig 2012-03-15 13:59:16.000000000 -0600
|
||||
+++ bin_prot-2.0.9/lib/common_stubs.h 2014-09-25 12:00:00.000000000 -0600
|
||||
@@ -41,6 +41,11 @@
|
||||
#include <caml/callback.h>
|
||||
#include <caml/signals.h>
|
||||
|
||||
+#define int64 int64_t
|
||||
+#define uint64 uint64_t
|
||||
+#define int32 int32_t
|
||||
+#define uint32 uint32_t
|
||||
+
|
||||
#ifdef ARCH_INT64_TYPE
|
||||
#include "int64_native.h"
|
||||
#else
|
@ -1,10 +0,0 @@
|
||||
--- 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
|
@ -1,37 +1,27 @@
|
||||
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||
%global srcname bin-prot
|
||||
%global upname bin_prot
|
||||
|
||||
%global dlnode 822
|
||||
|
||||
Name: ocaml-bin-prot
|
||||
Version: 2.0.9
|
||||
Release: 34%{?dist}
|
||||
Name: ocaml-%{srcname}
|
||||
Version: 0.14.0
|
||||
Epoch: 1
|
||||
Release: 7%{?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: %{name}-2.0.9-remove-Werror.patch
|
||||
|
||||
# Update integer types for ocaml 4.02
|
||||
Patch2: %{name}-2.0.9-fix-ints.patch
|
||||
|
||||
# Safe-string fixes for OCaml 4.06.
|
||||
Patch3: bin-prot-2.0.9-safe-string.patch
|
||||
|
||||
# Fix "naked" line directive for OCaml 4.07.
|
||||
Patch4: bin_prot-2.0.9-fix-line-directive.patch
|
||||
|
||||
BuildRequires: ocaml >= 3.12.0
|
||||
BuildRequires: ocaml-ocamlbuild
|
||||
BuildRequires: ocaml-findlib-devel
|
||||
BuildRequires: ocaml-ocamldoc
|
||||
BuildRequires: ocaml-camlp4-devel
|
||||
BuildRequires: ocaml-ounit-devel
|
||||
BuildRequires: ocaml-type-conv >= 3.0.4
|
||||
BuildRequires: chrpath
|
||||
# The project as a whole is MIT, but code in the src subdirectory is BSD.
|
||||
License: MIT and BSD
|
||||
URL: https://github.com/janestreet/%{upname}
|
||||
Source0: %{url}/archive/v%{version}/%{upname}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: ocaml >= 4.04.2
|
||||
BuildRequires: ocaml-base-devel >= 0.14
|
||||
BuildRequires: ocaml-dune >= 2.0.0
|
||||
BuildRequires: ocaml-odoc
|
||||
BuildRequires: ocaml-ppx-compare-devel >= 0.14
|
||||
BuildRequires: ocaml-ppx-custom-printf-devel >= 0.14
|
||||
BuildRequires: ocaml-ppx-fields-conv-devel >= 0.14
|
||||
BuildRequires: ocaml-ppx-optcomp-devel >= 0.14
|
||||
BuildRequires: ocaml-ppx-sexp-conv-devel >= 0.14
|
||||
BuildRequires: ocaml-ppx-variants-conv-devel >= 0.14
|
||||
|
||||
%description
|
||||
This library contains functionality for reading and writing OCaml
|
||||
@ -46,82 +36,128 @@ values will lead to non-termination whereas shared values, besides
|
||||
requiring significantly more space when encoded, may lead to a
|
||||
substantial increase in memory footprint when they are read back in.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
Requires: %{name} = 1:%{version}-%{release}
|
||||
Requires: ocaml-base-devel%{?_isa}
|
||||
Requires: ocaml-ppx-compare-devel%{?_isa}
|
||||
Requires: ocaml-ppx-custom-printf-devel%{?_isa}
|
||||
Requires: ocaml-ppx-fields-conv-devel%{?_isa}
|
||||
Requires: ocaml-ppx-optcomp-devel%{?_isa}
|
||||
Requires: ocaml-ppx-sexp-conv-devel%{?_isa}
|
||||
Requires: ocaml-ppx-variants-conv-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and signature files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
The %{name}-devel package contains libraries and signature files
|
||||
for developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n bin_prot-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
# Use Fedora CFLAGS, and define ARCH_INT64_TYPE
|
||||
expr=' "-DARCH_INT64_TYPE";'
|
||||
for flag in %{optflags}; do
|
||||
expr+="\\$\n"' '"\"$flag\";"
|
||||
done
|
||||
sed -i "/-pipe/,/-Wno-long-long/c\\$expr" myocamlbuild.ml
|
||||
sed -i 's/;\$$/;/' myocamlbuild.ml
|
||||
%autosetup -n %{upname}-%{version}
|
||||
|
||||
%build
|
||||
ocaml setup.ml -configure --prefix %{_prefix} \
|
||||
--libdir %{_libdir} \
|
||||
--libexecdir %{_libexecdir} \
|
||||
--exec-prefix %{_exec_prefix} \
|
||||
--bindir %{_bindir} \
|
||||
--sbindir %{_sbindir} \
|
||||
--mandir %{_mandir} \
|
||||
--datadir %{_datadir} \
|
||||
--localstatedir %{_localstatedir} \
|
||||
--sharedstatedir %{_sharedstatedir} \
|
||||
--destdir $RPM_BUILD_ROOT
|
||||
ocaml setup.ml -build
|
||||
|
||||
|
||||
%check
|
||||
ocaml setup.ml -test
|
||||
dune build %{?_smp_mflags}
|
||||
|
||||
# Relink with RPM_LD_FLAGS.
|
||||
pushd _build/default/src
|
||||
ocamlmklib -g -ldopt "$RPM_LD_FLAGS" -o bin_prot_stubs blit_stubs.o
|
||||
popd
|
||||
|
||||
%install
|
||||
export DESTDIR=$RPM_BUILD_ROOT
|
||||
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
||||
ocaml setup.ml -install
|
||||
dune install --destdir=%{buildroot}
|
||||
|
||||
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||
# We install the documentation with the doc macro
|
||||
rm -fr %{buildroot}%{_prefix}/doc
|
||||
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
# Add missing executable bits
|
||||
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license COPYRIGHT LICENSE LICENSE.Tywith
|
||||
%{_libdir}/ocaml/bin_prot
|
||||
%if %opt
|
||||
%exclude %{_libdir}/ocaml/bin_prot/*.a
|
||||
%exclude %{_libdir}/ocaml/bin_prot/*.cmxa
|
||||
%doc CHANGES.md README.md
|
||||
%license COPYRIGHT.txt LICENSE.md LICENSE-Tywith.txt THIRD-PARTY.txt
|
||||
%dir %{_libdir}/ocaml/%{upname}/
|
||||
%dir %{_libdir}/ocaml/%{upname}/shape/
|
||||
%dir %{_libdir}/ocaml/%{upname}/xen/
|
||||
%{_libdir}/ocaml/%{upname}/META
|
||||
%{_libdir}/ocaml/%{upname}/runtime.js
|
||||
%{_libdir}/ocaml/%{upname}/*.cma
|
||||
%{_libdir}/ocaml/%{upname}/*.cmi
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cma
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cmi
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/%{upname}/%{upname}*.cmxs
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cmxs
|
||||
%endif
|
||||
%exclude %{_libdir}/ocaml/bin_prot/*.mli
|
||||
%{_libdir}/ocaml/stublibs/*.so
|
||||
%{_libdir}/ocaml/stublibs/*.so.owner
|
||||
|
||||
%{_libdir}/ocaml/stublibs/dllbin_prot_stubs.so
|
||||
|
||||
%files devel
|
||||
%doc Changelog README.txt
|
||||
%if %opt
|
||||
%{_libdir}/ocaml/bin_prot/*.a
|
||||
%{_libdir}/ocaml/bin_prot/*.cmxa
|
||||
%{_libdir}/ocaml/%{upname}/dune-package
|
||||
%{_libdir}/ocaml/%{upname}/opam
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/%{upname}/*.a
|
||||
%{_libdir}/ocaml/%{upname}/*.cmx
|
||||
%{_libdir}/ocaml/%{upname}/*.cmxa
|
||||
%{_libdir}/ocaml/%{upname}/*/*.a
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cmx
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cmxa
|
||||
%endif
|
||||
%{_libdir}/ocaml/bin_prot/*.mli
|
||||
|
||||
%{_libdir}/ocaml/%{upname}/*.cmt
|
||||
%{_libdir}/ocaml/%{upname}/*.cmti
|
||||
%{_libdir}/ocaml/%{upname}/*.ml
|
||||
%{_libdir}/ocaml/%{upname}/*.mli
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cmt
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cmti
|
||||
%{_libdir}/ocaml/%{upname}/*/*.ml
|
||||
%{_libdir}/ocaml/%{upname}/*/*.mli
|
||||
|
||||
%changelog
|
||||
* Tue Mar 2 10:50:30 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 1:0.14.0-7
|
||||
- OCaml 4.12.0 build
|
||||
|
||||
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 1:0.14.0-6
|
||||
- Rebuild for ocaml-base 0.14.1
|
||||
|
||||
* Tue Feb 2 2021 Richard W.M. Jones <rjones@redhat.com> - 1:0.14.0-5
|
||||
- Bump and rebuild for updated ocaml Dynlink dependency.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.14.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Sep 02 2020 Richard W.M. Jones <rjones@redhat.com> - 1:0.14.0-3
|
||||
- OCaml 4.11.1 rebuild
|
||||
|
||||
* Mon Aug 24 2020 Richard W.M. Jones <rjones@redhat.com> - 1:0.14.0-2
|
||||
- OCaml 4.11.0 rebuild
|
||||
|
||||
* Wed Aug 19 2020 Jerry James <loganjerry@gmail.com> - 1:0.14.0-1
|
||||
- Version 0.14.0
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.13.0-5
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.13.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Thu Jul 23 2020 Richard W.M. Jones <rjones@redhat.com> - 1:0.13.0-3
|
||||
- Rebuild to resolve build order symbol problems.
|
||||
|
||||
* Wed Jun 24 2020 Jerry James <loganjerry@gmail.com> - 1:0.13.0-2
|
||||
- Fix the -devel subpackage dependency on the main package
|
||||
|
||||
* Mon Jun 15 2020 Jerry James <loganjerry@gmail.com> - 1:0.13.0-1
|
||||
- Version 0.13.0
|
||||
- Add Epoch to deal with new version numbering scheme
|
||||
- License change to MIT and BSD
|
||||
- Build with dune
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-36
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-35
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-34
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user