[gentoo-commits] repo/gentoo:master commit in: net-misc/wput/, net-misc/wput/files/

2023-07-14 Thread Joonas Niilola
commit: a8cbe0ecfc59d2c2fe2371a5c9d3f8320e31797d
Author: Brahmajit Das  gmail  com>
AuthorDate: Wed Jun 21 15:30:52 2023 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Fri Jul 14 07:24:24 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8cbe0ec

net-misc/wput: Fix call to undeclared library function exit

Closes: https://bugs.gentoo.org/898060
Signed-off-by: Brahmajit Das  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31564
Signed-off-by: Joonas Niilola  gentoo.org>

 ...t-0.6.2_p20130413_p11-exit-not-found-musl.patch |  9 
 net-misc/wput/wput-0.6.2_p20130413_p11-r1.ebuild   | 55 ++
 2 files changed, 64 insertions(+)

diff --git 
a/net-misc/wput/files/wput-0.6.2_p20130413_p11-exit-not-found-musl.patch 
b/net-misc/wput/files/wput-0.6.2_p20130413_p11-exit-not-found-musl.patch
new file mode 100644
index ..e92fb092dbd0
--- /dev/null
+++ b/net-misc/wput/files/wput-0.6.2_p20130413_p11-exit-not-found-musl.patch
@@ -0,0 +1,9 @@
+Bug: https://bugs.gentoo.org/898060
+--- a/src/memdbg.c
 b/src/memdbg.c
+@@ -1,4 +1,5 @@
+ #include 
++#include 
+ #include 
+ #include 
+ #ifndef WIN32

diff --git a/net-misc/wput/wput-0.6.2_p20130413_p11-r1.ebuild 
b/net-misc/wput/wput-0.6.2_p20130413_p11-r1.ebuild
new file mode 100644
index ..feeba7bfe7a1
--- /dev/null
+++ b/net-misc/wput/wput-0.6.2_p20130413_p11-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Tiny program like wget, to upload files/whole directories via FTP"
+HOMEPAGE="https://wput.sourceforge.net/;
+
+if [[ ${PV} == *_p* ]] ; then
+   MY_PV=$(ver_cut 1-3)
+   SRC_URI=" mirror://debian/pool/main/w/wput/wput_${MY_PV}+git$(ver_cut 
5).orig.tar.bz2"
+   SRC_URI+=" mirror://debian/pool/main/w/wput/wput_${MY_PV}+git$(ver_cut 
5)-$(ver_cut 7).debian.tar.xz"
+   S="${WORKDIR}"/${PN}-${MY_PV}+git$(ver_cut 5)
+else
+   SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tgz"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug ssl"
+
+RDEPEND="ssl? ( net-libs/gnutls:= )"
+DEPEND="${RDEPEND}"
+# Debian's patches to fix spelling means need gettext to regenerate
+# It's so common that it's not really worth the 'touch' dance to avoid it
+# or conditional patching.
+BDEPEND="sys-devel/gettext"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-0.6.2_p20130413_p11-xopen_source-strdup.patch
+   "${FILESDIR}"/${PN}-0.6.2_p20130413_p11-no-compress-manpages.patch
+   "${FILESDIR}"/${PN}-0.6.2_p20130413_p11-exit-not-found-musl.patch
+)
+
+src_prepare() {
+   eapply $(sed -e "s:^:${WORKDIR}/debian/patches/:" 
"${WORKDIR}"/debian/patches/series)
+   default
+
+   eautoreconf
+}
+
+src_configure() {
+   local myconf=(
+   --enable-g-switch=no
+   --enable-nls
+
+   $(usev debug '--enable-memdbg=yes')
+   $(use_with ssl)
+   )
+
+   econf "${myconf[@]}"
+}



[gentoo-commits] repo/gentoo:master commit in: net-misc/wput/, net-misc/wput/files/

2020-01-29 Thread Ben Kohler
commit: 782156e886fb0d76fa2831b36ec0c7f48f6278a4
Author: Ben Kohler  gentoo  org>
AuthorDate: Wed Jan 29 17:47:37 2020 +
Commit: Ben Kohler  gentoo  org>
CommitDate: Wed Jan 29 17:48:06 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=782156e8

net-misc/wput: bump to 0.6.2 w/ crash fix

Closes: https://bugs.gentoo.org/647848
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Signed-off-by: Ben Kohler  gentoo.org>

 net-misc/wput/Manifest |  1 +
 .../wput/files/wput-0.6.2-respect-destdir.patch| 23 +++
 net-misc/wput/files/wput-fix-crash.patch   | 47 ++
 net-misc/wput/wput-0.6.2.ebuild| 36 +
 4 files changed, 107 insertions(+)

diff --git a/net-misc/wput/Manifest b/net-misc/wput/Manifest
index 31766c93b6c..5e669fa06ef 100644
--- a/net-misc/wput/Manifest
+++ b/net-misc/wput/Manifest
@@ -1 +1,2 @@
 DIST wput-0.6.1.tgz 312342 BLAKE2B 
67053f71307e9fbb3f085e9347c7843f4bcaf951858164fa228f9cfd80898192efc344f1f9cbf65a3db286fae5b514da64ed3599627f264586c9242ac753f62b
 SHA512 
