* [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocplib-endian/, dev-ml/ocplib-endian/files/
@ 2020-10-17 3:14 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2020-10-17 3:14 UTC (permalink / raw
To: gentoo-commits
commit: 34cf79fccb906b79c9c0fa570d86ce241bd8c199
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 17 03:14:13 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 17 03:14:25 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34cf79fc
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 <AT> gentoo.org>
.../files/ocplib-endian-1.1-fix-build.patch | 66 ++++++++++++++++++++++
...dian-1.1.ebuild => ocplib-endian-1.1-r1.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 00000000000..5c7b1c3cee4
--- /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
similarity index 76%
rename from dev-ml/ocplib-endian/ocplib-endian-1.1.ebuild
rename to dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild
index 92a15b5de08..055e97e5c2f 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"
+)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocplib-endian/, dev-ml/ocplib-endian/files/
@ 2020-10-17 5:41 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2020-10-17 5:41 UTC (permalink / raw
To: gentoo-commits
commit: f2417895a2c184ed9e2685b7f9d4488e1bdfa346
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 17 05:38:31 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 17 05:41:23 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2417895
dev-ml/ocplib-endian: better fix for compile failure
Apparently, those irritating "syntax errors" only
appear when we have an older cppo.
Noticed when trying to fix a similar issue in lwt.
Drop the OCaml version requirement + patch, and
depend on a newer cppo.
Fixes: 34cf79fccb906b79c9c0fa570d86ce241bd8c199
Bug: https://bugs.gentoo.org/748549
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/ocplib-endian-1.1-fix-build.patch | 66 ----------------------
dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild | 10 +---
2 files changed, 1 insertion(+), 75 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
deleted file mode 100644
index 5c7b1c3cee4..00000000000
--- a/dev-ml/ocplib-endian/files/ocplib-endian-1.1-fix-build.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-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-r1.ebuild b/dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild
index 055e97e5c2f..c8a613e5eca 100644
--- a/dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild
+++ b/dev-ml/ocplib-endian/ocplib-endian-1.1-r1.ebuild
@@ -17,12 +17,4 @@ IUSE="+ocamlopt"
# 2 of 70 tests fail
RESTRICT="test"
-# see #748549 for version restriction on OCaml
-BDEPEND="
- >=dev-lang/ocaml-4.07.0
- >=dev-ml/cppo-1.1.0
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.1-fix-build.patch"
-)
+BDEPEND=">=dev-ml/cppo-1.6.6"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-17 5:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-17 5:41 [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocplib-endian/, dev-ml/ocplib-endian/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2020-10-17 3:14 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox