Skip to content

Commit

Permalink
dev-ada/gnatcoll: require dev-ada/libgpr-2018
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Tupone <[email protected]>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
  • Loading branch information
atupone committed Nov 18, 2018
1 parent 18cc5df commit 597ffa1
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions dev-ada/gnatcoll/files/gnatcoll-2017-gentoo.patch
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,65 @@
GNAT_Version => GNAT_Version,
Errors => Local_On_Error'Unrestricted_Access);
Free (GNAT_Version);
--- a/src/gnatcoll-projects.adb 2018-11-14 18:47:27.760365233 +0100
+++ b/src/gnatcoll-projects.adb 2018-11-14 19:10:43.961337201 +0100
@@ -3273,9 +3273,9 @@
Status : out Status_Type;
Result : out GNATCOLL.VFS.File_Array_Access)
is
- Mains_Str_List : String_List_Access;
+ Mains_Str_List : String_Vectors.Vector;
Closure_Status : GPR.Util.Status_Type;
- Closures_List : String_List_Access;
+ Closures_List : String_Vectors.Vector;
begin
Trace (Me, "Get_Closures");

@@ -3287,25 +3287,18 @@
return;
end if;

- Mains_Str_List := new String_List (Mains'First .. Mains'Last);
for I in Mains'Range loop
- Mains_Str_List (I) := new String'(Mains (I).Display_Base_Name);
+ Mains_Str_List.Append (Mains (I).Display_Base_Name);
end loop;

GPR.Util.Get_Closures
(Project.Get_View, Project.Tree_View,
- Mains => Mains_Str_List.all,
+ Mains => Mains_Str_List,
All_Projects => All_Projects,
Include_Externally_Built => Include_Externally_Built,
Status => Closure_Status,
Result => Closures_List);

- -- Freeing temporary list of mains.
- for I in Mains_Str_List'Range loop
- Free (Mains_Str_List (I));
- end loop;
- Free (Mains_Str_List);
-
case Closure_Status is
when Success =>
Status := Success;
@@ -3321,17 +3314,10 @@
end case;

if Closure_Status in Success | Incomplete_Closure then
- for I in Closures_List'Range loop
- Append (Result, Create (+Closures_List (I).all));
+ for Closure of Closures_List loop
+ Append (Result, Create (+Closure));
end loop;
end if;
-
- -- Freeing temporary list of closures.
- for I in Closures_List'Range loop
- Free (Closures_List (I));
- end loop;
- Free (Closures_List);
-
end Get_Closures;

----------------
2 changes: 1 addition & 1 deletion dev-ada/gnatcoll/gnatcoll-2017.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RDEPEND="gnat_2016? ( dev-lang/gnat-gpl:4.9.4 )
postgres? ( dev-db/postgresql:* )
sqlite? ( dev-db/sqlite )
projects? (
~dev-ada/libgpr-2017[gnat_2016=,gnat_2017=,shared?,static-libs?]
~dev-ada/libgpr-2018[gnat_2016=,gnat_2017=,shared?,static-libs?]
dev-ada/xmlada[shared?,static-libs?]
)"
DEPEND="${RDEPEND}
Expand Down

0 comments on commit 597ffa1

Please sign in to comment.