f5eb5e343c77cec0f3370e8d73679e3c720a848a963c2cdc64e6c52f30b47d76e0de9ccde965da9af97d2e5f23f45dd894f26371f56ead498d28fadffe65fc4b
+DIST wput-0.6.2.tgz 368510 BLAKE2B 
bf59720e220d837354aff7d90bf06dcf54df4adf10c53ca844cb18dc6f327793ebd5dce7beecc76b43ddccfe273435a1eca918ab2272145dc8bf47293f601004
 SHA512 
e1d0fb8570cbda44c97215ee1a021a9867f2e91323b3d7f7df1d7fd68a1b2aba40a7f3068e5e85e8c736b1dba1fba62df375af99e3fb96cd0fd414b139c641bd

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
new file mode 100644
index 000..f0cbfcdebd6
--- /dev/null
+++ b/net-misc/wput/files/wput-0.6.2-respect-destdir.patch
@@ -0,0 +1,23 @@
+diff --git a/Makefile.in b/Makefile.in
+index 6756cd2..6debea8 100644
+--- a/Makefile.in
 b/Makefile.in
+@@ -16,12 +16,12 @@ win-clean:
+ 
+ install: all
+   cd po && $(MAKE) $(MAKEDEFS) $@
+-  mkdir -p $(bindir) 
+-  mkdir -p $(mandir) 
+-  install -m0755 wput $(bindir)
+-  install -m0644 doc/wput.1.gz $(mandir)
+-  ln -s $(bindir)/wput $(bindir)/wdel
+-  install -m0644 doc/wdel.1.gz $(mandir)
++  install -d $(DESTDIR)/$(bindir)
++  install -d $(DESTDIR)/$(mandir)
++  install -m0755 wput $(DESTDIR)/$(bindir)
++  install -m0644 doc/wput.1 $(DESTDIR)/$(mandir)
++  ln -s wput $(DESTDIR)/$(bindir)/wdel
++  install -m0644 doc/wdel.1 $(DESTDIR)/$(mandir)
+   @echo ""
+   @echo "Wput and Wdel installed. See 'wput/wdel -h' or 'man wput/wdel' 
for"
+   @echo "usage information."

diff --git a/net-misc/wput/files/wput-fix-crash.patch 
b/net-misc/wput/files/wput-fix-crash.patch
new file mode 100644
index 000..2afab8e5991
--- /dev/null
+++ b/net-misc/wput/files/wput-fix-crash.patch
@@ -0,0 +1,47 @@
+diff -ur wput-0.6.2+git20130413.orig/src/progress.c 
wput-0.6.2+git20130413/src/progress.c
+--- wput-0.6.2+git20130413.orig/src/progress.c 2013-07-15 00:05:50.0 
+0200
 wput-0.6.2+git20130413/src/progress.c  2016-10-25 16:48:05.909105000 
+0200
+@@ -181,7 +181,7 @@
+   static char output[15];
+   time_t secs = time (NULL);
+   struct tm *ptm = localtime ();
+-  sprintf (output, "%02d:%02d:%02d", ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
++  snprintf (output, sizeof(output), "%02d:%02d:%02d", ptm->tm_hour, 
ptm->tm_min, ptm->tm_sec);
+   return output;
+ }
+ 
+@@ -261,11 +261,11 @@
+   unit = 3, trate = trate / (1024 * 1024 * 1024);
+   
+ if(trate < 100) 
+-  sprintf(buf, "%s%.2f%s", (trate < 10) ? " " : "", trate, 
units[sp][unit]);
++  snprintf(buf, sizeof(buf), "%s%.2f%s", (trate < 10) ? " " : "", 
trate, units[sp][unit]);
+   else if(trate < 1000)
+-  sprintf(buf, "%.1f%s", trate, units[sp][unit]);
++  snprintf(buf, sizeof(buf), "%.1f%s", trate, units[sp][unit]);
+   else
+-  sprintf(buf, " %d%s", (int) trate, units[sp][unit]);
++  snprintf(buf, sizeof(buf), " %d%s", (int) trate, 
units[sp][unit]);
+ return buf;
+ }
+ /* wrapper for our progress_bar */
+@@ -303,13 +303,15 @@
+   remain = (int) (WINCONV (fsession->local_fsize - transfered) * 
((double) time_diff * 1000)
+   / (double) WINCONV tbytes / 1000);
+ if(remain < 60)
+-  sprintf(buf, "ETA%02ds", remain);
++  snprintf(buf, sizeof(buf), "ETA%02ds", remain);
+   else if(remain < 3600)
+-  sprintf(buf, "ETA %2d:%02dm", remain / 60, remain % 60);
++  snprintf(buf, sizeof(buf), "ETA %2d:%02dm", remain / 60, remain 
% 60);
+   else if(remain < 3600 * 24)
+-  sprintf(buf, "ETA %2d:%02dh", remain / 3600, (remain % 3600) / 
60);
++  snprintf(buf, sizeof(buf), "ETA %2d:%02dh", remain / 3600, 
(remain % 3600) / 60);
++  else if(remain < 3600 * 24 * 100)
++