commit:     c22f22a3b400873197ce60111e3aaf63cdba4b53
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 20:44:43 2017 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Dec 10 20:44:43 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c22f22a3

dev-ada/gps: Respect CFLAGS and ADAFLAGS

Package-Manager: Portage-2.3.13, Repoman-2.3.3

 dev-ada/gps/files/gps-2017-gentoo.patch | 59 ++++++++++++++++++++++++++++-----
 dev-ada/gps/gps-2017.ebuild             |  6 ++--
 2 files changed, 54 insertions(+), 11 deletions(-)

diff --git a/dev-ada/gps/files/gps-2017-gentoo.patch 
b/dev-ada/gps/files/gps-2017-gentoo.patch
index e6ff1453189..631e6dc92ef 100644
--- a/dev-ada/gps/files/gps-2017-gentoo.patch
+++ b/dev-ada/gps/files/gps-2017-gentoo.patch
@@ -244,7 +244,7 @@
     ----------------------------
 --- gps-gpl-2017-src/toolchains_editor/core/src/toolchains.adb.old     
2017-11-23 22:02:52.819994229 +0100
 +++ gps-gpl-2017-src/toolchains_editor/core/src/toolchains.adb 2017-11-23 
22:07:20.326248295 +0100
-@@ -309,12 +309,12 @@
+@@ -309,12 +309,13 @@
                 else
                    Set_Command
                      (Tc, GNAT_Driver,
@@ -255,7 +255,8 @@
                    Set_Command
                      (Tc, GNAT_List,
 -                     To_String (Full_Path) & "gnatls",
-+                     To_String (Full_Path) & "@GNATLS@",
++                     To_String (Full_Path) &
++                        "@GNATLS@",
                       From_Default,
                       Is_Default_Path);
                    Set_Command
@@ -278,10 +279,10 @@
  
 -      Set_Command (Native_Toolchain, GNAT_Driver, "gnat", From_Default, True);
 -      Set_Command (Native_Toolchain, GNAT_List, "gnatls", From_Default, True);
-+      Set_Command (Native_Toolchain, GNAT_Driver, "@GNAT@", From_Default,
-+         True);
-+      Set_Command (Native_Toolchain, GNAT_List, "@GNATLS@", From_Default,
-+         True);
++      Set_Command (Native_Toolchain, GNAT_Driver,
++         "@GNAT@", From_Default, True);
++      Set_Command (Native_Toolchain, GNAT_List,
++         "@GNATLS@", From_Default, True);
        Set_Command (Native_Toolchain, Debugger, "gdb", From_Default, True);
        Set_Command (Native_Toolchain, CPP_Filt, "c++filt", From_Default, True);
  
@@ -289,8 +290,50 @@
  
        if Get_Compiler (Native_Toolchain, "Ada") = No_Compiler then
 -         Add_Compiler (Native_Toolchain, "Ada", "gnatmake", From_Default);
-+         Add_Compiler (Native_Toolchain, "Ada", "@GNATMAKE@",
-+            From_Default);
++         Add_Compiler (Native_Toolchain, "Ada",
++            "@GNATMAKE@", From_Default);
        end if;
  
        if Get_Compiler (Native_Toolchain, "C") = No_Compiler then
+--- gps-gpl-2017-src/gps/Makefile.old  2017-12-10 20:29:18.267622400 +0100
++++ gps-gpl-2017-src/gps/Makefile      2017-12-10 20:29:34.564312700 +0100
+@@ -45,7 +45,8 @@
+       for f in ../kernel/generated/*; do cat $$f | tr -d '\015' > $$f-aux; mv 
-f $$f-aux $$f; done
+ endif
+       $(GPRBUILD) $(GPRBUILD_FLAGS) -m -p -ws -XTP_TASKING=No_Tasking \
+-        $(GPRBUILD_BUILD_TYPE_FLAGS) -Pgps -largs `pkg-config gmodule-2.0 
--libs`
++        $(GPRBUILD_BUILD_TYPE_FLAGS) -Pgps -largs `pkg-config gmodule-2.0 
--libs` \
++        -cargs:Ada $(ADAFLAGS) -cargs:C ${CFLAGS}
+ 
+ resources:
+ ifeq ($(OS),Windows_NT)
+--- gps-gpl-2017-src/common/common_no_xmlada.gpr.in.old        2017-12-10 
20:48:13.986166250 +0100
++++ gps-gpl-2017-src/common/common_no_xmlada.gpr.in    2017-12-10 
20:48:29.654872055 +0100
+@@ -22,6 +22,7 @@
+              for Switches ("dynamic_arrays.adb") use No_Checks;
+           when "Debug" =>
+       end case;
++      for Driver ("C") use External ("CC", "gcc");
+    end Compiler;
+ 
+    package Naming is
+--- gps-gpl-2017-src/common/common_with_xmlada.gpr.in.old      2017-12-10 
20:48:37.352727540 +0100
++++ gps-gpl-2017-src/common/common_with_xmlada.gpr.in  2017-12-10 
20:48:50.423482155 +0100
+@@ -23,6 +23,7 @@
+              for Switches ("dynamic_arrays.adb") use No_Checks;
+           when "Debug" =>
+       end case;
++      for Driver ("C") use External ("CC", "gcc");
+    end Compiler;
+ 
+    package Binder is
+--- gps-gpl-2017-src/shared.gpr.in.old 2017-12-10 20:52:51.117967249 +0100
++++ gps-gpl-2017-src/shared.gpr.in     2017-12-10 20:53:15.627507886 +0100
+@@ -56,6 +56,7 @@
+                );
+             for Switches ("C") use Optimize & ("-g", "-O2");
+       end case;
++      for Driver ("C") use External ("CC", "gcc");
+    end Compiler;
+ 
+    package Binder is

diff --git a/dev-ada/gps/gps-2017.ebuild b/dev-ada/gps/gps-2017.ebuild
index 1425084ddd9..7ab72b50e19 100644
--- a/dev-ada/gps/gps-2017.ebuild
+++ b/dev-ada/gps/gps-2017.ebuild
@@ -45,9 +45,9 @@ src_prepare() {
        GCC_PV=6.3.0
        mv configure.{in,ac} || die
        sed -i \
-               -e "s:@GNATMAKE@:gnatmake-${GCC_PV}:g" \
-               -e "s:@GNAT@:gnat-${GCC_PV}:g" \
-               -e "s:@GNATLS@:gnatls-${GCC_PV}:g" \
+               -e "s:@GNATMAKE@:${CHOST}-gnatmake-${GCC_PV}:g" \
+               -e "s:@GNAT@:${CHOST}-gnat-${GCC_PV}:g" \
+               -e "s:@GNATLS@:${CHOST}-gnatls-${GCC_PV}:g" \
                aclocal.m4 \
                share/support/core/gnat_help_menus.py \
                share/support/core/toolchains.py \

Reply via email to