-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
addpkg(root/libgpiod): add v2.2 #22689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Grimler91
wants to merge
1
commit into
termux:master
Choose a base branch
from
Grimler91:libgpiod
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,15 @@ | ||
TERMUX_PKG_HOMEPAGE=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git | ||
TERMUX_PKG_DESCRIPTION="C library and tools for interacting with the GPIO character device. Requires kernel v4.6 or higher" | ||
TERMUX_PKG_LICENSE="LGPL-2.1" | ||
TERMUX_PKG_MAINTAINER="@termux" | ||
TERMUX_PKG_VERSION=2.2 | ||
TERMUX_PKG_SRCURL="https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${TERMUX_PKG_VERSION}.tar.gz" | ||
TERMUX_PKG_SHA256=ae35329db7027c740e90c883baf27c26311f0614e6a7b115771b28188b992aec | ||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" | ||
--enable-tools=yes | ||
ac_cv_func_versionsort=yes | ||
" | ||
|
||
termux_step_pre_configure() { | ||
autoreconf -vfi | ||
} |
This file contains hidden or 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,4 @@ | ||
TERMUX_SUBPKG_DESCRIPTION="Tools for interacting with Linux GPIO character device" | ||
TERMUX_SUBPKG_INCLUDE=" | ||
bin/* | ||
" |
This file contains hidden or 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,45 @@ | ||
--- ./tools/tools-common.c~ 2024-10-22 08:57:17.000000000 +0000 | ||
+++ ./tools/tools-common.c 2024-12-24 10:09:30.231824790 +0000 | ||
@@ -476,6 +476,42 @@ | ||
return 1; | ||
} | ||
|
||
+int strverscmp(const char *l0, const char *r0) | ||
+{ | ||
+ const unsigned char *l = (const void *)l0; | ||
+ const unsigned char *r = (const void *)r0; | ||
+ size_t i, dp, j; | ||
+ int z = 1; | ||
+ | ||
+ /* Find maximal matching prefix and track its maximal digit | ||
+ * suffix and whether those digits are all zeros. */ | ||
+ for (dp=i=0; l[i]==r[i]; i++) { | ||
+ int c = l[i]; | ||
+ if (!c) return 0; | ||
+ if (!isdigit(c)) dp=i+1, z=1; | ||
+ else if (c!='0') z=0; | ||
+ } | ||
+ | ||
+ if (l[dp]!='0' && r[dp]!='0') { | ||
+ /* If we're not looking at a digit sequence that began | ||
+ * with a zero, longest digit string is greater. */ | ||
+ for (j=i; isdigit(l[j]); j++) | ||
+ if (!isdigit(r[j])) return 1; | ||
+ if (isdigit(r[j])) return -1; | ||
+ } else if (z && dp<i && (isdigit(l[i]) || isdigit(r[i]))) { | ||
+ /* Otherwise, if common prefix of digit sequence is | ||
+ * all zeros, digits order less than non-digits. */ | ||
+ return (unsigned char)(l[i]-'0') - (unsigned char)(r[i]-'0'); | ||
+ } | ||
+ | ||
+ return l[i] - r[i]; | ||
+} | ||
+ | ||
+static int versionsort(const struct dirent **a, const struct dirent **b) | ||
+{ | ||
+ return strverscmp((*a)->d_name, (*b)->d_name); | ||
+} | ||
+ | ||
int all_chip_paths(char ***paths_ptr) | ||
{ | ||
int i, j, num_chips, ret = 0; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.