aboutsummaryrefslogtreecommitdiff
path: root/converters/mimelib
diff options
context:
space:
mode:
authorTilman Keskinoz <arved@FreeBSD.org>2011-01-20 10:24:53 +0000
committerTilman Keskinoz <arved@FreeBSD.org>2011-01-20 10:24:53 +0000
commitabbecd47f047dd1822512f17f95d38c0a3649844 (patch)
tree8ebe68ca7488b9bb52a8e31a3689317de801f769 /converters/mimelib
parent850c000f19178676ba947f97b21f5a330928eb4a (diff)
downloadports-abbecd47f047dd1822512f17f95d38c0a3649844.tar.gz
ports-abbecd47f047dd1822512f17f95d38c0a3649844.zip
Make compile on supported versions of FreeBSD
Feature safe: yes
Notes
Notes: svn path=/head/; revision=268021
Diffstat (limited to 'converters/mimelib')
-rw-r--r--converters/mimelib/Makefile7
-rw-r--r--converters/mimelib/files/patch-mimelib-mimelib-string.h35
-rw-r--r--converters/mimelib/files/patch-mimelib-mimelib-token.h17
-rw-r--r--converters/mimelib/files/patch-mimelib-msgcmp.cpp13
-rw-r--r--converters/mimelib/files/patch-mimelib-string.cpp79
-rw-r--r--converters/mimelib/files/patch-mimelib-token.cpp20
6 files changed, 168 insertions, 3 deletions
diff --git a/converters/mimelib/Makefile b/converters/mimelib/Makefile
index 27c155fc69f0..d29ce3420f65 100644
--- a/converters/mimelib/Makefile
+++ b/converters/mimelib/Makefile
@@ -22,8 +22,9 @@ USE_LDCONFIG= yes
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 700042
-BROKEN= Does not compile with GCC 4.2
-.endif
+post-patch:
+ ${FIND} ${WRKSRC}/mimelib/ -name "*.cpp" -or -name "*.h" \
+ | ${XARGS} ${REINPLACE_CMD} -e "s,iostream.h,iostream,"
+ ${TOUCH} ${WRKSRC}/mimelib/mimelib/Makefile.in ${WRKSRC}/stamp-h.in ${WRKSRC}/Makefile.in ${WRKSRC}/mimelib/Makefile.in
.include <bsd.port.post.mk>
diff --git a/converters/mimelib/files/patch-mimelib-mimelib-string.h b/converters/mimelib/files/patch-mimelib-mimelib-string.h
new file mode 100644
index 000000000000..5af7bcd3b643
--- /dev/null
+++ b/converters/mimelib/files/patch-mimelib-mimelib-string.h
@@ -0,0 +1,35 @@
+--- mimelib/mimelib/string.h.bak 2011-01-20 11:10:01.000000000 +0100
++++ mimelib/mimelib/string.h 2011-01-20 11:12:06.000000000 +0100
+@@ -504,7 +504,7 @@
+ //. {\tt DwString} object. White space characters include ASCII HT,
+ //. LF, and SPACE.
+
+- void WriteTo(ostream& aStrm) const;
++ void WriteTo(std::ostream& aStrm) const;
+ //. Writes the contents of this {\tt DwString} object to the stream
+ //. {\tt aStrm}.
+
+@@ -569,7 +569,7 @@
+
+ public:
+
+- virtual void PrintDebugInfo(ostream& aStrm) const;
++ virtual void PrintDebugInfo(std::ostream& aStrm) const;
+ //. Prints debugging information about the object to {\tt aStrm}.
+ //.
+ //. This member function is available only in the debug version of
+@@ -736,11 +736,11 @@
+ DW_EXPORT DwBool operator >= (const DwString& aStr1, const char* aCstr);
+ DW_EXPORT DwBool operator >= (const char* aCstr, const DwString& aStr2);
+
+-DW_EXPORT ostream& operator << (ostream& aOstrm, const DwString& aStr);
++DW_EXPORT std::ostream& operator << (std::ostream& aOstrm, const DwString& aStr);
+ //. Writes the contents of {\tt aStr} to the stream {\tt aOstrm}.
+
+-DW_EXPORT istream& getline (istream& aIstrm, DwString& aStr, char aDelim);
+-DW_EXPORT istream& getline (istream& aIstrm, DwString& aStr);
++DW_EXPORT std::istream& getline (std::istream& aIstrm, DwString& aStr, char aDelim);
++DW_EXPORT std::istream& getline (std::istream& aIstrm, DwString& aStr);
+
+ DW_EXPORT int DwStrcasecmp(const DwString& aStr1, const DwString& aStr2);
+ DW_EXPORT int DwStrcasecmp(const DwString& aStr1, const char* aCstr);
diff --git a/converters/mimelib/files/patch-mimelib-mimelib-token.h b/converters/mimelib/files/patch-mimelib-mimelib-token.h
new file mode 100644
index 000000000000..d5c9a8a6f3f3
--- /dev/null
+++ b/converters/mimelib/files/patch-mimelib-mimelib-token.h
@@ -0,0 +1,17 @@
+--- mimelib/mimelib/token.h.bak 1997-09-27 13:55:37.000000000 +0200
++++ mimelib/mimelib/token.h 2011-01-20 11:20:25.000000000 +0100
+@@ -74,12 +74,12 @@
+ const DwString& Token() const { return mToken; }
+ int Type() const { return mTkType; }
+ void StripDelimiters();
+- static ostream* mDebugOut;
++ static std::ostream* mDebugOut;
+ protected:
+ DwTokenizer(const DwString& aStr);
+ DwTokenizer(const char* aCStr);
+ virtual ~DwTokenizer();
+- void PrintToken(ostream*);
++ void PrintToken(std::ostream*);
+ // Quoted strings, comments, and domain literals are parsed
+ // identically in RFC822 and RFC1521
+ void ParseQuotedString();
diff --git a/converters/mimelib/files/patch-mimelib-msgcmp.cpp b/converters/mimelib/files/patch-mimelib-msgcmp.cpp
new file mode 100644
index 000000000000..af9bd718c198
--- /dev/null
+++ b/converters/mimelib/files/patch-mimelib-msgcmp.cpp
@@ -0,0 +1,13 @@
+--- mimelib/msgcmp.cpp.bak 1997-09-27 13:54:08.000000000 +0200
++++ mimelib/msgcmp.cpp 2011-01-20 11:13:04.000000000 +0100
+@@ -76,8 +76,8 @@
+ {
+ #if defined (DW_DEBUG_VERSION) || defined (DW_DEVELOPMENT_VERSION)
+ if (mMagicNumber != (DwUint32) kMagicNumber) {
+- cerr << "Bad value for 'this' in destructor\n";
+- cerr << "(Possibly 'delete' was called twice for same object)\n";
++ std::cerr << "Bad value for 'this' in destructor\n";
++ std::cerr << "(Possibly 'delete' was called twice for same object)\n";
+ abort();
+ }
+ mMagicNumber = 0;
diff --git a/converters/mimelib/files/patch-mimelib-string.cpp b/converters/mimelib/files/patch-mimelib-string.cpp
new file mode 100644
index 000000000000..aad90e7a2b2e
--- /dev/null
+++ b/converters/mimelib/files/patch-mimelib-string.cpp
@@ -0,0 +1,79 @@
+--- mimelib/string.cpp.bak 1997-09-27 13:54:17.000000000 +0200
++++ mimelib/string.cpp 2011-01-20 11:16:24.000000000 +0100
+@@ -29,7 +29,7 @@
+ #include <ctype.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <new.h>
++#include <new>
+ #include <mimelib/string.h>
+
+ #define DW_MIN(a,b) ((a) <= (b) ? (a) : (b))
+@@ -138,9 +138,9 @@
+ assert(rep != 0);
+ #if defined(DW_DEBUG_VERSION) || defined(DW_DEVELOPMENT_VERSION)
+ if (rep->mRefCount <= 0) {
+- cerr << "Error: attempt to delete a DwStringRep "
++ std::cerr << "Error: attempt to delete a DwStringRep "
+ "with ref count <= 0\n";
+- cerr << "(Possibly 'delete' was called twice for same object)\n";
++ std::cerr << "(Possibly 'delete' was called twice for same object)\n";
+ abort();
+ }
+ #endif // defined(DW_DEBUG_VERSION) || defined(DW_DEVELOPMENT_VERSION)
+@@ -173,8 +173,8 @@
+ {
+ #if defined (DW_DEBUG_VERSION) || defined (DW_DEVELOPMENT_VERSION)
+ if (mBuffer == 0) {
+- cerr << "DwStringRep destructor called for bad DwStringRep object\n";
+- cerr << "(Possibly 'delete' was called twice for same object)\n";
++ std::cerr << "DwStringRep destructor called for bad DwStringRep object\n";
++ std::cerr << "(Possibly 'delete' was called twice for same object)\n";
+ abort();
+ }
+ #endif // defined (DW_DEBUG_VERSION) || defined (DW_DEVELOPMENT_VERSION)
+@@ -1045,7 +1045,7 @@
+ }
+
+
+-void DwString::WriteTo(ostream& aStrm) const
++void DwString::WriteTo(std::ostream& aStrm) const
+ {
+ const char* buf = mRep->mBuffer + mStart;
+ for (size_t i=0; i < mLength; ++i) {
+@@ -1336,7 +1336,7 @@
+ }
+
+
+-void DwString::PrintDebugInfo(ostream& aStrm) const
++void DwString::PrintDebugInfo(std::ostream& aStrm) const
+ {
+ #if defined (DW_DEBUG_VERSION)
+ aStrm <<
+@@ -1633,7 +1633,7 @@
+ }
+
+
+-ostream& operator << (ostream& aOstrm, const DwString& aStr)
++std::ostream& operator << (std::ostream& aOstrm, const DwString& aStr)
+ {
+ const char* buf = aStr.data();
+ for (size_t i=0; i < aStr.length(); ++i) {
+@@ -1643,7 +1643,7 @@
+ }
+
+
+-istream& getline(istream& aIstrm, DwString& aStr, char aDelim)
++std::istream& getline(std::istream& aIstrm, DwString& aStr, char aDelim)
+ {
+ aStr.clear();
+ char ch;
+@@ -1657,7 +1657,7 @@
+ }
+
+
+-istream& getline(istream& aIstrm, DwString& aStr)
++std::istream& getline(std::istream& aIstrm, DwString& aStr)
+ {
+ return getline(aIstrm, aStr, '\n');
+ }
diff --git a/converters/mimelib/files/patch-mimelib-token.cpp b/converters/mimelib/files/patch-mimelib-token.cpp
new file mode 100644
index 000000000000..eb9338f3e9c5
--- /dev/null
+++ b/converters/mimelib/files/patch-mimelib-token.cpp
@@ -0,0 +1,20 @@
+--- mimelib/token.cpp.bak 1997-09-27 13:54:21.000000000 +0200
++++ mimelib/token.cpp 2011-01-20 11:19:49.000000000 +0100
+@@ -32,7 +32,7 @@
+ #include <mimelib/token.h>
+
+
+-ostream* DwTokenizer::mDebugOut = 0;
++std::ostream* DwTokenizer::mDebugOut = 0;
+
+
+ DwTokenizer::DwTokenizer(const DwString& aStr)
+@@ -221,7 +221,7 @@
+ }
+
+
+-void DwTokenizer::PrintToken(ostream* aOut)
++void DwTokenizer::PrintToken(std::ostream* aOut)
+ {
+ if (!aOut) return;
+ char* type = 0;