From 4c32fcf2840470c48f35fee91093b01a2463b6b7 Mon Sep 17 00:00:00 2001
From: Alexey Dokuchaev <danfe@FreeBSD.org>
Date: Fri, 23 Oct 2015 12:32:56 +0000
Subject: - Update to version 1.78 - Define LICENSE (GPLv2) - Project had moved
 to GitHub

PR:		197961
Submitted by:	Jim Riggs
---
 sysutils/fusefs-s3fs/Makefile                | 24 +++++++++++++++++-------
 sysutils/fusefs-s3fs/distinfo                |  4 ++--
 sysutils/fusefs-s3fs/files/patch-src__curl.h | 11 -----------
 sysutils/fusefs-s3fs/pkg-descr               |  7 +++----
 4 files changed, 22 insertions(+), 24 deletions(-)
 delete mode 100644 sysutils/fusefs-s3fs/files/patch-src__curl.h

diff --git a/sysutils/fusefs-s3fs/Makefile b/sysutils/fusefs-s3fs/Makefile
index 3c2412bae027..362f1f33604a 100644
--- a/sysutils/fusefs-s3fs/Makefile
+++ b/sysutils/fusefs-s3fs/Makefile
@@ -2,25 +2,35 @@
 # $FreeBSD$
 
 PORTNAME=	s3fs
-DISTVERSION=	1.74
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.78
 CATEGORIES=	sysutils
-MASTER_SITES=	GOOGLE_CODE
 PKGNAMEPREFIX=	fusefs-
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	FUSE-based file system backed by Amazon S3
 
+LICENSE=	GPLv2
+
 LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl \
 		libxml2.so:${PORTSDIR}/textproc/libxml2
 
+USE_GITHUB=	yes
+GH_ACCOUNT=	s3fs-fuse
+
+USES=		autoreconf fuse pkgconfig
 GNU_CONFIGURE=	yes
-PLIST_FILES=	bin/s3fs man/man1/s3fs.1.gz
-USES=		fuse pkgconfig
 USE_OPENSSL=	yes
 
+WRKSRC=		${WRKDIR}/${GH_ACCOUNT}-${PORTVERSION}
+
+PLIST_FILES=	bin/s3fs man/man1/s3fs.1.gz
+
 post-patch:
-	${REINPLACE_CMD} -e 's/libcrypto >= 0.9//g' ${WRKSRC}/configure
-	${REINPLACE_CMD} -e '/^DEPS_LIBS =/s/$$/ -lcrypto/' \
-		${WRKSRC}/src/Makefile.in
+	@${REINPLACE_CMD} -e 's/libcrypto >= 0.9//' ${WRKSRC}/configure.ac
+	@${REINPLACE_CMD} -e '/DEPS_LIBS/s/$$/ -lcrypto/' \
+		${WRKSRC}/src/Makefile.am
+	@${REINPLACE_CMD} -e '/pthread_self/s/static/reinterpret/' \
+		${WRKSRC}/src/openssl_auth.cpp
 
 .include <bsd.port.mk>
diff --git a/sysutils/fusefs-s3fs/distinfo b/sysutils/fusefs-s3fs/distinfo
index f220aa3a00eb..e00d88351eab 100644
--- a/sysutils/fusefs-s3fs/distinfo
+++ b/sysutils/fusefs-s3fs/distinfo
@@ -1,2 +1,2 @@
-SHA256 (s3fs-1.74.tar.gz) = d77d540582fe8287354fd3637e48064f81f6fe80c5f0e0f8253221c56b892b88
-SIZE (s3fs-1.74.tar.gz) = 199120
+SHA256 (s3fs-fuse-s3fs-v1.78_GH0.tar.gz) = 36c0b00a294d9676c462985c0c3f1362540e8ebc61c15bacb45e28a2f00297f5
+SIZE (s3fs-fuse-s3fs-v1.78_GH0.tar.gz) = 99538
diff --git a/sysutils/fusefs-s3fs/files/patch-src__curl.h b/sysutils/fusefs-s3fs/files/patch-src__curl.h
deleted file mode 100644
index 7bae7dec826d..000000000000
--- a/sysutils/fusefs-s3fs/files/patch-src__curl.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/curl.h.orig	2015-01-18 22:44:00.232344078 +0800
-+++ src/curl.h	2015-01-18 22:44:37.736341674 +0800
-@@ -85,7 +85,7 @@ struct filepart
- // for progress
- struct case_insensitive_compare_func
- {
--  bool operator()(const std::string& a, const std::string& b){
-+  bool operator()(const std::string& a, const std::string& b) const {
-     return strcasecmp(a.c_str(), b.c_str()) < 0;
-   }
- };
diff --git a/sysutils/fusefs-s3fs/pkg-descr b/sysutils/fusefs-s3fs/pkg-descr
index f620ce90249d..1bb37fb3db1c 100644
--- a/sysutils/fusefs-s3fs/pkg-descr
+++ b/sysutils/fusefs-s3fs/pkg-descr
@@ -1,5 +1,4 @@
-FUSE-based file system backed by Amazon S3. Mount a bucket as a local
-file system read/write. Store files/folders natively and
-transparently.
+FUSE-based file system backed by Amazon S3.  Mount a bucket as a local
+file system read/write.  Store files/folders natively and transparently.
 
-WWW: http://code.google.com/p/s3fs/
+WWW: https://github.com/s3fs-fuse/s3fs-fuse
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0