From 42825e870a32b5f52e4266f75bbc313129403c90 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Thu, 21 May 2020 19:04:09 +0200 Subject: [PATCH] dev-ml/num: use CFLAGS Closes: https://bugs.gentoo.org/723748 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alfredo Tupone --- dev-ml/num/files/num-1.3-cflags.patch | 11 +++++++++++ dev-ml/num/num-1.3.ebuild | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 dev-ml/num/files/num-1.3-cflags.patch diff --git a/dev-ml/num/files/num-1.3-cflags.patch b/dev-ml/num/files/num-1.3-cflags.patch new file mode 100644 index 000000000000..771455c4f724 --- /dev/null +++ b/dev-ml/num/files/num-1.3-cflags.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile 2020-05-21 18:54:31.176399032 +0200 ++++ b/src/Makefile 2020-05-21 18:55:27.881498310 +0200 +@@ -65,7 +65,7 @@ + %.cmx: %.ml + $(OCAMLOPT) $(CAMLOPTFLAGS) -c $*.ml + %.$(O): %.c +- $(OCAMLC) -ccopt -DBNG_ARCH_$(BNG_ARCH) -c $*.c ++ $(OCAMLC) -ccopt "-DBNG_ARCH_$(BNG_ARCH) $(CFLAGS)" -c $*.c + + # Legacy installation: files go into OCaml's stdlib directory; only META + # is installed via findlib diff --git a/dev-ml/num/num-1.3.ebuild b/dev-ml/num/num-1.3.ebuild index aaa82b73caa0..8cea14497085 100644 --- a/dev-ml/num/num-1.3.ebuild +++ b/dev-ml/num/num-1.3.ebuild @@ -19,6 +19,14 @@ DEPEND=">=dev-lang/ocaml-4.09.0[ocamlopt] RDEPEND="${DEPEND}" BDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-cflags.patch +) + +src_compile() { + emake CFLAGS="${CFLAGS}" +} + src_install() { findlib_src_preinst OCAMLPATH="${OCAMLFIND_DESTDIR}" emake install DESTDIR="${D}" -- 2.26.2