Fix install on HEAD and 10.0.

This commit is contained in:
Tom Judge 2014-02-21 21:22:17 +00:00
parent 82e317110e
commit 782be382da
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=345545
20 changed files with 233 additions and 46 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= libcabinet
PORTVERSION= 0.30
PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= http://www.bsd-geek.de/FreeBSD/distfiles/

View file

@ -1,5 +1,14 @@
--- bstring.cpp.orig Sun Aug 31 05:49:53 2003
+++ bstring.cpp Sun Aug 31 05:49:53 2003
--- bstring.cpp.orig 2014-02-21 15:40:03.760303112 -0500
+++ bstring.cpp 2014-02-21 15:41:19.474297650 -0500
@@ -15,7 +15,7 @@
#include "bstring.h"
#include <string.h>
-#include <fstream.h>
+#include <fstream>
///////////////////////////////////////***************************************
@@ -91,7 +91,7 @@
b_string b_string::operator + (const char* s)
@ -9,3 +18,10 @@
return temp += s;
}
@@ -217,4 +217,4 @@
//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
-#endif
\ No newline at end of file
+#endif

View file

@ -1,11 +1,19 @@
--- bstring.h.orig Tue Aug 19 18:15:26 2003
+++ bstring.h Tue Aug 19 18:16:08 2003
@@ -28,6 +28,9 @@
#include <fstream.h>
--- bstring.h.orig 1999-10-24 07:29:53.000000000 -0400
+++ bstring.h 2014-02-21 16:09:56.194556928 -0500
@@ -21,13 +21,15 @@
#ifndef __BSTRING_HPP__
#define __BSTRING_HPP__
-#include <alloc.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <fstream.h>
+#include <fstream>
#include "dos_comp.h"
+using std::ostream;
+using std::istream;
+using std::ostream;
+
//////////////////////////////////////////////////////////////////////////////

View file

@ -1,15 +1,17 @@
--- cfcreate.cpp.orig Sun Oct 24 13:29:53 1999
+++ cfcreate.cpp Tue Aug 19 21:16:05 2003
@@ -29,6 +29,8 @@
--- cfcreate.cpp.orig 1999-10-24 07:29:53.000000000 -0400
+++ cfcreate.cpp 2014-02-21 15:48:26.812268415 -0500
@@ -29,6 +29,10 @@
#include <unistd.h>
#endif
+using std::ios;
+using std::ifstream;
+using std::ofstream;
+
///////////////////////////////////////***************************************
int cfc_fileinfo::write_entry(ostream& out)
@@ -129,7 +131,7 @@
@@ -129,7 +133,7 @@
}
}
@ -18,7 +20,7 @@
#ifndef unix
if(getftime(in.rdbuf()->fd(), &datetime) != 0) return GETTIME_FAILURE;
#endif
@@ -194,7 +196,7 @@
@@ -194,7 +198,7 @@
unprocessed_data = NULL; // Reset buffer holder
unprocessed_data_len = 0u;
@ -27,7 +29,7 @@
{
delete[] buf;
buf = NULL;
@@ -272,7 +274,7 @@
@@ -272,7 +276,7 @@
return WRITE_ERROR;
}

View file

@ -1,6 +1,15 @@
--- cfcreate.h.orig Tue Dec 19 20:09:01 2006
+++ cfcreate.h Tue Dec 19 20:09:09 2006
@@ -211,7 +211,7 @@
--- cfcreate.h.orig 1999-10-24 07:29:53.000000000 -0400
+++ cfcreate.h 2014-02-21 15:47:18.116272433 -0500
@@ -20,6 +20,8 @@
#include "cffile.h"
#include "zlib.h"
+using std::fstream;
+
#ifdef unix
#include <unistd.h>
#endif
@@ -211,7 +213,7 @@
int process_block(const byte* data, word datalen);
int read_block(istream& in, byte* &buf, int& bytesread);
int compress_block(byte* &dest, word &destlen, byte* src, word srclen);

View file

@ -1,5 +1,14 @@
--- cfdblock.cpp.orig Tue Aug 19 18:22:14 2003
+++ cfdblock.cpp Tue Aug 19 18:23:24 2003
--- cfdblock.cpp.orig 1999-10-24 02:13:29.000000000 -0400
+++ cfdblock.cpp 2014-02-21 15:49:13.695264850 -0500
@@ -17,7 +17,7 @@
#ifndef __CFDBLOCK_CPP__
#define __CFDBLOCK_CPP__
-#include <fstream.h>
+#include <fstream>
#include "cftypes.h"
#include "cfdblock.h"
#include "cfheader.h"
@@ -124,7 +124,7 @@
ra_size = cab_header.get_datablock_ra_size();
reserved_area = new byte[ra_size];

View file

