Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/psiconv/files/, app-text/psiconv/
Date: Fri, 28 Feb 2020 00:30:50
Message-Id: 1582849827.feae48e6ea13a13ca3e47dd45d6d4117e33de37d.soap@gentoo
1 commit: feae48e6ea13a13ca3e47dd45d6d4117e33de37d
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 28 00:30:27 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 28 00:30:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=feae48e6
7
8 app-text/psiconv: Port to EAPI 7
9
10 * Fix GCC 10 / -fno-common
11 * Fix missing headers causing implicit declarations
12
13 Closes: https://bugs.gentoo.org/707134
14 Package-Manager: Portage-2.3.89, Repoman-2.3.20
15 Signed-off-by: David Seifert <soap <AT> gentoo.org>
16
17 ...conv-0.8.3-Wimplicit-function-declaration.patch | 92 ++++++++++++++++++++++
18 .../files/psiconv-0.8.3-gcc10-fno-common.patch | 21 +++++
19 app-text/psiconv/psiconv-0.8.3-r1.ebuild | 21 ++---
20 3 files changed, 125 insertions(+), 9 deletions(-)
21
22 diff --git a/app-text/psiconv/files/psiconv-0.8.3-Wimplicit-function-declaration.patch b/app-text/psiconv/files/psiconv-0.8.3-Wimplicit-function-declaration.patch
23 new file mode 100644
24 index 00000000000..9d01c2d87de
25 --- /dev/null
26 +++ b/app-text/psiconv/files/psiconv-0.8.3-Wimplicit-function-declaration.patch
27 @@ -0,0 +1,92 @@
28 +--- a/extra/checkuid.c
29 ++++ b/extra/checkuid.c
30 +@@ -19,6 +19,7 @@
31 +
32 +
33 + #include <stdio.h>
34 ++#include <stdlib.h>
35 +
36 + unsigned long uid1[32] = { /* bit 0 */ 0x000045A0,
37 + /* bit 1 */ 0x00008B40,
38 +--- a/extra/empty.c
39 ++++ b/extra/empty.c
40 +@@ -20,6 +20,7 @@
41 + #include <psiconv/generate.h>
42 +
43 + #include <stdio.h>
44 ++#include <stdlib.h>
45 +
46 + void help(void)
47 + {
48 +--- a/extra/rewrite.c
49 ++++ b/extra/rewrite.c
50 +@@ -21,6 +21,7 @@
51 + #include <psiconv/generate.h>
52 +
53 + #include <stdio.h>
54 ++#include <stdlib.h>
55 +
56 + int main(int argc, char *argv[])
57 + {
58 +--- a/lib/psiconv/error.c
59 ++++ b/lib/psiconv/error.c
60 +@@ -22,6 +22,7 @@
61 + #include <stdarg.h>
62 + #include <stdio.h>
63 + #include <stdlib.h>
64 ++#include <string.h>
65 +
66 + #include "error.h"
67 +
68 +--- a/lib/psiconv/generate_layout.c
69 ++++ b/lib/psiconv/generate_layout.c
70 +@@ -23,6 +23,8 @@
71 + #include "generate_routines.h"
72 + #include "error.h"
73 +
74 ++#include <string.h>
75 ++
76 + #ifdef DMALLOC
77 + #include <dmalloc.h>
78 + #endif
79 +--- a/lib/psiconv/generate_simple.c
80 ++++ b/lib/psiconv/generate_simple.c
81 +@@ -23,6 +23,8 @@
82 + #include "generate_routines.h"
83 + #include "error.h"
84 +
85 ++#include <string.h>
86 ++
87 + #ifdef DMALLOC
88 + #include <dmalloc.h>
89 + #endif
90 +--- a/lib/psiconv/list.c
91 ++++ b/lib/psiconv/list.c
92 +@@ -23,6 +23,7 @@
93 + #include <stddef.h>
94 + #include <stdlib.h>
95 + #include <stdio.h>
96 ++#include <string.h>
97 + #include "general.h"
98 + #include "list.h"
99 + #include "error.h"
100 +--- a/lib/psiconv/misc.c
101 ++++ b/lib/psiconv/misc.c
102 +@@ -22,6 +22,7 @@
103 + #include <stdarg.h>
104 + #include <stdio.h>
105 + #include <stdlib.h>
106 ++#include <string.h>
107 + #include "common.h"
108 +
109 + #ifdef DMALLOC
110 +--- a/lib/psiconv/parse_driver.c
111 ++++ b/lib/psiconv/parse_driver.c
112 +@@ -21,6 +21,7 @@
113 + #include "compat.h"
114 +
115 + #include <stdlib.h>
116 ++#include <string.h>
117 +
118 + #include "parse.h"
119 + #include "parse_routines.h"
120
121 diff --git a/app-text/psiconv/files/psiconv-0.8.3-gcc10-fno-common.patch b/app-text/psiconv/files/psiconv-0.8.3-gcc10-fno-common.patch
122 new file mode 100644
123 index 00000000000..4c21a6ed3d4
124 --- /dev/null
125 +++ b/app-text/psiconv/files/psiconv-0.8.3-gcc10-fno-common.patch
126 @@ -0,0 +1,21 @@
127 +--- a/program/psiconv/psiconv.c
128 ++++ b/program/psiconv/psiconv.c
129 +@@ -41,6 +41,8 @@
130 + #include "gen.h"
131 + #include "psiconv.h"
132 +
133 ++psiconv_list fileformat_list;
134 ++
135 + static void print_help(void);
136 + static void print_version(void);
137 + static void strtoupper(char *str);
138 +--- a/program/psiconv/psiconv.h
139 ++++ b/program/psiconv/psiconv.h
140 +@@ -31,6 +31,6 @@
141 + output_function *output;
142 + } *psiconv_fileformat;
143 +
144 +-psiconv_list fileformat_list; /* of struct psiconv_fileformat */
145 ++extern psiconv_list fileformat_list; /* of struct psiconv_fileformat */
146 +
147 + #endif /* PSICONV_GEN_H */
148
149 diff --git a/app-text/psiconv/psiconv-0.8.3-r1.ebuild b/app-text/psiconv/psiconv-0.8.3-r1.ebuild
150 index 004004aee64..84ee5132d4f 100644
151 --- a/app-text/psiconv/psiconv-0.8.3-r1.ebuild
152 +++ b/app-text/psiconv/psiconv-0.8.3-r1.ebuild
153 @@ -1,7 +1,7 @@
154 -# Copyright 1999-2014 Gentoo Foundation
155 +# Copyright 1999-2020 Gentoo Authors
156 # Distributed under the terms of the GNU General Public License v2
157
158 -EAPI=5
159 +EAPI=7
160
161 inherit toolchain-funcs
162
163 @@ -9,20 +9,23 @@ DESCRIPTION="An interpreter for Psion 5(MX) file formats"
164 HOMEPAGE="http://huizen.dds.nl/~frodol/psiconv"
165 SRC_URI="http://huizen.dds.nl/~frodol/${PN}/${P}.tar.gz"
166
167 -SLOT="0"
168 LICENSE="GPL-2"
169 -IUSE="static-libs"
170 +SLOT="0"
171 KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86"
172
173 -src_prepare() {
174 - tc-export AR
175 -}
176 +PATCHES=(
177 + "${FILESDIR}"/${P}-gcc10-fno-common.patch
178 + "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch
179 +)
180
181 src_configure() {
182 - econf $(use_enable static-libs static)
183 + tc-export AR
184 + econf --disable-static
185 }
186
187 src_install() {
188 default
189 - use static-libs || rm -fr "${D}"usr/lib*/lib${PN}.la
190 +
191 + # no static archives
192 + find "${D}" -name '*.la' -delete || die
193 }