1 |
commit: e869241d43b6b12ce36eaa75c46418c59920ce9d |
2 |
Author: Marco Scardovi <marco <AT> scardovi <DOT> com> |
3 |
AuthorDate: Fri Jun 25 17:11:49 2021 +0000 |
4 |
Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me> |
5 |
CommitDate: Fri Jun 25 17:11:49 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e869241d |
7 |
|
8 |
net-dialup/atinout: new package |
9 |
|
10 |
atinout is a command line manager for the pinephone modem |
11 |
|
12 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
13 |
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com> |
14 |
|
15 |
net-dialup/atinout/Manifest | 1 + |
16 |
net-dialup/atinout/atinout-0.9.1.ebuild | 19 +++++ |
17 |
...e-gcc-happy-by-adding-fallthrough-comment.patch | 25 +++++++ |
18 |
.../0002-do-not-rely-on-CR-in-modem-output.patch | 84 ++++++++++++++++++++++ |
19 |
net-dialup/atinout/metadata.xml | 8 +++ |
20 |
5 files changed, 137 insertions(+) |
21 |
|
22 |
diff --git a/net-dialup/atinout/Manifest b/net-dialup/atinout/Manifest |
23 |
new file mode 100644 |
24 |
index 000000000..71e1a00a7 |
25 |
--- /dev/null |
26 |
+++ b/net-dialup/atinout/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST atinout-0.9.1.tar.gz 24117 BLAKE2B b8d7f120d010d12f8acf620ddeb697c2e63d5b33711c2e717ba378f3a97fbc3ab8dafeceb2782779e33defc072923a2be21020e0826f9909f4707528baead926 SHA512 ae25b2c4f3e2a9b861a7fc7d8e469d0d9d7a230281266393ce8547abca7e2368a709db3293ca31c00d5599b1de12ae9c8cd2bc0beefce53fa30012b6a2d7764b |
29 |
|
30 |
diff --git a/net-dialup/atinout/atinout-0.9.1.ebuild b/net-dialup/atinout/atinout-0.9.1.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000..1232e50b8 |
33 |
--- /dev/null |
34 |
+++ b/net-dialup/atinout/atinout-0.9.1.ebuild |
35 |
@@ -0,0 +1,19 @@ |
36 |
+# Copyright 1999-2021 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+ |
41 |
+DESCRIPTION="AT commands as input are sent to modem and responses given as output" |
42 |
+HOMEPAGE="http://atinout.sourceforge.net/index.html" |
43 |
+SRC_URI="https://netix.dl.sourceforge.net/project/atinout/v0.9.1/${P}.tar.gz" |
44 |
+ |
45 |
+LICENSE="GPL-3" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64 ~arm64" |
48 |
+ |
49 |
+PATCHES=( |
50 |
+ "${FILESDIR}"/0001-make-gcc-happy-by-adding-fallthrough-comment.patch |
51 |
+ "${FILESDIR}"/0002-do-not-rely-on-CR-in-modem-output.patch |
52 |
+) |
53 |
+ |
54 |
+QA_PREBUILT="/usr/bin/atinout" |
55 |
|
56 |
diff --git a/net-dialup/atinout/files/0001-make-gcc-happy-by-adding-fallthrough-comment.patch b/net-dialup/atinout/files/0001-make-gcc-happy-by-adding-fallthrough-comment.patch |
57 |
new file mode 100644 |
58 |
index 000000000..ce7800fe0 |
59 |
--- /dev/null |
60 |
+++ b/net-dialup/atinout/files/0001-make-gcc-happy-by-adding-fallthrough-comment.patch |
61 |
@@ -0,0 +1,25 @@ |
62 |
+From ca2e04f8b069d269172f0d55d3716a809537f696 Mon Sep 17 00:00:00 2001 |
63 |
+From: Beralt Meppelink <b.meppelink@××××.eu> |
64 |
+Date: Fri, 27 Oct 2017 09:12:18 +0200 |
65 |
+Subject: [PATCH 1/2] make gcc happy by adding fallthrough comment |
66 |
+ |
67 |
+--- |
68 |
+ atinout.c | 2 +- |
69 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
70 |
+ |
71 |
+diff --git a/atinout.c b/atinout.c |
72 |
+index d04f300..924b5bc 100644 |
73 |
+--- a/atinout.c |
74 |
++++ b/atinout.c |
75 |
+@@ -150,7 +150,7 @@ static bool is_final_result(const char * const response) |
76 |
+ if (strcmp(&response[1], "K\r\n") == 0) { |
77 |
+ return true; |
78 |
+ } |
79 |
+- /* no break */ |
80 |
++ // fallthrough |
81 |
+ default: |
82 |
+ return false; |
83 |
+ } |
84 |
+-- |
85 |
+2.23.0 |
86 |
+ |
87 |
|
88 |
diff --git a/net-dialup/atinout/files/0002-do-not-rely-on-CR-in-modem-output.patch b/net-dialup/atinout/files/0002-do-not-rely-on-CR-in-modem-output.patch |
89 |
new file mode 100644 |
90 |
index 000000000..593dc8538 |
91 |
--- /dev/null |
92 |
+++ b/net-dialup/atinout/files/0002-do-not-rely-on-CR-in-modem-output.patch |
93 |
@@ -0,0 +1,84 @@ |
94 |
+From 65dae46181119867cd8e93ca5b33d3b0cf3df08c Mon Sep 17 00:00:00 2001 |
95 |
+From: Beralt Meppelink <b.meppelink@××××.eu> |
96 |
+Date: Fri, 27 Oct 2017 10:42:50 +0200 |
97 |
+Subject: [PATCH 2/2] do not rely on CR in modem output |
98 |
+ |
99 |
+--- |
100 |
+ atinout.c | 24 +++++++++++------------- |
101 |
+ 1 file changed, 11 insertions(+), 13 deletions(-) |
102 |
+ |
103 |
+diff --git a/atinout.c b/atinout.c |
104 |
+index 924b5bc..4cd7689 100644 |
105 |
+--- a/atinout.c |
106 |
++++ b/atinout.c |
107 |
+@@ -34,7 +34,6 @@ |
108 |
+ |
109 |
+ #define MAX_LINE_LENGTH (4 * 1024) |
110 |
+ static char buf[MAX_LINE_LENGTH]; |
111 |
+-static char buf2[MAX_LINE_LENGTH]; |
112 |
+ |
113 |
+ static struct option long_options[] = { |
114 |
+ {"help", no_argument, NULL, 'h'}, |
115 |
+@@ -125,36 +124,36 @@ static bool is_final_result(const char * const response) |
116 |
+ } |
117 |
+ return false; |
118 |
+ case 'B': |
119 |
+- if (strcmp(&response[1], "USY\r\n") == 0) { |
120 |
++ if (strcmp(&response[1], "USY\n") == 0) { |
121 |
+ return true; |
122 |
+- } |
123 |
++ } |
124 |
++ |
125 |
+ return false; |
126 |
+ |
127 |
+ case 'E': |
128 |
+- if (strcmp(&response[1], "RROR\r\n") == 0) { |
129 |
++ if (strcmp(&response[1], "RROR\n") == 0) { |
130 |
+ return true; |
131 |
+ } |
132 |
+ return false; |
133 |
+ case 'N': |
134 |
+- if (strcmp(&response[1], "O ANSWER\r\n") == 0) { |
135 |
++ if (strcmp(&response[1], "O ANSWER\n") == 0) { |
136 |
+ return true; |
137 |
+ } |
138 |
+- if (strcmp(&response[1], "O CARRIER\r\n") == 0) { |
139 |
++ if (strcmp(&response[1], "O CARRIER\n") == 0) { |
140 |
+ return true; |
141 |
+ } |
142 |
+- if (strcmp(&response[1], "O DIALTONE\r\n") == 0) { |
143 |
++ if (strcmp(&response[1], "O DIALTONE\n") == 0) { |
144 |
+ return true; |
145 |
+ } |
146 |
+ return false; |
147 |
+ case 'O': |
148 |
+- if (strcmp(&response[1], "K\r\n") == 0) { |
149 |
++ if (strcmp(&response[1], "K\n") == 0) { |
150 |
+ return true; |
151 |
+ } |
152 |
+ // fallthrough |
153 |
+ default: |
154 |
+ return false; |
155 |
+ } |
156 |
+- |
157 |
+ } |
158 |
+ |
159 |
+ int main(int argc, char *argv[]) |
160 |
+@@ -248,11 +247,10 @@ int main(int argc, char *argv[]) |
161 |
+ fprintf(stderr, "EOF from modem\n"); |
162 |
+ return EXIT_FAILURE; |
163 |
+ } |
164 |
+- strcpy(buf2, line); |
165 |
+- strip_cr(buf2); |
166 |
+- res = fputs(buf2, output); |
167 |
++ strip_cr(line); |
168 |
++ res = fputs(line, output); |
169 |
+ if (res < 0) { |
170 |
+- fprintf(stderr, "failed to write '%s' to output file (res = %d)\n", buf2, res); |
171 |
++ fprintf(stderr, "failed to write '%s' to output file (res = %d)\n", line, res); |
172 |
+ return EXIT_FAILURE; |
173 |
+ } |
174 |
+ } while (! is_final_result(line)); |
175 |
+-- |
176 |
+2.23.0 |
177 |
+ |
178 |
|
179 |
diff --git a/net-dialup/atinout/metadata.xml b/net-dialup/atinout/metadata.xml |
180 |
new file mode 100644 |
181 |
index 000000000..144c8091c |
182 |
--- /dev/null |
183 |
+++ b/net-dialup/atinout/metadata.xml |
184 |
@@ -0,0 +1,8 @@ |
185 |
+<?xml version='1.0' encoding='UTF-8'?> |
186 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
187 |
+<pkgmetadata> |
188 |
+ <maintainer type="person"> |
189 |
+ <email>marco@××××××××.com</email> |
190 |
+ <name>Marco Scardovi</name> |
191 |
+ </maintainer> |
192 |
+</pkgmetadata> |