aboutsummaryrefslogtreecommitdiffstats
path: root/www/http_get
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2012-09-10 05:19:43 +0800
committerswills <swills@FreeBSD.org>2012-09-10 05:19:43 +0800
commit5c4ae0f3870e32e1e45b4c83065aee4455cd1529 (patch)
tree3a49621f935a50290880a3c4c6ccaa5fa2350f78 /www/http_get
parent4b4821447ca3d62d478b11559be529f449e7cf5a (diff)
downloadfreebsd-ports-gnome-5c4ae0f3870e32e1e45b4c83065aee4455cd1529.tar.gz
freebsd-ports-gnome-5c4ae0f3870e32e1e45b4c83065aee4455cd1529.tar.zst
freebsd-ports-gnome-5c4ae0f3870e32e1e45b4c83065aee4455cd1529.zip
- Add https/ssl support
- Update to 20100619 (latest) - Give maintainership to Masaki TAGAWA <masaki@club.kyutech.ac.jp> PR: ports/171491 Submitted by: Masaki TAGAWA <masaki@club.kyutech.ac.jp>
Diffstat (limited to 'www/http_get')
-rw-r--r--www/http_get/Makefile14
-rw-r--r--www/http_get/distinfo4
-rw-r--r--www/http_get/files/Makefile.bsd12
-rw-r--r--www/http_get/files/patch-http_get.c55
4 files changed, 49 insertions, 36 deletions
diff --git a/www/http_get/Makefile b/www/http_get/Makefile
index 45cf4482a453..921ea37af54d 100644
--- a/www/http_get/Makefile
+++ b/www/http_get/Makefile
@@ -6,19 +6,23 @@
#
PORTNAME= http_get
-PORTVERSION= 1.0
-PORTREVISION= 1
+PORTVERSION= 1.0.20100619
CATEGORIES= www ipv6
MASTER_SITES= http://www.acme.com/software/http_get/
-DISTNAME= ${PORTNAME}_18mar2002
+DISTNAME= ${PORTNAME}_19jun2010
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= masaki@club.kyutech.ac.jp
COMMENT= Dump http-contents to stdout
WRKSRC= ${WRKDIR}/http_get
+MAKEFILE= ${FILESDIR}/Makefile.bsd
MAN1= http_get.1
-MANCOMPRESSED= no
+MANCOMPRESSED= yes
PLIST_FILES= bin/http_get
+.ifndef NO_OPENSSL
+USE_OPENSSL= yes
+.endif
+
.include <bsd.port.mk>
diff --git a/www/http_get/distinfo b/www/http_get/distinfo
index fe937304eb86..3a16b25558aa 100644
--- a/www/http_get/distinfo
+++ b/www/http_get/distinfo
@@ -1,2 +1,2 @@
-SHA256 (http_get_18mar2002.tar.gz) = 0cc841593596c86842a0f18143ef81fb4876e0c2fbef92e9c2687b75f0bc9dd3
-SIZE (http_get_18mar2002.tar.gz) = 6481
+SHA256 (http_get_19jun2010.tar.gz) = 8c5c58c9c2710cbb6d225b9ddf9301a894d2069a2a4852d3a1a1df8d4a7f4c6a
+SIZE (http_get_19jun2010.tar.gz) = 6646
diff --git a/www/http_get/files/Makefile.bsd b/www/http_get/files/Makefile.bsd
new file mode 100644
index 000000000000..4e29196e91b6
--- /dev/null
+++ b/www/http_get/files/Makefile.bsd
@@ -0,0 +1,12 @@
+PROG = http_get
+SRCS = http_get.c
+
+.ifndef NO_OPENSSL
+CFLAGS += -DUSE_SSL -I${OPENSSLBASE}/include ${OPENSSL_CFLAGS}
+LDFLAGS += -L${OPENSSLBASE}/lib -lssl -lcrypto
+.endif
+
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man
+
+.include <bsd.prog.mk>
diff --git a/www/http_get/files/patch-http_get.c b/www/http_get/files/patch-http_get.c
index 219b0874d4ef..f9cf35383cf8 100644
--- a/www/http_get/files/patch-http_get.c
+++ b/www/http_get/files/patch-http_get.c
@@ -1,9 +1,9 @@
---- http_get.c.orig Wed Dec 15 19:10:11 2004
-+++ http_get.c Wed Dec 15 19:10:30 2004
+--- http_get.c.org 2010-06-20 11:20:30.000000000 +0900
++++ http_get.c 2012-09-09 11:24:00.000000000 +0900
@@ -2,7 +2,9 @@
**
** Originally based on a simple version by Al Globus <globus@nas.nasa.gov>.
- ** Debugged and prettified by Jef Poskanzer <jef@acme.com>. Also includes
+ ** Debugged and prettified by Jef Poskanzer <jef@mail.acme.com>. Also includes
-** ifdefs to handle https via OpenSSL.
+** ifdefs to handle https via OpenSSL. -h argument for debugging multihomed
+** URLs added by Jim Salter.
@@ -11,7 +11,7 @@
*/
#include <unistd.h>
-@@ -35,6 +37,7 @@
+@@ -36,6 +38,7 @@
static int verbose;
static int timeout;
static char* url;
@@ -19,51 +19,48 @@
/* Protocol symbols. */
#define PROTO_HTTP 0
-@@ -72,6 +75,8 @@
- user_agent = "http_get";
- auth_token = (char*) 0;
- cookie = (char*) 0;
+@@ -79,6 +82,7 @@
+ ncookies = 0;
+ header_name = (char*) 0;
+ header_value = (char*) 0;
+ force_host = (char*) "[NONE]";
-+
+ verbose = 0;
while ( argn < argc && argv[argn][0] == '-' && argv[argn][1] != '\0' )
{
- if ( strcmp( argv[argn], "-v" ) == 0 )
-@@ -81,6 +86,11 @@
+@@ -87,6 +91,11 @@
++argn;
timeout = atoi( argv[argn] );
}
-+ else if ( strcmp( argv[argn], "-h" ) == 0 && argn + 1 < argc )
-+ {
-+ ++argn;
-+ force_host = argv[argn];
-+ }
++ else if ( strcmp( argv[argn], "-H" ) == 0 && argn + 1 < argc )
++ {
++ ++argn;
++ force_host = argv[argn];
++ }
else if ( strcmp( argv[argn], "-r" ) == 0 && argn + 1 < argc )
{
++argn;
-@@ -127,7 +137,7 @@
+@@ -147,7 +156,7 @@
static void
usage()
{
-- (void) fprintf( stderr, "usage: %s [-t timeout] [-r referer] [-u user-agent] [-a username:password] url\n", argv0 );
-+ (void) fprintf( stderr, "usage: %s [-t timeout] [-h force host address] [-r referer] [-u user-agent] [-a username:password] url\n", argv0 );
+- (void) fprintf( stderr, "usage: %s [-c cookie] [-t timeout] [-r referer] [-u user-agent] [-a username:password] [-h header value] [-v] url\n", argv0 );
++ (void) fprintf( stderr, "usage: %s [-c cookie] [-t timeout] [-H force host address] [-r referer] [-u user-agent] [-a username:password] [-h header value] [-v] url\n", argv0 );
exit( 1 );
}
-@@ -218,7 +228,16 @@
- int bytes, b, header_state, status;
+@@ -240,7 +249,14 @@
+ int i, bytes, b, header_state, status;
(void) alarm( timeout );
- sockfd = open_client_socket( host, port );
-+
-+if ( force_host == "[NONE]" )
-+ {
++ if ( strcmp( force_host, "[NONE]" ) == 0 )
++ {
+ sockfd = open_client_socket( host, port );
-+ }
-+else
-+ {
++ }
++ else
++ {
+ sockfd = open_client_socket( force_host, port );
-+ }
-+
++ }
#ifdef USE_SSL
if ( protocol == PROTO_HTTPS )