Fix build with Clang.
This commit is contained in:
parent
01f53556f6
commit
8a23ef500e
5 changed files with 277 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.99 2012/06/14 07:43:42 sbd Exp $
|
||||
# $NetBSD: Makefile,v 1.100 2012/06/25 11:29:13 joerg Exp $
|
||||
|
||||
DISTNAME= kdegraphics-${_KDE_VERSION}
|
||||
PKGREVISION= 19
|
||||
|
@ -31,6 +31,12 @@ SUBST_SED.kpdf+= -e 's:/usr/X11R6:${X11BASE}:g'
|
|||
# Ensure we export symbols in the linked shared object.
|
||||
LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
|
||||
|
||||
.include "../../mk/compiler.mk"
|
||||
.if !empty(PKGSRC_COMPILER:Mclang)
|
||||
# OpenEXR uses exceptions in the header files
|
||||
BUILDLINK_TRANSFORM+= rm:-fno-exceptions
|
||||
.endif
|
||||
|
||||
.include "../../meta-pkgs/kde3/kde3.mk"
|
||||
.include "../../converters/fribidi/buildlink3.mk"
|
||||
.include "../../devel/libgphoto2/buildlink3.mk"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.53 2012/01/26 21:14:30 shattered Exp $
|
||||
$NetBSD: distinfo,v 1.54 2012/06/25 11:29:13 joerg Exp $
|
||||
|
||||
SHA1 (kdegraphics-3.5.10.tar.bz2) = 9634e3ab364d017152fb6d636efad8811aeec6c3
|
||||
RMD160 (kdegraphics-3.5.10.tar.bz2) = 94278e4419ab99885fc9efae9b6ba5ba787f831e
|
||||
|
@ -8,4 +8,7 @@ SHA1 (patch-ab) = f2aa9e992904add4b95ecf2553a4e1bf9510913f
|
|||
SHA1 (patch-ac) = 3738313046fbb69ac527ae472fe5db24bdff3fff
|
||||
SHA1 (patch-ad) = 39f9af23006d6b8d09d0ecbb83a382df6b125152
|
||||
SHA1 (patch-ae) = e1984e4441f2b96697ae7a17028bd59bacb7cc73
|
||||
SHA1 (patch-af) = ab3eff6677c889dfd48b5aa6cc116a0da18dd925
|
||||
SHA1 (patch-af) = aa0a0bbfbdd20d8542aebd64912709bf1f4ff979
|
||||
SHA1 (patch-kmrml_kmrml_mrml__elements.h) = f832e7e0a83cec5214630fd871f2d7132b5219d9
|
||||
SHA1 (patch-kviewshell_documentWidget.cpp) = 605f44f574f8391b9947424d0fee926bc2f7a494
|
||||
SHA1 (patch-kviewshell_plugins_djvu_libdjvu_GContainer.h) = ba805be065c9eb38b865d969e291ab5bb49b1798
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-kmrml_kmrml_mrml__elements.h,v 1.1 2012/06/25 11:29:14 joerg Exp $
|
||||
|
||||
--- kmrml/kmrml/mrml_elements.h.orig 2012-06-18 18:08:26.000000000 +0000
|
||||
+++ kmrml/kmrml/mrml_elements.h
|
||||
@@ -157,7 +157,7 @@ namespace KMrml
|
||||
QDomElement elem = list.item( i ).toElement();
|
||||
t item( elem );
|
||||
if ( item.isValid() )
|
||||
- append( item );
|
||||
+ this->append( item );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-kviewshell_documentWidget.cpp,v 1.1 2012/06/25 11:29:14 joerg Exp $
|
||||
|
||||
--- kviewshell/documentWidget.cpp.orig 2012-06-18 18:22:45.000000000 +0000
|
||||
+++ kviewshell/documentWidget.cpp
|
||||
@@ -287,7 +287,8 @@ void DocumentWidget::paintEvent(QPaintEv
|
||||
if (KVSPrefs::changeColors() && KVSPrefs::renderMode() != KVSPrefs::EnumRenderMode::Paper)
|
||||
{
|
||||
// Paint widget contents with accessibility changes.
|
||||
- bitBlt ( this, destRect.topLeft(), &pageData->accessiblePixmap(), pixmapRect, CopyROP);
|
||||
+ QPixmap p(pageData->accessiblePixmap());
|
||||
+ bitBlt ( this, destRect.topLeft(), &p, pixmapRect, CopyROP);
|
||||
}
|
||||
else
|
||||
{
|
|
@ -0,0 +1,238 @@
|
|||
$NetBSD: patch-kviewshell_plugins_djvu_libdjvu_GContainer.h,v 1.1 2012/06/25 11:29:14 joerg Exp $
|
||||
|
||||
--- kviewshell/plugins/djvu/libdjvu/GContainer.h.orig 2012-06-18 18:24:59.000000000 +0000
|
||||
+++ kviewshell/plugins/djvu/libdjvu/GContainer.h
|
||||
@@ -152,6 +152,86 @@ namespace DJVU {
|
||||
// Cf section 5.4.7 in november 1997 draft.
|
||||
#pragma warning( disable : 4243 )
|
||||
#endif
|
||||
+// ------------------------------------------------------------
|
||||
+// HASH FUNCTIONS
|
||||
+// ------------------------------------------------------------
|
||||
+
|
||||
+
|
||||
+/** @name Hash functions
|
||||
+ These functions let you use template class \Ref{GMap} with the
|
||||
+ corresponding elementary types. The returned hash code may be reduced to
|
||||
+ an arbitrary range by computing its remainder modulo the upper bound of
|
||||
+ the range.
|
||||
+ @memo Hash functions for elementary types. */
|
||||
+//@{
|
||||
+
|
||||
+/** Hashing function (unsigned int). */
|
||||
+static inline unsigned int
|
||||
+hash(const unsigned int & x)
|
||||
+{
|
||||
+ return x;
|
||||
+}
|
||||
+
|
||||
+/** Hashing function (int). */
|
||||
+static inline unsigned int
|
||||
+hash(const int & x)
|
||||
+{
|
||||
+ return (unsigned int)x;
|
||||
+}
|
||||
+
|
||||
+/** Hashing function (long). */
|
||||
+static inline unsigned int
|
||||
+hash(const long & x)
|
||||
+{
|
||||
+ return (unsigned int)x;
|
||||
+}
|
||||
+
|
||||
+/** Hashing function (unsigned long). */
|
||||
+static inline unsigned int
|
||||
+hash(const unsigned long & x)
|
||||
+{
|
||||
+ return (unsigned int)x;
|
||||
+}
|
||||
+
|
||||
+/** Hashing function (void *). */
|
||||
+static inline unsigned int
|
||||
+hash(void * const & x)
|
||||
+{
|
||||
+ return (unsigned long) x;
|
||||
+}
|
||||
+
|
||||
+/** Hashing function (const void *). */
|
||||
+static inline unsigned int
|
||||
+hash(const void * const & x)
|
||||
+{
|
||||
+ return (unsigned long) x;
|
||||
+}
|
||||
+
|
||||
+/** Hashing function (float). */
|
||||
+static inline unsigned int
|
||||
+hash(const float & x)
|
||||
+{
|
||||
+ // optimizer will get rid of unnecessary code
|
||||
+ unsigned int *addr = (unsigned int*)&x;
|
||||
+ if (sizeof(float)<2*sizeof(unsigned int))
|
||||
+ return addr[0];
|
||||
+ else
|
||||
+ return addr[0]^addr[1];
|
||||
+}
|
||||
+
|
||||
+/** Hashing function (double). */
|
||||
+static inline unsigned int
|
||||
+hash(const double & x)
|
||||
+{
|
||||
+ // optimizer will get rid of unnecessary code
|
||||
+ unsigned int *addr = (unsigned int*)&x;
|
||||
+ if (sizeof(double)<2*sizeof(unsigned int))
|
||||
+ return addr[0];
|
||||
+ else if (sizeof(double)<4*sizeof(unsigned int))
|
||||
+ return addr[0]^addr[1];
|
||||
+ else
|
||||
+ return addr[0]^addr[1]^addr[2]^addr[3];
|
||||
+}
|
||||
|
||||
|
||||
// GPEnabled inhertenced removed again so the code works on more machines.
|
||||
@@ -887,21 +967,21 @@ public:
|
||||
/** Inserts an element after the last element of the list.
|
||||
The new element is initialized with a copy of argument #elt#. */
|
||||
void append(const TYPE &elt)
|
||||
- { GListImpl<TI>::append(newnode((const TI&)elt)); }
|
||||
+ { GListImpl<TI>::append(this->newnode((const TI&)elt)); }
|
||||
/** Inserts an element before the first element of the list.
|
||||
The new element is initialized with a copy of argument #elt#. */
|
||||
void prepend(const TYPE &elt)
|
||||
- { GListImpl<TI>::prepend(newnode((const TI&)elt)); }
|
||||
+ { GListImpl<TI>::prepend(this->newnode((const TI&)elt)); }
|
||||
/** Inserts a new element after the list element at position #pos#. When
|
||||
position #pos# is null the element is inserted at the beginning of the
|
||||
list. The new element is initialized with a copy of #elt#. */
|
||||
void insert_after(GPosition pos, const TYPE &elt)
|
||||
- { GListImpl<TI>::insert_after(pos, newnode((const TI&)elt)); }
|
||||
+ { GListImpl<TI>::insert_after(pos, this->newnode((const TI&)elt)); }
|
||||
/** Inserts a new element before the list element at position #pos#. When
|
||||
position #pos# is null the element is inserted at the end of the
|
||||
list. The new element is initialized with a copy of #elt#. */
|
||||
void insert_before(GPosition pos, const TYPE &elt)
|
||||
- { GListImpl<TI>::insert_before(pos, newnode((const TI&)elt)); }
|
||||
+ { GListImpl<TI>::insert_before(pos, this->newnode((const TI&)elt)); }
|
||||
/** Inserts an element of another list into this list. This function
|
||||
removes the element at position #frompos# in list #frompos#, inserts it
|
||||
in the current list before the element at position #pos#, and advances
|
||||
@@ -1122,7 +1202,7 @@ GMapImpl<K,TI>::GMapImpl(const GCONT Tra
|
||||
template<class K, class TI> GCONT HNode *
|
||||
GMapImpl<K,TI>::get_or_create(const K &key)
|
||||
{
|
||||
- GCONT HNode *m = get(key);
|
||||
+ GCONT HNode *m = this->get(key);
|
||||
if (m) return m;
|
||||
MNode *n = (MNode*) operator new (sizeof(MNode));
|
||||
#if GCONTAINER_ZERO_FILL
|
||||
@@ -1131,7 +1211,7 @@ GMapImpl<K,TI>::get_or_create(const K &k
|
||||
new ((void*)&(n->key)) K (key);
|
||||
new ((void*)&(n->val)) TI ();
|
||||
n->hashcode = hash((const K&)(n->key));
|
||||
- installnode(n);
|
||||
+ this->installnode(n);
|
||||
return n;
|
||||
}
|
||||
|
||||
@@ -1197,13 +1277,13 @@ public:
|
||||
contains key #key#. This variant of #operator[]# is necessary when
|
||||
dealing with a #const GMAP<KTYPE,VTYPE>#. */
|
||||
const VTYPE& operator[](const KTYPE &key) const
|
||||
- { return (const VTYPE&)(((const typename GMapImpl<KTYPE,TI>::MNode*)(get_or_throw(key)))->val); }
|
||||
+ { return (const VTYPE&)(((const typename GMapImpl<KTYPE,TI>::MNode*)(this->get_or_throw(key)))->val); }
|
||||
/** Returns a reference to the value of the map entry for key #key#. This
|
||||
reference can be used for both reading (as "#a[n]#") and modifying (as
|
||||
"#a[n]=v#"). If there is no entry for key #key#, a new entry is created
|
||||
for that key with the null constructor #VTYPE::VTYPE()#. */
|
||||
VTYPE& operator[](const KTYPE &key)
|
||||
- { return (VTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(get_or_create(key)))->val); }
|
||||
+ { return (VTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(this->get_or_create(key)))->val); }
|
||||
/** Destroys the map entry for position #pos#.
|
||||
Nothing is done if position #pos# is not a valid position. */
|
||||
void del(GPosition &pos)
|
||||
@@ -1266,86 +1346,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
-// ------------------------------------------------------------
|
||||
-// HASH FUNCTIONS
|
||||
-// ------------------------------------------------------------
|
||||
-
|
||||
-
|
||||
-/** @name Hash functions
|
||||
- These functions let you use template class \Ref{GMap} with the
|
||||
- corresponding elementary types. The returned hash code may be reduced to
|
||||
- an arbitrary range by computing its remainder modulo the upper bound of
|
||||
- the range.
|
||||
- @memo Hash functions for elementary types. */
|
||||
-//@{
|
||||
-
|
||||
-/** Hashing function (unsigned int). */
|
||||
-static inline unsigned int
|
||||
-hash(const unsigned int & x)
|
||||
-{
|
||||
- return x;
|
||||
-}
|
||||
-
|
||||
-/** Hashing function (int). */
|
||||
-static inline unsigned int
|
||||
-hash(const int & x)
|
||||
-{
|
||||
- return (unsigned int)x;
|
||||
-}
|
||||
-
|
||||
-/** Hashing function (long). */
|
||||
-static inline unsigned int
|
||||
-hash(const long & x)
|
||||
-{
|
||||
- return (unsigned int)x;
|
||||
-}
|
||||
-
|
||||
-/** Hashing function (unsigned long). */
|
||||
-static inline unsigned int
|
||||
-hash(const unsigned long & x)
|
||||
-{
|
||||
- return (unsigned int)x;
|
||||
-}
|
||||
-
|
||||
-/** Hashing function (void *). */
|
||||
-static inline unsigned int
|
||||
-hash(void * const & x)
|
||||
-{
|
||||
- return (unsigned long) x;
|
||||
-}
|
||||
-
|
||||
-/** Hashing function (const void *). */
|
||||
-static inline unsigned int
|
||||
-hash(const void * const & x)
|
||||
-{
|
||||
- return (unsigned long) x;
|
||||
-}
|
||||
-
|
||||
-/** Hashing function (float). */
|
||||
-static inline unsigned int
|
||||
-hash(const float & x)
|
||||
-{
|
||||
- // optimizer will get rid of unnecessary code
|
||||
- unsigned int *addr = (unsigned int*)&x;
|
||||
- if (sizeof(float)<2*sizeof(unsigned int))
|
||||
- return addr[0];
|
||||
- else
|
||||
- return addr[0]^addr[1];
|
||||
-}
|
||||
-
|
||||
-/** Hashing function (double). */
|
||||
-static inline unsigned int
|
||||
-hash(const double & x)
|
||||
-{
|
||||
- // optimizer will get rid of unnecessary code
|
||||
- unsigned int *addr = (unsigned int*)&x;
|
||||
- if (sizeof(double)<2*sizeof(unsigned int))
|
||||
- return addr[0];
|
||||
- else if (sizeof(double)<4*sizeof(unsigned int))
|
||||
- return addr[0]^addr[1];
|
||||
- else
|
||||
- return addr[0]^addr[1]^addr[2]^addr[3];
|
||||
-}
|
||||
|
||||
|
||||
//@}
|
Loading…
Reference in a new issue