summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-01-22 21:25:03 +0100
committerAlfredo Tupone <tupone@gentoo.org>2022-01-22 21:25:03 +0100
commitaa94926bbf041302507bd8a121edba782f0d2afc (patch)
treea65987d4b5f67f0f024f23efe7b3cb5616e474ba /dev-lang
parentnet-misc/dropbox: bump to 140.4.1951 (diff)
downloadgentoo-aa94926bbf041302507bd8a121edba782f0d2afc.tar.gz
gentoo-aa94926bbf041302507bd8a121edba782f0d2afc.tar.bz2
gentoo-aa94926bbf041302507bd8a121edba782f0d2afc.zip
dev-lang/ocaml: respect CFLAGS for ocaml-4.09
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch54
-rw-r--r--dev-lang/ocaml/ocaml-4.09.0-r2.ebuild7
2 files changed, 59 insertions, 2 deletions
diff --git a/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch b/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
new file mode 100644
index 000000000000..920cd32264b6
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
@@ -0,0 +1,54 @@
+--- a/runtime/Makefile 2022-01-22 19:49:32.914213696 +0100
++++ b/runtime/Makefile 2022-01-22 19:50:03.765640701 +0100
+@@ -335,7 +335,7 @@
+ # (without the extension, which is added by the macro)
+ define COMPILE_C_FILE
+ $(1).$(O): %.c
+- $$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
++ $$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
+ endef
+
+ object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic
+--- a/yacc/Makefile 2022-01-22 20:02:56.510340885 +0100
++++ b/yacc/Makefile 2022-01-22 20:03:14.998000508 +0100
+@@ -63,4 +63,4 @@
+ # also works for .obj files.
+
+ %.$(O): %.c
+- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
+--- a/otherlibs/Makefile.otherlibs.common 2022-01-22 20:24:15.316779625 +0100
++++ b/otherlibs/Makefile.otherlibs.common 2022-01-22 20:24:50.730126701 +0100
+@@ -138,4 +138,4 @@
+ $(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
+
+ .c.$(O):
+- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
+--- a/ocamltest/Makefile 2022-01-22 20:30:22.454009704 +0100
++++ b/ocamltest/Makefile 2022-01-22 20:30:33.845799603 +0100
+@@ -221,7 +221,7 @@
+ $(ocamllex) -q $<
+
+ %.$(O): %.c
+- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -c $<
++ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -c $<
+
+ ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config
+ sed \
+--- a/otherlibs/systhreads/Makefile 2022-01-22 20:42:17.647349876 +0100
++++ b/otherlibs/systhreads/Makefile 2022-01-22 20:43:29.766086103 +0100
+@@ -93,11 +93,11 @@
+ # twice, each time with different options).
+
+ st_stubs_b.$(O): st_stubs.c $(HEADER)
+- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
+ $(SHAREDLIB_CFLAGS) $(OUTPUTOBJ)$@ $<
+
+ st_stubs_n.$(O): st_stubs.c $(HEADER)
+- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) \
++ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) \
+ -I$(ROOTDIR)/runtime $(SHAREDLIB_CFLAGS) -DNATIVE_CODE \
+ -DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) \
+ $(OUTPUTOBJ)$@ -c $<
diff --git a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
index 68b58ca86b18..ca9871a0c358 100644
--- a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
+++ b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -21,7 +21,10 @@ BDEPEND="${RDEPEND}
PDEPEND="emacs? ( app-emacs/ocaml-mode )
xemacs? ( app-xemacs/ocaml )"
-PATCHES=( "${FILESDIR}"/${PN}-4.09.0-gcc-10.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.09.0-gcc-10.patch
+ "${FILESDIR}"/${P}-cflags.patch
+)
src_prepare() {
default