summaryrefslogtreecommitdiff
path: root/meta/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-05-16 09:06:00 +0000
committerRichard Purdie <richard@openedhand.com>2008-05-16 09:06:00 +0000
commit3c35b00196661077b6f5a6e996c34c9b5d8c244f (patch)
tree99627e360537a116bc097b2d503bebe80c04e60d /meta/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch
parent4c664f698ca1fe0d0e04f581d01d024757fdad8a (diff)
downloadopenembedded-core-3c35b00196661077b6f5a6e996c34c9b5d8c244f.tar.gz
openembedded-core-3c35b00196661077b6f5a6e996c34c9b5d8c244f.tar.bz2
openembedded-core-3c35b00196661077b6f5a6e996c34c9b5d8c244f.zip
gcc: Sync with OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4485 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch')
-rw-r--r--meta/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch147
1 files changed, 147 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch b/meta/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch
new file mode 100644
index 0000000000..b3283d75f3
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch
@@ -0,0 +1,147 @@
+#! /bin/sh -e
+
+# DP: - Change the default search path for project files to the one specified
+# DP: by the Debian Policy for Ada: /usr/share/ada/adainclude.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+Index: gcc/ada/Make-lang.in
+===================================================================
+--- gcc/ada/Make-lang.in.orig
++++ gcc/ada/Make-lang.in
+@@ -974,7 +974,7 @@
+ $(ECHO) " S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
+ $(ECHO) " S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
+ $(ECHO) " S3 : constant String := \"$(target)/\";" >>tmp-sdefault.adb
+- $(ECHO) " S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S4 : constant String := \"/usr/share/ada/adainclude/\";" >>tmp-sdefault.adb
+ $(ECHO) " function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
+ $(ECHO) " begin" >>tmp-sdefault.adb
+ $(ECHO) " return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
+Index: gcc/ada/prj-ext.adb
+===================================================================
+--- gcc/ada/prj-ext.adb.orig
++++ gcc/ada/prj-ext.adb
+@@ -24,7 +24,6 @@
+ ------------------------------------------------------------------------------
+
+ with Hostparm;
+-with Makeutl; use Makeutl;
+ with Output; use Output;
+ with Osint; use Osint;
+ with Sdefault;
+@@ -254,38 +253,10 @@
+
+ -- Set the initial value of Current_Project_Path
+
+- if Add_Default_Dir then
+- declare
+- Prefix : String_Ptr := Sdefault.Search_Dir_Prefix;
+- begin
+- if Prefix = null then
+- Prefix := new String'(Executable_Prefix_Path);
+-
+- if Prefix.all /= "" then
+- if Get_Mode = Ada_Only then
+- Current_Project_Path :=
+- new String'(Name_Buffer (1 .. Name_Len) &
+- Path_Separator &
+- Prefix.all & Directory_Separator & "gnat");
+-
+- else
+- Current_Project_Path :=
+- new String'(Name_Buffer (1 .. Name_Len) &
+- Path_Separator &
+- Prefix.all & Directory_Separator &
+- "share" & Directory_Separator & "gpr");
+- end if;
+- end if;
+-
+- else
+- Current_Project_Path :=
+- new String'(Name_Buffer (1 .. Name_Len) & Path_Separator &
+- Prefix.all &
+- ".." & Directory_Separator &
+- ".." & Directory_Separator &
+- ".." & Directory_Separator & "gnat");
+- end if;
+- end;
++ if Add_Default_Dir and Sdefault.Search_Dir_Prefix /= null then
++ Current_Project_Path :=
++ new String'(Name_Buffer (1 .. Name_Len) & Path_Separator &
++ Sdefault.Search_Dir_Prefix.all);
+ end if;
+
+ if Current_Project_Path = null then
+Index: gcc/ada/gnatls.adb
+===================================================================
+--- gcc/ada/gnatls.adb.orig
++++ gcc/ada/gnatls.adb
+@@ -1622,9 +1622,6 @@
+ declare
+ Project_Path : String_Access := Getenv (Gpr_Project_Path);
+
+- Lib : constant String :=
+- Directory_Separator & "lib" & Directory_Separator;
+-
+ First : Natural;
+ Last : Natural;
+
+@@ -1684,36 +1681,8 @@
+ if Add_Default_Dir then
+ Name_Len := 0;
+ Add_Str_To_Name_Buffer (Sdefault.Search_Dir_Prefix.all);
+-
+- -- On Windows, make sure that all directory separators are '\'
+-
+- if Directory_Separator /= '/' then
+- for J in 1 .. Name_Len loop
+- if Name_Buffer (J) = '/' then
+- Name_Buffer (J) := Directory_Separator;
+- end if;
+- end loop;
+- end if;
+-
+- -- Find the sequence "/lib/"
+-
+- while Name_Len >= Lib'Length
+- and then Name_Buffer (Name_Len - 4 .. Name_Len) /= Lib
+- loop
+- Name_Len := Name_Len - 1;
+- end loop;
+-
+- -- If the sequence "/lib"/ was found, display the default
+- -- directory <prefix>/lib/gnat/.
+-
+- if Name_Len >= 5 then
+- Name_Buffer (Name_Len + 1 .. Name_Len + 4) := "gnat";
+- Name_Buffer (Name_Len + 5) := Directory_Separator;
+- Name_Len := Name_Len + 5;
+- Write_Str (" ");
+- Write_Line
+- (To_Host_Dir_Spec (Name_Buffer (1 .. Name_Len), True).all);
+- end if;
++ Write_Str (" ");
++ Write_Line (Name_Buffer (1 .. Name_Len));
+ end if;
+ end;
+