@ -0,0 +1,11 @@
--- cfdblock.h.orig 2014-02-21 15:49:53.526262379 -0500
+++ cfdblock.h 2014-02-21 15:50:02.511261600 -0500
@@ -14,7 +14,7 @@
#ifndef __CFDBLOCK_H__
#define __CFDBLOCK_H__
-#include <fstream.h>
+#include <fstream>
#include "cftypes.h"
#include "cfheader.h"

View file

@ -0,0 +1,11 @@
--- cffdrmgr.cpp.orig 2014-02-21 15:50:45.048258834 -0500
+++ cffdrmgr.cpp 2014-02-21 15:50:53.033257685 -0500
@@ -12,7 +12,7 @@
#ifndef __CFFDRMGR_CPP__
#define __CFFDRMGR_CPP__
-#include <fstream.h>
+#include <fstream>
#include "zlib.h"
#include "cftypes.h"
#include "cfdblock.h"

View file

@ -0,0 +1,11 @@
--- cffdrmgr.h.orig 2014-02-21 15:51:05.912257936 -0500
+++ cffdrmgr.h 2014-02-21 15:51:13.426256130 -0500
@@ -9,7 +9,7 @@
#ifndef __CFFDRMGR_H__
#define __CFFDRMGR_H__
-#include <fstream.h>
+#include <fstream>
#include "zlib.h"
#include "cftypes.h"
#include "cfdblock.h"

View file

@ -0,0 +1,11 @@
--- cffile.cpp.orig 2014-02-21 15:52:54.235249989 -0500
+++ cffile.cpp 2014-02-21 15:53:02.965814752 -0500
@@ -17,7 +17,7 @@
#ifndef __CFFILE_CPP__
#define __CFFILE_CPP__
-#include <fstream.h>
+#include <fstream>
#include "cffile.h"
#include "cftypes.h"
#include "cfheader.h"

View file

@ -1,5 +1,14 @@
--- cffile.h.orig Sun Aug 31 05:54:08 2003
+++ cffile.h Sun Aug 31 05:54:10 2003
--- cffile.h.orig 1999-10-24 02:13:29.000000000 -0400
+++ cffile.h 2014-02-21 16:12:05.824389036 -0500
@@ -15,7 +15,7 @@
#define __CFFILE_H__
#include <string.h>
-#include <fstream.h>
+#include <fstream>
#include "bstring.h"
#include "cftypes.h"
@@ -161,4 +161,4 @@
////////////////////////////////////////////////////////////////////////////////

View file

@ -1,5 +1,14 @@
--- cffolder.cpp.orig Tue Aug 19 18:23:48 2003
+++ cffolder.cpp Tue Aug 19 18:24:14 2003
--- cffolder.cpp.orig 1999-10-24 02:13:29.000000000 -0400
+++ cffolder.cpp 2014-02-21 15:53:49.255245183 -0500
@@ -17,7 +17,7 @@
#ifndef __CFFOLDER_CPP__
#define __CFFOLDER_CPP__
-#include <fstream.h>
+#include <fstream>
#include "cftypes.h"
#include "cfheader.h"
#include "cffolder.h"
@@ -70,7 +70,7 @@
ra_size = cab_header.get_folder_ra_size();
reserved_area = new byte[ra_size];

View file

@ -1,5 +1,14 @@
--- cffolder.h.orig Tue Aug 19 18:30:59 2003
+++ cffolder.h Tue Aug 19 18:31:08 2003
--- cffolder.h.orig 1999-10-24 02:13:29.000000000 -0400
+++ cffolder.h 2014-02-21 15:52:05.724747639 -0500
@@ -15,7 +15,7 @@
#define __CFFOLDER_H__
#include <string.h>
-#include <fstream.h>
+#include <fstream>
#include "cftypes.h"
#include "cfheader.h"
@@ -89,4 +89,5 @@
////////////////////////////////////////////////////////////////////////////////

View file

