pkgsrc-Bugs archive

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

pkg/29644: libopendaap bug and tunesbrowser



>Number:         29644
>Category:       pkg
>Synopsis:       libopendaap update broke tunesbrowser
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 09 21:25:00 +0000 2005
>Originator:     Antoine Reilles
>Release:        NetBSD 2.99.16
>Organization:
        
>Environment:
        
        
System: NetBSD arcelot.loria.fr 2.99.16 NetBSD 2.99.16 (MYKERNEL) #0: Sun Feb 
20 22:10:25 CET 2005 
root%arcelot.loria.fr@localhost:/usr/obj/sys/arch/i386/compile/MYKERNEL i386
Architecture: i386
Machine: i386
>Description:
the recent update of libdaap broke the tunesbrowser package.

I tried to build tunesbrowser-2.0, and did the necessary patches to make
it work under -current.
However, it builds fine now, but does not work, because of pthreads mutex
problems with libdaap. 

In thread.h, there was something like:                            
                                                                                
               
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); \                    
               
pthread_mutexattr_destroy(&attr) ; \                                            
               
pthread_mutex_init(& m, &attr); \                                               
               
                                                                                
               
Be setting things in the correct order, i've got a working
tunesbrowser-2.0. I include here my patch to libopendaap (just add a
patch-aa for thread.h), and a patch for tunesbrowser-2.0. I know pkgsrc
is now frozen, but i was not able to build the old tunesbrowser with the
new libopendaap.

>How-To-Repeat:
upgrade libopendaap to the latest one, and then try to build tunesbrowser
>Fix:
Here a patch for libopendaap, which corrects its use of 
pthread_mutexattr_destroy

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/audio/libopendaap/distinfo,v
retrieving revision 1.5
diff -u -r1.5 distinfo
--- distinfo    7 Mar 2005 15:30:44 -0000       1.5
+++ distinfo    9 Mar 2005 20:08:23 -0000
@@ -3,6 +3,7 @@
 SHA1 (libopendaap-0.3.0.tar.bz2) = 21817a7886ffc8c4d88c621231569562c61356db
 RMD160 (libopendaap-0.3.0.tar.bz2) = 2218783e40e7f48a7b89b2e27145e4964f7dd687
 Size (libopendaap-0.3.0.tar.bz2) = 365682 bytes
+SHA1 (patch-aa) = 46069794c86a4687eecec576a3d3c0cf56fcd36c
 SHA1 (patch-ab) = 3bd01a3038505721149a8ea56f564442b035cee4
 SHA1 (patch-ac) = d723c22d11df6d511290d45ccb54861fbecc178d
 SHA1 (patch-ad) = 88b72f80e4a6ed68f7ae74ace3f3dbf07709c0b1
--- /dev/null   2005-03-09 21:03:18.000000000 +0100
+++ patches/patch-aa    2005-03-09 21:00:04.000000000 +0100
@@ -0,0 +1,12 @@
+--- thread.h.orig      2005-03-09 20:59:09.000000000 +0100
++++ thread.h   2005-03-09 20:59:23.000000000 +0100
+@@ -42,8 +42,8 @@
+         pthread_mutexattr_t attr; \
+         pthread_mutexattr_init(&attr) ; \
+         pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); \
+-        pthread_mutexattr_destroy(&attr) ; \
+         pthread_mutex_init(& m, &attr); \
++        pthread_mutexattr_destroy(&attr) ; \
+     } while (0)
+ #define ts_mutex_lock(m)              pthread_mutex_lock(& m)
+ #define ts_mutex_unlock(m)            pthread_mutex_unlock(& m)

And a patch to the tunesbrowser package, upgrading it to 2.0 since the current
one does not build with the updated libopendaap. I haven't checked for C99 isms 
like was done with the previous patches for this package, since i'n not enough 
fluent with C to see them.


Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/audio/tunesbrowser/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile    3 Oct 2004 00:13:10 -0000       1.2
+++ Makefile    9 Mar 2005 20:07:35 -0000
@@ -1,8 +1,7 @@
 # $NetBSD: Makefile,v 1.2 2004/10/03 00:13:10 tv Exp $
 #
 
-DISTNAME=              tunesbrowser-0.1.5
-PKGREVISION=   1
+DISTNAME=              tunesbrowser-0.2.0
 CATEGORIES=            audio
 MASTER_SITES=          http://crazney.net/programs/itunes/files/
 EXTRACT_SUFX=          .tar.bz2
