From 90ae25d9df1a7d25e1d98a7fe4823589996a56c2 Mon Sep 17 00:00:00 2001 From: Gautier de Montmollin Date: Mon, 4 Mar 2024 12:40:24 +0100 Subject: [PATCH 1/3] gid 13.0.0 (#1007) GID v.013 https://forum.ada-lang.io/t/generic-image-decoder-gid-version-13/ --- index/gi/gid/gid-13.0.0.toml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 index/gi/gid/gid-13.0.0.toml diff --git a/index/gi/gid/gid-13.0.0.toml b/index/gi/gid/gid-13.0.0.toml new file mode 100644 index 00000000..75f24a92 --- /dev/null +++ b/index/gi/gid/gid-13.0.0.toml @@ -0,0 +1,43 @@ +description = "Generic Image Decoder - decode a broad variety of image formats" +name = "gid" +version = "13.0.0" +authors = ["Gautier de Montmollin"] +website = "https://gen-img-dec.sourceforge.io/" +licenses = "MIT" +maintainers = ["gdemont@hotmail.com"] +maintainers-logins = ["zertovitch", "Fabien-Chouteau"] +project-files = ["gid.gpr"] +tags = ["image", "decoder", "bmp", "gif", "jpeg", "jpg", "pbm", "pgm", "png", "pnm", "ppm", "qoi", "tga", "targa"] +executables = ["to_bmp"] +long-description = """ + image + +The Generic Image Decoder (GID) is a low-level Ada package for decoding a broad variety of image formats, +from any data stream, to any kind of medium, be it an in-memory bitmap, a GUI object, some other stream, +floating-point data for scientific calculations, a browser element, a device, ... + +Currently supported formats are: BMP, GIF, JPEG, PNG, PNM (PBM, PGM, PPM), QOI, TGA + +Animations (GIF, PNG) are supported. + +Some features: + +* Task safe +* Endian-neutral +* Multi-platform, but native code build +* Standalone (no dependency on other libraires, bindings, etc.; no extra component needed for running) +* Unconditionally portable code: OS-, CPU-, compiler- independent code (*). +* Pure Ada 2012: this package can be used in projects in Ada 2012 and later versions of the Ada language +* Free, open-source + +______ + +(*) within limits of compiler's provided integer types and target architecture capacity. +""" + +[gpr-externals] +GID_Build_Mode = ["Debug", "Fast_but_checked", "Fast_unchecked", "Small", "Smallest", "Profiling"] + +[origin] +url = "https://sourceforge.net/projects/gen-img-dec/files/gid_013_without_test_images.zip" +hashes = ["sha512:efab534cb4ee1314d1847382397a40ca04e6b129a239d38d4e26671a570723a98daf6a6ff9630829cbfbdf6262243620c5740af1355d601eb299069883ddd887"] From c5af03b39fe07f95dc30067ae93d3cf6236535f8 Mon Sep 17 00:00:00 2001 From: Pierre-Marie de Rodat Date: Sat, 9 Mar 2024 19:58:00 +0100 Subject: [PATCH 2/3] ada_toml 0.4.0 (#1008) --- index/ad/ada_toml/ada_toml-0.4.0.toml | 107 ++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 index/ad/ada_toml/ada_toml-0.4.0.toml diff --git a/index/ad/ada_toml/ada_toml-0.4.0.toml b/index/ad/ada_toml/ada_toml-0.4.0.toml new file mode 100644 index 00000000..b4ef788c --- /dev/null +++ b/index/ad/ada_toml/ada_toml-0.4.0.toml @@ -0,0 +1,107 @@ +description = "TOML parser for Ada" +name = "ada_toml" +version = "0.4.0" +authors = ["AdaCore", "Pierre-Marie de Rodat "] +licenses = "BSD-3-Clause" +maintainers = ["pmderodat@kawie.fr"] +maintainers-logins = ["pmderodat"] +project-files = ["ada_toml.gpr"] +long-description = """ +ada-toml: TOML parser for Ada +============================= + +`ada-toml` is a pure Ada library for parsing and creating +[TOML](https://github.com/toml-lang/toml#toml) documents. It conforms to the +[version 1.0.0](https://toml.io/en/v1.0.0) of the format standard. + + +Quick tutorial +-------------- + +All basic types and subprograms are in the `TOML` package. All "nodes" in a +TOML documents are materialized using the `TOML.TOML_Value` type. Since TOML +values make up a tree, this type has reference semantics. This means that +modifying a TOML node does not modify the corresponding `TOML_Value` value +itself, but rather the TOML value that is referenced. + +Parsing a TOML file is as easy as using the `TOML.File_IO.Load_File` function: + +```ada +declare + Result : constant TOML.Read_Result := + TOML.File_IO.Load_File ("config.toml"); +begin + if Result.Success then + Ada.Text_IO.Put_Line ("config.toml loaded with success!"); + else + Ada.Text_IO.Put_Line ("error while loading config.toml:"); + Ada.Text_IO.Put_Line + (Ada.Strings.Unbounded.To_String (Result.Message)); + end if; +end; +``` + +Each TOML value has kind, defining which data it contains (a boolean, an +integer, a string, a table, ...). To each kind, one or several primitives are +associated to let one process the underlying data: + +```ada +case Result.Kind is + when TOML.TOML_Boolean => + Ada.Text_IO.Put_Line ("Boolean: " & Result.As_Boolean'Image); + + when TOML.TOML_Integer => + Ada.Text_IO.Put_Line ("Boolean: " & Result.As_Integer'Image); + + when TOML.TOML_String => + Ada.Text_IO.Put_Line ("Boolean: " & Result.As_String); + + when TOML.TOML_Array => + Ada.Text_IO.Put_Line ("Array of " & Result.Length & " elements"); + + when others => + null; +end case; +``` + +There are also primitives to build TOML values: + +```ada +declare + Bool : constant TOML.TOML_Value := TOML.Create_Boolean (False); + Int : constant TOML.TOML_Value := TOML.Create_Integer (10); + Str : constant TOML.TOML_Value := TOML.Create_String ("Hello, world"); + + Table : constant TOML.TOML_Value := TOML.Create_Table; +begin + Table.Set ("bool_field", Bool); + Table.Set ("int_field", Int); + Table.Set ("str_field", Str); +end; +``` + +And finally one can turn a tree of TOML nodes back in text form: + +```ada +Ada.Text_IO.Put_Line ("TOML document:"); +Ada.Text_IO.Put_Line (Table.Dump_As_String); +``` + + +Contributing +------------ + +The development of `ada-toml` happens on +[GitHub](https://github.com/pmderodat/ada-toml). Everyone is welcome to +contribute to this project: please read our [contribution +rules](https://github.com/pmderodat/ada-toml/tree/master/CONTRIBUTING.rst) if +you consider doing so. +""" + +[gpr-externals] +ADA_TOML_BUILD_MODE = ["dev", "prod"] +LIBRARY_TYPE = ["static", "relocatable", "static-pic"] + +[origin] +url = "https://github.com/pmderodat/ada-toml/archive/v0.4.tar.gz" +hashes = ["sha512:3f3dd0de717da00a7dfd9982bb19bfb2dd372e02c23deca91329fa11fcfd077b8292e48a2fcfd23d15aef1e8ee9542cda286af1bbb2d6ac1325f7dfe91e0808c"] From 1e49e381fc721788f06f261feefaeb559030dbfc Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Wed, 13 Mar 2024 12:30:12 +0100 Subject: [PATCH 3/3] Fix cache location in devel branch --- .github/workflows/build-native-master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-native-master.yml b/.github/workflows/build-native-master.yml index 62ac621f..93864dcb 100644 --- a/.github/workflows/build-native-master.yml +++ b/.github/workflows/build-native-master.yml @@ -55,7 +55,7 @@ jobs: - name: Install tar from msys2 (Windows) # Git tar in Actions VM does not seem to work) if: matrix.os == 'windows-latest' - run: C:\Users\runneradmin\AppData\Local\alire\msys64\usr\bin\pacman --noconfirm -S tar + run: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin\pacman --noconfirm -S tar - name: Test crate run: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh