From 651bfc8f87339472d9547caeeebf01b3b47da8f3 Mon Sep 17 00:00:00 2001 From: pmunts Date: Mon, 23 Jan 2023 02:44:25 -0800 Subject: [PATCH] mcp2221 1.20671.1 (#733) Support MacOS, on both Intel and Apple silicon. Use hidapi and libusb-1.0 from Homebrew, if available. --- index/mc/mcp2221/mcp2221-1.20671.1.toml | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 index/mc/mcp2221/mcp2221-1.20671.1.toml diff --git a/index/mc/mcp2221/mcp2221-1.20671.1.toml b/index/mc/mcp2221/mcp2221-1.20671.1.toml new file mode 100644 index 00000000..e70e309b --- /dev/null +++ b/index/mc/mcp2221/mcp2221-1.20671.1.toml @@ -0,0 +1,64 @@ +name = "mcp2221" +description = "MCP2221 USB Raw HID I/O Expander Library for GNAT Ada" +version = "1.20671.1" +licenses = "BSD-1-Clause" +website = "https://github.com/pmunts/libsimpleio" + +authors = ["Philip Munts"] +maintainers = ["Philip Munts "] +maintainers-logins = ["pmunts"] + +project-files = ["mcp2221.gpr"] + +tags = ["embedded", "linux", "mcp2221", "adc", "dac", "gpio", "i2c", "motor", +"pwm", "sensor", "serial", "servo", "spi", "stepper"] + +[available."case(os)"] +'linux|macos|windows' = true +"..." = false + +# Linux needs libhidapi and libusb + +[[depends-on]] +[depends-on."case(os)"."linux"] +libhidapi = "*" + +[[depends-on]] +[depends-on."case(os)"."linux"] +libusb = "*" + +# MacOS needs Homebrew hidapi and libusb + +#[[depends-on]] +#[depends-on."case(distribution)"."homebrew"] +#libhidapi = "*" + +#[[depends-on]] +#[depends-on."case(distribution)"."homebrew"] +#libusb = "*" + +# On Linux, patch hid-hidapi.ads to link with libhidapi-hidraw.so + +[[actions."case(os)".linux]] +type = "post-fetch" +command = ["sh", "-c", "./src/scripts/postfetch.linux"] + +# On MacOS, copy .dylib files to ./lib + +[[actions."case(os)".macos]] +type = "post-fetch" +command = ["sh", "-c", "./src/scripts/postfetch.macos"] + +# On Windows, copy .DLL files to ./lib + +[[actions."case(os)".windows]] +type = "post-fetch" +command = ["sh", "-c", "./src/scripts/postfetch.windows"] + +[origin] +hashes = [ +"sha256:9a6f3a6366c0f1c539d0fcd3ca8b9648f86c630a4aedd52d6c9e783539e8c9b8", +"sha512:f52309d0ee6d6acd50a5c6cc51fa0d94a6c479062f9c20d425a966a55844745ef527a766baf0480f9c2dc5a7bbb6df9f3ea649feec5459bdef90a983da639bfb", +] +url = "http://repo.munts.com/alire/mcp2221-1.20671.1.tbz2" +