commit:     b621f163b9af5f8949f0ce1ce1bc13651562b3ff
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 23 18:13:37 2022 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Jan 23 18:13:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b621f163

dev-lang/ocaml: respect CFLAGS

Closes: https://bugs.gentoo.org/719166
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch     | 11 ++++++
 ...09.0-cflags.patch => ocaml-4.10.2-cflags.patch} | 46 ++++++++--------------
 dev-lang/ocaml/ocaml-4.05.0-r7.ebuild              |  4 +-
 dev-lang/ocaml/ocaml-4.05.0-r8.ebuild              |  4 +-
 dev-lang/ocaml/ocaml-4.09.0-r2.ebuild              |  2 +
 dev-lang/ocaml/ocaml-4.10.2-r2.ebuild              |  8 +++-
 dev-lang/ocaml/ocaml-4.11.2-r2.ebuild              |  5 ++-
 dev-lang/ocaml/ocaml-4.12.1.ebuild                 |  4 +-
 dev-lang/ocaml/ocaml-4.13.1.ebuild                 |  4 +-
 9 files changed, 53 insertions(+), 35 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
index 920cd32264b6..8d2391407a35 100644
--- a/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
+++ b/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
@@ -52,3 +52,14 @@
          -I$(ROOTDIR)/runtime $(SHAREDLIB_CFLAGS) -DNATIVE_CODE \
          -DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) \
          $(OUTPUTOBJ)$@ -c $<
+--- a/tools/Makefile   2022-01-23 09:57:00.788877931 +0100
++++ b/tools/Makefile   2022-01-23 09:57:21.735516656 +0100
+@@ -322,7 +322,7 @@
+ endif
+ 
+ objinfo_helper$(EXE): objinfo_helper.c $(ROOTDIR)/runtime/caml/s.h
+-      $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
++      $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime 
$(OUTPUTEXE)$@ \
+           $(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) $< $(LIBBFD_LINK)
+ 
+ OBJINFO=$(ROOTDIR)/compilerlibs/ocamlcommon.cma \

diff --git a/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch 
b/dev-lang/ocaml/files/ocaml-4.10.2-cflags.patch
similarity index 54%
copy from dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
copy to dev-lang/ocaml/files/ocaml-4.10.2-cflags.patch
index 920cd32264b6..01117c39887d 100644
--- a/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch
+++ b/dev-lang/ocaml/files/ocaml-4.10.2-cflags.patch
@@ -9,14 +9,6 @@
  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 @@
@@ -25,30 +17,26 @@
  .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).
+@@ -102,10 +102,10 @@
+ st_stubs_n.$(O): OC_CPPFLAGS += $(NATIVE_CPPFLAGS)
  
  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)$@ $<
+-      $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
++      $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(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 $<
+-      $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
++      $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
+ 
+ partialclean:
+       rm -f *.cm*
+--- a/Makefile.common.in       2022-01-23 18:05:04.192323554 +0100
++++ b/Makefile.common.in       2022-01-23 18:05:17.211122643 +0100
+@@ -79,4 +79,4 @@
+ # general (it supports both .o and .obj)
+ 
+ %.$(O): %.c
+-      $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
++      $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<

diff --git a/dev-lang/ocaml/ocaml-4.05.0-r7.ebuild 
b/dev-lang/ocaml/ocaml-4.05.0-r7.ebuild
index 68a369bcebf8..8f3bd8015bfc 100644
--- a/dev-lang/ocaml/ocaml-4.05.0-r7.ebuild
+++ b/dev-lang/ocaml/ocaml-4.05.0-r7.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
@@ -30,6 +30,8 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+QA_FLAGS_IGNORED='/usr/lib.*/ocaml/raw_spacetime_lib.cmxs'
+
 S="${WORKDIR}/${MY_P}"
 
 PATCHES=(

diff --git a/dev-lang/ocaml/ocaml-4.05.0-r8.ebuild 
b/dev-lang/ocaml/ocaml-4.05.0-r8.ebuild
index 4c2da17dac59..58ae1dde82d7 100644
--- a/dev-lang/ocaml/ocaml-4.05.0-r8.ebuild
+++ b/dev-lang/ocaml/ocaml-4.05.0-r8.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
@@ -30,6 +30,8 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+QA_FLAGS_IGNORED='/usr/lib.*/ocaml/raw_spacetime_lib.cmxs'
+
 S="${WORKDIR}/${MY_P}"
 
 PATCHES=(

diff --git a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild 
b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
index ca9871a0c358..ef5e9bedc947 100644
--- a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
+++ b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild
@@ -21,6 +21,8 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
+
 PATCHES=(
        "${FILESDIR}"/${PN}-4.09.0-gcc-10.patch
        "${FILESDIR}"/${P}-cflags.patch

diff --git a/dev-lang/ocaml/ocaml-4.10.2-r2.ebuild 
b/dev-lang/ocaml/ocaml-4.10.2-r2.ebuild
index 3b6334a9c87c..fbf4e4c204b6 100644
--- a/dev-lang/ocaml/ocaml-4.10.2-r2.ebuild
+++ b/dev-lang/ocaml/ocaml-4.10.2-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,6 +21,12 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
+
+PATCHES=(
+       "${FILESDIR}"/${P}-cflags.patch
+)
+
 src_prepare() {
        default
 

diff --git a/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild 
b/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild
index cbc5b7cb458b..666f43b938bd 100644
--- a/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild
+++ b/dev-lang/ocaml/ocaml-4.11.2-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,8 +21,11 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
+
 PATCHES=(
        "${FILESDIR}"/${PN}-4.11.2-glibc-2.34.patch
+       "${FILESDIR}"/${PN}-4.10.2-cflags.patch
 )
 
 src_prepare() {

diff --git a/dev-lang/ocaml/ocaml-4.12.1.ebuild 
b/dev-lang/ocaml/ocaml-4.12.1.ebuild
index 287a7f38e79d..fd6cae2fff2c 100644
--- a/dev-lang/ocaml/ocaml-4.12.1.ebuild
+++ b/dev-lang/ocaml/ocaml-4.12.1.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
@@ -20,6 +20,8 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
+
 PATCHES=(
        "${FILESDIR}"/${PN}-4.12.0-glibc-2.34.patch
 )

diff --git a/dev-lang/ocaml/ocaml-4.13.1.ebuild 
b/dev-lang/ocaml/ocaml-4.13.1.ebuild
index da99522c6e38..1765de6905c0 100644
--- a/dev-lang/ocaml/ocaml-4.13.1.ebuild
+++ b/dev-lang/ocaml/ocaml-4.13.1.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
@@ -20,6 +20,8 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
+
 src_prepare() {
        default
 

Reply via email to