Sync devel-1.1 with stable-1.0 (#331)
* remoteio release 1.19928.2 (#309) msys tar needs tarballs created with -H posix * Add files via upload (#326) Co-authored-by: pmunts <phil@munts.net> Co-authored-by: Paul Jarrett <jarrett.paul.young@gmail.com>
This commit is contained in:
committed by
GitHub
parent
6d4e6d6cec
commit
04f4b1a642
@@ -0,0 +1,74 @@
|
||||
name = "dir_iterators"
|
||||
description = "Ways of moving around directory trees"
|
||||
version = "0.0.3"
|
||||
website = "https://github.com/pyjarrett/dir_iterators"
|
||||
authors = ["Paul Jarrett"]
|
||||
licenses = "Apache-2.0"
|
||||
|
||||
maintainers = ["Paul Jarrett <jarrett.paul.young@gmail.com>"]
|
||||
maintainers-logins = ["pyjarrett"]
|
||||
tags = ["dir", "files", "walk"]
|
||||
|
||||
long-description = '''
|
||||
[](https://github.com/pyjarrett/dir_iterators/actions)
|
||||
[](https://alire.ada.dev/crates/dir_iterators.html)
|
||||
|
||||
## Iterator-based directory walks
|
||||
|
||||
Provides convenient ways to walk directories based on Ada 2012 user-defined
|
||||
iterators.
|
||||
|
||||
Inspired by [walkdir for Rust](https://github.com/BurntSushi/walkdir).
|
||||
|
||||
|
||||
## Walking a directory tree recursively
|
||||
|
||||
```ada
|
||||
with Ada.Directories;
|
||||
with Ada.Text_IO;
|
||||
with Dir_Iterators.Recursive;
|
||||
|
||||
-- ...
|
||||
|
||||
Dir_Walk : constant Dir_Iterators.Recursive.Recursive_Dir_Walk
|
||||
:= Dir_Iterators.Recursive.Walk (Dir);
|
||||
|
||||
for Dir_Entry of Dir_Walk loop
|
||||
Ada.Text_IO.Put_Line(Ada.Directories.Full_Name(Dir_Entry));
|
||||
end loop;
|
||||
```
|
||||
|
||||
## Walking a directory tree recursively with a filter
|
||||
|
||||
Use a filter to prune directories and files from the walk.
|
||||
|
||||
```ada
|
||||
with Ada.Directories;
|
||||
with Ada.Text_IO;
|
||||
with Dir_Iterators.Recursive;
|
||||
|
||||
package AD renames Ada.Directories;
|
||||
|
||||
-- ...
|
||||
|
||||
procedure Foo (Include_Dot_Files : Boolean; Dir_Root : String) is
|
||||
function Filter (E : Ada.Directories.Directory_Entry_Type) return Boolean is
|
||||
Name : constant String := Ada.Directories.Simple_Name(E);
|
||||
begin
|
||||
return Include_Dot_Files
|
||||
or else (not (Name'Length > 1 and then Name(1) = '.'));
|
||||
end Filter;
|
||||
|
||||
Walk : constant Dir_Iterators.Recursive.Recursive_Dir_Walk :=
|
||||
Dir_Iterators.Recursive.Walk (Dir_Root, Filter'Access);
|
||||
begin
|
||||
for Dir_Entry of Walk loop
|
||||
Ada.Text_IO.Put_Line(Ada.Directories.Full_Name(Dir_Entry));
|
||||
end loop;
|
||||
end Foo;
|
||||
```
|
||||
'''
|
||||
[origin]
|
||||
commit = "9a345982c4680cea101a4295da1ead5610526a3d"
|
||||
url = "git+https://github.com/pyjarrett/dir_iterators.git"
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
name = "remoteio"
|
||||
description = "Remote I/O Protocol Client Library for GNAT Ada"
|
||||
version = "1.19928.2"
|
||||
licenses = "BSD-1-Clause"
|
||||
website = "https://github.com/pmunts/simpleio"
|
||||
|
||||
authors = ["Philip Munts"]
|
||||
maintainers = ["Philip Munts <phil@munts.net>"]
|
||||
maintainers-logins = ["pmunts"]
|
||||
|
||||
project-files = ["remoteio.gpr", "programs.gpr"]
|
||||
|
||||
tags = ["embedded", "linux", "remoteio", "adc", "dac", "gpio", "i2c", "motor",
|
||||
"pwm", "sensor", "serial", "servo", "spi", "stepper"]
|
||||
|
||||
[available."case(os)"]
|
||||
'linux|windows' = true
|
||||
"..." = false
|
||||
|
||||
# Linux needs libhidapi-dev and/or libusb-1.0-0-dev installed
|
||||
|
||||
[[depends-on]]
|
||||
[depends-on."case(os)"."linux"]
|
||||
libhidapi = "~0.8"
|
||||
|
||||
[[depends-on]]
|
||||
[depends-on."case(os)"."linux"]
|
||||
libusb = "~1.0"
|
||||
|
||||
# On Linux, patch hid-hidapi.ads to link with libhidapi-hidraw.so
|
||||
|
||||
[[actions."case(os)".linux]]
|
||||
type = "post-fetch"
|
||||
command = ["sh", "-c", "sed -i 's/lhidapi/lhidapi-hidraw/g' src/objects/hid/hid-hidapi.ads"]
|
||||
|
||||
# On Windows, copy .DLL files to ./bin/ (for execution) and ./lib/ (for linking)
|
||||
|
||||
[[actions."case(os)".windows]]
|
||||
type = "post-fetch"
|
||||
command = ["sh", "-c", "mkdir -p ./bin && cp src/win64/*.dll ./bin && mkdir -p ./lib && cp src/win64/*.dll ./lib"]
|
||||
|
||||
[origin]
|
||||
hashes = [
|
||||
"sha512:6f9f2f580b06ea18d2b462ee08408741d5fecbcd554114802e7303f2d05dd7025592f6a9f2a1205d5dcf782a4c0950c324aab9213be296c692ddfec838ed436f",
|
||||
]
|
||||
url = "http://repo.munts.com/alire/remoteio-1.19928.2.tbz2"
|
||||
|
||||
Reference in New Issue
Block a user