From owner-svn-ports-head@FreeBSD.ORG Fri Feb 15 17:24:35 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C6BEA5F1; Fri, 15 Feb 2013 17:24:35 +0000 (UTC) (envelope-from pawel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A88B3A1E; Fri, 15 Feb 2013 17:24:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FHOZ9L032676; Fri, 15 Feb 2013 17:24:35 GMT (envelope-from pawel@svn.freebsd.org) Received: (from pawel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FHOYa4032672; Fri, 15 Feb 2013 17:24:34 GMT (envelope-from pawel@svn.freebsd.org) Message-Id: <201302151724.r1FHOYa4032672@svn.freebsd.org> From: Pawel Pekala Date: Fri, 15 Feb 2013 17:24:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r312302 - head/graphics/kdegraphics3/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 17:24:35 -0000 Author: pawel Date: Fri Feb 15 17:24:34 2013 New Revision: 312302 URL: http://svnweb.freebsd.org/changeset/ports/312302 Log: Fix build with clang, patches from NetBSD pkgsrc PR: ports/175634 Submitted by: Oliver Pinter Added: head/graphics/kdegraphics3/files/patch-configure (contents, props changed) head/graphics/kdegraphics3/files/patch-kmrml_kmrml_mrml__elements.h (contents, props changed) head/graphics/kdegraphics3/files/patch-kviewshell_documentWidget.cpp (contents, props changed) head/graphics/kdegraphics3/files/patch-kviewshell_plugins_djvu_libdjvu_GContainer.h (contents, props changed) Added: head/graphics/kdegraphics3/files/patch-configure ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/kdegraphics3/files/patch-configure Fri Feb 15 17:24:34 2013 (r312302) @@ -0,0 +1,17 @@ +--- configure.orig 2013-02-15 17:32:14.000000000 +0100 ++++ configure 2013-02-15 17:33:04.000000000 +0100 +@@ -35743,11 +35743,11 @@ + + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' +-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compile='$CXX -c $CXXFLAGS $USE_EXCEPTIONS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $USE_EXCEPTIONS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $USE_EXCEPTIONS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + + + kde_save_CXXFLAGS="$CXXFLAGS" Added: head/graphics/kdegraphics3/files/patch-kmrml_kmrml_mrml__elements.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/kdegraphics3/files/patch-kmrml_kmrml_mrml__elements.h Fri Feb 15 17:24:34 2013 (r312302) @@ -0,0 +1,11 @@ +--- 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 ); + } + } + Added: head/graphics/kdegraphics3/files/patch-kviewshell_documentWidget.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/kdegraphics3/files/patch-kviewshell_documentWidget.cpp Fri Feb 15 17:24:34 2013 (r312302) @@ -0,0 +1,12 @@ +--- 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 + { Added: head/graphics/kdegraphics3/files/patch-kviewshell_plugins_djvu_libdjvu_GContainer.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/kdegraphics3/files/patch-kviewshell_plugins_djvu_libdjvu_GContainer.h Fri Feb 15 17:24:34 2013 (r312302) @@ -0,0 +1,236 @@ +--- 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::append(newnode((const TI&)elt)); } ++ { GListImpl::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::prepend(newnode((const TI&)elt)); } ++ { GListImpl::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::insert_after(pos, newnode((const TI&)elt)); } ++ { GListImpl::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::insert_before(pos, newnode((const TI&)elt)); } ++ { GListImpl::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::GMapImpl(const GCONT Tra + template GCONT HNode * + GMapImpl::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::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#. */ + const VTYPE& operator[](const KTYPE &key) const +- { return (const VTYPE&)(((const typename GMapImpl::MNode*)(get_or_throw(key)))->val); } ++ { return (const VTYPE&)(((const typename GMapImpl::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::MNode*)(get_or_create(key)))->val); } ++ { return (VTYPE&)(((typename GMapImpl::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]; +-} + + + //@}