[58502] trunk/dports/sysutils/bacula

macsforever2000 at macports.org macsforever2000 at macports.org
Tue Sep 29 19:10:38 PDT 2009


Revision: 58502
          http://trac.macports.org/changeset/58502
Author:   macsforever2000 at macports.org
Date:     2009-09-29 19:10:34 -0700 (Tue, 29 Sep 2009)
Log Message:
-----------
Fix for building 64-bit. (#21674)

Modified Paths:
--------------
    trunk/dports/sysutils/bacula/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/bacula/files/patch-base64-typecast.diff

Modified: trunk/dports/sysutils/bacula/Portfile
===================================================================
--- trunk/dports/sysutils/bacula/Portfile	2009-09-29 23:54:17 UTC (rev 58501)
+++ trunk/dports/sysutils/bacula/Portfile	2009-09-30 02:10:34 UTC (rev 58502)
@@ -5,7 +5,7 @@
 
 name             bacula
 version          3.0.2
-revision         1
+revision         2
 categories       sysutils
 platforms        darwin
 license          GPL
@@ -30,7 +30,8 @@
                  port:gettext \
                  port:ncurses
 
-patchfiles       patch-configure.diff
+patchfiles       patch-configure.diff \
+                 patch-base64-typecast.diff
 
 post-patch {
                  reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure

Added: trunk/dports/sysutils/bacula/files/patch-base64-typecast.diff
===================================================================
--- trunk/dports/sysutils/bacula/files/patch-base64-typecast.diff	                        (rev 0)
+++ trunk/dports/sysutils/bacula/files/patch-base64-typecast.diff	2009-09-30 02:10:34 UTC (rev 58502)
@@ -0,0 +1,80 @@
+diff -ur src/lib/base64.c.orig src/lib/base64.c
+--- src/lib/base64.c.orig	2009-02-28 14:52:14.000000000 +0000
++++ src/lib/base64.c	2009-09-28 17:30:01.000000000 +0100
+@@ -74,9 +74,9 @@
+  * stored (not including the EOS).
+  */
+ int
+-to_base64(intmax_t value, char *where)
++to_base64(int64_t value, char *where)
+ {
+-   uintmax_t val;
++   uint64_t val;
+    int i = 0;
+    int n;
+ 
+@@ -98,7 +98,7 @@
+    val = value;
+    where[i] = 0;
+    do {
+-      where[--i] = base64_digits[val & (uintmax_t)0x3F];
++      where[--i] = base64_digits[val & (uint64_t)0x3F];
+       val >>= 6;
+    } while (val);
+    return n;
+@@ -112,9 +112,9 @@
+  * Returns the value.
+  */
+ int
+-from_base64(intmax_t *value, char *where)
++from_base64(int64_t *value, char *where)
+ {
+-   uintmax_t val = 0;
++   uint64_t val = 0;
+    int i, neg;
+ 
+    if (!base64_inited)
+@@ -131,7 +131,7 @@
+       val += base64_map[(uint8_t)where[i++]];
+    }
+ 
+-   *value = neg ? -(intmax_t)val : (intmax_t)val;
++   *value = neg ? -(int64_t)val : (int64_t)val;
+    return i;
+ }
+ 
+diff -ur src/lib/protos.h.orig src/lib/protos.h
+--- src/lib/protos.h.orig	2008-12-20 22:02:31.000000000 +0000
++++ src/lib/protos.h	2009-09-28 17:28:08.000000000 +0100
+@@ -45,8 +45,8 @@
+ 
+ /* base64.c */
+ void      base64_init            (void);
+-int       to_base64              (intmax_t value, char *where);
+-int       from_base64            (intmax_t *value, char *where);
++int       to_base64              (int64_t value, char *where);
++int       from_base64            (int64_t *value, char *where);
+ int       bin_to_base64          (char *buf, int buflen, char *bin, int binlen, 
+                                   int compatible);
+ 
+diff -ur src/filed/restore.c.orig src/filed/restore.c
+--- src/filed/restore.c.orig	2009-07-04 22:18:49.000000000 +0100
++++ src/filed/restore.c	2009-09-28 18:10:17.000000000 +0100
+@@ -159,7 +159,7 @@
+    char ec1[50];                       /* Buffer printing huge values */
+    uint32_t buf_size;                  /* client buffer size */
+    int stat;
+-   intmax_t rsrc_len = 0;             /* Original length of resource fork */
++   int64_t rsrc_len = 0;             /* Original length of resource fork */
+    r_ctx rctx;
+    ATTR *attr;
+    /* ***FIXME*** make configurable */
+@@ -550,7 +550,7 @@
+                   continue;
+                }
+ 
+-               rctx.fork_size = rsrc_len;
++               rctx.fork_size = (intmax_t)rsrc_len;
+                Dmsg0(130, "Restoring resource fork\n");
+             }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090929/41c4edeb/attachment.html>


More information about the macports-changes mailing list