lufs-0.9.7-enable-gnome-2.patch 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. diff -upr -x aclocal.m4 -x Makefile.in -x configure -x '.*' -x autom4te.cache -x kernel lufs-0.9.7.orig/config.h.in lufs-0.9.7/config.h.in
  2. --- lufs-0.9.7.orig/config.h.in 2003-10-29 22:48:48.000000000 +0000
  3. +++ lufs-0.9.7/config.h.in 2004-01-13 22:51:00.000000000 +0000
  4. @@ -9,6 +9,9 @@
  5. /* Define if libchipcard is present. */
  6. #undef HAS_LIBCHIPCARD
  7. +/* Define if using libgnome-2 rather than 1. */
  8. +#undef HAS_LIBGNOME_2
  9. +
  10. /* Define if ssh is found. */
  11. #undef HAS_SSH
  12. diff -upr -x aclocal.m4 -x Makefile.in -x configure -x '.*' -x autom4te.cache -x kernel lufs-0.9.7.orig/configure.in lufs-0.9.7/configure.in
  13. --- lufs-0.9.7.orig/configure.in 2003-10-29 22:40:28.000000000 +0000
  14. +++ lufs-0.9.7/configure.in 2004-01-13 22:50:20.802647656 +0000
  15. @@ -164,7 +164,9 @@ AC_SUBST(SSHPROG)
  16. dnl Checking gnome
  17. AC_CHECK_PROG(GCONF, gnome-config, gnome-config)
  18. AC_CHECK_PROG(GVFSCONF, gnome-vfs-config, gnome-vfs-config)
  19. +AC_CHECK_PROG(PKGCONF, pkg-config, pkg-config)
  20. AC_CHECK_LIB(gnomevfs, gnome_vfs_init, HAS_GNOMEVFS=1,)
  21. +AC_CHECK_LIB(gnomevfs-2, gnome_vfs_init, HAS_GNOMEVFS2=1,`$PKGCONF --libs-only-l gnome-vfs-2.0`)
  22. if test "$GCONF" -a "$GVFSCONF" -a "$HAS_GNOMEVFS"
  23. then
  24. AC_DEFINE([HAS_GVFS], 1, [Define if gvfs is to be built.])
  25. @@ -172,6 +174,16 @@ then
  26. GVFS_LDADD="`$GCONF --libs gnome` `$GVFSCONF --libs`"
  27. GVFS_CFLAGS="`$GCONF --cflags gnome` `$GVFSCONF --cflags`"
  28. opt_fs="$opt_fs gvfs"
  29. +elif test "$PKGCONF" -a "$HAS_GNOMEVFS2"
  30. +then
  31. + AC_DEFINE([HAS_GVFS], 1, [Define if gvfs is to be built.])
  32. + AC_DEFINE([HAS_LIBGNOME_2], 1, [Define if using libgnome-2 rather than 1.])
  33. + define_has_libgnome_2="#define HAS_LIBGNOME_2"
  34. + AC_SUBST(define_has_libgnome_2)
  35. +
  36. + GVFS_LDADD="`$PKGCONF --libs libgnome-2.0` `$PKGCONF --libs gnome-vfs-2.0`"
  37. + GVFS_CFLAGS="`$PKGCONF --cflags libgnome-2.0` `$PKGCONF --cflags gnome-vfs-2.0`"
  38. + opt_fs="$opt_fs gvfs"
  39. fi
  40. AC_SUBST(GVFS_LDADD)
  41. AC_SUBST(GVFS_CFLAGS)
  42. diff -upr -x aclocal.m4 -x Makefile.in -x configure -x '.*' -x autom4te.cache -x kernel lufs-0.9.7.orig/filesystems/gvfs/gvfs.cpp lufs-0.9.7/filesystems/gvfs/gvfs.cpp
  43. --- lufs-0.9.7.orig/filesystems/gvfs/gvfs.cpp 2003-03-08 21:45:29.000000000 +0000
  44. +++ lufs-0.9.7/filesystems/gvfs/gvfs.cpp 2004-01-13 22:55:44.906376400 +0000
  45. @@ -36,8 +36,13 @@
  46. #include <lufs/fs.h>
  47. #include "gvfs.h"
  48. +#include "config.h"
  49. +#ifdef HAS_LIBGNOME_2
  50. +#include <libgnome/libgnome.h>
  51. +#else
  52. #include <gnome.h>
  53. +#endif
  54. #include <libgnomevfs/gnome-vfs.h>
  55. extern "C" {
  56. @@ -275,7 +280,11 @@ GVFS::do_readdir(char* d, struct directo
  57. goto out_uri;
  58. }
  59. +#ifdef HAS_LIBGNOME_2
  60. + if(gnome_vfs_directory_open_from_uri(&dir, uri, GNOME_VFS_FILE_INFO_DEFAULT) != GNOME_VFS_OK){
  61. +#else
  62. if(gnome_vfs_directory_open_from_uri(&dir, uri, GNOME_VFS_FILE_INFO_DEFAULT, NULL) != GNOME_VFS_OK){
  63. +#endif
  64. WARN("could not open directory!");
  65. goto out_info;
  66. }