@@ -16,6 +15,8 @@
 USE_LIBTOOL=           yes
 LIBTOOL_OVERRIDE=      ${WRKSRC}/libtool
 
+CONFIGURE_ARGS+= --datadir=${PREFIX}/share/tunesbrowser
+
 DEPENDS+=              mad>=0.15.0b:../../audio/mad
 
 .include "../../audio/gst-plugins-artsd/buildlink3.mk"
@@ -25,5 +26,6 @@
 .include "../../devel/libglade2/buildlink3.mk"
 .include "../../devel/pkgconfig/buildlink3.mk"
 .include "../../multimedia/gstreamer/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/audio/tunesbrowser/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- PLIST       20 Jun 2004 20:41:22 -0000      1.1.1.1
+++ PLIST       9 Mar 2005 20:07:35 -0000
@@ -1,3 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/06/20 20:41:22 agc Exp $
+@comment $NetBSD$
 bin/tunesbrowser
-share/tunesbrowser.glade
+man/man1/tunesbrowser.1
+share/tunesbrowser/comp.blue.png
+share/tunesbrowser/comp.red.png
+share/tunesbrowser/sound1.png
+share/tunesbrowser/sound2.png
+share/tunesbrowser/tunesbrowser.glade
+@dirrm share/tunesbrowser
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/audio/tunesbrowser/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo    23 Feb 2005 20:39:53 -0000      1.3
+++ distinfo    9 Mar 2005 20:07:35 -0000
@@ -1,9 +1,6 @@
 $NetBSD: distinfo,v 1.3 2005/02/23 20:39:53 agc Exp $
 
