From ea6c20b776d3c0da07143af95de375fb619ba70f Mon Sep 17 00:00:00 2001 From: walkerlala Date: Thu, 23 Mar 2017 10:20:23 +0000 Subject: [PATCH] tnftp: convert to an actual recipe. (#1240) * remove ftp. --- net-ftp/ftp/ftp-20121221.recipe | 47 ------------------- net-ftp/tnftp/patches/tnftp-20091122.patch | 12 ----- net-ftp/tnftp/patches/tnftp-20151004.patch | 51 ++++++++++++++++++++ net-ftp/tnftp/tnftp-20091122.recipe | 26 ----------- net-ftp/tnftp/tnftp-20151004.recipe | 54 ++++++++++++++++++++++ 5 files changed, 105 insertions(+), 85 deletions(-) delete mode 100644 net-ftp/ftp/ftp-20121221.recipe delete mode 100644 net-ftp/tnftp/patches/tnftp-20091122.patch create mode 100644 net-ftp/tnftp/patches/tnftp-20151004.patch delete mode 100644 net-ftp/tnftp/tnftp-20091122.recipe create mode 100644 net-ftp/tnftp/tnftp-20151004.recipe diff --git a/net-ftp/ftp/ftp-20121221.recipe b/net-ftp/ftp/ftp-20121221.recipe deleted file mode 100644 index c18248af8..000000000 --- a/net-ftp/ftp/ftp-20121221.recipe +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY="Standard FTP client" -DESCRIPTION="ftp is a standard command line client for connecting to FTP \ -servers. The File Transfer protocol (defined in RFC 959) is used for \ -transferring files from one computer to another over a network." -HOMEPAGE="http://netbsd.org/" -COPYRIGHT="1997-2012 The NetBSD Foundation, Inc." -LICENSE="BSD (3-clause)" -REVISION="1" -SOURCE_URI="cvs://anoncvs@anoncvs.NetBSD.org:/cvsroot/src/usr.bin/ftp#2012-12-21" - -ARCHITECTURES="x86_gcc2 x86 x86_64" - -PROVIDES=" - ftp = $portVersion - cmd:ftp - " -REQUIRES=" - haiku - lib:libedit - " - -BUILD_REQUIRES=" - haiku_devel - devel:libedit - " -BUILD_PREREQUIRES=" - cmd:gcc - " - -PATCH() -{ - sed -i 's/#include //g' *.c -} - -BUILD() -{ - gcc -Dlint -DDIRENT_MISSING_D_NAMLEN -DINFTIM=-1 -DSECSPERHOUR=3600 -DSECSPERDAY=86400 \ - cmds.c cmdtab.c complete.c domacro.c fetch.c ftp.c main.c \ - progressbar.c ruserpass.c util.c -o ftp \ - -lnetwork -ledit -lbsd -} - -INSTALL() -{ - mkdir -p $binDir - cp ftp $binDir -} diff --git a/net-ftp/tnftp/patches/tnftp-20091122.patch b/net-ftp/tnftp/patches/tnftp-20091122.patch deleted file mode 100644 index 1679058c0..000000000 --- a/net-ftp/tnftp/patches/tnftp-20091122.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN tnftpd-20091122/configure.ac tnftpd-20091122-haiku/configure.ac ---- tnftpd-20091122/configure.ac 2009-12-30 01:42:42.036962304 +0000 -+++ tnftpd-20091122-haiku/configure.ac 2010-08-30 03:35:13.000000000 +0000 -@@ -123,7 +123,7 @@ - [LIBS="-lsocket -lnsl $LIBS"], - [], - [-lnsl])]) -- -+AC_CHECK_LIB(network, socket, LIBS="-lnetwork $LIBS") - # - # Checks for header files. - # diff --git a/net-ftp/tnftp/patches/tnftp-20151004.patch b/net-ftp/tnftp/patches/tnftp-20151004.patch new file mode 100644 index 000000000..0bcdc4748 --- /dev/null +++ b/net-ftp/tnftp/patches/tnftp-20151004.patch @@ -0,0 +1,51 @@ +From 4e312373e9f83285b965043813bf7dfce4c09a6d Mon Sep 17 00:00:00 2001 +From: Yubin Ruan +Date: Thu, 23 Mar 2017 08:34:38 +0000 +Subject: [PATCH] fix porting problem + +--- + configure.ac | 7 ++++++- + libnetbsd/getnameinfo.c | 2 +- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2754750..f93fd76 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,7 +19,7 @@ AC_CONFIG_MACRO_DIR([buildaux]) + AC_CONFIG_HEADERS([tnftp_config.h]) + AC_CONFIG_LIBOBJ_DIR([libnetbsd]) + +-AM_INIT_AUTOMAKE([-Wall -Werror foreign nostdinc silent-rules]) ++AM_INIT_AUTOMAKE([-Wall foreign nostdinc silent-rules]) + AM_MAINTAINER_MODE() + + # +@@ -114,6 +114,11 @@ AC_SEARCH_LIBS([socket], + [-lnsl])]) + + # ++# haiku has `getpass()' in libbsd.so ++# ++AC_SEARCH_LIBS(getpass, bsd) ++ ++# + # Check for (Dante) SOCKS5. + # + AS_IF([test "$with_socks" != no], +diff --git a/libnetbsd/getnameinfo.c b/libnetbsd/getnameinfo.c +index d72372c..7253196 100644 +--- a/libnetbsd/getnameinfo.c ++++ b/libnetbsd/getnameinfo.c +@@ -88,7 +88,7 @@ static int ip6_sa2str(const struct sockaddr_in6 *, char *, size_t, int); + + int + getnameinfo(const struct sockaddr *sa, socklen_t salen, +- char *host, size_t hostlen, char *serv, size_t servlen, int flags) ++ char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags) + { + struct afd *afd; + struct servent *sp; +-- +2.11.0 + diff --git a/net-ftp/tnftp/tnftp-20091122.recipe b/net-ftp/tnftp/tnftp-20091122.recipe deleted file mode 100644 index 7b0a46923..000000000 --- a/net-ftp/tnftp/tnftp-20091122.recipe +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION="NetBSD FTP client with several advanced features" -HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/" -SOURCE_URI="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/tnftpd-20091122.tar.gz" -REVISION="1" -STATUS_HAIKU="broken" -DEPEND="" -CHECKSUM_MD5="e7f86e7680648b675ee27c94655de494" -BUILD() -{ - cd tnftpd-20091122 - libtoolize --force --copy --install - aclocal - autoconf - automake - autoheader - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make -} - -INSTALL() -{ - cd tnftpd-20091122 - make install -} -LICENSE="BSD (2-clause)" -COPYRIGHT="2001-2008 The NetBSD Foundation, Inc. All rights reserved." diff --git a/net-ftp/tnftp/tnftp-20151004.recipe b/net-ftp/tnftp/tnftp-20151004.recipe new file mode 100644 index 000000000..6eb80dca6 --- /dev/null +++ b/net-ftp/tnftp/tnftp-20151004.recipe @@ -0,0 +1,54 @@ +SUMMARY="NetBSD luke FTP client" +DESCRIPTION="NetBSD FTP client with several advanced features" +LICENSE="BSD (2-clause)" +COPYRIGHT="2001-2015 The NetBSD Foundation, Inc. All rights reserved." +HOMEPAGE="http://ftp.netbsd.org/pub/NetBSD/misc/tnftp/" +REVISION="1" +SOURCE_URI="$HOMEPAGE/tnftp-$portVersion.tar.gz" +CHECKSUM_SHA256="c94a8a49d3f4aec1965feea831d4d5bf6f90c65fd8381ee0863d11a5029a43a0" +PATCHES="tnftp-$portVersion.patch" + +ARCHITECTURES="x86_64 x86 x86_gcc2" + +PROVIDES=" + tnftp = $portVersion + cmd:tnftp + " +REQUIRES=" + haiku + lib:libncurses + " + +BUILD_REQUIRES=" + haiku_devel + devel:libncurses + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:autoheader + cmd:gcc + cmd:ld + cmd:libtoolize + cmd:make + " + +BUILD() +{ + export LDFLAGS="-lnetwork" + export CFLAGS="-D_BSD_SOURCE" + + libtoolize --force --copy --install + aclocal + autoconf + automake --add-missing + autoheader + runConfigure ./configure + make +} + +INSTALL() +{ + make install +}