1 |
commit: 4ce3322fd13b78a01c8204b9beb7f303756b986c |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 21 02:08:22 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 20 21:19:58 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ce3322f |
7 |
|
8 |
net-im/ysm: port to EAPI 7 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
.../ysm/files/ysm-2.9.9.1-dont-strip-binary.patch | 17 +++ |
13 |
net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch | 17 +++ |
14 |
net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch | 163 +++++++++++++++++++++ |
15 |
net-im/ysm/ysm-2.9.9.1-r1.ebuild | 25 ---- |
16 |
net-im/ysm/ysm-2.9.9.1-r2.ebuild | 46 ++++++ |
17 |
5 files changed, 243 insertions(+), 25 deletions(-) |
18 |
|
19 |
diff --git a/net-im/ysm/files/ysm-2.9.9.1-dont-strip-binary.patch b/net-im/ysm/files/ysm-2.9.9.1-dont-strip-binary.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..dd84db69b46 |
22 |
--- /dev/null |
23 |
+++ b/net-im/ysm/files/ysm-2.9.9.1-dont-strip-binary.patch |
24 |
@@ -0,0 +1,17 @@ |
25 |
+From bcdc0714b9dcd08714374aa83ab112f1da0600a7 Mon Sep 17 00:00:00 2001 |
26 |
+From: Sam James <sam@g.o> |
27 |
+Date: Wed, 21 Apr 2021 00:45:47 +0000 |
28 |
+Subject: [PATCH 2/2] Don't strip binary |
29 |
+ |
30 |
+--- a/src/Makefile.in |
31 |
++++ b/src/Makefile.in |
32 |
+@@ -53,7 +53,7 @@ install-prog: |
33 |
+ @if [ -f "$(DESTDIR)$(bindir)/$(PROG)" ]; then \ |
34 |
+ mv -f "$(DESTDIR)$(bindir)/$(PROG)" "$(DESTDIR)$(bindir)/$(PROG).old"; \ |
35 |
+ fi |
36 |
+- $(INSTALL) -s $(PROG) $(DESTDIR)$(bindir)/ ; |
37 |
++ $(INSTALL) $(PROG) $(DESTDIR)$(bindir)/ ; |
38 |
+ |
39 |
+ @echo -e \ |
40 |
+ " **********************************************************\n"\ |
41 |
+-- |
42 |
|
43 |
diff --git a/net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch b/net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch |
44 |
new file mode 100644 |
45 |
index 00000000000..dcfeecb04c8 |
46 |
--- /dev/null |
47 |
+++ b/net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch |
48 |
@@ -0,0 +1,17 @@ |
49 |
+From 52470a9be22fb4f8b6092e744c324ba691aff583 Mon Sep 17 00:00:00 2001 |
50 |
+From: Sam James <sam@g.o> |
51 |
+Date: Wed, 21 Apr 2021 00:45:27 +0000 |
52 |
+Subject: [PATCH 1/2] Fix bashism |
53 |
+ |
54 |
+--- a/configure.in |
55 |
++++ b/configure.in |
56 |
+@@ -94,7 +94,7 @@ AC_CHECK_LIB([nsl], |
57 |
+ |
58 |
+ # final checks |
59 |
+ |
60 |
+-if test "$vl_cv_lib_readline" == "no"; then |
61 |
++if test "$vl_cv_lib_readline" = "xno"; then |
62 |
+ # are we using getline instead? do we have threads? |
63 |
+ if test "$pthread_libs"; then |
64 |
+ CMDOBJS="cmdline/getline.o $CMDOBJS" |
65 |
+-- |
66 |
|
67 |
diff --git a/net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch b/net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch |
68 |
new file mode 100644 |
69 |
index 00000000000..cda0654e8e3 |
70 |
--- /dev/null |
71 |
+++ b/net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch |
72 |
@@ -0,0 +1,163 @@ |
73 |
+From d86f720bf221d713243e60147c412c05696bae7a Mon Sep 17 00:00:00 2001 |
74 |
+From: Sam James <sam@g.o> |
75 |
+Date: Wed, 21 Apr 2021 01:16:11 +0000 |
76 |
+Subject: [PATCH] Rewrite configure.ac |
77 |
+ |
78 |
+First cut at rewriting the configure script to use standard macros. Couldn't |
79 |
+find the macros referred to in the original and they were non-standard anyway. |
80 |
+ |
81 |
+First noticed when fixing a Bashism. |
82 |
+--- |
83 |
+ configure.in | 74 +++++++++++++++++-------------------------------- |
84 |
+ src/YSM_Setup.c | 3 +- |
85 |
+ 2 files changed, 26 insertions(+), 51 deletions(-) |
86 |
+ |
87 |
+diff --git a/configure.in b/configure.in |
88 |
+index 767fb51..e9f4262 100644 |
89 |
+--- a/configure.in |
90 |
++++ b/configure.in |
91 |
+@@ -1,4 +1,5 @@ |
92 |
+ AC_INIT(src/YSM_Main.c) |
93 |
++ |
94 |
+ # give welcome |
95 |
+ echo "" |
96 |
+ echo "" |
97 |
+@@ -11,32 +12,20 @@ AC_PROG_CC |
98 |
+ AC_PROG_INSTALL |
99 |
+ AC_PROG_MAKE_SET |
100 |
+ |
101 |
+-# check missing posix types |
102 |
+-CHECK_POSIX_TYPES |
103 |
+- |
104 |
+-# enable command line options. |
105 |
+-ac_arg_threads="no" |
106 |
+-ac_arg_readline="no" |
107 |
++AC_ARG_ENABLE([threads], |
108 |
++ AS_HELP_STRING([--disable-threads], [Disable threads])) |
109 |
+ |
110 |
+-AC_ARG_ENABLE([threads], |
111 |
+- AC_HELP_STRING([--disable-threads], |
112 |
+- [disable threads support]), |
113 |
+- ac_arg_threads=$enableval, ac_arg_threads=yes) |
114 |
+- |
115 |
+-AC_ARG_ENABLE([readline], |
116 |
+- AC_HELP_STRING([--disable-readline], |
117 |
+- [do not try to use the readline library]), |
118 |
+- ac_arg_readline=$enableval, ac_arg_readline=yes) |
119 |
++AC_ARG_ENABLE([readline], |
120 |
++ AS_HELP_STRING([--disable-readline], [Disable readline])) |
121 |
+ |
122 |
+ ##### fribidi ##### |
123 |
+ |
124 |
+ AC_ARG_WITH(fribidi, |
125 |
+ [ --with-fribidi=[DIR] enable the fribidi library in [DIR] to enable Hebrew and Arabic support], |
126 |
+- [with_fribidi=$withval], |
127 |
+- [with_fribidi=no]) |
128 |
++ [with_fribidi=$withval]) |
129 |
+ |
130 |
+-if test "$with_fribidi" = "yes"; then |
131 |
+- for ac_dir in /usr/local /usr; do |
132 |
++if test "x$with_fribidi" = "xyes"; then |
133 |
++ for ac_dir in /usr /usr/local; do |
134 |
+ if test -f "$ac_dir/include/fribidi/fribidi.h"; then |
135 |
+ with_fribidi=$ac_dir |
136 |
+ break; |
137 |
+@@ -44,8 +33,8 @@ if test "$with_fribidi" = "yes"; then |
138 |
+ done |
139 |
+ fi |
140 |
+ |
141 |
+-if test -n "$with_fribidi" -a "$with_fribidi" != "no"; then |
142 |
+- if test "$with_fribidi" = "yes"; then with_fribidi="/usr"; fi |
143 |
++if test -n "$with_fribidi" -a "x$with_fribidi" != "xno"; then |
144 |
++ if test "x$with_fribidi" = "xyes"; then with_fribidi="/usr"; fi |
145 |
+ |
146 |
+ if test -r $with_fribidi/include/fribidi/fribidi.h; then |
147 |
+ LIBS="$LIBS `$with_fribidi/bin/fribidi-config --libs`" |
148 |
+@@ -53,36 +42,23 @@ if test -n "$with_fribidi" -a "$with_fribidi" != "no"; then |
149 |
+ fi |
150 |
+ fi |
151 |
+ |
152 |
+-##### fribidi ##### |
153 |
+- |
154 |
+-AC_CACHE_CHECK([whether to enable threads support], |
155 |
+- ac_arg_threads, ac_arg_threads) |
156 |
+- |
157 |
+-AC_CACHE_CHECK([whether to use the readline library], |
158 |
+- ac_arg_readline, ac_arg_readline) |
159 |
+- |
160 |
+- |
161 |
+ # only check for readline if we have threads support |
162 |
+-if test "x$ac_arg_threads" = "xyes"; then |
163 |
+- CHECK_POSIX_THREADS |
164 |
++if test "x$enable_threads" != "xno"; then |
165 |
++ AC_DEFINE([YSM_WITH_THREADS], [1], [Building with threads]) |
166 |
++ |
167 |
++ AX_PTHREAD |
168 |
++ LIBS="$LIBS $PTHREAD_LIBS" |
169 |
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
170 |
+ |
171 |
+ # check for readline if we have threads only |
172 |
+- if test "$pthread_libs" != "no" && test "x$ac_arg_readline" = "xyes"; |
173 |
+- then |
174 |
+- CHECK_READLINE |
175 |
+- else |
176 |
+- vl_cv_lib_readline="no" |
177 |
++ if test "x$PTHREAD_LIBS" != "xno" -a "x$enable_readline" != "xno"; then |
178 |
++ AX_LIB_READLINE |
179 |
++ LIBS="$LIBS $READLINE_LIBS" |
180 |
++ CFLAGS="$CFLAGS $READLINE_CFLAGS" |
181 |
+ fi |
182 |
+-else |
183 |
+- vl_cv_lib_readline="no" |
184 |
+ fi |
185 |
+ |
186 |
+- |
187 |
+-# check for iconv |
188 |
+-CHECK_ICONV |
189 |
+- |
190 |
+-# check for setenv |
191 |
+-CHECK_SETENV |
192 |
++AM_ICONV |
193 |
+ |
194 |
+ # check for sparc required libraries |
195 |
+ AC_CHECK_LIB([socket], |
196 |
+@@ -93,18 +69,18 @@ AC_CHECK_LIB([nsl], |
197 |
+ LIBS="-lnsl $LIBS") |
198 |
+ |
199 |
+ # final checks |
200 |
+- |
201 |
+-if test "$vl_cv_lib_readline" = "xno"; then |
202 |
++if test "$enable_readline" = "xno"; then |
203 |
+ # are we using getline instead? do we have threads? |
204 |
+- if test "$pthread_libs"; then |
205 |
++ if test "$PTHREAD_LIBS"; then |
206 |
+ CMDOBJS="cmdline/getline.o $CMDOBJS" |
207 |
+ else |
208 |
+ # no threads, use ysmreadline!. |
209 |
+ CMDOBJS="cmdline/ysmline.o $CMDOBJS" |
210 |
+ fi |
211 |
++else |
212 |
++ AC_DEFINE([USE_READLINE], [1], [Using GNU Readline]) |
213 |
+ fi |
214 |
+ |
215 |
+-AC_SUBST(pthread_libs) |
216 |
+ AC_SUBST(CMDOBJS) |
217 |
+ AC_STDC_HEADERS |
218 |
+ AC_OUTPUT([Makefile src/Makefile src/man/Makefile]) |
219 |
+diff --git a/src/YSM_Setup.c b/src/YSM_Setup.c |
220 |
+index d91c143..8436549 100644 |
221 |
+--- a/src/YSM_Setup.c |
222 |
++++ b/src/YSM_Setup.c |
223 |
+@@ -743,8 +743,7 @@ int tries = 0; |
224 |
+ #define YSMOPENCONFIG(rwx) (fd = YSM_fopen(YSM_cfgfile,rwx)) |
225 |
+ #define YSMCLOSECONFIG() YSM_fclose(fd) |
226 |
+ |
227 |
+-__inline void |
228 |
+-CFGWRITE(FILE *fd, const u_int8_t *foo, ...) |
229 |
++void CFGWRITE(FILE *fd, const u_int8_t *foo, ...) |
230 |
+ { |
231 |
+ va_list args; |
232 |
+ va_start(args, foo); |
233 |
+-- |
234 |
+2.31.1 |
235 |
+ |
236 |
|
237 |
diff --git a/net-im/ysm/ysm-2.9.9.1-r1.ebuild b/net-im/ysm/ysm-2.9.9.1-r1.ebuild |
238 |
deleted file mode 100644 |
239 |
index 1cc3184874b..00000000000 |
240 |
--- a/net-im/ysm/ysm-2.9.9.1-r1.ebuild |
241 |
+++ /dev/null |
242 |
@@ -1,25 +0,0 @@ |
243 |
-# Copyright 1999-2017 Gentoo Foundation |
244 |
-# Distributed under the terms of the GNU General Public License v2 |
245 |
- |
246 |
-EAPI=6 |
247 |
- |
248 |
-inherit flag-o-matic versionator |
249 |
- |
250 |
-MY_PV="$(replace_all_version_separators _)" |
251 |
- |
252 |
-DESCRIPTION="A console ICQ client supporting versions 7/8" |
253 |
-HOMEPAGE="http://ysmv7.sourceforge.net/" |
254 |
-SRC_URI="mirror://sourceforge/ysmv7/${PN}v7_${MY_PV}.tar.bz2" |
255 |
-LICENSE="GPL-2" |
256 |
-SLOT="0" |
257 |
-KEYWORDS="amd64 ppc x86" |
258 |
-IUSE="" |
259 |
-RESTRICT="mirror" |
260 |
- |
261 |
-S=${WORKDIR}/${PN}v7_${MY_PV} |
262 |
- |
263 |
-src_prepare() { |
264 |
- # fix bug 570408 by restoring pre-GCC5 inline semantics |
265 |
- append-cflags -std=gnu89 |
266 |
- default |
267 |
-} |
268 |
|
269 |
diff --git a/net-im/ysm/ysm-2.9.9.1-r2.ebuild b/net-im/ysm/ysm-2.9.9.1-r2.ebuild |
270 |
new file mode 100644 |
271 |
index 00000000000..13963a823e8 |
272 |
--- /dev/null |
273 |
+++ b/net-im/ysm/ysm-2.9.9.1-r2.ebuild |
274 |
@@ -0,0 +1,46 @@ |
275 |
+# Copyright 1999-2021 Gentoo Authors |
276 |
+# Distributed under the terms of the GNU General Public License v2 |
277 |
+ |
278 |
+EAPI=7 |
279 |
+ |
280 |
+inherit autotools flag-o-matic |
281 |
+ |
282 |
+MY_PV=$(ver_rs 1- _) |
283 |
+ |
284 |
+DESCRIPTION="A console ICQ client supporting versions 7/8" |
285 |
+HOMEPAGE="http://ysmv7.sourceforge.net/" |
286 |
+SRC_URI="mirror://sourceforge/ysmv7/${PN}v7_${MY_PV}.tar.bz2" |
287 |
+S="${WORKDIR}"/${PN}v7_${MY_PV} |
288 |
+ |
289 |
+LICENSE="GPL-2" |
290 |
+SLOT="0" |
291 |
+KEYWORDS="amd64 ppc x86" |
292 |
+RESTRICT="mirror" |
293 |
+ |
294 |
+# Introduced by fix-configure.patch |
295 |
+BDEPEND="sys-devel/autoconf-archive" |
296 |
+ |
297 |
+PATCHES=( |
298 |
+ "${FILESDIR}"/${PN}-2.9.9.1-dont-strip-binary.patch |
299 |
+ "${FILESDIR}"/${PN}-2.9.9.1-fix-bashism.patch |
300 |
+ "${FILESDIR}"/${PN}-2.9.9.1-fix-configure.patch |
301 |
+) |
302 |
+ |
303 |
+src_prepare() { |
304 |
+ default |
305 |
+ |
306 |
+ mv configure.{in,ac} || die |
307 |
+ |
308 |
+ # Made obsolete by rewrite patch (fix-configure.patch) |
309 |
+ rm aclocal.m4 || die |
310 |
+ |
311 |
+ config_rpath_update . |
312 |
+ eautoreconf |
313 |
+} |
314 |
+ |
315 |
+src_configure() { |
316 |
+ # fix bug 570408 by restoring pre-GCC 5 inline semantics |
317 |
+ append-cflags -std=gnu89 |
318 |
+ |
319 |
+ econf |
320 |
+} |