git: 7b013f0f7d26 - main - net/unison2{32, 40}: unbreak against immutable strings in OCaml 4.06+.
Alexey Dokuchaev
danfe at FreeBSD.org
Mon Sep 27 12:45:16 UTC 2021
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7b013f0f7d260b8a3732b3028f8ee6f4f6d07615
commit 7b013f0f7d260b8a3732b3028f8ee6f4f6d07615
Author: Alexey Dokuchaev <danfe at FreeBSD.org>
AuthorDate: 2021-09-27 12:44:18 +0000
Commit: Alexey Dokuchaev <danfe at FreeBSD.org>
CommitDate: 2021-09-27 12:44:27 +0000
net/unison2{32,40}: unbreak against immutable strings in OCaml 4.06+.
---
net/unison232/Makefile | 4 ----
net/unison232/files/patch-Makefile.OCaml | 29 +++++++++++++++++++++++++++++
net/unison240/Makefile | 4 ----
net/unison240/files/patch-Makefile.OCaml | 29 +++++++++++++++++++++++++++++
4 files changed, 58 insertions(+), 8 deletions(-)
diff --git a/net/unison232/Makefile b/net/unison232/Makefile
index 30fcf0fe4897..970b35e96d39 100644
--- a/net/unison232/Makefile
+++ b/net/unison232/Makefile
@@ -61,10 +61,6 @@ USES+= gettext-runtime gnome
PLIST_SUB+= X11=""
.endif
-post-patch:
- @${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk2)@\1site-lib/\2@' \
- ${WRKSRC}/Makefile.OCaml
-
post-build:
d=$$(mktemp -d) && trap "rm -rf $$d" 0 && ( cd ${WRKSRC} && HOME=$$d ./unison -selftest -ui text -batch )
.if ${FLAVOR} == x11
diff --git a/net/unison232/files/patch-Makefile.OCaml b/net/unison232/files/patch-Makefile.OCaml
new file mode 100644
index 000000000000..8c9629cf3e8e
--- /dev/null
+++ b/net/unison232/files/patch-Makefile.OCaml
@@ -0,0 +1,29 @@
+--- Makefile.OCaml.orig 2009-06-18 09:29:40 UTC
++++ Makefile.OCaml
+@@ -65,7 +65,7 @@ OCAMLLIBDIR=$(shell ocamlc -v | tail -n -1 | sed -e 's
+ # This should be set to an appropriate value automatically, depending
+ # on whether the lablgtk library is available
+ LABLGTKLIB=$(OCAMLLIBDIR)/lablgtk
+-LABLGTK2LIB=$(OCAMLLIBDIR)/lablgtk2
++LABLGTK2LIB=$(OCAMLLIBDIR)/site-lib/lablgtk2
+ ##BCP [3/2007]: Removed temporarily, since the OSX UI is not working well
+ ## at the moment and we don't want to confuse people by building it by default
+ ifeq ($(OSARCH),osx)
+@@ -84,7 +84,7 @@ buildexecutable::
+ ### Default parameters
+
+ INCLFLAGS=-I lwt -I ubase
+-CAMLFLAGS+=$(INCLFLAGS)
++CAMLFLAGS+=$(INCLFLAGS) -unsafe-string
+
+ ifeq ($(OSARCH),win32)
+ # Win32 system
+@@ -246,7 +246,7 @@ endif
+
+ # Gtk2 GUI
+ ifeq ($(UISTYLE), gtk2)
+- CAMLFLAGS+=-I +lablgtk2
++ CAMLFLAGS+=-I +site-lib/lablgtk2
+ OCAMLOBJS+=pixmaps.cmo uigtk2.cmo linkgtk2.cmo
+ OCAMLLIBS+=lablgtk.cma
+ endif
diff --git a/net/unison240/Makefile b/net/unison240/Makefile
index 38f82a554fb8..a65bd9dcff63 100644
--- a/net/unison240/Makefile
+++ b/net/unison240/Makefile
@@ -63,10 +63,6 @@ pre-patch:
@${REINPLACE_CMD} -e 's,= Unix\.symlink,s1 s2 & s1 s2,' \
${WRKSRC}/system/system_generic.ml
-post-patch:
- @${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk2)@\1site-lib/\2@' \
- ${WRKSRC}/Makefile.OCaml
-
post-build:
(cd ${WRKSRC} && HOME=${WRKSRC} ./unison -selftest -ui text -batch)
.if ${FLAVOR} == x11
diff --git a/net/unison240/files/patch-Makefile.OCaml b/net/unison240/files/patch-Makefile.OCaml
new file mode 100644
index 000000000000..dfd96642b5e9
--- /dev/null
+++ b/net/unison240/files/patch-Makefile.OCaml
@@ -0,0 +1,29 @@
+--- Makefile.OCaml.orig 2014-12-30 02:21:28 UTC
++++ Makefile.OCaml
+@@ -72,7 +72,7 @@ OCAMLLIBDIR=$(shell ocamlc -v | tail -1 | sed -e 's/.*
+ # This should be set to an appropriate value automatically, depending
+ # on whether the lablgtk library is available
+ LABLGTKLIB=$(OCAMLLIBDIR)/lablgtk
+-LABLGTK2LIB=$(OCAMLLIBDIR)/lablgtk2
++LABLGTK2LIB=$(OCAMLLIBDIR)/site-lib/lablgtk2
+ ##BCP [3/2007]: Removed temporarily, since the OSX UI is not working well
+ ## at the moment and we don't want to confuse people by building it by default
+ ifeq ($(OSARCH),osx)
+@@ -91,7 +91,7 @@ buildexecutable::
+ ### Default parameters
+
+ INCLFLAGS=-I lwt -I ubase -I system
+-CAMLFLAGS+=$(INCLFLAGS)
++CAMLFLAGS+=$(INCLFLAGS) -unsafe-string
+ CAMLFLAGS+=-I system/$(SYSTEM) -I lwt/$(SYSTEM)
+
+ ifeq ($(OSARCH),win32)
+@@ -292,7 +292,7 @@ endif
+
+ # Gtk2 GUI
+ ifeq ($(UISTYLE), gtk2)
+- CAMLFLAGS+=-I +lablgtk2
++ CAMLFLAGS+=-I +site-lib/lablgtk2
+ OCAMLOBJS+=pixmaps.cmo uigtk2.cmo linkgtk2.cmo
+ OCAMLLIBS+=lablgtk.cma
+ endif
More information about the dev-commits-ports-all
mailing list