net-misc/unison: fix parallel build bug.
authorBenda Xu <heroxbd@gentoo.org>
Thu, 26 Oct 2017 06:28:06 +0000 (15:28 +0900)
committerBenda Xu <heroxbd@gentoo.org>
Thu, 26 Oct 2017 06:28:06 +0000 (15:28 +0900)
Reference: https://github.com/bcpierce00/unison/pull/100
Credit: Robert Forsman, Coacher, José María Fernández González
Credit: Frank Steinmetzger, WGH
Closes: https://bugs.gentoo.org/582666

Package-Manager: Portage-2.3.3, Repoman-2.3.1

net-misc/unison/files/unison-2.48.4-Makefile-dep.patch [new file with mode: 0644]
net-misc/unison/unison-2.48.4.ebuild

diff --git a/net-misc/unison/files/unison-2.48.4-Makefile-dep.patch b/net-misc/unison/files/unison-2.48.4-Makefile-dep.patch
new file mode 100644 (file)
index 0000000..f65959d
--- /dev/null
@@ -0,0 +1,20 @@
+Makefile.OCaml: fswatch.cmi depends on ubase/prefs.cmi.
+
+  The dependency is needed to compile unison
+  in parallel.
+
+Reference: https://github.com/bcpierce00/unison/pull/100
+
+diff --git a/Makefile.OCaml b/Makefile.OCaml
+index 21610ce..84fe7ad 100644
+--- a/Makefile.OCaml
++++ b/Makefile.OCaml
+@@ -426,6 +426,8 @@ win32rc/unison.res.lib: win32rc/unison.res
+       @echo "$(CAMLC): $< ---> $@"
+       $(CAMLC) $(CAMLFLAGS) -c $(CWD)/$<
+ 
++fswatch.cmi : ubase/prefs.cmi
++
+ %.cmo: %.ml
+       @echo "$(OCAMLC): $< ---> $@"
+       $(OCAMLC) $(CAMLFLAGS) -c $(CWD)/$<
index a1f428de517bfb0d1fd14980d401d8346c8375e7..951e84771c95cbf111526ebaab45be8d01a9515b 100644 (file)
@@ -30,6 +30,11 @@ SRC_URI="https://www.seas.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}
                https://www.seas.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
 S="${WORKDIR}"/src
 
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-2.48.4-Makefile-dep.patch
+       default
+}
+
 src_compile() {
        local myconf