pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/libreoffice4 Fix build with Clang. Patches mostly...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e658a0bbe087
branches:  trunk
changeset: 629407:e658a0bbe087
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Jan 20 19:27:51 2014 +0000

description:
Fix build with Clang. Patches mostly from FreeBSD.

diffstat:

 misc/libreoffice4/Makefile                                                               |    4 +-
 misc/libreoffice4/distinfo                                                               |   19 +-
 misc/libreoffice4/patches/patch-binaryurp_source_cache.hxx                               |  141 ++++++++++
 misc/libreoffice4/patches/patch-binaryurp_source_lessoperators.cxx                       |   48 +++
 misc/libreoffice4/patches/patch-binaryurp_source_lessoperators.hxx                       |   15 +
 misc/libreoffice4/patches/patch-bridges_source_cpp__uno_gcc3__linux__intel_share.hxx     |   38 ++
 misc/libreoffice4/patches/patch-bridges_source_cpp__uno_gcc3__linux__x86-64_share.hxx    |   76 +++++
 misc/libreoffice4/patches/patch-bridges_source_cpp__uno_gcc3__linux__x86-64_uno2cpp.cxx  |   13 +
 misc/libreoffice4/patches/patch-filter_source_graphicfilter_ipbm_ipbm.cxx                |   31 ++
 misc/libreoffice4/patches/patch-filter_source_graphicfilter_ipcd_ipcd.cxx                |   13 +
 misc/libreoffice4/patches/patch-filter_source_graphicfilter_ipcx_ipcx.cxx                |   13 +
 misc/libreoffice4/patches/patch-filter_source_graphicfilter_iras_iras.cxx                |   13 +
 misc/libreoffice4/patches/patch-filter_source_graphicfilter_itga_itga.cxx                |   13 +
 misc/libreoffice4/patches/patch-include_sal_log.hxx                                      |   20 +
 misc/libreoffice4/patches/patch-slideshow_source_engine_activities_activitiesfactory.cxx |   22 +
 misc/libreoffice4/patches/patch-sw_inc_unotbl.hxx                                        |   22 +
 misc/libreoffice4/patches/patch-sw_inc_viewsh.hxx                                        |   22 +
 misc/libreoffice4/patches/patch-sw_source_core_inc_frame.hxx                             |   22 +
 misc/libreoffice4/patches/patch-vcl_headless_svptext.cxx                                 |   13 +
 19 files changed, 555 insertions(+), 3 deletions(-)

diffs (truncated from 654 to 300 lines):

diff -r 6c452a04d65a -r e658a0bbe087 misc/libreoffice4/Makefile
--- a/misc/libreoffice4/Makefile        Mon Jan 20 19:26:40 2014 +0000
+++ b/misc/libreoffice4/Makefile        Mon Jan 20 19:27:51 2014 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.12 2014/01/20 19:26:40 joerg Exp $
+# $NetBSD: Makefile,v 1.13 2014/01/20 19:27:51 joerg Exp $
 
 VER=           4.1.3.2
 DISTNAME=      libreoffice-${VER}
 PKGNAME=       libreoffice4-${VER}
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    misc
 MASTER_SITES=  http://download.documentfoundation.org/libreoffice/src/4.1.3/
 EXTRACT_SUFX=  .tar.xz
diff -r 6c452a04d65a -r e658a0bbe087 misc/libreoffice4/distinfo
--- a/misc/libreoffice4/distinfo        Mon Jan 20 19:26:40 2014 +0000
+++ b/misc/libreoffice4/distinfo        Mon Jan 20 19:27:51 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2013/11/03 03:40:49 ryoon Exp $
+$NetBSD: distinfo,v 1.4 2014/01/20 19:27:51 joerg Exp $
 
 SHA1 (libreoffice/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz) = 452eba922e4f41603539c9dc39947d2271e47093
 RMD160 (libreoffice/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz) = dbeb7a7f8c89961ca2e544b810345d025561866b
@@ -153,9 +153,26 @@
 SHA1 (libreoffice/libreoffice-translations-4.1.3.2.tar.xz) = f5ed5424a50bc24761e7255b73079ad134eb164e
 RMD160 (libreoffice/libreoffice-translations-4.1.3.2.tar.xz) = 74fd890849f941f02c2bc9e185e9bff7a906684d
 Size (libreoffice/libreoffice-translations-4.1.3.2.tar.xz) = 130228660 bytes
