diff options
author | Sam James <sam@gentoo.org> | 2020-10-17 03:14:13 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-10-17 03:14:25 +0000 |
commit | 34cf79fccb906b79c9c0fa570d86ce241bd8c199 (patch) | |
tree | e43fda22dfab284ff2e1b3890f6e59cd9b3e4720 /dev-ml/ocplib-endian | |
parent | dev-python/python-ironicclient: 4.4.0 bump (diff) | |
download | gentoo-34cf79fccb906b79c9c0fa570d86ce241bd8c199.tar.gz gentoo-34cf79fccb906b79c9c0fa570d86ce241bd8c199.tar.bz2 gentoo-34cf79fccb906b79c9c0fa570d86ce241bd8c199.zip |
dev-ml/ocplib-endian: fix build
In some instances, build fails because of
a compatibility stanza. Let's just drop
it in a patch here and add a lower bound
on OCaml.
Closes: https://bugs.gentoo.org/748549
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ml/ocplib-endian')
-rw-r--r-- | dev-ml/ocplib-endian/files/ocplib-endian-1.1-fix-build.patch | 66 | ||||
-rw-r--r-- | dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild (renamed from dev-ml/ocplib-endian/ocplib-endian-1.1.ebuild) | 11 |
2 files changed, 74 insertions, 3 deletions
diff --git a/dev-ml/ocplib-endian/files/ocplib-endian-1.1-fix-build.patch b/dev-ml/ocplib-endian/files/ocplib-endian-1.1-fix-build.patch new file mode 100644 index 000000000000..5c7b1c3cee49 --- /dev/null +++ b/dev-ml/ocplib-endian/files/ocplib-endian-1.1-fix-build.patch @@ -0,0 +1,66 @@ +Drop old compatibility code which causes a syntax error (sometimes?) +https://bugs.gentoo.org/748549 +--- a/src/endianBytes.cppo.ml ++++ b/src/endianBytes.cppo.ml +@@ -89,26 +89,6 @@ let unsafe_set_char (s:Bytes.t) off v = + + #include "common.ml" + +-#if OCAML_VERSION < (4, 07, 0) +- +-external unsafe_get_16 : Bytes.t -> int -> int = "%caml_string_get16u" +-external unsafe_get_32 : Bytes.t -> int -> int32 = "%caml_string_get32u" +-external unsafe_get_64 : Bytes.t -> int -> int64 = "%caml_string_get64u" +- +-external unsafe_set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16u" +-external unsafe_set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32u" +-external unsafe_set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64u" +- +-external get_16 : Bytes.t -> int -> int = "%caml_string_get16" +-external get_32 : Bytes.t -> int -> int32 = "%caml_string_get32" +-external get_64 : Bytes.t -> int -> int64 = "%caml_string_get64" +- +-external set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16" +-external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32" +-external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64" +- +-#else +- + external unsafe_get_16 : Bytes.t -> int -> int = "%caml_bytes_get16u" + external unsafe_get_32 : Bytes.t -> int -> int32 = "%caml_bytes_get32u" + external unsafe_get_64 : Bytes.t -> int -> int64 = "%caml_bytes_get64u" +@@ -125,6 +105,4 @@ external set_16 : Bytes.t -> int -> int -> unit = "%caml_bytes_set16" + external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_bytes_set32" + external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_bytes_set64" + +-#endif +- + #include "common_401.ml" +--- a/src/endianString.cppo.ml ++++ b/src/endianString.cppo.ml +@@ -93,18 +93,6 @@ external get_16 : string -> int -> int = "%caml_string_get16" + external get_32 : string -> int -> int32 = "%caml_string_get32" + external get_64 : string -> int -> int64 = "%caml_string_get64" + +-#if OCAML_VERSION < (4, 07, 0) +- +-external unsafe_set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16u" +-external unsafe_set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32u" +-external unsafe_set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64u" +- +-external set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16" +-external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32" +-external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64" +- +-#else +- + external unsafe_set_16 : Bytes.t -> int -> int -> unit = "%caml_bytes_set16u" + external unsafe_set_32 : Bytes.t -> int -> int32 -> unit = "%caml_bytes_set32u" + external unsafe_set_64 : Bytes.t -> int -> int64 -> unit = "%caml_bytes_set64u" +@@ -113,6 +101,4 @@ external set_16 : Bytes.t -> int -> int -> unit = "%caml_bytes_set16" + external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_bytes_set32" + external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_bytes_set64" + +-#endif +- + #include "common_401.ml" diff --git a/dev-ml/ocplib-endian/ocplib-endian-1.1.ebuild b/dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild index 92a15b5de084..055e97e5c2fb 100644 --- a/dev-ml/ocplib-endian/ocplib-endian-1.1.ebuild +++ b/dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild @@ -15,9 +15,14 @@ KEYWORDS="~amd64 ~arm ~arm64 ~x86" IUSE="+ocamlopt" # 2 of 70 tests fail -RESTRICT=test +RESTRICT="test" -DEPEND=" +# see #748549 for version restriction on OCaml +BDEPEND=" + >=dev-lang/ocaml-4.07.0 >=dev-ml/cppo-1.1.0 " -RDEPEND="" + +PATCHES=( + "${FILESDIR}/${PN}-1.1-fix-build.patch" +) |