summaryrefslogtreecommitdiff
path: root/unison
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2016-05-21 13:41:10 +0200
committerJuergen Daubert <jue@jue.li>2016-05-21 13:41:10 +0200
commitcbc472db3ecf6ee916a298cd3b3d17780f2e1020 (patch)
tree9c68aa69fa8f4c84522bc302218c7ebd8ca1f2cc /unison
parente9b6f718d65ed177534205cb50b73ae20b02a8b0 (diff)
downloadopt-cbc472db3ecf6ee916a298cd3b3d17780f2e1020.tar.gz
opt-cbc472db3ecf6ee916a298cd3b3d17780f2e1020.tar.xz
unison: fix build with ocaml 4.03
Diffstat (limited to 'unison')
-rw-r--r--unison/.md5sum1
-rw-r--r--unison/Pkgfile6
-rw-r--r--unison/ocaml-4.03.patch20
3 files changed, 25 insertions, 2 deletions
diff --git a/unison/.md5sum b/unison/.md5sum
index 7e8930ab9..b6c7bbb5f 100644
--- a/unison/.md5sum
+++ b/unison/.md5sum
@@ -1 +1,2 @@
+7cdb48c81f06304a0fd6f6c6479d90ce ocaml-4.03.patch
91ff2ef4141aede9af719fdd5e848bcb unison-2.48.3.tar.gz
diff --git a/unison/Pkgfile b/unison/Pkgfile
index 1c7f0c88a..7e7f100d3 100644
--- a/unison/Pkgfile
+++ b/unison/Pkgfile
@@ -6,11 +6,13 @@
name=unison
version=2.48.3
-release=1
-source=(http://www.cis.upenn.edu/~bcpierce/unison/download/releases/$name-$version/$name-$version.tar.gz)
+release=2
+source=(http://www.cis.upenn.edu/~bcpierce/unison/download/releases/$name-$version/$name-$version.tar.gz
+ ocaml-4.03.patch)
build() {
cd $name-$version
+ patch -p2 -i $SRC/ocaml-4.03.patch
unset CFLAGS CXXFLAGS
make -j1 UISTYLE=text THREADS=true NATIVE=true unison unison-fsmonitor
install -d $PKG/usr/bin
diff --git a/unison/ocaml-4.03.patch b/unison/ocaml-4.03.patch
new file mode 100644
index 000000000..a15ca0e64
--- /dev/null
+++ b/unison/ocaml-4.03.patch
@@ -0,0 +1,20 @@
+commit 4473822b5aa6de3e849ca6c958b365a71edbca4f
+Author: Benjamin Pierce <bcpierce00@gmail.com>
+Date: Sat May 14 11:28:49 2016 -0400
+
+ Fix build for OCaml 4.03.0
+
+diff --git a/src/system/system_generic.ml b/src/system/system_generic.ml
+index 22b5b6c..b9a4cef 100755
+--- a/src/system/system_generic.ml
++++ b/src/system/system_generic.ml
+@@ -57,7 +57,8 @@ let opendir f =
+ let readdir = Unix.readdir
+ let closedir = Unix.closedir
+ let readlink = Unix.readlink
+-let symlink = Unix.symlink
++(* BCP 5/16: Eta-expand for backward compatibility with OCaml <=4.02 *)
++let symlink s1 s2 = Unix.symlink s1 s2
+ let chdir = Sys.chdir
+ let getcwd = Sys.getcwd
+

Generated by cgit