+SHA1 (patch-binaryurp_source_cache.hxx) = 9dcb02838324c0c67107eead428ddc5725f208dc
+SHA1 (patch-binaryurp_source_lessoperators.cxx) = ed7088df69bd0a77636d093d3a249859e13434a9
+SHA1 (patch-binaryurp_source_lessoperators.hxx) = 23b8879843ba446abe131186f82ddaef1e6fff33
+SHA1 (patch-bridges_source_cpp__uno_gcc3__linux__intel_share.hxx) = 59d599e9a064062b80c40cef07fdc9a8b9ff05a4
+SHA1 (patch-bridges_source_cpp__uno_gcc3__linux__x86-64_share.hxx) = 2ed400fd6df0f537e7d6af6ce070429c35d5f656
+SHA1 (patch-bridges_source_cpp__uno_gcc3__linux__x86-64_uno2cpp.cxx) = 6073ea67c6f3b398fd74619cee5415d6aba13e3d
 SHA1 (patch-configure) = 884cbd21af8479f487ca9b781f86b870d9a346fb
 SHA1 (patch-configure.ac) = 521e402256b6a874f0a3f470c7042a0a2e1874eb
+SHA1 (patch-filter_source_graphicfilter_ipbm_ipbm.cxx) = 26410ff2372265c155bd8d2f6f67f0f55ae92e47
+SHA1 (patch-filter_source_graphicfilter_ipcd_ipcd.cxx) = 6708cac5b8391c09e06687b5db740dbc1e57621f
+SHA1 (patch-filter_source_graphicfilter_ipcx_ipcx.cxx) = f4d89719ed1c8828eee6d977f38c47eb5af5b73c
+SHA1 (patch-filter_source_graphicfilter_iras_iras.cxx) = 68ad09a9e43f5332d22fb43d112f300fde5ef193
+SHA1 (patch-filter_source_graphicfilter_itga_itga.cxx) = 9582c99383114146ccbced00b3af86731b48f030
+SHA1 (patch-include_sal_log.hxx) = 64f2f48dee55753ef64d0b7905f6822c803eae18
 SHA1 (patch-odk_CustomTarget__classes.mk) = be85f00d88e60139bcf0440947349d4078c7d54f
+SHA1 (patch-slideshow_source_engine_activities_activitiesfactory.cxx) = 2a5568c3373fad5fead83b80e7edc16a95d7a3de
 SHA1 (patch-solenv_gbuild_AllLangResTarget.mk) = c6fa51c74e3be0e9d4f18e1481039d44d6c3db98
 SHA1 (patch-solenv_gbuild_Module.mk) = c31494a266b998e43d6e27f1e93cfd6a0ee0c6a5
+SHA1 (patch-sw_inc_unotbl.hxx) = 2dfbc64ac56c69d084138f3c492f48e870e0abdc
+SHA1 (patch-sw_inc_viewsh.hxx) = bb6121ef50d21f1b6be672c3e8115eb3d092aac3
+SHA1 (patch-sw_source_core_inc_frame.hxx) = e1d65b6d9f7d0d9f0b3b02738a849a13ad970240
 SHA1 (patch-sysui_CustomTarget__slackware.mk) = 7caac8785ee86f005d9e4b2acbecc45036478f02
