-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for FreeBSD (#22) * update GNAT project to recognize -XOS=freebsd and configure accordingly * add FreeBSD as a valid operating system * add AMD64 as an alias for X86_64 because uname -m returns amd64 on FreeBSD * add platform specific implementation for FreeBSD To build on FreeBSD, we should use gprbuild -j0 -P alr_env -XOS=freebsd * Fixes requested during code review Co-authored-by: GHA <[email protected]>
- Loading branch information
1 parent
4f9191a
commit e77a410
Showing
6 changed files
with
76 additions
and
3 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
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,34 @@ | ||
|
||
package body Alire.Platforms.Current is | ||
|
||
-- FreeBSD implementation (very close to Linux) | ||
|
||
--------------------------- | ||
-- Detected_Distribution -- | ||
--------------------------- | ||
|
||
function Detected_Distribution return Platforms.Distributions is | ||
(Platforms.Distro_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.FreeBSD); | ||
|
||
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,19 @@ | ||
with Alire.Platforms.Common; | ||
|
||
package body Alire.Platforms.Folders is | ||
|
||
-- Linux implementation | ||
|
||
----------- | ||
-- Cache -- | ||
----------- | ||
|
||
function Cache return String is (Common.XDG_Config_Folder); | ||
|
||
----------- | ||
-- Config-- | ||
----------- | ||
|
||
function Config return String is (Common.XDG_Config_Folder); | ||
|
||
end Alire.Platforms.Folders; |