Update of /cvsroot/fink/dists/10.3/unstable/main/finkinfo/utils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23994

Modified Files:
        gkrellm2.info 
Added Files:
        gkrellm2.patch 
Log Message:
Update


--- NEW FILE: gkrellm2.patch ---
# Darwin 7.8 doesn't have (or require) libmd5.  I'm not sure when this occurred,
# so I don't know whether just removing it or creating a new "darwin7.8" or
# somesuch target is the right thing to do.
diff -ur gkrellm-2.2.4/Makefile gkrellm-2.2.4.patched/Makefile
--- gkrellm-2.2.4/Makefile      Mon Sep  6 18:32:40 2004
+++ gkrellm-2.2.4.patched/Makefile      Wed Mar 23 17:18:37 2005
@@ -195,11 +195,11 @@
 darwin: gkrellm.pc
        (cd po && ${MAKE} all)
        (cd src && ${MAKE} GTK_CONFIG=gtk-config STRIP= \
-               EXTRAOBJS= SYS_LIBS="-lkvm -lmd5 -framework IOKit" \
+               EXTRAOBJS= SYS_LIBS="-lkvm -framework IOKit" \
                LINK_FLAGS="-prebind -Wl,-bind_at_load -framework 
CoreFoundation -lX11" \
                gkrellm )
        (cd server && ${MAKE} GTK_CONFIG=gtk-config STRIP= \
-               EXTRAOBJS= SYS_LIBS="-lkvm -lmd5 -framework IOKit" \
+               EXTRAOBJS= SYS_LIBS="-lkvm -framework IOKit" \
                LINK_FLAGS="-prebind -Wl,-bind_at_load -framework 
CoreFoundation" \
                gkrellmd )
 
# Two changes here:
#   (gkrellm_sys_proc_read_data): Change integer type to shut up compiler 
warnings.
#   (gkrellm_sys_disk_init): Reshuffle code a bit to tolerate failures for some
#     of the IOKit entries returned.  On one of my systems, the first entry
#     returned by IOIteratorNext caused a "no such device" error; with the 
original
#     code, all subsequent iterations would fail as well because 'status' was
#     never reset, even though subsequent items returned by IOIteratorNext were
#     valid.  The new execution path risks running through the loop several 
times
#     even if one of the IOKit calls returns a "general" error, but I don't see
#     that this would do any harm, nor do I see a good way to make the 
distinction
#     programmatically.
#     I also bail out early if we can't even get a device iterator.
diff -ur gkrellm-2.2.4/src/sysdeps/darwin.c 
gkrellm-2.2.4.patched/src/sysdeps/darwin.c
--- gkrellm-2.2.4/src/sysdeps/darwin.c  Sat May  1 13:46:38 2004
+++ gkrellm-2.2.4.patched/src/sysdeps/darwin.c  Wed Mar 23 18:01:55 2005
@@ -153,7 +153,7 @@
        static u_int    n_processes, n_forks = 0, curpid = -1;
        u_int           n_vforks, n_rforks;
        gint            r_forks, r_vforks, r_rforks;
-       gint            len;
+       size_t          len;
        gint            nextpid, nforked;
        static struct nlist nl[] = {
 #define N_NEXTPID      0
@@ -350,32 +350,33 @@
 gboolean
 gkrellm_sys_disk_init(void)
     {
-    kern_return_t status = 0;
     io_registry_entry_t drive      = 0;  /* needs release */
     io_registry_entry_t child      = 0;  /* needs release */
     
     /* get ports and services for drive stats */
     /* Obtain the I/O Kit communication handle */
-    status = IOMasterPort(MACH_PORT_NULL, &masterPort);
+    if (IOMasterPort(MACH_PORT_NULL, &masterPort)) return FALSE;
 
     /* Obtain the list of all drive objects */
-    status = IOServiceGetMatchingServices(masterPort,
-                                            
IOServiceMatching("IOBlockStorageDriver"),
-                                            &drivelist);                      
+    if (IOServiceGetMatchingServices(masterPort,
+                                    IOServiceMatching("IOBlockStorageDriver"),
+                                    &drivelist))
+      return FALSE;
+
     while ( (drive = IOIteratorNext(drivelist)) )
     {
         gchar * name = malloc(128); /* io_name_t is char[128] */
+       kern_return_t status = 0;
         int ptr = 0;
                
                if(!name) return FALSE;
                
         /* Obtain the properties for this drive object */           
+       status = IORegistryEntryGetChildEntry(drive, kIOServicePlane, &child );
+
         if(!status)
-        status = IORegistryEntryGetChildEntry(drive, kIOServicePlane, &child );
-        
-        if(!status)
-        status = IORegistryEntryGetName(child, name );
-        
+       status = IORegistryEntryGetName(child, name );
+
         /* Convert spaces to underscores, for prefs safety */
         if(!status)
         {
@@ -384,13 +385,13 @@
                 if(name[ptr] == ' ') 
                     name[ptr] = '_';
             }
-           disk_list = g_list_append(disk_list, name);
+            disk_list = g_list_append(disk_list, name);
         }
         IOObjectRelease(drive); drive = 0;
     }
     IOIteratorReset(drivelist);
     
-       return (disk_list != NULL) ? TRUE : FALSE;
+    return (disk_list != NULL) ? TRUE : FALSE;
 }
 
 

## End of patch ##

Index: gkrellm2.info
===================================================================
RCS file: /cvsroot/fink/dists/10.3/unstable/main/finkinfo/utils/gkrellm2.info,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- gkrellm2.info       12 Mar 2005 17:47:40 -0000      1.13
+++ gkrellm2.info       4 Apr 2005 08:46:39 -0000       1.14
@@ -1,19 +1,19 @@
 Package: gkrellm2
-Version: 2.2.4
+Version: 2.2.5
 Revision: 10
 Maintainer: Ben Hines <[EMAIL PROTECTED]>
 Source: mirror:custom:gkrellm-%v.tar.bz2
 SourceDirectory: gkrellm-%v
-#Patch: %n.patch
+Patch: %n.patch
 CustomMirror: <<
-nam-us: http://web.wt.net/~billw/gkrellm/
+nam-us: http://members.dslextreme.com/users/billw/gkrellm/
 <<
-Source-MD5: 7f8662d7f5b6e59f499799b6655c4267
+Source-MD5: 24e611ba74d0bfb6aad4e4c6153c859f
 Conflicts: gkrellm
 Depends: gtk+2-shlibs, glib2-shlibs, imlib-shlibs,  libwww-shlibs
 BuildDepends: gtk+2-dev, glib2, imlib, libwww, pkgconfig, atk1, gettext-dev, 
gettext-bin, gettext-tools, libiconv-dev, pango1-dev, x11-dev, gcc3.3
-SetCFLAGS: -DSYSTEM_PLUGINS_DIR=\"%p/lib/%n/plugins\" 
-DSYSTEM_THEMES_DIR=\"%p/lib/%n/themes\"
-CompileScript: make darwin INSTALLROOT=%p CC=gcc-3.3 CXX=g++-3.3
+SetCFLAGS: -DHAVE_GETADDRINFO -DSYSTEM_PLUGINS_DIR=\"%p/lib/%n/plugins\" 
-DSYSTEM_THEMES_DIR=\"%p/lib/%n/themes\"
+CompileScript: make darwin INSTALLROOT=%p
 InstallScript: <<
  mkdir -p %i/bin %i/include %i/share/man/man1
  make install_darwin INSTALLROOT=%i



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to