pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/grive Fix build on NetBSD/ARM.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/728e4aba1dde
branches:  trunk
changeset: 648057:728e4aba1dde
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Mar 10 14:08:01 2015 +0000

description:
Fix build on NetBSD/ARM.

diffstat:

 net/grive/distinfo                                    |   4 +-
 net/grive/patches/patch-libgrive_src_protocol_Json.cc |  45 ++++++++++++++++++-
 2 files changed, 46 insertions(+), 3 deletions(-)

diffs (72 lines):

diff -r 76e028985c55 -r 728e4aba1dde net/grive/distinfo
--- a/net/grive/distinfo        Tue Mar 10 13:59:29 2015 +0000
+++ b/net/grive/distinfo        Tue Mar 10 14:08:01 2015 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2014/06/06 14:57:00 abs Exp $
+$NetBSD: distinfo,v 1.2 2015/03/10 14:08:01 joerg Exp $
 
 SHA1 (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = e3059b0ce32ea05d7b5457948317b39358dbb239
 RMD160 (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = f2a8c3e67f24c01b45ba831f2b3b8c2b5e39fe5c
 Size (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = 162471 bytes
 SHA1 (patch-cmake_Modules_FindJSONC.cmake) = 3038261ef82ad501ffeae18abbba562cc73ae435
-SHA1 (patch-libgrive_src_protocol_Json.cc) = 81087f290cba4f37aeac09742973a78fd9be0bb9
+SHA1 (patch-libgrive_src_protocol_Json.cc) = c6a30dd3558a1e054e0486531cc6142e9ad0d263
 SHA1 (patch-libgrive_src_util_OS.cc) = 79cdfe8f89e28901b44c1e8dc5f054a9ca03f061
diff -r 76e028985c55 -r 728e4aba1dde net/grive/patches/patch-libgrive_src_protocol_Json.cc
--- a/net/grive/patches/patch-libgrive_src_protocol_Json.cc     Tue Mar 10 13:59:29 2015 +0000
+++ b/net/grive/patches/patch-libgrive_src_protocol_Json.cc     Tue Mar 10 14:08:01 2015 +0000
@@ -1,6 +1,7 @@
-$NetBSD: patch-libgrive_src_protocol_Json.cc,v 1.1.1.1 2014/06/06 14:57:00 abs Exp $
+$NetBSD: patch-libgrive_src_protocol_Json.cc,v 1.2 2015/03/10 14:08:02 joerg Exp $
 
 Update for json-c 0.11 and later
+On NetBSD/ARM, int32_t is not long, so add template specialisation for that.
 
 --- libgrive/src/protocol/Json.cc.orig 2013-05-02 16:40:04.000000000 +0000
 +++ libgrive/src/protocol/Json.cc
@@ -15,3 +16,45 @@
  #ifdef _MSC_VER
        #pragma warning(pop)
  #endif
+@@ -107,6 +107,20 @@ Json::Json( const boost::int32_t& l ) :
+               ) ;
+ }
+ 
++#ifdef __arm__
++template <>
++Json::Json( const long& l ) :
++      m_json( ::json_object_new_int( l ) )
++{
++      if ( m_json == 0 )
++              BOOST_THROW_EXCEPTION(
++                      Error()
++                              << JsonCApi_( "json_object_new_int" )
++                              << ValueErr( l )
++              ) ;
++}
++#endif
++
+ template <>
+ Json::Json( const boost::int64_t& l ) :
+       m_json( ::json_object_new_int64( l ) )
+@@ -131,6 +145,20 @@ Json::Json( const boost::uint32_t& l ) :
+               ) ;
+ }
+ 
++#ifdef __arm__
++template <>
++Json::Json( const unsigned long& l ) :
++      m_json( ::json_object_new_int( static_cast<int>(l) ) )
++{
++      if ( m_json == 0 )
++              BOOST_THROW_EXCEPTION(
++                      Error()
++                              << JsonCApi_( "json_object_new_int" )
++                              << ValueErr( l )
++              ) ;
++}
++#endif
++
+ template <>
+ Json::Json( const boost::uint64_t& l ) :
+       m_json( ::json_object_new_int64( l ) )



Home | Main Index | Thread Index | Old Index