wput, bump version, delete old bep/patch file (#1317)

This commit is contained in:
Schrijvers Luc
2017-05-04 23:14:59 +02:00
committed by waddlesplash
parent 40221900a8
commit 89593a3465
4 changed files with 180 additions and 99 deletions

View File

@@ -1,72 +0,0 @@
diff -urN wput-0.6.1/Makefile.in wput-0.6.1-haiku/Makefile.in
--- wput-0.6.1/Makefile.in 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/Makefile.in 2008-07-01 13:44:33.000000000 +0000
@@ -16,8 +16,10 @@
install: all
cd po && $(MAKE) $(MAKEDEFS) $@
- install -m0755 wput $(bindir)
- install -m0644 doc/wput.1.gz $(mandir)
+ mkdir -p $(DESTDIR)$(bindir)
+ mkdir -p $(DESTDIR)$(mandir)
+ install -m0755 wput $(DESTDIR)$(bindir)
+ install -m0644 doc/wput.1.gz $(DESTDIR)$(mandir)
@echo "----------------"
@echo "Wput installed. See 'wput -h' or 'man wput' for usage information."
@echo "Further documentation is located in the doc/USAGE.* files."
diff -urN wput-0.6.1/configure.in wput-0.6.1-haiku/configure.in
--- wput-0.6.1/configure.in 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/configure.in 2008-07-01 10:53:25.000000000 +0000
@@ -171,6 +171,7 @@
LIBS="-lsocket $LIBS";;
SCO*) CC=${CC-"cc -belf"}
LIBS="-lsocket $LIBS";;
+Haiku*) LIBS="-lnetwork $LIBS";;
esac
AC_CONFIG_HEADER(src/config.h)
AC_SUBST(GETOPT)
diff -urN wput-0.6.1/src/progress.c wput-0.6.1-haiku/src/progress.c
--- wput-0.6.1/src/progress.c 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/src/progress.c 2008-07-01 13:39:16.000000000 +0000
@@ -219,14 +219,16 @@
unsigned short int terminal_width = 80;
int get_term_width(void) {
+ int termwidth = 80;
+#ifndef __HAIKU__
struct winsize win;
char * p;
- int termwidth = 80;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) == -1 || !win.ws_col) {
if ((p = getenv("COLUMNS")) != NULL)
termwidth = atoi(p);
} else
termwidth = win.ws_col;
+#endif
return termwidth;
}
diff -urN wput-0.6.1/src/socketlib.c wput-0.6.1-haiku/src/socketlib.c
--- wput-0.6.1/src/socketlib.c 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/src/socketlib.c 2008-07-01 10:42:33.000000000 +0000
@@ -48,7 +48,7 @@
#ifndef WIN32
#include <netdb.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
diff -urN wput-0.6.1/src/wput.h wput-0.6.1-haiku/src/wput.h
--- wput-0.6.1/src/wput.h 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/src/wput.h 2008-07-01 10:42:16.000000000 +0000
@@ -18,7 +18,7 @@
# include <sys/uio.h>
# include <strings.h>
-# include <sys/errno.h>
+# include <errno.h>
# include <pwd.h>
# define WINCONV

View File

