1 |
commit: 782156e886fb0d76fa2831b36ec0c7f48f6278a4 |
2 |
Author: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 29 17:47:37 2020 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 29 17:48:06 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=782156e8 |
7 |
|
8 |
net-misc/wput: bump to 0.6.2 w/ crash fix |
9 |
|
10 |
Closes: https://bugs.gentoo.org/647848 |
11 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
12 |
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> |
13 |
|
14 |
net-misc/wput/Manifest | 1 + |
15 |
.../wput/files/wput-0.6.2-respect-destdir.patch | 23 +++++++++++ |
16 |
net-misc/wput/files/wput-fix-crash.patch | 47 ++++++++++++++++++++++ |
17 |
net-misc/wput/wput-0.6.2.ebuild | 36 +++++++++++++++++ |
18 |
4 files changed, 107 insertions(+) |
19 |
|
20 |
diff --git a/net-misc/wput/Manifest b/net-misc/wput/Manifest |
21 |
index 31766c93b6c..5e669fa06ef 100644 |
22 |
--- a/net-misc/wput/Manifest |
23 |
+++ b/net-misc/wput/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST wput-0.6.1.tgz 312342 BLAKE2B 67053f71307e9fbb3f085e9347c7843f4bcaf951858164fa228f9cfd80898192efc344f1f9cbf65a3db286fae5b514da64ed3599627f264586c9242ac753f62b SHA512 f5eb5e343c77cec0f3370e8d73679e3c720a848a963c2cdc64e6c52f30b47d76e0de9ccde965da9af97d2e5f23f45dd894f26371f56ead498d28fadffe65fc4b |
26 |
+DIST wput-0.6.2.tgz 368510 BLAKE2B bf59720e220d837354aff7d90bf06dcf54df4adf10c53ca844cb18dc6f327793ebd5dce7beecc76b43ddccfe273435a1eca918ab2272145dc8bf47293f601004 SHA512 e1d0fb8570cbda44c97215ee1a021a9867f2e91323b3d7f7df1d7fd68a1b2aba40a7f3068e5e85e8c736b1dba1fba62df375af99e3fb96cd0fd414b139c641bd |
27 |
|
28 |
diff --git a/net-misc/wput/files/wput-0.6.2-respect-destdir.patch b/net-misc/wput/files/wput-0.6.2-respect-destdir.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..f0cbfcdebd6 |
31 |
--- /dev/null |
32 |
+++ b/net-misc/wput/files/wput-0.6.2-respect-destdir.patch |
33 |
@@ -0,0 +1,23 @@ |
34 |
+diff --git a/Makefile.in b/Makefile.in |
35 |
+index 6756cd2..6debea8 100644 |
36 |
+--- a/Makefile.in |
37 |
++++ b/Makefile.in |
38 |
+@@ -16,12 +16,12 @@ win-clean: |
39 |
+ |
40 |
+ install: all |
41 |
+ cd po && $(MAKE) $(MAKEDEFS) $@ |
42 |
+- mkdir -p $(bindir) |
43 |
+- mkdir -p $(mandir) |
44 |
+- install -m0755 wput $(bindir) |
45 |
+- install -m0644 doc/wput.1.gz $(mandir) |
46 |
+- ln -s $(bindir)/wput $(bindir)/wdel |
47 |
+- install -m0644 doc/wdel.1.gz $(mandir) |
48 |
++ install -d $(DESTDIR)/$(bindir) |
49 |
++ install -d $(DESTDIR)/$(mandir) |
50 |
++ install -m0755 wput $(DESTDIR)/$(bindir) |
51 |
++ install -m0644 doc/wput.1 $(DESTDIR)/$(mandir) |
52 |
++ ln -s wput $(DESTDIR)/$(bindir)/wdel |
53 |
++ install -m0644 doc/wdel.1 $(DESTDIR)/$(mandir) |
54 |
+ @echo "----------------" |
55 |
+ @echo "Wput and Wdel installed. See 'wput/wdel -h' or 'man wput/wdel' for" |
56 |
+ @echo "usage information." |
57 |
|
58 |
diff --git a/net-misc/wput/files/wput-fix-crash.patch b/net-misc/wput/files/wput-fix-crash.patch |
59 |
new file mode 100644 |
60 |
index 00000000000..2afab8e5991 |
61 |
--- /dev/null |
62 |
+++ b/net-misc/wput/files/wput-fix-crash.patch |
63 |
@@ -0,0 +1,47 @@ |
64 |
+diff -ur wput-0.6.2+git20130413.orig/src/progress.c wput-0.6.2+git20130413/src/progress.c |
65 |
+--- wput-0.6.2+git20130413.orig/src/progress.c 2013-07-15 00:05:50.000000000 +0200 |
66 |
++++ wput-0.6.2+git20130413/src/progress.c 2016-10-25 16:48:05.909105000 +0200 |
67 |
+@@ -181,7 +181,7 @@ |
68 |
+ static char output[15]; |
69 |
+ time_t secs = time (NULL); |
70 |
+ struct tm *ptm = localtime (&secs); |
71 |
+- sprintf (output, "%02d:%02d:%02d", ptm->tm_hour, ptm->tm_min, ptm->tm_sec); |
72 |
++ snprintf (output, sizeof(output), "%02d:%02d:%02d", ptm->tm_hour, ptm->tm_min, ptm->tm_sec); |
73 |
+ return output; |
74 |
+ } |
75 |
+ |
76 |
+@@ -261,11 +261,11 @@ |
77 |
+ unit = 3, trate = trate / (1024 * 1024 * 1024); |
78 |
+ |
79 |
+ if(trate < 100) |
80 |
+- sprintf(buf, "%s%.2f%s", (trate < 10) ? " " : "", trate, units[sp][unit]); |
81 |
++ snprintf(buf, sizeof(buf), "%s%.2f%s", (trate < 10) ? " " : "", trate, units[sp][unit]); |
82 |
+ else if(trate < 1000) |
83 |
+- sprintf(buf, "%.1f%s", trate, units[sp][unit]); |
84 |
++ snprintf(buf, sizeof(buf), "%.1f%s", trate, units[sp][unit]); |
85 |
+ else |
86 |
+- sprintf(buf, " %d%s", (int) trate, units[sp][unit]); |
87 |
++ snprintf(buf, sizeof(buf), " %d%s", (int) trate, units[sp][unit]); |
88 |
+ return buf; |
89 |
+ } |
90 |
+ /* wrapper for our progress_bar */ |
91 |
+@@ -303,13 +303,15 @@ |
92 |
+ remain = (int) (WINCONV (fsession->local_fsize - transfered) * ((double) time_diff * 1000) |
93 |
+ / (double) WINCONV tbytes / 1000); |
94 |
+ if(remain < 60) |
95 |
+- sprintf(buf, "ETA %02ds", remain); |
96 |
++ snprintf(buf, sizeof(buf), "ETA %02ds", remain); |
97 |
+ else if(remain < 3600) |
98 |
+- sprintf(buf, "ETA %2d:%02dm", remain / 60, remain % 60); |
99 |
++ snprintf(buf, sizeof(buf), "ETA %2d:%02dm", remain / 60, remain % 60); |
100 |
+ else if(remain < 3600 * 24) |
101 |
+- sprintf(buf, "ETA %2d:%02dh", remain / 3600, (remain % 3600) / 60); |
102 |
++ snprintf(buf, sizeof(buf), "ETA %2d:%02dh", remain / 3600, (remain % 3600) / 60); |
103 |
++ else if(remain < 3600 * 24 * 100) |
104 |
++ snprintf(buf, sizeof(buf), "ETA %2d:%02dd", remain / (3600 * 24), (remain % (24 * 3600)) / 3600); |
105 |
+ else |
106 |
+- sprintf(buf, "ETA %2d:%02dd", remain / (3600 * 24), (remain % (24 * 3600)) / 3600); |
107 |
++ snprintf(buf, sizeof(buf), "ETA **:** "); |
108 |
+ /* NO, there won't be an eta of weeks or years! 14.4modem times are gone ;). god bless all gprs-users */ |
109 |
+ |
110 |
+ return buf; |
111 |
|
112 |
diff --git a/net-misc/wput/wput-0.6.2.ebuild b/net-misc/wput/wput-0.6.2.ebuild |
113 |
new file mode 100644 |
114 |
index 00000000000..c95956b3e7b |
115 |
--- /dev/null |
116 |
+++ b/net-misc/wput/wput-0.6.2.ebuild |
117 |
@@ -0,0 +1,36 @@ |
118 |
+# Copyright 1999-2020 Gentoo Authors |
119 |
+# Distributed under the terms of the GNU General Public License v2 |
120 |
+ |
121 |
+EAPI=6 |
122 |
+ |
123 |
+DESCRIPTION="Tiny program like wget, to upload files/whole directories via FTP" |
124 |
+HOMEPAGE="http://wput.sourceforge.net/" |
125 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" |
126 |
+ |
127 |
+LICENSE="GPL-2" |
128 |
+SLOT="0" |
129 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
130 |
+IUSE="debug nls ssl" |
131 |
+ |
132 |
+RDEPEND="ssl? ( net-libs/gnutls )" |
133 |
+ |
134 |
+DEPEND=" |
135 |
+ ${RDEPEND} |
136 |
+ nls? ( sys-devel/gettext )" |
137 |
+ |
138 |
+PATCHES=( |
139 |
+ "${FILESDIR}/${PN}-0.6.2-respect-destdir.patch" |
140 |
+ "${FILESDIR}/${PN}-0.6-respectldflags.patch" |
141 |
+ "${FILESDIR}/${PN}-fix-crash.patch" |
142 |
+) |
143 |
+ |
144 |
+DOCS=( ChangeLog INSTALL TODO ) |
145 |
+ |
146 |
+src_configure() { |
147 |
+ local myconf="--enable-g-switch=no" |
148 |
+ use debug && myconf="--enable-memdbg=yes" |
149 |
+ econf \ |
150 |
+ $(use_enable nls) \ |
151 |
+ $(use_with ssl) \ |
152 |
+ "${myconf}" |
153 |
+} |