aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2021-09-27 12:44:18 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2021-09-27 12:44:27 +0000
commit7b013f0f7d260b8a3732b3028f8ee6f4f6d07615 (patch)
treee864729f22f2199647ae480dbf44d5d6fb276cb3 /net
parentde79f7754ee12f6b0a2d9269e1fd770668b18143 (diff)
downloadports-7b013f0f7d260b8a3732b3028f8ee6f4f6d07615.tar.gz
ports-7b013f0f7d260b8a3732b3028f8ee6f4f6d07615.zip
net/unison2{32,40}: unbreak against immutable strings in OCaml 4.06+.
Diffstat (limited to 'net')
-rw-r--r--net/unison232/Makefile4
-rw-r--r--net/unison232/files/patch-Makefile.OCaml29
-rw-r--r--net/unison240/Makefile4
-rw-r--r--net/unison240/files/patch-Makefile.OCaml29
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