@@ -0,0 +1,124 @@
From 2bdc9f9e7a4e404bbc2b2adb02fe2dde55d46d32 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Wed, 3 May 2017 19:11:04 +0200
Subject: fix gcc2 parse errors
diff --git a/src/ftp.c b/src/ftp.c
index dca07af..744dd62 100644
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -492,7 +492,8 @@ int do_delete(_fsession * fsession, char * filename){
printout(vDEBUG, _("RMD of directory %s failed, probably not empty; deleting recursively\n"), filename);
/* save the current path so that we can cd back to it later, after the recursive delete */
- char * oldpath = cpy(fsession->ftp->current_directory);
+ {
+ char * oldpath = cpy(fsession->ftp->current_directory);
char * newpath = malloc(strlen(fsession->ftp->current_directory) + 1 + strlen(filename) + 1);
*newpath = '\0';
strcat(newpath, fsession->ftp->current_directory);
@@ -511,7 +512,8 @@ int do_delete(_fsession * fsession, char * filename){
free(fsession->ftp->current_directory);
fsession->ftp->current_directory = cpy(newpath);
- struct fileinfo * dl = ftp_get_current_directory_list(fsession->ftp);
+ {
+ struct fileinfo * dl = ftp_get_current_directory_list(fsession->ftp);
if(!dl) {
res = ftp_get_list(fsession->ftp);
@@ -543,6 +545,8 @@ int do_delete(_fsession * fsession, char * filename){
fsession->ftp->current_directory = cpy(oldpath);
res = ftp_do_rmd(fsession->ftp, filename);
}
+ }
+ }
} else {
printout(vDEBUG, "%s is a file, symlink or unknown; using DELE\n", filename);
res = ftp_do_dele(fsession->ftp, filename);
diff --git a/src/ftplib.c b/src/ftplib.c
index cf83a18..a58fa42 100644
--- a/src/ftplib.c
+++ b/src/ftplib.c
@@ -607,7 +607,8 @@ int ftp_do_chmod(ftp_con * self, char * file) {
int res;
printout(vMORE, "==> SITE CHMOD %s %s ... ", opt.chmod, file);
- char *value = malloc(strlen(opt.chmod)
+ {
+ char *value = malloc(strlen(opt.chmod)
+ 1 /* " " */
+ strlen(file)
+ 1 /* \0 */);
@@ -626,6 +627,7 @@ int ftp_do_chmod(ftp_con * self, char * file) {
}
printout(vMORE, _("\n"));
return 0;
+ }
}
/* Global (hence stable) pseudo file pointer for Wget ftp_parse_ls(). */
diff --git a/src/queue.c b/src/queue.c
index 9a5255e..b90f518 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -155,7 +155,8 @@ void separate_urls(void) {
/* cut a trailing slash in the filename */
if (*(K->url + strlen(K->url) - 1) == '/')
*(K->url + strlen(K->url) - 1) = '\0';
- char *d = strrchr(K->url + 6, '/');
+ {
+ char *d = strrchr(K->url + 6, '/');
if(d) {
int len = (d - K->url + 1);
char * tmpurl = malloc(len + 1);
@@ -165,6 +166,7 @@ void separate_urls(void) {
free(K->url);
K->url = tmpurl;
}
+ }
} else if (*(K->url + strlen(K->url) - 1) != '/') {
K->url = realloc(K->url, strlen(K->url) + 2);
strcat(K->url, "/");
diff --git a/src/socketlib.c b/src/socketlib.c
index ab77d2b..391a600 100644
--- a/src/socketlib.c
+++ b/src/socketlib.c
@@ -51,6 +51,8 @@
#include <netdb.h>
#ifndef __HAIKU__
# include <sys/errno.h>
+#else
+# include <errno.h>
#endif
#include <netinet/in.h>
#include <arpa/inet.h>
--
2.7.0
From 36f7241941d730c23fe1f0a37b8e031f9122a43f Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Wed, 3 May 2017 20:51:57 +0200
Subject: fix install paths
diff --git a/Makefile.in b/Makefile.in
index 6756cd2..99021ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
#wput makefile
PACKAGE = @PACKAGE@
prefix = @prefix@
-datadir = $(prefix)/share
-mandir = $(datadir)/man/man1
+datadir = @datadir@
+mandir = @mandir@
exec_prefix = @exec_prefix@
bindir=@bindir@
--
2.7.0

View File

@@ -1,27 +0,0 @@
DESCRIPTION="wput"
HOMEPAGE="http://wput.sourceforge.net/"
SOURCE_URI="http://voxel.dl.sourceforge.net/sourceforge/wput/wput-0.6.1.tgz"
CHECKSUM_MD5="92b41efed4db8eb4f3443c23bf7ceecf"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD()
{
cd wput-0.6.1
echo 'LT_INIT' >> configure.in
echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.in
libtoolize --force --copy --install
aclocal -I m4 --warnings=none --force
autoconf --warnings=none
./configure --prefix=`finddir B_COMMON_DIRECTORY` --enable-shared --disable-nls
make
}
INSTALL()
{
cd wput-0.6.1
make install
}
LICENSE="GNU GPL v2"
COPYRIGHT="2002-2006 Hagen Fritsch"

View File

@@ -0,0 +1,56 @@
SUMMARY="A command-line ftp-client"
DESCRIPTION="Wput is a command-line ftp-client that looks like wget but \
instead of downloading, uploads files or whole directories to remote \
ftp-servers."
HOMEPAGE="http://wput.sourceforge.net/"
COPYRIGHT="2002-2008 Hagen Fritsch"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://sourceforge.net/projects/wput/files/wput/0.6.2/wput-0.6.2.tgz"
CHECKSUM_SHA256="229d8bb7d045ca1f54d68de23f1bc8016690dc0027a16586712594fbc7fad8c7"
PATCHES="wput-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
wput$secondaryArchSuffix = $portVersion
cmd:wdel$secondaryArchSuffix
cmd:wput$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libgnutls_openssl$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libgnutls_openssl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:awk
cmd:libtoolize$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:gzip
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
libtoolize -fci
autoconf
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
}