pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/daapd Fix questionable C++ code instead of using...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3bb1f0561cb4
branches:  trunk
changeset: 515517:3bb1f0561cb4
user:      tron <tron%pkgsrc.org@localhost>
date:      Mon Jul 03 13:58:30 2006 +0000

description:
Fix questionable C++ code instead of using "-ffriend-injection" option
(which might be removed from future GCC versions) to make this build
with GCC 4.1.x.

Patch tested by Thomas 'wiz' Klausner.

diffstat:

 audio/daapd/Makefile         |   8 +-----
 audio/daapd/distinfo         |   4 ++-
 audio/daapd/patches/patch-ad |  24 +++++++++++++++++++
 audio/daapd/patches/patch-ae |  54 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 8 deletions(-)

diffs (123 lines):

diff -r 7d84db0c1ab0 -r 3bb1f0561cb4 audio/daapd/Makefile
--- a/audio/daapd/Makefile      Mon Jul 03 13:34:50 2006 +0000
+++ b/audio/daapd/Makefile      Mon Jul 03 13:58:30 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2006/07/03 02:18:15 tron Exp $
+# $NetBSD: Makefile,v 1.22 2006/07/03 13:58:30 tron Exp $
 
 DISTNAME=              daapd-0.2.4b
 PKGREVISION=           1
@@ -42,12 +42,6 @@
 SUBST_FILES.paths=     daapd.8 daapd.cc
 SUBST_SED.paths=       -e 's,/etc/,${PKG_SYSCONFDIR}/,g'
 
-.include "../../mk/compiler.mk"
-
-.if !empty(CC_VERSION:Mgcc-4.1.*)
-CFLAGS+=               -ffriend-injection
-.endif
-
 post-extract:
        for FILE in `${FIND} ${WRKSRC}/daaplib -type f -print`; do      \
          ${TR} -d \\r <$${FILE} >$${FILE}.new;                         \
diff -r 7d84db0c1ab0 -r 3bb1f0561cb4 audio/daapd/distinfo
--- a/audio/daapd/distinfo      Mon Jul 03 13:34:50 2006 +0000
+++ b/audio/daapd/distinfo      Mon Jul 03 13:58:30 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2006/07/03 02:18:15 tron Exp $
+$NetBSD: distinfo,v 1.16 2006/07/03 13:58:30 tron Exp $
 
 SHA1 (daapd-0.2.4b.tgz) = 0903303f155c19ae12cdc78be05799508156a16b
 RMD160 (daapd-0.2.4b.tgz) = 899b37b3872623ef918f7faa4eb8bad2dfc5b369
@@ -6,3 +6,5 @@
 SHA1 (patch-aa) = c10564ede45fa92b18926da68a7a9a2d9547627d
 SHA1 (patch-ab) = 4b6e743a4de3f476ad73c13ecc19397d418e2731
 SHA1 (patch-ac) = 0a4e3dfb010bbf2cc01843987c970548cb4c646f
+SHA1 (patch-ad) = 05a61ced18d5b0827ade7e6b3341430ff9b9e89d
+SHA1 (patch-ae) = 3433d7e944999e10690ccdda1d49d3c711671446
diff -r 7d84db0c1ab0 -r 3bb1f0561cb4 audio/daapd/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/daapd/patches/patch-ad      Mon Jul 03 13:58:30 2006 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-ad,v 1.1 2006/07/03 13:58:31 tron Exp $
+
+--- daaplib/include/daap/tagoutput.h.orig      2006-07-03 10:56:28.000000000 +0100
++++ daaplib/include/daap/tagoutput.h   2006-07-03 10:39:27.000000000 +0100
+@@ -98,9 +98,7 @@
+                       return( func( *this ));
+               }
+                       
+-              friend inline TagOutput& end( TagOutput& x ) {
+-                      return( x.closeTag());
+-              }
++              friend inline TagOutput& end( TagOutput& x );
+               
+       protected:
+               typedef std::vector<u8>  DataInt8;
+@@ -125,4 +123,8 @@
+               TagOutput( const TagOutput& );
+               TagOutput& operator = ( const TagOutput& );
+       };
++
++      inline TagOutput& end( TagOutput& x ) {
++              return( x.closeTag());
++      }
+ #endif
diff -r 7d84db0c1ab0 -r 3bb1f0561cb4 audio/daapd/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/daapd/patches/patch-ae      Mon Jul 03 13:58:30 2006 +0000
@@ -0,0 +1,54 @@
+$NetBSD: patch-ae,v 1.1 2006/07/03 13:58:31 tron Exp $
+
+--- daaplib/include/daap/taginput.h.orig       2006-07-03 14:32:01.000000000 +0100
++++ daaplib/include/daap/taginput.h    2006-07-03 14:36:37.000000000 +0100
+@@ -71,9 +71,7 @@
+                       return( func( *this ));
+               }
+                       
+-              friend inline TagInput& end( TagInput& x ) {
+-                      return( x.closeTag() );
+-              }
++              friend inline TagInput& end( TagInput& x );
+ 
+ 
+               //////
+@@ -95,15 +93,9 @@
+                       return( *this );
+               }
+ 
+-              friend inline TagInput& skipTag( TagInput& x ) {
+-                      x.skipTag();
+-                      return( x );
+-              }
++              friend inline TagInput& skipTag( TagInput& x );
+ 
+-              friend inline TagInput& skipRestOfTag( TagInput& x ) {
+-                      x.skipRestOfTag();
+-                      return( x );
+-              }
++              friend inline TagInput& skipRestOfTag( TagInput& x );
+ 
+       protected:
+               typedef std::vector<u32> StackInt32;
+@@ -131,4 +123,20 @@
+               TagInput( const TagInput& );
+               TagInput& operator = ( const TagInput& );
+       };
++
++      inline TagInput& end( TagInput& x ) {
++              return( x.closeTag() );
++      }
++
++
++      inline TagInput& skipTag( TagInput& x ) {
++              x.skipTag();
++              return( x );
++      }
++
++      inline TagInput& skipRestOfTag( TagInput& x ) {
++              x.skipRestOfTag();
++              return( x );
++      }
++
+ #endif



Home | Main Index | Thread Index | Old Index