Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
Date: Sat, 22 Jan 2022 20:25:19
Message-Id: 1642883103.aa94926bbf041302507bd8a121edba782f0d2afc.tupone@gentoo
1 commit: aa94926bbf041302507bd8a121edba782f0d2afc
2 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 22 20:25:03 2022 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 22 20:25:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa94926b
7
8 dev-lang/ocaml: respect CFLAGS for ocaml-4.09
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
12
13 dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch | 54 ++++++++++++++++++++++++++
14 dev-lang/ocaml/ocaml-4.09.0-r2.ebuild | 7 +++-
15 2 files changed, 59 insertions(+), 2 deletions(-)
16
17 diff --git a/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch b/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
18 new file mode 100644
19 index 000000000000..920cd32264b6
20 --- /dev/null
21 +++ b/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
22 @@ -0,0 +1,54 @@
23 +--- a/runtime/Makefile 2022-01-22 19:49:32.914213696 +0100
24 ++++ b/runtime/Makefile 2022-01-22 19:50:03.765640701 +0100
25 +@@ -335,7 +335,7 @@
26 + # (without the extension, which is added by the macro)
27 + define COMPILE_C_FILE
28 + $(1).$(O): %.c
29 +- $$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
30 ++ $$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
31 + endef
32 +
33 + object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic
34 +--- a/yacc/Makefile 2022-01-22 20:02:56.510340885 +0100
35 ++++ b/yacc/Makefile 2022-01-22 20:03:14.998000508 +0100
36 +@@ -63,4 +63,4 @@
37 + # also works for .obj files.
38 +
39 + %.$(O): %.c
40 +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
41 ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
42 +--- a/otherlibs/Makefile.otherlibs.common 2022-01-22 20:24:15.316779625 +0100
43 ++++ b/otherlibs/Makefile.otherlibs.common 2022-01-22 20:24:50.730126701 +0100
44 +@@ -138,4 +138,4 @@
45 + $(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
46 +
47 + .c.$(O):
48 +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
49 ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
50 +--- a/ocamltest/Makefile 2022-01-22 20:30:22.454009704 +0100
51 ++++ b/ocamltest/Makefile 2022-01-22 20:30:33.845799603 +0100
52 +@@ -221,7 +221,7 @@
53 + $(ocamllex) -q $<
54 +
55 + %.$(O): %.c
56 +- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -c $<
57 ++ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -c $<
58 +
59 + ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config
60 + sed \
61 +--- a/otherlibs/systhreads/Makefile 2022-01-22 20:42:17.647349876 +0100
62 ++++ b/otherlibs/systhreads/Makefile 2022-01-22 20:43:29.766086103 +0100
63 +@@ -93,11 +93,11 @@
64 + # twice, each time with different options).
65 +
66 + st_stubs_b.$(O): st_stubs.c $(HEADER)
67 +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
68 ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
69 + $(SHAREDLIB_CFLAGS) $(OUTPUTOBJ)$@ $<
70 +
71 + st_stubs_n.$(O): st_stubs.c $(HEADER)
72 +- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) \
73 ++ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) \
74 + -I$(ROOTDIR)/runtime $(SHAREDLIB_CFLAGS) -DNATIVE_CODE \
75 + -DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) \
76 + $(OUTPUTOBJ)$@ -c $<
77
78 diff --git a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
79 index 68b58ca86b18..ca9871a0c358 100644
80 --- a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
81 +++ b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
82 @@ -1,4 +1,4 @@
83 -# Copyright 1999-2021 Gentoo Authors
84 +# Copyright 1999-2022 Gentoo Authors
85 # Distributed under the terms of the GNU General Public License v2
86
87 EAPI=7
88 @@ -21,7 +21,10 @@ BDEPEND="${RDEPEND}
89 PDEPEND="emacs? ( app-emacs/ocaml-mode )
90 xemacs? ( app-xemacs/ocaml )"
91
92 -PATCHES=( "${FILESDIR}"/${PN}-4.09.0-gcc-10.patch )
93 +PATCHES=(
94 + "${FILESDIR}"/${PN}-4.09.0-gcc-10.patch
95 + "${FILESDIR}"/${P}-cflags.patch
96 +)
97
98 src_prepare() {
99 default