-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
separate (Alire) | ||
function Check_Absolute_Path (Path : Any_Path) return Boolean is | ||
begin | ||
return (Path'Length >= 1 | ||
and then | ||
Path (Path'First) = GNAT.OS_Lib.Directory_Separator); | ||
end Check_Absolute_Path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
package body Alire.Platforms.Current is | ||
|
||
-- OpenBSD implementation (very close to Linux/FreeBSD) | ||
|
||
--------------------------- | ||
-- Detected_Distribution -- | ||
--------------------------- | ||
|
||
function Detected_Distribution return Platforms.Distributions | ||
is (Platforms.Distribution_Unknown); | ||
|
||
----------------------- | ||
-- Distribution_Root -- | ||
----------------------- | ||
|
||
function Distribution_Root return Absolute_Path | ||
is ("/"); | ||
|
||
---------------------- | ||
-- Load_Environment -- | ||
---------------------- | ||
|
||
procedure Load_Environment (Ctx : in out Alire.Environment.Context) | ||
is null; | ||
|
||
---------------------- | ||
-- Operating_System -- | ||
---------------------- | ||
|
||
function Operating_System return Alire.Platforms.Operating_Systems | ||
is (Alire.Platforms.OpenBSD); | ||
|
||
---------------- | ||
-- Initialize -- | ||
---------------- | ||
|
||
procedure Initialize is null; | ||
|
||
end Alire.Platforms.Current; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
with Ada.Directories; | ||
|
||
with Alire.Platforms.Common; | ||
|
||
package body Alire.Platforms.Folders is | ||
|
||
-- Linux implementation | ||
|
||
----------- | ||
-- Cache -- | ||
----------- | ||
|
||
function Cache return Absolute_Path is (Common.XDG_Data_Home); | ||
|
||
----------- | ||
-- Config-- | ||
----------- | ||
|
||
function Config return Absolute_Path is (Common.XDG_Config_Home); | ||
|
||
---------- | ||
-- Home -- | ||
---------- | ||
|
||
function Home return Absolute_Path is (Common.Unix_Home_Folder); | ||
|
||
---------- | ||
-- Temp -- | ||
---------- | ||
|
||
function Temp return Absolute_Path | ||
is (Ada.Directories.Full_Name (Common.Unix_Temp_Folder)); | ||
|
||
end Alire.Platforms.Folders; |