@ -1,6 +1,13 @@
--- cfheader.cpp.orig Tue Aug 19 18:24:35 2003
+++ cfheader.cpp Tue Aug 19 18:28:27 2003
@@ -24,11 +24,14 @@
--- cfheader.cpp.orig 1999-10-24 02:13:29.000000000 -0400
+++ cfheader.cpp 2014-02-21 16:02:37.285291121 -0500
@@ -18,17 +18,23 @@
#define __CFHEADER_CPP__
#include <string.h>
-#include <fstream.h>
+#include <fstream>
#include "bstring.h"
#include "cftypes.h"
#include "cfheader.h"
#ifdef unix
@ -10,13 +17,16 @@
#include <strstrea.h>
#endif
+using std::ios;
+using std::ifstream;
+using std::ofstream;
+using std::ostrstream;
+using std::ends;
+
////////////////////////////////////////****************************************
// Initializes a valid fixed cabinet header
@@ -127,7 +130,7 @@
@@ -127,7 +133,7 @@
{
reserved_area = new byte[cabinet_ra_size];
@ -25,7 +35,7 @@
{
return (in.fail()) ? READ_ERROR : UNEXPECTED_EOF;
}
@@ -172,7 +175,7 @@
@@ -172,7 +178,7 @@
if(cabinet_ra_size > 0) // If has cabinet reserved area
{
@ -34,7 +44,7 @@
{
return WRITE_ERROR;
}
@@ -210,4 +213,4 @@
@@ -210,4 +216,4 @@
////////////////////////////////////////****************************************

View file

@ -0,0 +1,16 @@
--- cfheader.h.orig 2014-02-21 15:42:52.379291286 -0500
+++ cfheader.h 2014-02-21 16:02:51.918208148 -0500
@@ -15,10 +15,12 @@
#define __CFHEADER_H__
#include <string.h>
-#include <fstream.h>
+#include <fstream>
#include "cftypes.h"
#include "bstring.h"
+using std::ifstream;
+using std::ofstream;
////////////////////////////////////////////////////////////////////////////////
// This class contains all the fixed fields always preset in a cabinet header

View file

@ -1,5 +1,14 @@
--- cfreader.cpp.orig Tue Aug 19 18:28:46 2003
+++ cfreader.cpp Tue Aug 19 18:29:10 2003
--- cfreader.cpp.orig 1999-10-24 02:13:29.000000000 -0400
+++ cfreader.cpp 2014-02-21 15:55:15.698239494 -0500
@@ -22,7 +22,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <fstream.h>
+#include <fstream>
#include "darray.h"
#include "cffile.h"
#include "cftypes.h"
@@ -31,6 +31,8 @@
#include "cfheader.h"
#include "cfreader.h"

View file

@ -0,0 +1,11 @@
--- cfreader.h.orig 2014-02-21 16:11:11.770180090 -0500
+++ cfreader.h 2014-02-21 16:10:41.259844074 -0500
@@ -11,7 +11,7 @@
#ifndef __CFREADER_H__
#define __CFREADER_H__
-#include <fstream.h>
+#include <fstream>
#include "darray.h"
#include "cffile.h"
#include "cffdrmgr.h"

View file

@ -1,13 +1,14 @@
--- cftypes.cpp.orig Sun Oct 24 08:13:29 1999
+++ cftypes.cpp Wed Sep 3 14:24:13 2003
--- cftypes.cpp.orig 1999-10-24 02:13:29.000000000 -0400
+++ cftypes.cpp 2014-02-21 16:06:43.971192116 -0500
@@ -10,11 +10,20 @@
#ifndef __CFTYPES_CPP__
#define __CFTYPES_CPP__
-#include <values.h>
-#include <fstream.h>
+#include <inttypes.h>
+#include <limits.h>
#include <fstream.h>
+#include <fstream>
#include "zlib.h"
#include "cftypes.h"

View file

@ -1,12 +1,14 @@
--- cftypes.h.orig Tue Aug 19 18:17:55 2003
+++ cftypes.h Tue Aug 19 18:18:54 2003
@@ -18,6 +18,9 @@
#include <fstream.h>
--- cftypes.h.orig 1999-10-24 02:13:29.000000000 -0400
+++ cftypes.h 2014-02-21 15:42:11.491293648 -0500
@@ -16,7 +16,10 @@
#ifndef __CFTYPES_H__
#define __CFTYPES_H__
-#include <fstream.h>
+#include <fstream>
+
+using std::istream;
+using std::ostream;
+
typedef unsigned char byte;
typedef unsigned short int word;
typedef unsigned long int dword;

View file

@ -1,6 +1,28 @@
--- listcab.cpp.orig Tue Aug 19 20:42:27 2003
+++ listcab.cpp Tue Aug 19 20:49:27 2003
@@ -47,13 +47,19 @@
--- listcab.cpp.orig 1999-10-24 08:11:38.000000000 -0400
+++ listcab.cpp 2014-02-21 16:14:29.246853465 -0500
@@ -8,8 +8,8 @@
#include <stdio.h>
#include <string.h>
//#include <iomanip.h>
-#include <fstream.h>
-#include <iostream.h>
+#include <fstream>
+#include <iostream>
#include "cftypes.h"
#include "cfheader.h"
#include "cffolder.h"
@@ -19,6 +19,10 @@
#include "cfreader.h"
#include "cfcreate.h"
+using std::endl;
+using std::cout;
+using std::cerr;
+
////////////////////////////////////////****************************************
void display_header_info(cabinet_header& cfh);
@@ -47,13 +51,19 @@
cerr << "New Folder Error: " << retval << endl;
return 1;
}
@ -24,7 +46,7 @@
if((retval = cab.add_file(filename)) != OK)
{
perror("read");
@@ -62,10 +68,13 @@
@@ -62,10 +72,13 @@
return 1;
}
}