libgpiod: added package to repo (#2484)

* added package for libgpiod.
The hash doesn't verify for any version
The sha256 of the gzip archive is(v2.0.1): 62071ac22872d9b936408e4a067d15edcdd61dce864ace8725eacdaefe23b898 (result of: shasum -a 256 libgpiod-2.0.1.tar.gz
The sha256() function in xmake seems to come up with something different.

Signed-off-by: Dakota Carter <slang.veteran-0s@icloud.com>

* updated
-removed comments
-moved `packages/l/xmake.lua` -> `packages/l/libgpiod/xmake.lua
-switched to tools.autoconf`

Signed-off-by: Dakota Carter <slang.veteran-0s@icloud.com>

* -added file, forgot to

Signed-off-by: Dakota Carter <slang.veteran-0s@icloud.com>

* added space

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

---------

Signed-off-by: Dakota Carter <slang.veteran-0s@icloud.com>
Co-authored-by: ruki <waruqi@gmail.com>
pull/2492/head
Greeley 2 years ago committed by GitHub
parent 67d161b684
commit 27aa2682bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      packages/l/libgpiod/xmake.lua

@ -0,0 +1,24 @@
package("libgpiod")
set_homepage("https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/")
set_description("libgpiod - C library and tools for interacting with the linux GPIO character device (gpiod stands for GPIO device)")
add_urls("https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-$(version).tar.gz",
"https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git")
add_versions("v2.0.1", "cf0d4db1d94cc99281de142063d0e28f42760c4d918d6b8854e1b27811517c34")
add_versions("v2.0", "a0f835c4ca4a2a3ca021090b574235ba58bb9fd612d8a6051fb1350054e04fdd")
add_versions("v1.6.4", "9f920260c46b155f65cba8796dcf159e4ba56950b85742af357d75a1af709e68")
add_deps("autoconf-archive", "automake", "libtool", "pkg-config")
on_install("linux", function (package)
local configs = {"--enable-tools=yes", "--enable-bindings-cxx"}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
import("package.tools.autoconf").install(package, configs)
package:addenv("PATH", "bin")
end)
on_test(function (package)
os.runv("gpiodetect")
assert(package:has_cfuncs("gpiod_api_version", {includes = "gpiod.h"}))
end)
Loading…
Cancel
Save