diff --git a/srcpkgs/mathcomp/patches/PR174.patch b/srcpkgs/mathcomp/patches/PR174.patch new file mode 100644 index 00000000000..fd60a615361 --- /dev/null +++ b/srcpkgs/mathcomp/patches/PR174.patch @@ -0,0 +1,28 @@ +From bda1aa9d494e4c92374db32f47e456ff9cd35540 Mon Sep 17 00:00:00 2001 +From: Jason Gross +Date: Mon, 18 Dec 2017 17:05:45 -0500 +Subject: [PATCH] Enable parallel build, fix #88 + +Apparently, the jobserver flags don't show up until we're actually +executing a rule. So rather than save the old flags, we instead record +whether or not we've seen -B before adding it (actually, whether we've +seen -B or B, since it seems that make stores B rather than -B in +MAKEFLAGS?), and then, later, we filter out B and -B only if we didn't +see them before we added them. +--- + mathcomp/Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- mathcomp/Makefile ++++ mathcomp/Makefile +@@ -15,7 +15,9 @@ else + COQDEP=$(COQBIN)coqdep + endif + +-OLD_MAKEFLAGS:=$(MAKEFLAGS) ++HAS_B:=$(filter -B B,$(MAKEFLAGS)) ++# OLD_MAKEFLAGS must use =, not :=, to capture MAKEFLAGS at call time ++OLD_MAKEFLAGS=$(if $(HAS_B),$(MAKEFLAGS),$(filter-out -B B,$(MAKEFLAGS))) + MAKEFLAGS+=-B + + .DEFAULT_GOAL := all diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template new file mode 100644 index 00000000000..73f1761025d --- /dev/null +++ b/srcpkgs/mathcomp/template @@ -0,0 +1,20 @@ +# Template file for 'mathcomp' +pkgname=mathcomp +version=1.6.4 +revision=1 +wrksrc="math-comp-mathcomp-${version}" +build_wrksrc="mathcomp" +build_style=gnu-makefile +hostmakedepends="coq" +short_desc="The Mathematical Components Library for the Coq proof assistant" +maintainer="Leah Neukirchen " +license="CeCILL-B" +homepage="https://github.com/math-comp/math-comp" +distfiles="https://github.com/math-comp/math-comp/archive/${pkgname}-${version}.tar.gz" +checksum=c672a4237f708b5f03f1feed9de37f98ef5c331819047e1f71b5762dcd92b262 +nocross=yes + +do_install() { + make install DESTDIR="${DESTDIR}" 'COQLIB:=$(shell coqtop -where)/' + vlicense ../CeCILL-B +}