From: Alexis Ballier Date: Fri, 6 May 2016 12:48:07 +0000 (+0200) Subject: dev-ml/batteries: make ocaml 4.03 patches conditional to having ocaml 4.03. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=ee40a808229ad9d50e5afbf25585c8e098655c30;p=gentoo.git dev-ml/batteries: make ocaml 4.03 patches conditional to having ocaml 4.03. It fails to build with older versions otherwise, bug #582246 Package-Manager: portage-2.2.28 --- diff --git a/dev-ml/batteries/batteries-2.4.0.ebuild b/dev-ml/batteries/batteries-2.4.0.ebuild index 7ea0d79a32fa..b5a7c8f8590b 100644 --- a/dev-ml/batteries/batteries-2.4.0.ebuild +++ b/dev-ml/batteries/batteries-2.4.0.ebuild @@ -22,8 +22,10 @@ DEPEND="${RDEPEND} DOCS=( "ChangeLog" "FAQ" "README.folders" "README.md" ) S="${WORKDIR}/${PN}-included-${PV}" -PATCHES=( - "${FILESDIR}/oc43-1.patch" - "${FILESDIR}/oc43-2.patch" - "${FILESDIR}/oc43-3.patch" -) + +src_prepare() { + has_version '>=dev-lang/ocaml-4.03' && epatch \ + "${FILESDIR}/oc43-1.patch" \ + "${FILESDIR}/oc43-2.patch" \ + "${FILESDIR}/oc43-3.patch" +}