summaryrefslogtreecommitdiff
path: root/graphics/djvulibre
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2004-10-06 04:51:10 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2004-10-06 04:51:10 +0000
commit566f4e905d9cf037351c8abe020fae50c9ec8232 (patch)
treeb69e45a638fd137035711aed898c23f8f8e73c05 /graphics/djvulibre
parentUnbreak on 5.X and -CURRENT. (diff)
Unbreak the build with recent GCC.
Reported by: kris Approved by: portmgr (krion), fjoe (mentor, implicit)
Notes
Notes: svn path=/head/; revision=118558
Diffstat (limited to 'graphics/djvulibre')
-rw-r--r--graphics/djvulibre/Makefile8
-rw-r--r--graphics/djvulibre/files/patch-libdjvu_Arrays.h52
-rw-r--r--graphics/djvulibre/files/patch-libdjvu_GContainer.h59
-rw-r--r--graphics/djvulibre/files/patch-libdjvu_GString.cpp20
-rw-r--r--graphics/djvulibre/files/patch-libdjvu_GString.h11
-rw-r--r--graphics/djvulibre/files/patch-libdjvu_MMX.cpp11
6 files changed, 154 insertions, 7 deletions
diff --git a/graphics/djvulibre/Makefile b/graphics/djvulibre/Makefile
index 0dcc209cdf39..e5d9c2594641 100644
--- a/graphics/djvulibre/Makefile
+++ b/graphics/djvulibre/Makefile
@@ -42,12 +42,6 @@ CONFIGURE_ENV+= CXX=${CXX} \
CONFIGURE_ARGS+=--disable-djview
.endif
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 502126
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
.if !defined(WITH_OPTIMIZED_CFLAGS)
pre-everything::
@${ECHO_MSG} "You can enable additional compilation optimizations"
@@ -82,4 +76,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/djvulibre/files/patch-libdjvu_Arrays.h b/graphics/djvulibre/files/patch-libdjvu_Arrays.h
new file mode 100644
index 000000000000..74cedc3f505e
--- /dev/null
+++ b/graphics/djvulibre/files/patch-libdjvu_Arrays.h
@@ -0,0 +1,52 @@
+--- libdjvu/Arrays.h.orig Sat Nov 8 04:08:20 2003
++++ libdjvu/Arrays.h Mon Sep 20 21:01:27 2004
+@@ -708,21 +708,21 @@
+ template <class TYPE>
+ TArray<TYPE>::TArray ()
+ {
+- assign(new ArrayRep(sizeof(TYPE), destroy, init1,
++ this->assign(new ArrayRep(sizeof(TYPE), destroy, init1,
+ init2, init2, insert));
+ }
+
+ template <class TYPE>
+ TArray<TYPE>::TArray(int hi)
+ {
+- assign(new ArrayRep(sizeof(TYPE), destroy, init1,
++ this->assign(new ArrayRep(sizeof(TYPE), destroy, init1,
+ init2, init2, insert, hi));
+ }
+
+ template <class TYPE>
+ TArray<TYPE>::TArray(int lo, int hi)
+ {
+- assign(new ArrayRep(sizeof(TYPE), destroy, init1,
++ this->assign(new ArrayRep(sizeof(TYPE), destroy, init1,
+ init2, init2, insert, lo, hi));
+ }
+
+@@ -854,21 +854,21 @@
+ template <class TYPE> inline
+ DArray<TYPE>::DArray ()
+ {
+- assign(new ArrayRep(sizeof(TYPE), destroy, init1,
++ this->assign(new ArrayRep(sizeof(TYPE), destroy, init1,
+ init2, copy, insert));
+ }
+
+ template <class TYPE> inline
+ DArray<TYPE>::DArray(const int hi)
+ {
+- assign(new ArrayRep(sizeof(TYPE), destroy, init1,
++ this->assign(new ArrayRep(sizeof(TYPE), destroy, init1,
+ init2, copy, insert, hi));
+ }
+
+ template <class TYPE> inline
+ DArray<TYPE>::DArray(const int lo, const int hi)
+ {
+- assign(new ArrayRep(sizeof(TYPE), destroy, init1,
++ this->assign(new ArrayRep(sizeof(TYPE), destroy, init1,
+ init2, copy, insert, lo, hi));
+ }
+
diff --git a/graphics/djvulibre/files/patch-libdjvu_GContainer.h b/graphics/djvulibre/files/patch-libdjvu_GContainer.h
new file mode 100644
index 000000000000..567b22145c08
--- /dev/null
+++ b/graphics/djvulibre/files/patch-libdjvu_GContainer.h
@@ -0,0 +1,59 @@
+--- libdjvu/GContainer.h.orig Sat Nov 8 04:08:21 2003
++++ libdjvu/GContainer.h Fri Oct 1 13:45:26 2004
+@@ -786,9 +786,9 @@
+ template<class TI> int
+ GListImpl<TI>::operator==(const GListImpl<TI> &l2) const
+ {
+- Node *p, *q;
++ ListNode<TI> *p, *q;
+ for (p=head.next, q=l2.head.next; p && q; p=p->next, q=q->next )
+- if (p->data != q->data)
++ if (p->val != q->val)
+ return 0;
+ return p==0 && q==0;
+ }
+@@ -817,7 +817,7 @@
+ // -- ACCESS
+ /** Returns the number of elements in the list. */
+ int size() const
+- { return nelem; }
++ { return this->nelem; }
+ /** Returns the first position in the list. See \Ref{GPosition}. */
+ GPosition firstpos() const
+ { return GListImpl<TI>::firstpos(); }
+@@ -846,7 +846,7 @@
+ /** Tests whether a list is empty.
+ Returns a non zero value if the list contains no elements. */
+ int isempty() const
+- { return nelem==0; }
++ { return this->nelem==0; }
+ /** Compares two lists. Returns a non zero value if and only if both lists
+ contain the same elements (as tested by #TYPE::operator==(const TYPE&)#
+ in the same order. */
+@@ -1149,7 +1149,7 @@
+ public:
+ /** Returns the number of elements in the map. */
+ int size() const
+- { return nelems; }
++ { return this->nelems; }
+ /** Returns the first position in the map. */
+ GPosition firstpos() const
+ { return GMapImpl<KTYPE,TI>::firstpos(); }
+@@ -1159,7 +1159,7 @@
+ /** Tests whether the associative map is empty.
+ Returns a non zero value if and only if the map contains zero entries. */
+ int isempty() const
+- { return nelems==0; }
++ { return this->nelems==0; }
+ /** Searches an entry for key #key#. If the map contains an entry whose key
+ is equal to #key# according to #KTYPE::operator==(const KTYPE&)#, this
+ function returns its position. Otherwise it returns an invalid
+@@ -1215,7 +1215,7 @@
+ /* Old iterators. Do not use. */
+ #if GCONTAINER_OLD_ITERATORS
+ void first(GPosition &pos) const { pos = firstpos(); }
+- void last(GPosition &pos) const { pos = lastpos(); }
++ void last(GPosition &pos) const { pos = this->lastpos(); }
+ const VTYPE *next(GPosition &pos) const
+ { if (!pos) return 0; const VTYPE *x=&((*this)[pos]); ++pos; return x; }
+ VTYPE *next(GPosition &pos)
diff --git a/graphics/djvulibre/files/patch-libdjvu_GString.cpp b/graphics/djvulibre/files/patch-libdjvu_GString.cpp
new file mode 100644
index 000000000000..96d4c1f0fca4
--- /dev/null
+++ b/graphics/djvulibre/files/patch-libdjvu_GString.cpp
@@ -0,0 +1,20 @@
+--- libdjvu/GString.cpp.orig Tue Dec 2 04:57:39 2003
++++ libdjvu/GString.cpp Fri Oct 1 14:05:22 2004
+@@ -2666,7 +2666,7 @@
+ { init(GStringRep::UTF8::create(&dat,0,1)); }
+
+ GUTF8String::GUTF8String(const GUTF8String &fmt, va_list &args)
+-{ init(fmt.ptr?fmt->vformat(args):fmt); }
++{ init(fmt.ptr?fmt->vformat(args):(GUTF8String &)fmt); }
+
+ GUTF8String::GUTF8String(const char *str)
+ { init(GStringRep::UTF8::create(str)); }
+@@ -2712,7 +2712,7 @@
+ GNativeString::operator+(const GUTF8String &s2) const
+ {
+ return GStringRep::UTF8::create(
+- ptr?(*this)->toUTF8(true):(*this),s2);
++ ptr?(*this)->toUTF8(true):(GP<GStringRep>)(*this),s2);
+ }
+ #endif
+
diff --git a/graphics/djvulibre/files/patch-libdjvu_GString.h b/graphics/djvulibre/files/patch-libdjvu_GString.h
new file mode 100644
index 000000000000..9cbc820f188d
--- /dev/null
+++ b/graphics/djvulibre/files/patch-libdjvu_GString.h
@@ -0,0 +1,11 @@
+--- libdjvu/GString.h.orig Tue Dec 2 04:57:40 2003
++++ libdjvu/GString.h Fri Oct 1 13:52:39 2004
+@@ -1558,7 +1558,7 @@
+ inline
+ GNativeString::GNativeString(const GNativeString &fmt, va_list &args)
+ {
+- init(fmt.ptr?fmt->vformat(args):fmt);
++ init(fmt.ptr?fmt->vformat(args):(GNativeString &)fmt);
+ }
+
+ inline GNativeString
diff --git a/graphics/djvulibre/files/patch-libdjvu_MMX.cpp b/graphics/djvulibre/files/patch-libdjvu_MMX.cpp
new file mode 100644
index 000000000000..909f14e5ba90
--- /dev/null
+++ b/graphics/djvulibre/files/patch-libdjvu_MMX.cpp
@@ -0,0 +1,11 @@
+--- libdjvu/MMX.cpp.orig Fri Oct 1 14:42:33 2004
++++ libdjvu/MMX.cpp Sat Nov 8 04:08:22 2003
+@@ -161,7 +161,7 @@
+ "1:\tpopl %%ebx\n\t"
+ "movl %%edx, %0"
+ : "=m" (cpuflags) :
+- : "eax","ebx","ecx","edx");
++ : "eax","ecx","edx");
+ #endif
+ #if defined(MMX) && defined(_MSC_VER) && defined(_M_IX86)
+ // Detection of MMX for MSVC