aboutsummaryrefslogtreecommitdiffstats
path: root/net/unison232
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-07-30 20:52:16 +0800
committerpav <pav@FreeBSD.org>2004-07-30 20:52:16 +0800
commit470aecd0742a4c2aff9fea3a0fe27ebb848ad2c8 (patch)
treea0171f77ed9d1662066da093d62f296ba46ac4d1 /net/unison232
parent4bf07d517751e0c17b9257b1dc51ed8c2c5f9cfd (diff)
downloadfreebsd-ports-gnome-470aecd0742a4c2aff9fea3a0fe27ebb848ad2c8.tar.gz
freebsd-ports-gnome-470aecd0742a4c2aff9fea3a0fe27ebb848ad2c8.tar.zst
freebsd-ports-gnome-470aecd0742a4c2aff9fea3a0fe27ebb848ad2c8.zip
- Allow build with older version of ocaml too
PR: ports/69695 Submitted by: Dan Pelleg <daniel+gnats@pelleg.org> (maintainer)
Diffstat (limited to 'net/unison232')
-rw-r--r--net/unison232/Makefile11
-rw-r--r--net/unison232/files/ocaml-external-patch-ab13
2 files changed, 24 insertions, 0 deletions
diff --git a/net/unison232/Makefile b/net/unison232/Makefile
index b3de6afbdb4c..149126354848 100644
--- a/net/unison232/Makefile
+++ b/net/unison232/Makefile
@@ -18,6 +18,7 @@ MAINTAINER= daniel+unison@pelleg.org
COMMENT= A user-level file synchronization tool
BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml
+PATCH_DEPENDS= ${BUILD_DEPENDS}
USE_GMAKE= yes
MAKE_ARGS= UISTYLE=text CFLAGS=""
@@ -28,6 +29,16 @@ EXTRA_DOCS= unison-manual.dvi unison-manual.html \
unison-manual.pdf unison-manual.ps
.endif
+pre-patch:
+ @if [ `ocamlc -version | ${SED} -e s/\\\.//g -e s/\\\+.*//` -gt 307 ] ; then \
+ if ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/ocaml-external-patch-ab ; then \
+ ${TRUE} ; \
+ else \
+ ${ECHO_MSG} ">> Patch ocaml-external-patch-ab failed to apply cleanly." ; \
+ ${FALSE} ; \
+ fi; \
+ fi
+
post-install:
@${STRIP_CMD} ${PREFIX}/bin/unison
.if !defined(NOPORTDOCS)
diff --git a/net/unison232/files/ocaml-external-patch-ab b/net/unison232/files/ocaml-external-patch-ab
new file mode 100644
index 000000000000..247ae274f9f7
--- /dev/null
+++ b/net/unison232/files/ocaml-external-patch-ab
@@ -0,0 +1,13 @@
+--- ubase/uprintf.ml.orig Thu Jul 29 22:50:35 2004
++++ ubase/uprintf.ml Thu Jul 29 22:51:55 2004
+@@ -10,8 +10,8 @@
+ (* *)
+ (***********************************************************************)
+
+-external format_int: string -> int -> string = "format_int"
+-external format_float: string -> float -> string = "format_float"
++external format_int: string -> int -> string = "caml_format_int"
++external format_float: string -> float -> string = "caml_format_float"
+
+ let fprintf outchan doafter format =
+ let format = (Obj.magic format : string) in