public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocamlnet/, dev-ml/ocamlnet/files/
@ 2017-06-30 12:47 Alexis Ballier
  0 siblings, 0 replies; 3+ messages in thread
From: Alexis Ballier @ 2017-06-30 12:47 UTC (permalink / raw
  To: gentoo-commits

commit:     d7d57903f6e0094b295fc3bcf9bb1f83443b9c5c
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 30 11:42:02 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Jun 30 12:47:13 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7d57903

dev-ml/ocamlnet: backport upstream fix to build with ocaml 4.05

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-ml/ocamlnet/files/ocaml405.patch  | 145 ++++++++++++++++++++++++++++++++++
 dev-ml/ocamlnet/ocamlnet-4.1.2.ebuild |   6 +-
 2 files changed, 150 insertions(+), 1 deletion(-)

diff --git a/dev-ml/ocamlnet/files/ocaml405.patch b/dev-ml/ocamlnet/files/ocaml405.patch
new file mode 100644
index 00000000000..a112d1fb447
--- /dev/null
+++ b/dev-ml/ocamlnet/files/ocaml405.patch
@@ -0,0 +1,145 @@
+commit f3d451b81c4caa8cce7f55af6463ec685e79e227
+Author: Gerd Stolpmann <gerd@gerd-stolpmann.de>
+Date:   Sun Feb 26 21:04:49 2017 +0100
+
+    ocaml-4.05: support for O_KEEPEXEC
+
+diff --git a/code/src/netsys/Makefile b/code/src/netsys/Makefile
+index cbc1ce2..cb70a09 100644
+--- a/code/src/netsys/Makefile
++++ b/code/src/netsys/Makefile
+@@ -56,7 +56,7 @@ OCAMLC_OPTIONS_FOR_netsys_c_xdr.c = -ccopt -O
+ OCAMLC_OPTIONS += $(STRING_OPTS)
+ OCAMLOPT_OPTIONS += $(STRING_OPTS)
+ 
+-PP_OPTIONS = -pp "$(CPPO) $(DEF_O_SHARE_DELETE) $(DEF_O_CLOEXEC) $(PP_BYTES) $(PP_DEPRECATED)"
++PP_OPTIONS = -pp "$(CPPO) $(DEF_O_SHARE_DELETE) $(DEF_O_CLOEXEC) $(DEF_O_KEEPEXEC) $(PP_BYTES) $(PP_DEPRECATED)"
+ 
+ INSTALL_EXTRA += netsys_c_event.h $(OOH_OBJECT)
+ 
+diff --git a/code/src/netsys/configure b/code/src/netsys/configure
+index 1325843..f4dbc09 100755
+--- a/code/src/netsys/configure
++++ b/code/src/netsys/configure
+@@ -437,6 +437,21 @@ else
+     echo "no"
+ fi
+ 
++######################################################################
++
++printf "Checking for O_KEEPEXEC... "
++mkdir -p tmp
++cat <<_EOF_ >tmp/t.ml
++let x = Unix.O_KEEPEXEC;;
++_EOF_
++
++def_o_keepexec="-D NO_O_KEEPEXEC"
++if ocaml unix.cma tmp/t.ml >/dev/null 2>/dev/null; then
++    echo "yes"
++    def_o_keepexec="-D HAVE_O_KEEPEXEC"
++else
++    echo "no"
++fi
+ 
+ ######################################################################
+ 
+@@ -445,6 +460,7 @@ cat <<EOF >Makefile.conf
+ NETSYS_LINK_OPTIONS = $netsys_link_options
+ DEF_O_SHARE_DELETE = $def_o_share_delete
+ DEF_O_CLOEXEC = $def_o_cloexec
++DEF_O_KEEPEXEC = $def_o_keepexec
+ OOH_OBJECT = $def_ooh_object
+ EOF
+ 
+diff --git a/code/src/netsys/netsys_c.c b/code/src/netsys/netsys_c.c
+index a8b16be..4c30873 100644
+--- a/code/src/netsys/netsys_c.c
++++ b/code/src/netsys/netsys_c.c
+@@ -448,32 +448,43 @@ static int at_flags_table[] = {
+ #ifndef O_RSYNC
+ #define O_RSYNC 0
+ #endif
+-#ifndef O_CLOEXEC
+-#define NEED_CLOEXEC_EMULATION
+-#define O_CLOEXEC 0
+-#endif
+ 
+ static int open_flag_table[] = {
+   O_RDONLY, O_WRONLY, O_RDWR, O_NONBLOCK, O_APPEND, O_CREAT, O_TRUNC, O_EXCL, 
+-  O_NOCTTY, O_DSYNC, O_SYNC, O_RSYNC, 0 /* O_SHARE_DELETE */, O_CLOEXEC
++  O_NOCTTY, O_DSYNC, O_SYNC, O_RSYNC,
++  0 /* O_SHARE_DELETE */, 0 /* O_CLOEXEC */, 0 /* O_KEEPEXEC */
+ };
+ 
+-#ifdef NEED_CLOEXEC_EMULATION
++enum { CLOEXEC = 1, KEEPEXEC = 2 };
++
+ static int open_cloexec_table[] = {
+-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
++    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CLOEXEC, KEEPEXEC
+ };
++#ifndef HAVE_O_KEEPEXEC
++#define unix_cloexec_default 0
+ #endif
++
+ #endif
+ 
+ CAMLprim value netsys_openat(value dirfd, value path, value flags, value perm)
+ {
+ #ifdef HAVE_AT
+     CAMLparam4(dirfd, path, flags, perm);
+-    int ret, cv_flags;
++    int ret, cv_flags, clo_flags, cloexec;
+     char * p;
+ 
+     /* shamelessly copied from ocaml distro */
+     cv_flags = convert_flag_list(flags, open_flag_table);
++    clo_flags = convert_flag_list(flags, open_cloexec_table);
++    if (clo_flags & CLOEXEC)
++        cloexec = 1;
++    else if (clo_flags & KEEPEXEC)
++        cloexec = 0;
++    else
++        cloexec = unix_cloexec_default;
++#if defined(O_CLOEXEC)
++    if (cloexec) cv_flags |= O_CLOEXEC;
++#endif
+     p = stat_alloc(string_length(path) + 1);
+     strcpy(p, String_val(path));
+     enter_blocking_section();
+@@ -481,8 +492,8 @@ CAMLprim value netsys_openat(value dirfd, value path, value flags, value perm)
+     leave_blocking_section();
+     stat_free(p);
+     if (ret == -1) uerror("openat", path);
+-#if defined(NEED_CLOEXEC_EMULATION) && defined(FD_CLOEXEC)
+-    if (convert_flag_list(flags, open_cloexec_table) != 0) {
++#if !defined(O_CLOEXEC)
++    {
+         int flags = fcntl(Int_val(dirfd), F_GETFD, 0);
+         if (flags == -1 || fcntl(Int_val(dirfd), F_SETFD, flags | FD_CLOEXEC) == -1)
+           uerror("openat", path);
+diff --git a/code/src/netsys/netsys_posix.ml b/code/src/netsys/netsys_posix.ml
+index 602ceae..3bf3e7c 100644
+--- a/code/src/netsys/netsys_posix.ml
++++ b/code/src/netsys/netsys_posix.ml
+@@ -715,6 +715,12 @@ type at_flag = AT_EACCESS | AT_SYMLINK_NOFOLLOW | AT_SYMLINK_FOLLOW |
+                AT_REMOVEDIR
+ 
+ (* The stubs assume these type definitions: *)
++#ifdef HAVE_O_KEEPEXEC
++type open_flag1 = Unix.open_flag =
++    O_RDONLY | O_WRONLY | O_RDWR | O_NONBLOCK | O_APPEND | O_CREAT | O_TRUNC
++  | O_EXCL | O_NOCTTY | O_DSYNC | O_SYNC | O_RSYNC | O_SHARE_DELETE
++  | O_CLOEXEC | O_KEEPEXEC
++#else
+ #ifdef HAVE_O_CLOEXEC
+ type open_flag1 = Unix.open_flag =
+     O_RDONLY | O_WRONLY | O_RDWR | O_NONBLOCK | O_APPEND | O_CREAT | O_TRUNC
+@@ -731,6 +737,7 @@ type open_flag1 = Unix.open_flag =
+   | O_EXCL | O_NOCTTY | O_DSYNC | O_SYNC | O_RSYNC
+ #endif
+ #endif
++#endif
+ 
+ type access_permission1 = Unix.access_permission =
+     R_OK | W_OK | X_OK | F_OK

diff --git a/dev-ml/ocamlnet/ocamlnet-4.1.2.ebuild b/dev-ml/ocamlnet/ocamlnet-4.1.2.ebuild
index 3bceb097c9c..6d89e100f0e 100644
--- a/dev-ml/ocamlnet/ocamlnet-4.1.2.ebuild
+++ b/dev-ml/ocamlnet/ocamlnet-4.1.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -34,6 +34,10 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${MY_P}
 
+src_prepare() {
+	epatch "${FILESDIR}/ocaml405.patch"
+}
+
 ocamlnet_use_with() {
 	if use $1; then
 		echo "-with-$2"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocamlnet/, dev-ml/ocamlnet/files/
@ 2022-12-22  7:45 Alfredo Tupone
  0 siblings, 0 replies; 3+ messages in thread
From: Alfredo Tupone @ 2022-12-22  7:45 UTC (permalink / raw
  To: gentoo-commits

commit:     30b7745ed174255ab0e2fb712927065df9e6f4f4
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 07:43:59 2022 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 07:45:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30b7745e

dev-ml/ocamlnet: add hard dependency in Makefile

Closes: https://bugs.gentoo.org/887479
Closes: https://bugs.gentoo.org/887687
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ml/ocamlnet/files/ocamlnet-4.1.9-unboundLexer.patch | 10 ++++++++++
 dev-ml/ocamlnet/ocamlnet-4.1.9.ebuild                   |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/dev-ml/ocamlnet/files/ocamlnet-4.1.9-unboundLexer.patch b/dev-ml/ocamlnet/files/ocamlnet-4.1.9-unboundLexer.patch
new file mode 100644
index 000000000000..416df217c035
--- /dev/null
+++ b/dev-ml/ocamlnet/files/ocamlnet-4.1.9-unboundLexer.patch
@@ -0,0 +1,10 @@
+--- a/src/rpc-generator/Makefile	2022-12-22 08:32:49.839794123 +0100
++++ b/src/rpc-generator/Makefile	2022-12-22 08:34:48.185817182 +0100
+@@ -31,4 +31,7 @@
+ rpcgen-packlist:
+ 	echo $(BINDIR)/ocamlrpcgen >rpcgen-packlist
+ 
++main.cmo: lexer.cmo
++lexer.cmo: parser.cmo
++
+ include depend

diff --git a/dev-ml/ocamlnet/ocamlnet-4.1.9.ebuild b/dev-ml/ocamlnet/ocamlnet-4.1.9.ebuild
index 5eb163cf9132..6bd4d2437240 100644
--- a/dev-ml/ocamlnet/ocamlnet-4.1.9.ebuild
+++ b/dev-ml/ocamlnet/ocamlnet-4.1.9.ebuild
@@ -35,6 +35,8 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
+PATCHES=( "${FILESDIR}"/${P}-unboundLexer.patch )
+
 ocamlnet_use_with() {
 	if use $1; then
 		echo "-with-$2"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocamlnet/, dev-ml/ocamlnet/files/
@ 2024-10-23 19:46 Alfredo Tupone
  0 siblings, 0 replies; 3+ messages in thread
From: Alfredo Tupone @ 2024-10-23 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     9fa417578d3a98d569f21ff1c492b40b0a1456f3
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 23 19:43:07 2024 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Oct 23 19:45:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fa41757

dev-ml/ocamlnet: drop which in favor of command -v

Closes: https://bugs.gentoo.org/941755
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ml/ocamlnet/files/ocamlnet-4.1.9-noWhich.patch | 16 ++++++++++++++++
 dev-ml/ocamlnet/ocamlnet-4.1.9-r1.ebuild           |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/dev-ml/ocamlnet/files/ocamlnet-4.1.9-noWhich.patch b/dev-ml/ocamlnet/files/ocamlnet-4.1.9-noWhich.patch
new file mode 100644
index 000000000000..9baed9842292
--- /dev/null
+++ b/dev-ml/ocamlnet/files/ocamlnet-4.1.9-noWhich.patch
@@ -0,0 +1,16 @@
+--- a/configure	2024-10-23 21:15:13.597333850 +0200
++++ b/configure	2024-10-23 21:15:34.527082731 +0200
+@@ -1106,11 +1106,11 @@
+ printf "%s" "Checking for make utility... "
+ if [ -z "$MAKE" ]
+ then
+-  if which gmake >/dev/null
++  if command -v gmake >/dev/null
+   then
+     make=gmake
+   else
+-    if which make >/dev/null
++    if command -v make >/dev/null
+     then
+       make=make
+     fi

diff --git a/dev-ml/ocamlnet/ocamlnet-4.1.9-r1.ebuild b/dev-ml/ocamlnet/ocamlnet-4.1.9-r1.ebuild
index 60b4eea78ebf..791b193f2a11 100644
--- a/dev-ml/ocamlnet/ocamlnet-4.1.9-r1.ebuild
+++ b/dev-ml/ocamlnet/ocamlnet-4.1.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -38,6 +38,7 @@ DEPEND="${RDEPEND}"
 PATCHES=(
 	"${FILESDIR}"/${P}-unboundLexer.patch
 	"${FILESDIR}"/${P}-shuffle.patch
+	"${FILESDIR}"/${P}-noWhich.patch
 )
 
 ocamlnet_use_with() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-23 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30 12:47 [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocamlnet/, dev-ml/ocamlnet/files/ Alexis Ballier
  -- strict thread matches above, loose matches on Subject: below --
2022-12-22  7:45 Alfredo Tupone
2024-10-23 19:46 Alfredo Tupone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox