[39987] trunk/dports/gnome/gnucash
jmr at macports.org
jmr at macports.org
Mon Sep 15 09:19:01 PDT 2008
Revision: 39987
http://trac.macports.org/changeset/39987
Author: jmr at macports.org
Date: 2008-09-15 09:19:00 -0700 (Mon, 15 Sep 2008)
Log Message:
-----------
gnucash: add patches to fix issues with saving on network volumes (#16545)
Modified Paths:
--------------
trunk/dports/gnome/gnucash/Portfile
Added Paths:
-----------
trunk/dports/gnome/gnucash/files/patch-enotsup.diff
trunk/dports/gnome/gnucash/files/patch-gnc-backend-file.c.diff
Modified: trunk/dports/gnome/gnucash/Portfile
===================================================================
--- trunk/dports/gnome/gnucash/Portfile 2008-09-15 15:28:19 UTC (rev 39986)
+++ trunk/dports/gnome/gnucash/Portfile 2008-09-15 16:19:00 UTC (rev 39987)
@@ -5,6 +5,7 @@
name gnucash
version 2.2.5
+revision 1
categories gnome x11
maintainers nomaintainer
@@ -49,8 +50,14 @@
configure.args --disable-glibtest \
--disable-dependency-tracking --enable-hbci --enable-ofx
-patchfiles patch-configure.diff patch-lib_libc_libc-missing-noop.c.diff
+patchfiles patch-configure.diff patch-lib_libc_libc-missing-noop.c.diff \
+ patch-gnc-backend-file.c.diff patch-enotsup.diff
+# patch-gnc-backend-file.c.diff and patch-enotsup.diff are needed to fix
+# ticket #16545. Corresponding upstream bugs:
+# http://bugzilla.gnome.org/show_bug.cgi?id=549595
+# http://bugzilla.gnome.org/show_bug.cgi?id=552306
+
post-patch {
reinplace "/^DYLD_LIBRARY_PATH/s|=\"|=\"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources at -PATH_SEPARATOR-@|" ${worksrcpath}/src/bin/gnucash.in
reinplace "/^DYLD_LIBRARY_PATH/s|=\"|=\"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources at -PATH_SEPARATOR-@|" ${worksrcpath}/src/bin/overrides/gnucash-env.in
Added: trunk/dports/gnome/gnucash/files/patch-enotsup.diff
===================================================================
--- trunk/dports/gnome/gnucash/files/patch-enotsup.diff (rev 0)
+++ trunk/dports/gnome/gnucash/files/patch-enotsup.diff 2008-09-15 16:19:00 UTC (rev 39987)
@@ -0,0 +1,42 @@
+--- src/backend/file/gnc-backend-file.c 2008-09-14 22:55:04.000000000 -0400
++++ src/backend/file/gnc-backend-file.c 2008-09-14 22:56:05.000000000 -0400
+@@ -143,16 +143,19 @@ gnc_file_be_get_file_lock (FileBackend *
+ rc = link (be->lockfile, pathbuf);
+ if (rc)
+ {
+ /* If hard links aren't supported, just allow the lock. */
+ if (errno == EPERM
+ # ifdef EOPNOTSUPP
+ || errno == EOPNOTSUPP
+ # endif
++# ifdef ENOTSUP
++ || errno == ENOTSUP
++# endif
+ )
+ {
+ be->linkfile = NULL;
+ return TRUE;
+ }
+
+ /* Otherwise, something else is wrong. */
+ qof_backend_set_error ((QofBackend*)be, ERR_BACKEND_LOCKED);
+@@ -404,16 +407,19 @@ gnc_int_link_or_make_backup(FileBackend
+ ;
+ if(err_ret != 0)
+ {
+ #ifdef HAVE_LINK
+ if(errno == EPERM
+ # ifdef EOPNOTSUPP
+ || errno == EOPNOTSUPP
+ # endif
++# ifdef ENOTSUP
++ || errno == ENOTSUP
++# endif
+ # ifdef ENOSYS // catches http://bugzilla.gnome.org/show_bug.cgi?id=549595
+ || errno == ENOSYS
+ # endif
+ )
+ #endif
+ {
+ copy_success = copy_file(orig, bkup);
+ }
Added: trunk/dports/gnome/gnucash/files/patch-gnc-backend-file.c.diff
===================================================================
--- trunk/dports/gnome/gnucash/files/patch-gnc-backend-file.c.diff (rev 0)
+++ trunk/dports/gnome/gnucash/files/patch-gnc-backend-file.c.diff 2008-09-15 16:19:00 UTC (rev 39987)
@@ -0,0 +1,31 @@
+Index: src/backend/file/gnc-backend-file.c
+===================================================================
+--- src/backend/file/gnc-backend-file.c (Revision 17479)
++++ src/backend/file/gnc-backend-file.c (Arbeitskopie)
+@@ -395,6 +395,7 @@
+ static gboolean
+ gnc_int_link_or_make_backup(FileBackend *be, const char *orig, const char *bkup)
+ {
++ gboolean copy_success = FALSE;
+ int err_ret =
+ #ifdef HAVE_LINK
+ link (orig, bkup)
+@@ -409,13 +410,16 @@
+ # ifdef EOPNOTSUPP
+ || errno == EOPNOTSUPP
+ # endif
++# ifdef ENOSYS // catches http://bugzilla.gnome.org/show_bug.cgi?id=549595
++ || errno == ENOSYS
++# endif
+ )
+ #endif
+ {
+- err_ret = copy_file(orig, bkup);
++ copy_success = copy_file(orig, bkup);
+ }
+
+- if(!err_ret)
++ if(!copy_success)
+ {
+ qof_backend_set_error((QofBackend*)be, ERR_FILEIO_BACKUP_ERROR);
+ PWARN ("unable to make file backup from %s to %s: %s",
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080915/b8f368bf/attachment.html
More information about the macports-changes
mailing list