diff options
| -rw-r--r-- | meta-gnome/recipes-gnome/gvfs/files/gphoto_build_with_libgphoto_2.5_API.patch | 78 | ||||
| -rw-r--r-- | meta-gnome/recipes-gnome/gvfs/gvfs.inc | 1 |
2 files changed, 79 insertions, 0 deletions
diff --git a/meta-gnome/recipes-gnome/gvfs/files/gphoto_build_with_libgphoto_2.5_API.patch b/meta-gnome/recipes-gnome/gvfs/files/gphoto_build_with_libgphoto_2.5_API.patch new file mode 100644 index 0000000000..25d44b0e92 --- /dev/null +++ b/meta-gnome/recipes-gnome/gvfs/files/gphoto_build_with_libgphoto_2.5_API.patch | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | Upstream-Status: Backport | ||
| 2 | https://git.gnome.org/browse/gvfs/commit/daemon/gvfsbackendgphoto2.c?id=259a09183f7c96b5fb0f6453bb4b0bcf92e3eaa2 | ||
| 3 | |||
| 4 | Signed-off-by: Max Krummenacher <max.oss.09 at gmail.com> | ||
| 5 | |||
| 6 | From 259a09183f7c96b5fb0f6453bb4b0bcf92e3eaa2 Mon Sep 17 00:00:00 2001 | ||
| 7 | From: Cosimo Cecchi <cosimoc@gnome.org> | ||
| 8 | Date: Wed, 8 Aug 2012 13:14:19 +0200 | ||
| 9 | Subject: gphoto: build with libgphoto 2.5 API | ||
| 10 | |||
| 11 | Patch taken from the Fedora package | ||
| 12 | Author: Jindrich Novy <jnovy@redhat.com> | ||
| 13 | |||
| 14 | http://pkgs.fedoraproject.org/cgit/gvfs.git/commit/?id=cd0c6218df85bf3de101402c1aa9d79aae7c3019 | ||
| 15 | |||
| 16 | diff --git a/configure.ac b/configure.ac | ||
| 17 | index 3215694..3280666 100644 | ||
| 18 | --- a/configure.ac | ||
| 19 | +++ b/configure.ac | ||
| 20 | @@ -436,6 +436,9 @@ if test "x$enable_gphoto2" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" | ||
| 21 | if test "x$msg_gphoto2" = "xyes"; then | ||
| 22 | if test "x$use_gphoto2" = "xyes"; then | ||
| 23 | AC_DEFINE(HAVE_GPHOTO2, 1, [Define to 1 if gphoto2 is available]) | ||
| 24 | + PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.5.0, | ||
| 25 | + AC_DEFINE(HAVE_GPHOTO25, 1, [Define to 1 if libgphoto2 2.5 is available]) | ||
| 26 | + ) | ||
| 27 | else | ||
| 28 | if test "x$enable_gphoto2" = "xyes"; then | ||
| 29 | AC_MSG_ERROR([Cannot build with gphoto2 support. Need OS tweaks in hal volume monitor.]) | ||
| 30 | diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c | ||
| 31 | index 0d2c594..75b4b02 100644 | ||
| 32 | --- a/daemon/gvfsbackendgphoto2.c | ||
| 33 | +++ b/daemon/gvfsbackendgphoto2.c | ||
| 34 | @@ -1647,7 +1647,9 @@ do_mount (GVfsBackend *backend, | ||
| 35 | return; | ||
| 36 | } | ||
| 37 | |||
| 38 | +#ifndef HAVE_GPHOTO25 | ||
| 39 | DEBUG (" '%s' '%s' '%s'", info.name, info.path, info.library_filename); | ||
| 40 | +#endif | ||
| 41 | |||
| 42 | /* set port */ | ||
| 43 | rc = gp_camera_set_port_info (gphoto2_backend->camera, info); | ||
| 44 | @@ -2590,7 +2592,11 @@ do_slow_file_rename_in_same_dir (GVfsBackendGphoto2 *gphoto2_backend, | ||
| 45 | } | ||
| 46 | } | ||
| 47 | |||
| 48 | +#ifdef HAVE_GPHOTO25 | ||
| 49 | + rc = gp_camera_folder_put_file (gphoto2_backend->camera, dir, new_name, GP_FILE_TYPE_NORMAL, file_dest, gphoto2_backend->context); | ||
| 50 | +#else | ||
| 51 | rc = gp_camera_folder_put_file (gphoto2_backend->camera, dir, file_dest, gphoto2_backend->context); | ||
| 52 | +#endif | ||
| 53 | if (rc != 0) | ||
| 54 | goto out; | ||
| 55 | |||
| 56 | @@ -3222,14 +3228,18 @@ commit_write_handle (GVfsBackendGphoto2 *gphoto2_backend, WriteHandle *write_han | ||
| 57 | if (rc != 0) | ||
| 58 | goto out; | ||
| 59 | |||
| 60 | - gp_file_set_type (file, GP_FILE_TYPE_NORMAL); | ||
| 61 | gp_file_set_name (file, write_handle->name); | ||
| 62 | gp_file_set_mtime (file, time (NULL)); | ||
| 63 | gp_file_set_data_and_size (file, | ||
| 64 | dup_for_gphoto2 (write_handle->data, write_handle->size), | ||
| 65 | write_handle->size); | ||
| 66 | |||
| 67 | +#ifdef HAVE_GPHOTO25 | ||
| 68 | + rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, write_handle->name, GP_FILE_TYPE_NORMAL, file, gphoto2_backend->context); | ||
| 69 | +#else | ||
| 70 | + gp_file_set_type (file, GP_FILE_TYPE_NORMAL); | ||
| 71 | rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, file, gphoto2_backend->context); | ||
| 72 | +#endif | ||
| 73 | if (rc != 0) | ||
| 74 | { | ||
| 75 | gp_file_unref (file); | ||
| 76 | -- | ||
| 77 | cgit v0.10.2 | ||
| 78 | |||
diff --git a/meta-gnome/recipes-gnome/gvfs/gvfs.inc b/meta-gnome/recipes-gnome/gvfs/gvfs.inc index c516a40f10..f9798e9d3e 100644 --- a/meta-gnome/recipes-gnome/gvfs/gvfs.inc +++ b/meta-gnome/recipes-gnome/gvfs/gvfs.inc | |||
| @@ -16,6 +16,7 @@ SRC_URI += " \ | |||
| 16 | file://0003-Adapt-to-glib-mutex-API-changes.patch \ | 16 | file://0003-Adapt-to-glib-mutex-API-changes.patch \ |
| 17 | file://0004-Adapt-to-glib-thread-API-changes.patch \ | 17 | file://0004-Adapt-to-glib-thread-API-changes.patch \ |
| 18 | file://0005-client-gdaemonfile.c-replace-g_memmove-by-memmove.patch \ | 18 | file://0005-client-gdaemonfile.c-replace-g_memmove-by-memmove.patch \ |
| 19 | file://gphoto_build_with_libgphoto_2.5_API.patch \ | ||
| 19 | " | 20 | " |
| 20 | 21 | ||
| 21 | EXTRA_OECONF = "--with-archive-includes=${STAGING_INCDIR} \ | 22 | EXTRA_OECONF = "--with-archive-includes=${STAGING_INCDIR} \ |