-SHA1 (tunesbrowser-0.1.5.tar.bz2) = 31feff440625d2dad664b7e9fb8ec4055aa151ef
-RMD160 (tunesbrowser-0.1.5.tar.bz2) = baba93b8c66ddbd39811c2e69b9186fce7f6fdfa
-Size (tunesbrowser-0.1.5.tar.bz2) = 190729 bytes
-SHA1 (patch-aa) = 39d837625a837d4c927bd220d3f3e030b4b122bd
-SHA1 (patch-ab) = d9da00f2daf4cdb33ea69f51ffb294f7130765d7
-SHA1 (patch-ac) = c0bad452914fb27e73713c2026f33aa3a4bb74d5
-SHA1 (patch-ad) = 99d5bcac138e5b7e936c288e7531f2b3c5458c83
+SHA1 (tunesbrowser-0.2.0.tar.bz2) = 79195c25d6f6bfdeebe9b1e8eb34b5ca0e185764
+RMD160 (tunesbrowser-0.2.0.tar.bz2) = 365aee4d25f4a77efb751b268874bcf0ec64db70
+Size (tunesbrowser-0.2.0.tar.bz2) = 208472 bytes
+SHA1 (patch-aa) = b437f835f3c1614c3bdc73f3eb99e51395bfacf5
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/audio/tunesbrowser/patches/patch-aa,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-aa
--- patches/patch-aa    20 Jun 2004 20:41:22 -0000      1.1.1.1
+++ patches/patch-aa    9 Mar 2005 20:07:35 -0000
@@ -1,53 +1,25 @@
-$NetBSD: patch-aa,v 1.1.1.1 2004/06/20 20:41:22 agc Exp $
-
---- configure  2004/06/05 22:49:11     1.1
-+++ configure  2004/06/05 22:49:43
-@@ -19625,23 +19625,23 @@
-   else
-      PKG_CONFIG_MIN_VERSION=0.9.0
-      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
--        echo "$as_me:$LINENO: checking for opendaap libglade-2.0 
gstreamer-0.6" >&5
--echo $ECHO_N "checking for opendaap libglade-2.0 gstreamer-0.6... $ECHO_C" >&6
-+        echo "$as_me:$LINENO: checking for opendaap libglade-2.0 
gstreamer-0.8" >&5
-+echo $ECHO_N "checking for opendaap libglade-2.0 gstreamer-0.8... $ECHO_C" >&6
+--- main.c.orig        2005-03-09 16:08:32.000000000 +0100
++++ main.c     2005-03-09 16:09:04.000000000 +0100
+@@ -38,7 +38,7 @@
+ {
+     fprintf(stderr, "Oops! TunesBrowser has crashed. Sorry about that!\n");
+     fprintf(stderr, "This probably won't be of any use unless you feel like 
debugging,\n");
+-    fprintf(stderr, "but the crash occured because of %p being bad.\n", 
siginfo->si_ptr);
++    fprintf(stderr, "but the crash occured because of %p being bad.\n", 
siginfo->si_addr);
+ #if 0
+     fprintf(stderr, "\n\nRaised SIGSTOP. You can now attach a debugger.\n");
+     fprintf(stderr, "Attach to PID %i\n", getpid());
+@@ -66,11 +66,11 @@
+     int ret;
  
--        if $PKG_CONFIG --exists "opendaap libglade-2.0 gstreamer-0.6" ; then
-+        if $PKG_CONFIG --exists "opendaap libglade-2.0 gstreamer-0.8" ; then
-             echo "$as_me:$LINENO: result: yes" >&5
- echo "${ECHO_T}yes" >&6
-             succeeded=yes
+     sa.sa_handler = (void*)sighandler_sigsegv;
+-    sa.sa_flags = SA_NOMASK | SA_SIGINFO;
++    sa.sa_flags = SA_NODEFER | SA_SIGINFO;
+     ret = sigaction(SIGSEGV, &sa, NULL);
  
-             echo "$as_me:$LINENO: checking TB_CFLAGS" >&5
- echo $ECHO_N "checking TB_CFLAGS... $ECHO_C" >&6
--            TB_CFLAGS=`$PKG_CONFIG --cflags "opendaap libglade-2.0 
gstreamer-0.6"`
-+            TB_CFLAGS=`$PKG_CONFIG --cflags "opendaap libglade-2.0 
gstreamer-0.8"`
-             echo "$as_me:$LINENO: result: $TB_CFLAGS" >&5
- echo "${ECHO_T}$TB_CFLAGS" >&6
- 
-             echo "$as_me:$LINENO: checking TB_LIBS" >&5
- echo $ECHO_N "checking TB_LIBS... $ECHO_C" >&6
--            TB_LIBS=`$PKG_CONFIG --libs "opendaap libglade-2.0 gstreamer-0.6"`
-+            TB_LIBS=`$PKG_CONFIG --libs "opendaap libglade-2.0 gstreamer-0.8"`
-             echo "$as_me:$LINENO: result: $TB_LIBS" >&5
- echo "${ECHO_T}$TB_LIBS" >&6
-         else
-@@ -19649,7 +19649,7 @@
-             TB_LIBS=""
-             ## If we have a custom action on failure, don't print errors, but
-             ## do set a variable so people can do so.
--            TB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors 
"opendaap libglade-2.0 gstreamer-0.6"`
-+            TB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors 
"opendaap libglade-2.0 gstreamer-0.8"`
-             echo $TB_PKG_ERRORS
-         fi
- 
-@@ -19664,8 +19664,8 @@
-   if test $succeeded = yes; then
-      :
-   else
--     { { echo "$as_me:$LINENO: error: Library requirements (opendaap 
libglade-2.0 gstreamer-0.6) not met; consider adjusting the PKG_CONFIG_PATH 
environment variable if your libraries are in a nonstandard prefix so 
pkg-config can find them." >&5
--echo "$as_me: error: Library requirements (opendaap libglade-2.0 
gstreamer-0.6) not met; consider adjusting the PKG_CONFIG_PATH environment 
variable if your libraries are in a nonstandard prefix so pkg-config can find 
them." >&2;}
-+     { { echo "$as_me:$LINENO: error: Library requirements (opendaap 
libglade-2.0 gstreamer-0.8) not met; consider adjusting the PKG_CONFIG_PATH 
environment variable if your libraries are in a nonstandard prefix so 
pkg-config can find them." >&5
-+echo "$as_me: error: Library requirements (opendaap libglade-2.0 
gstreamer-0.8) not met; consider adjusting the PKG_CONFIG_PATH environment 
variable if your libraries are in a nonstandard prefix so pkg-config can find 
them." >&2;}
-    { (exit 1); exit 1; }; }
-   fi
+     sa.sa_handler = (void*)sighandler_sigpipe;
+-    sa.sa_flags = SA_NOMASK | SA_SIGINFO;
++    sa.sa_flags = SA_NODEFER | SA_SIGINFO;
+     ret = sigaction(SIGPIPE, &sa, NULL);
+ }
  

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index