+SHA1 (patch-vcl_headless_svptext.cxx) = a4e73886449fe1f794503c680abea4c3e4aab6a8
diff -r 6c452a04d65a -r e658a0bbe087 misc/libreoffice4/patches/patch-binaryurp_source_cache.hxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libreoffice4/patches/patch-binaryurp_source_cache.hxx        Mon Jan 20 19:27:51 2014 +0000
@@ -0,0 +1,141 @@
+$NetBSD: patch-binaryurp_source_cache.hxx,v 1.1 2014/01/20 19:27:51 joerg Exp $
+
+--- binaryurp/source/cache.hxx.orig    2013-10-22 17:49:23.000000000 +0000
++++ binaryurp/source/cache.hxx
+@@ -25,6 +25,7 @@
+ #include <cassert>
+ #include <cstddef>
+ #include <map>
++#include <list>
+ 
+ #include "boost/noncopyable.hpp"
+ #include "sal/types.h"
+@@ -37,88 +38,57 @@ enum { size = 256, ignore = 0xFFFF };
+ 
+ }
+ 
+-template< typename T > class Cache: private boost::noncopyable {
++template< typename T > class Cache : private boost::noncopyable {
+ public:
++    typedef sal_uInt16 IdxType;
++
+     explicit Cache(std::size_t size):
+-        size_(size), first_(map_.end()), last_(map_.end())
++        size_(size)
+     {
+         assert(size < cache::ignore);
+     }
+ 
+-    sal_uInt16 add(T const & content, bool * found) {
+-        assert(found != 0);
+-        typename Map::iterator i(map_.find(content));
+-        *found = i != map_.end();
+-        if (i == map_.end()) {
+-            typename Map::size_type n = map_.size();
+-            if (n < size_) {
+-                i =
+-                    (map_.insert(
+-                        typename Map::value_type(
+-                            content,
+-                            Entry(
+-                                static_cast< sal_uInt16 >(n), map_.end(),
+-                                first_)))).
+-                    first;
+-                if (first_ == map_.end()) {
+-                    last_ = i;
+-                } else {
+-                    first_->second.prev = i;
+-                }
+-                first_ = i;
+-            } else if (last_ != map_.end()) {
+-                i =
+-                    (map_.insert(
+-                        typename Map::value_type(
+-                            content,
+-                            Entry(last_->second.index, map_.end(), first_)))).
+-                    first;
+-                first_->second.prev = i;
+-                first_ = i;
+-                typename Map::iterator j(last_);
+-                last_ = last_->second.prev;
+-                last_->second.next = map_.end();
+-                map_.erase(j);
+-            } else {
+-                // Reached iff size_ == 0:
+-                return cache::ignore;
+-            }
+-        } else if (i != first_) {
+-            // Move to front (reached only if size_ > 1):
+-            i->second.prev->second.next = i->second.next;
+-            if (i->second.next == map_.end()) {
+-                last_ = i->second.prev;
+-            } else {
+-                i->second.next->second.prev = i->second.prev;
+-            }
+-            i->second.prev = map_.end();
+-            i->second.next = first_;
+-            first_->second.prev = i;
+-            first_ = i;
+-        }
+-        return i->second.index;
++    IdxType add( const T& rContent, bool* pbFound) {
++      assert( pbFound != NULL);
++      if( !size_) {
++              *pbFound = false;
++              return cache::ignore;
++      }
++      // try to insert into the map
++      list_.push_front( rContent); // create a temp entry
++      typedef std::pair<typename LruList::iterator, IdxType> MappedType;
++      typedef std::pair<typename LruItMap::iterator,bool> MapPair;
++      MapPair aMP = map_.insert( MappedType( list_.begin(), 0));
++      *pbFound = !aMP.second;
++      
++      if( !aMP.second) { // insertion not needed => found the entry
++              list_.pop_front(); // remove the temp entry
++              list_.splice( list_.begin(), list_, aMP.first->first); // the found entry is moved to front
++              return aMP.first->second;
++      }
++
++      // test insertion successful => it was new so we keep it
++      IdxType n = static_cast<IdxType>( map_.size() - 1);
++      if( n >= size_) { // cache full => replace the LRU entry
++              // find the least recently used element in the map
++              typename LruItMap::iterator it = map_.find( --list_.end());
++              n = it->second;
++              map_.erase( it); // remove it from the map
++              list_.pop_back(); // remove from the list
++      }
++      aMP.first->second = n;
++      return n;
+     }
+ 
+ private:
+-    struct Entry;
+-
+-    typedef std::map< T, Entry > Map;
+-
+-    struct Entry {
+-        sal_uInt16 index;
+-        typename Map::iterator prev;
+-        typename Map::iterator next;
+-
+-        Entry(
+-            sal_uInt16 theIndex, typename Map::iterator thePrev,
+-            typename Map::iterator theNext):
+-            index(theIndex), prev(thePrev), next(theNext) {}
+-    };
++    typedef std::list<T> LruList; // last recently used list
++    typedef typename LruList::iterator LruListIt;
++    struct CmpT{ bool operator()( const LruListIt& rA, const LruListIt& rB) const { return (*rA<*rB);}};
++    typedef ::std::map< LruListIt, IdxType, CmpT > LruItMap; // a map into a LruList
+ 
+     std::size_t size_;
+-    Map map_;
+-    typename Map::iterator first_;
+-    typename Map::iterator last_;
++    LruItMap map_;
++    LruList list_;
+ };
+ 
+ }
diff -r 6c452a04d65a -r e658a0bbe087 misc/libreoffice4/patches/patch-binaryurp_source_lessoperators.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libreoffice4/patches/patch-binaryurp_source_lessoperators.cxx        Mon Jan 20 19:27:51 2014 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-binaryurp_source_lessoperators.cxx,v 1.1 2014/01/20 19:27:51 joerg Exp $
+
+--- binaryurp/source/lessoperators.cxx.orig    2013-10-22 17:49:23.000000000 +0000
++++ binaryurp/source/lessoperators.cxx
+@@ -38,8 +38,30 @@ bool operator <(TypeDescription const & 
+     typelib_TypeClass tc2 = right.get()->eTypeClass;
+     return tc1 < tc2 ||
+         (tc1 == tc2 &&
+-         (OUString(left.get()->pTypeName) <
+-          OUString(right.get()->pTypeName)));
++         (OUString::unacquired(&left.get()->pTypeName) <
++          OUString::unacquired(&right.get()->pTypeName)));
++}
++
++bool TypeDescEqual::operator()( const TypeDescription& rLeft, const TypeDescription& rRight) const
++{
++      assert( rLeft.is() && rRight.is());
++      const typelib_TypeDescription& rA = *rLeft.get();
++      const typelib_TypeDescription& rB = *rRight.get();
++      if( rA.eTypeClass != rB.eTypeClass)
++              return false;
++      const sal_Int32 nCmp = rtl_ustr_compare_WithLength(
++                      rA.pTypeName->buffer, rA.pTypeName->length,
++                      rB.pTypeName->buffer, rB.pTypeName->length);
++      return (nCmp == 0);
++}
++
++sal_Int32 TypeDescHash::operator()( const TypeDescription& rTD) const
++{
++      assert( rTD.is());
++      const typelib_TypeDescription& rA = *rTD.get();
++      sal_Int32 h = rtl_ustr_hashCode_WithLength( rA.pTypeName->buffer, rA.pTypeName->length);
++      h ^= static_cast<sal_Int32>(rA.eTypeClass);
++      return h;
+ }
+ 
+ } } } }
+@@ -47,8 +69,8 @@ bool operator <(TypeDescription const & 
+ namespace rtl {
+ 
+ bool operator <(ByteSequence const & left, ByteSequence const & right) {
+-    for (sal_Int32 i = 0; i != std::min(left.getLength(), right.getLength());
+-         ++i)
++    const sal_Int32 nLen = std::min( left.getLength(), right.getLength());
++    for( sal_Int32 i = 0; i < nLen; ++i )
+     {
+         if (left[i] < right[i]) {
+             return true;
diff -r 6c452a04d65a -r e658a0bbe087 misc/libreoffice4/patches/patch-binaryurp_source_lessoperators.hxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libreoffice4/patches/patch-binaryurp_source_lessoperators.hxx        Mon Jan 20 19:27:51 2014 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-binaryurp_source_lessoperators.hxx,v 1.1 2014/01/20 19:27:51 joerg Exp $
+
+--- binaryurp/source/lessoperators.hxx.orig    2013-10-22 17:49:23.000000000 +0000
++++ binaryurp/source/lessoperators.hxx
+@@ -31,6 +31,10 @@ namespace com { namespace sun { namespac
+ 
+ bool operator <(TypeDescription const & left, TypeDescription const & right);
+ 
++struct TypeDescHash { sal_Int32 operator()( const TypeDescription&) const; };
++
++struct TypeDescEqual { bool operator()( const TypeDescription&, const TypeDescription&) const; };
++
+ } } } }
+ 
+ namespace rtl {
diff -r 6c452a04d65a -r e658a0bbe087 misc/libreoffice4/patches/patch-bridges_source_cpp__uno_gcc3__linux__intel_share.hxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libreoffice4/patches/patch-bridges_source_cpp__uno_gcc3__linux__intel_share.hxx      Mon Jan 20 19:27:51 2014 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-bridges_source_cpp__uno_gcc3__linux__intel_share.hxx,v 1.1 2014/01/20 19:27:51 joerg Exp $
+
+--- bridges/source/cpp_uno/gcc3_linux_intel/share.hxx.orig     2013-10-22 17:49:23.000000000 +0000
++++ bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
+@@ -69,7 +69,33 @@ struct __cxa_eh_globals
+ 
+ }
+ 
++#ifdef _LIBCPP_VERSION
++
++namespace __cxxabiv1
++{
++    struct __class_type_info : public std::type_info
++    {
++        explicit __class_type_info( const char *__n ) : type_info( __n ) { }
++        virtual ~__class_type_info();
++    };
++
++    struct __si_class_type_info : public __class_type_info
++    {
++        explicit __si_class_type_info( const char *__n, const __class_type_info *__b ) :
++            __class_type_info( __n ), __base_type( __b ) { }
++        virtual ~__si_class_type_info();
++        const __class_type_info *__base_type;
++    };
++
++extern "C" void *__cxa_allocate_exception( std::size_t thrown_size ) _NOEXCEPT;
++
++extern "C" _LIBCPP_NORETURN void __cxa_throw(



Home | Main Index | Thread Index | Old Index