Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2018 09:55:26 +0000 (UTC)
From:      Rodrigo Osorio <rodrigo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r473814 - in head/www/dfileserver: . files
Message-ID:  <201807030955.w639tQxh056770@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigo
Date: Tue Jul  3 09:55:25 2018
New Revision: 473814
URL: https://svnweb.freebsd.org/changeset/ports/473814

Log:
  Fix C++ issues for 12.0
  
  - Unixify the files using dos2unix
  - Add patches to fix the C++ issues in the code
  - Dump PORTREVISION

Added:
  head/www/dfileserver/files/
  head/www/dfileserver/files/patch-src_CPathResolver.cxx   (contents, props changed)
  head/www/dfileserver/files/patch-src_DashFileServer.cxx   (contents, props changed)
  head/www/dfileserver/files/patch-src_contrib_Base64.cpp   (contents, props changed)
Modified:
  head/www/dfileserver/Makefile

Modified: head/www/dfileserver/Makefile
==============================================================================
--- head/www/dfileserver/Makefile	Tue Jul  3 09:37:35 2018	(r473813)
+++ head/www/dfileserver/Makefile	Tue Jul  3 09:55:25 2018	(r473814)
@@ -3,6 +3,7 @@
 
 PORTNAME=	DFileServer
 PORTVERSION=	1.1.3
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://rodrigo.osorio.free.fr/freebsd/distfiles/ \
 		http://harpy.soarwitheagles.net/~dashy/
@@ -11,6 +12,8 @@ MAINTAINER=	rodrigo@FreeBSD.org
 COMMENT=	Compact webserver designed to make sharing files easy
 
 LICENSE=	BSD3CLAUSE
+
+USES=	dos2unix
 
 PLIST_FILES=	bin/dfileserver
 

Added: head/www/dfileserver/files/patch-src_CPathResolver.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/dfileserver/files/patch-src_CPathResolver.cxx	Tue Jul  3 09:55:25 2018	(r473814)
@@ -0,0 +1,11 @@
+--- src/CPathResolver.cxx.orig	2018-07-02 11:45:26 UTC
++++ src/CPathResolver.cxx
+@@ -100,7 +100,7 @@ CPathResolver::CPathResolver( string Con
+ 	mPaths = new SPathNode();
+ 
+ 	ifstream Config( ConfigFile.c_str(), ios::in );
+-	if( Config == NULL ) throw( (exn_t)EXN_IO );
++	if( ! Config.is_open() ) throw( (exn_t)EXN_IO );
+ 
+ 	while( !Config.eof() ) {
+ 		string Fake, Real;

Added: head/www/dfileserver/files/patch-src_DashFileServer.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/dfileserver/files/patch-src_DashFileServer.cxx	Tue Jul  3 09:55:25 2018	(r473814)
@@ -0,0 +1,13 @@
+--- src/DashFileServer.cxx.orig	2018-07-02 11:55:29 UTC
++++ src/DashFileServer.cxx
+@@ -218,8 +218,8 @@ int InitalizeNetwork ( int ArgPort, int 
+ 	memset(&(ListenAddr.sin_zero), '\0', 8);
+ 
+ 	// Bind the socket to the listening network struct.
+-	if ( bind( NetworkSocket, (struct sockaddr *)&ListenAddr, 
+-					sizeof( struct sockaddr ) ) == -1 )
++	if ( ::bind( NetworkSocket, (struct sockaddr *)&ListenAddr, 
++					sizeof( struct sockaddr ) ) == -1)
+ 	{
+ 		perror("InitalizeNetwork -- bind()");
+ 		return -1;

Added: head/www/dfileserver/files/patch-src_contrib_Base64.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/dfileserver/files/patch-src_contrib_Base64.cpp	Tue Jul  3 09:55:25 2018	(r473814)
@@ -0,0 +1,36 @@
+--- src/contrib/Base64.cpp.orig	2005-09-30 05:15:19 UTC
++++ src/contrib/Base64.cpp
+@@ -27,11 +27,12 @@ static string       cvt = "ABCDEFGHIJKLM
+ 
+ string Base64::encode(string data)
+ {
+-    auto     string::size_type  i;
+-    auto     char               c;
+-    auto     string::size_type  len = data.length();
+-    auto     string             ret;
++    std::string::size_type  i;
++    std::string::size_type  len;
++    char               c;
++    string             ret;
+ 
++    len = data.length();
+     for (i = 0; i < len; ++i)
+     {
+         c = (data[i] >> 2) & 0x3f;
+@@ -71,11 +72,11 @@ string Base64::encode(string data)
+ 
+ string Base64::decode(string data)
+ {
+-    auto     string::size_type  i;
+-    auto     char               c;
+-    auto     char               c1;
+-    auto     string::size_type  len = data.length();
+-    auto     string             ret;
++    string::size_type  i;
++    char               c;
++    char               c1;
++    string::size_type  len = data.length();
++    string             ret;
+ 
+     for (i = 0; i < len; ++i)
+     {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807030955.w639tQxh056770>