diff --git a/shotwell-0.31-3-broken_import.patch b/shotwell-0.31-3-broken_import.patch new file mode 100644 index 0000000000000000000000000000000000000000..ca82dce2492afe42095e3ddf15a244eae1e65cbc --- /dev/null +++ b/shotwell-0.31-3-broken_import.patch @@ -0,0 +1,124 @@ +From beb76f5d8354e55adffe6c41079dfe984bc6654a Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 12:30:44 +0100 +Subject: [PATCH 1/3] Silence a couple of more warnings + +(cherry picked from commit cdd0e4fbd0ac86088e6b4f40bc34247b8dd8bd23) +--- + src/camera/GPhoto.vala | 1 - + src/camera/ImportPage.vala | 1 - + src/config/ConfigurationInterfaces.vala | 3 +++ + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala +index 64ff7ca0..df96bf56 100644 +--- a/src/camera/GPhoto.vala ++++ b/src/camera/GPhoto.vala +@@ -137,7 +137,6 @@ namespace GPhoto { + public PhotoMetadata? get_fallback_metadata(Camera camera, Context context, string folder, string filename) { + // Fixme: Why do we need to query get_storageinfo here first? + GPhoto.CameraStorageInformation[] sifs = null; +- int count = 0; + camera.get_storageinfo(out sifs, context); + + GPhoto.PortInfo port_info; +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index 7dbe9d42..63839ad7 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1180,7 +1180,6 @@ public class ImportPage : CheckerboardPage { + Gee.ArrayList import_list = new Gee.ArrayList(); + + GPhoto.CameraStorageInformation[] sifs = null; +- int count = 0; + refresh_result = dcamera.gcamera.get_storageinfo(out sifs, spin_idle_context.context); + if (refresh_result == GPhoto.Result.OK) { + for (int fsid = 0; fsid < count; fsid++) { +diff --git a/src/config/ConfigurationInterfaces.vala b/src/config/ConfigurationInterfaces.vala +index 195a28f7..a2c9ecfa 100644 +--- a/src/config/ConfigurationInterfaces.vala ++++ b/src/config/ConfigurationInterfaces.vala +@@ -408,6 +408,9 @@ public abstract class ConfigurationFacade : Object { + case ConfigurableProperty.IMPORT_DIR: + import_directory_changed(); + break; ++ default: ++ // We do not support notification for the rest of the properties ++ break; + } + } + +-- +2.34.1 + +From 3da578893766250a0f4adadb5d60db72c92d1fb7 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 12:58:40 +0100 +Subject: [PATCH 2/3] Fix iteration of storage informations + +(cherry picked from commit 7f3eca0fc593e45f9479f8fd5ffe6f032ecdeb6b) +--- + src/camera/ImportPage.vala | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index 63839ad7..375e5cb0 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1182,7 +1182,7 @@ public class ImportPage : CheckerboardPage { + GPhoto.CameraStorageInformation[] sifs = null; + refresh_result = dcamera.gcamera.get_storageinfo(out sifs, spin_idle_context.context); + if (refresh_result == GPhoto.Result.OK) { +- for (int fsid = 0; fsid < count; fsid++) { ++ for (int fsid = 0; fsid < sifs.length; fsid++) { + // Check well-known video and image paths first to prevent accidental + // scanning of undesired directories (which can cause user annoyance with + // some smartphones or camera-equipped media players) +@@ -1324,7 +1324,6 @@ public class ImportPage : CheckerboardPage { + // between each mount + public static string? get_fs_basedir(GPhoto.Camera camera, int fsid) { + GPhoto.CameraStorageInformation[] sifs = null; +- int count = 0; + GPhoto.Result res = camera.get_storageinfo(out sifs, null_context.context); + if (res != GPhoto.Result.OK) + return null; +-- +2.34.1 + +From e2d877dc82e929035c64b7dfb80a820c0a9af412 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sat, 29 May 2021 11:04:45 +0200 +Subject: [PATCH 3/3] Camera: Fix import from camera + +The teneray operator seems to generate invalid code which corrupts the +basedir, leading to either no thumbnails nor no files at all + +Fixes #4927 + +(cherry picked from commit 29cf40fff3697ab59aedacb91513b016a478698e) +--- + src/camera/ImportPage.vala | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index 375e5cb0..b7c9716f 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1330,8 +1330,12 @@ public class ImportPage : CheckerboardPage { + + if (fsid >= sifs.length) + return null; +- +- return (GPhoto.CameraStorageInfoFields.BASE in sifs[fsid].fields) ? (string) sifs[fsid].basedir : "/"; ++ ++ if (GPhoto.CameraStorageInfoFields.BASE in sifs[fsid].fields) { ++ return (string) sifs[fsid].basedir; ++ } else { ++ return "/"; ++ } + } + + public static string? get_fulldir(GPhoto.Camera camera, string camera_name, int fsid, string folder) { +-- +2.34.1 + diff --git a/shotwell-0.31.3-initializer_fixes.patch b/shotwell-0.31.3-initializer_fixes.patch new file mode 100644 index 0000000000000000000000000000000000000000..d48946b437e148464430edb0ce6f56454cf72b29 --- /dev/null +++ b/shotwell-0.31.3-initializer_fixes.patch @@ -0,0 +1,68 @@ +From 689f3d18e5739888923f002520afa84551968b1b Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz +Date: Tue, 30 Nov 2021 15:09:17 +0100 +Subject: [PATCH] Fix accessibility issues with initializer of constants + +(cherry picked from commit 59ae0ce648982669f24a33db501f3f229508cb6e) +--- + src/International.vala | 2 -- + src/Resources.vala | 7 ------- + vapi/version.vapi | 17 ++++++++++++++--- + 3 files changed, 14 insertions(+), 12 deletions(-) + +diff --git a/src/International.vala b/src/International.vala +index 555a91f8..73f07639 100644 +--- a/src/International.vala ++++ b/src/International.vala +@@ -4,8 +4,6 @@ + * See the COPYING file in this distribution. + */ + +-extern const string _LANG_SUPPORT_DIR; +- + public const string TRANSLATABLE = "translatable"; + + namespace InternationalSupport { +diff --git a/src/Resources.vala b/src/Resources.vala +index 6d2b8851..86f0eb65 100644 +--- a/src/Resources.vala ++++ b/src/Resources.vala +@@ -4,13 +4,6 @@ + * See the COPYING file in this distribution. + */ + +-// defined by ./configure or Makefile and included by gcc -D +-extern const string _PREFIX; +-extern const string _VERSION; +-extern const string GETTEXT_PACKAGE; +-extern const string _LIB; +-extern const string _LIBEXECDIR; +- + namespace Resources { + public const string APP_TITLE = "Shotwell"; + public const string APP_LIBRARY_ROLE = _("Photo Manager"); +diff --git a/vapi/version.vapi b/vapi/version.vapi +index 06974c84..e191f2f7 100644 +--- a/vapi/version.vapi ++++ b/vapi/version.vapi +@@ -1,3 +1,14 @@ +-[CCode (cheader_filename="version.h")] +-extern const string? _GIT_VERSION; +- ++[CCode (cheader_filename = "version.h")] ++public const string? _GIT_VERSION; ++[CCode (cheader_filename = "config.h")] ++public const string _PREFIX; ++[CCode (cheader_filename = "config.h")] ++public const string _VERSION; ++[CCode (cheader_filename = "config.h")] ++public const string GETTEXT_PACKAGE; ++[CCode (cheader_filename = "config.h")] ++public const string _LIB; ++[CCode (cheader_filename = "config.h")] ++public const string _LIBEXECDIR; ++[CCode (cheader_filename = "config.h")] ++public const string _LANG_SUPPORT_DIR; +-- +2.34.1 + diff --git a/shotwell-0.31.3-vapi_fixes.patch b/shotwell-0.31.3-vapi_fixes.patch new file mode 100644 index 0000000000000000000000000000000000000000..8652c9b066b9b592cbca9adb71d11ac75a9b8a11 --- /dev/null +++ b/shotwell-0.31.3-vapi_fixes.patch @@ -0,0 +1,376 @@ +From c28346f321fc25921d1a02a493a402f1d7d776ed Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sat, 13 Mar 2021 22:31:32 +0100 +Subject: [PATCH 1/6] vapis: Fix gphoto2 vapi + +There was some copy-paste going on there that didn't actually match the +C structs + +(cherry picked from commit 8223fc3e2b8eabc98c86c65c0058b4a9732a6b65) +--- + vapi/libgphoto2.vapi | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index 22f70eed..d1504116 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -162,7 +162,6 @@ namespace GPhoto { + public string type; + public uint width; + public uint height; +- public string name; + public CameraFilePermissions permissions; + public time_t mtime; + } +@@ -179,9 +178,6 @@ namespace GPhoto { + public string type; + public uint width; + public uint height; +- public string name; +- public CameraFilePermissions permissions; +- public time_t mtime; + } + + [CCode ( +-- +2.34.1 + +From 6e342dfb44d03da286dfc361699d6fec9889b010 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sat, 13 Mar 2021 23:22:50 +0100 +Subject: [PATCH 2/6] More GPhoto2 vapi fixes + +(cherry picked from commit f36e09d05fe59efaf293f547c46a49231e1a4519) +--- + vapi/libgphoto2.vapi | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) + +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index d1504116..61f13a35 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -53,7 +53,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_CAMERA", + unref_function="gp_camera_unref", + free_function="gp_camera_free", +- cheader_filename="gphoto2/gphoto2-camera.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-camera.h,gphoto2.h" + )] + public class Camera { + [CCode (cname="gp_camera_new")] +@@ -74,7 +74,7 @@ namespace GPhoto { + [CCode (cname="gp_camera_folder_delete_all")] + public Result delete_all_files(string folder, Context context); + [CCode (cname="gp_camera_folder_put_file")] +- public Result put_file(string folder, CameraFile file, Context context); ++ public Result put_file(string folder, string filename, CameraFileType type, CameraFile file, Context context); + [CCode (cname="gp_camera_folder_make_dir")] + public Result make_dir(string folder, string name, Context context); + [CCode (cname="gp_camera_folder_remove_dir")] +@@ -99,7 +99,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_FILE", + unref_function="gp_file_unref", + free_function="gp_file_free", +- cheader_filename="gphoto2/gphoto2-file.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-file.h,gphoto2.h" + )] + public class CameraFile { + [CCode (cname="gp_file_new")] +@@ -140,7 +140,6 @@ namespace GPhoto { + public enum CameraFileInfoFields { + NONE, + TYPE, +- NAME, + SIZE, + WIDTH, + HEIGHT, +@@ -159,7 +158,7 @@ namespace GPhoto { + public CameraFileInfoFields fields; + public CameraFileStatus status; + public ulong size; +- public string type; ++ public char type[64]; + public uint width; + public uint height; + public CameraFilePermissions permissions; +@@ -175,7 +174,7 @@ namespace GPhoto { + public CameraFileInfoFields fields; + public CameraFileStatus status; + public ulong size; +- public string type; ++ public char type[64]; + public uint width; + public uint height; + } +@@ -253,7 +252,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_LIST", + unref_function="gp_list_unref", + free_function="gp_list_free", +- cheader_filename="gphoto2/gphoto2-list.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-list.h,gphoto2.h" + )] + public class CameraList { + [CCode (cname="gp_list_new")] +@@ -262,7 +261,7 @@ namespace GPhoto { + public Result append(string name, string value); + public Result reset(); + public Result sort(); +- public Result find_by_name(out int? index, string name); ++ public Result find_by_name(out int index, string name); + public Result get_name(int index, out unowned string name); + public Result get_value(int index, out unowned string value); + public Result set_name(int index, string name); +@@ -310,9 +309,9 @@ namespace GPhoto { + )] + public struct CameraStorageInformation { + public CameraStorageInfoFields fields; +- public string basedir; +- public string label; +- public string description; ++ public char basedir[256]; ++ public char label[256]; ++ public char description[256]; + public int type; + public int fstype; + public int access; +@@ -325,7 +324,7 @@ namespace GPhoto { + [CCode ( + ref_function="GPHOTO_REF_CONTEXT", + unref_function="gp_context_unref", +- cheader_filename="gphoto2/gphoto2-context.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-context.h,gphoto2.h" + )] + public class Context { + [CCode (cname="gp_context_new")] +@@ -481,7 +480,7 @@ namespace GPhoto { + + [CCode ( + cheader_filename="gphoto2/gphoto2-version.h", +- cprefix="GP_VERSION" ++ cprefix="GP_VERSION_" + )] + public enum VersionVerbosity { + SHORT, +-- +2.34.1 + +From 70274c2261256b660d4e89fc1344b47d81f3d5ff Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sat, 13 Mar 2021 22:32:17 +0100 +Subject: [PATCH 3/6] Fix strings in [SimpleType] structs + +(cherry picked from commit 0fb9e8795e830f31a660eaa75678fd0af3fe729c) +--- + src/camera/ImportPage.vala | 5 +++-- + vapi/libraw.vapi | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index ab24df61..6ebf2313 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1410,12 +1410,13 @@ public class ImportPage : CheckerboardPage { + import_list.add(video_source); + } else { + // determine file format from type, and then from file extension +- PhotoFileFormat file_format = PhotoFileFormat.from_gphoto_type(info.file.type); ++ string file_type = (string)info.file.type; ++ PhotoFileFormat file_format = PhotoFileFormat.from_gphoto_type(file_type); + if (file_format == PhotoFileFormat.UNKNOWN) { + file_format = PhotoFileFormat.get_by_basename_extension(filename); + if (file_format == PhotoFileFormat.UNKNOWN) { + message("Skipping %s/%s: Not a supported file extension (%s)", fulldir, +- filename, info.file.type); ++ filename, file_type); + + continue; + } +diff --git a/vapi/libraw.vapi b/vapi/libraw.vapi +index b1b5875b..146f447e 100644 +--- a/vapi/libraw.vapi ++++ b/vapi/libraw.vapi +@@ -248,7 +248,7 @@ public struct Thumbnail { + public uint tlength; + public int tcolors; + [CCode (array_length_cname="tlength")] +- public uint8[] thumb; ++ public unowned uint8[] thumb; + } + + [CCode (cname="enum LibRaw_thumbnail_formats", cprefix="LIBRAW_THUMBNAIL_")] +-- +2.34.1 + +From 652621659fd41c930d327cff5861702651438900 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 11:21:10 +0100 +Subject: [PATCH 4/6] vapis: Plug memory leak in GPhoto2 + +Caller was supposed to free the StorageInfo, which with the old binding +we never did + +(cherry picked from commit 3a5904a23f9d7fe3a7d4d8dd4ea81136471b0692) +--- + src/camera/GPhoto.vala | 5 +++-- + src/camera/ImportPage.vala | 14 ++++++-------- + vapi/libgphoto2.vapi | 2 +- + 3 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala +index aa2fcf2b..64ff7ca0 100644 +--- a/src/camera/GPhoto.vala ++++ b/src/camera/GPhoto.vala +@@ -135,9 +135,10 @@ namespace GPhoto { + // filesystem. In these cases shotwell can access the file directly. See: + // https://bugzilla.gnome.org/show_bug.cgi?id=716915 + public PhotoMetadata? get_fallback_metadata(Camera camera, Context context, string folder, string filename) { +- GPhoto.CameraStorageInformation *sifs = null; ++ // Fixme: Why do we need to query get_storageinfo here first? ++ GPhoto.CameraStorageInformation[] sifs = null; + int count = 0; +- camera.get_storageinfo(&sifs, out count, context); ++ camera.get_storageinfo(out sifs, context); + + GPhoto.PortInfo port_info; + camera.get_port_info(out port_info); +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index 6ebf2313..f5e98955 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1179,9 +1179,9 @@ public class ImportPage : CheckerboardPage { + + Gee.ArrayList import_list = new Gee.ArrayList(); + +- GPhoto.CameraStorageInformation *sifs = null; ++ GPhoto.CameraStorageInformation[] sifs = null; + int count = 0; +- refresh_result = dcamera.gcamera.get_storageinfo(&sifs, out count, spin_idle_context.context); ++ refresh_result = dcamera.gcamera.get_storageinfo(out sifs, spin_idle_context.context); + if (refresh_result == GPhoto.Result.OK) { + for (int fsid = 0; fsid < count; fsid++) { + // Check well-known video and image paths first to prevent accidental +@@ -1324,18 +1324,16 @@ public class ImportPage : CheckerboardPage { + // Need to do this because some phones (iPhone, in particular) changes the name of their filesystem + // between each mount + public static string? get_fs_basedir(GPhoto.Camera camera, int fsid) { +- GPhoto.CameraStorageInformation *sifs = null; ++ GPhoto.CameraStorageInformation[] sifs = null; + int count = 0; +- GPhoto.Result res = camera.get_storageinfo(&sifs, out count, null_context.context); ++ GPhoto.Result res = camera.get_storageinfo(out sifs, null_context.context); + if (res != GPhoto.Result.OK) + return null; + +- if (fsid >= count) ++ if (fsid >= sifs.length) + return null; + +- GPhoto.CameraStorageInformation *ifs = sifs + fsid; +- +- return (ifs->fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? ifs->basedir : "/"; ++ return (sifs[fsid].fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? sifs[fsid].basedir : "/"; + } + + public static string? get_fulldir(GPhoto.Camera camera, string camera_name, int fsid, string folder) { +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index 61f13a35..adcef5c5 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -64,7 +64,7 @@ namespace GPhoto { + public Result set_port_info(PortInfo info); + public Result get_abilities(out CameraAbilities abilities); + public Result set_abilities(CameraAbilities abilities); +- public Result get_storageinfo(CameraStorageInformation **sifs, out int count, Context context); ++ public Result get_storageinfo([CCode (array_length_pos=1)]out CameraStorageInformation[] sifs, Context context); + + // Folders + [CCode (cname="gp_camera_folder_list_folders")] +-- +2.34.1 + +From 48fd72432da04ebaa08a85f4a8a90c47ea500b6a Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 11:21:10 +0100 +Subject: [PATCH 5/6] Fix compile error after GPhoto vapi change + +(cherry picked from commit 0c5779bf9d9fa8f08696340dff1548b3c25374c6) +--- + src/camera/ImportPage.vala | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index f5e98955..7dbe9d42 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1333,7 +1333,7 @@ public class ImportPage : CheckerboardPage { + if (fsid >= sifs.length) + return null; + +- return (sifs[fsid].fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? sifs[fsid].basedir : "/"; ++ return (GPhoto.CameraStorageInfoFields.BASE in sifs[fsid].fields) ? (string) sifs[fsid].basedir : "/"; + } + + public static string? get_fulldir(GPhoto.Camera camera, string camera_name, int fsid, string folder) { +-- +2.34.1 + +From da5e2c7165d8ac41c3416fb42d89f32f7b41f858 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 12:22:55 +0100 +Subject: [PATCH 6/6] Fix and clarify the helper header for GPhoto + +(cherry picked from commit 2e668ff82f31704973acd5520f90f4576c7519a9) +--- + vapi/libgphoto2.vapi | 8 ++++---- + vapi/{gphoto.h => shotwell-gphoto-helper.h} | 0 + 2 files changed, 4 insertions(+), 4 deletions(-) + rename vapi/{gphoto.h => shotwell-gphoto-helper.h} (100%) + +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index adcef5c5..aeab7255 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -53,7 +53,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_CAMERA", + unref_function="gp_camera_unref", + free_function="gp_camera_free", +- cheader_filename="gphoto2/gphoto2-camera.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-camera.h,shotwell-gphoto-helper.h" + )] + public class Camera { + [CCode (cname="gp_camera_new")] +@@ -99,7 +99,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_FILE", + unref_function="gp_file_unref", + free_function="gp_file_free", +- cheader_filename="gphoto2/gphoto2-file.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-file.h,shotwell-gphoto-helper.h" + )] + public class CameraFile { + [CCode (cname="gp_file_new")] +@@ -252,7 +252,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_LIST", + unref_function="gp_list_unref", + free_function="gp_list_free", +- cheader_filename="gphoto2/gphoto2-list.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-list.h,shotwell-gphoto-helper.h" + )] + public class CameraList { + [CCode (cname="gp_list_new")] +@@ -324,7 +324,7 @@ namespace GPhoto { + [CCode ( + ref_function="GPHOTO_REF_CONTEXT", + unref_function="gp_context_unref", +- cheader_filename="gphoto2/gphoto2-context.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-context.h,shotwell-gphoto-helper.h" + )] + public class Context { + [CCode (cname="gp_context_new")] +diff --git a/vapi/gphoto.h b/vapi/shotwell-gphoto-helper.h +similarity index 100% +rename from vapi/gphoto.h +rename to vapi/shotwell-gphoto-helper.h +-- +2.34.1 + diff --git a/shotwell-0.28.4.tar.xz b/shotwell-0.31.3.tar.xz similarity index 44% rename from shotwell-0.28.4.tar.xz rename to shotwell-0.31.3.tar.xz index 859e83eb59df2df43cd549fc9f9146cd58eacacf..b38c3d46d7f6aba94ea78ee82baacd3c1f37507d 100644 Binary files a/shotwell-0.28.4.tar.xz and b/shotwell-0.31.3.tar.xz differ diff --git a/shotwell.spec b/shotwell.spec index 3beed79b86d38bccd2ad787658c78e46105f167e..2b17a82774cdd8248e8d449e37b004bd96d3b038 100644 --- a/shotwell.spec +++ b/shotwell.spec @@ -1,51 +1,73 @@ Name: shotwell -Version: 0.28.4 -Release: 2 +Version: 0.31.3 +Release: 1 Summary: A photo organizer for the GNOME desktop # LGPLv2+ for the code # CC-BY-SA for some of the icons License: LGPLv2+ and CC-BY-SA URL: https://wiki.gnome.org/Apps/Shotwell -Source0: https://download.gnome.org/sources/shotwell/0.28/shotwell-%{version}.tar.xz +Source0: https://download.gnome.org/sources/shotwell/0.31/shotwell-%{version}.tar.xz +# Fix FTBFS with vala 0.53 cherry-pick upstream commits 8223fc3e, +# f36e09d0, 0fb9e879, 3a5904a2, 0c5779bf, and 2e668ff8 +Patch0: shotwell-0.31.3-vapi_fixes.patch +# On top of this, fix import broken import: cherry-pick upstream +# commits cdd0e4fb, 7f3eca0f, and 29cf40ff +Patch1: shotwell-0.31-3-broken_import.patch +# Fix FTBFS with vala 0.55: cherry-pick upstream commit 59ae0ce6 +Patch2: shotwell-0.31.3-initializer_fixes.patch BuildRequires: vala BuildRequires: desktop-file-utils BuildRequires: libappstream-glib >= 0.7.3 BuildRequires: gettext BuildRequires: itstool +BuildRequires: meson BuildRequires: pkgconfig(atk) -BuildRequires: pkgconfig(libgdata) +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(champlain-0.12) >= 0.12.16 +BuildRequires: pkgconfig(champlain-gtk-0.12) +BuildRequires: pkgconfig(clutter-1.0) +BuildRequires: pkgconfig(clutter-gtk-1.0) BuildRequires: pkgconfig(gcr-3) BuildRequires: pkgconfig(gcr-ui-3) -BuildRequires: pkgconfig(gdk-3.0) +BuildRequires: pkgconfig(gdk-3.0) >= 3.22 +BuildRequires: pkgconfig(gdk-pixbuf-2.0) BuildRequires: pkgconfig(gdk-x11-3.0) BuildRequires: pkgconfig(gee-0.8) >= 0.8.5 -BuildRequires: pkgconfig(gexiv2) >= 0.10.4 -BuildRequires: pkgconfig(gio-unix-2.0) >= 2.20 +BuildRequires: pkgconfig(gexiv2) >= 0.11.0 +BuildRequires: pkgconfig(gio-2.0) >= 2.40 +BuildRequires: pkgconfig(gio-unix-2.0) >= 2.40 BuildRequires: pkgconfig(glib-2.0) >= 2.40.0 -BuildRequires: pkgconfig(gmodule-2.0) >= 2.24.0 -BuildRequires: pkgconfig(gnome-doc-utils) -BuildRequires: pkgconfig(gstreamer-1.0) >= 1.0.0 -BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.0.0 -BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= 1.0.0 -BuildRequires: pkgconfig(gstreamer-pbutils-1.0) >= 1.0.0 -BuildRequires: pkgconfig(gtk+-3.0) >= 3.14.0 +BuildRequires: pkgconfig(gmodule-2.0) >= 2.40 +BuildRequires: pkgconfig(gstreamer-1.0) >= 1.0 +BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.0 +BuildRequires: pkgconfig(gstreamer-pbutils-1.0) >= 1.0 +BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= 1.0 +BuildRequires: pkgconfig(gtk+-3.0) >= 3.22 BuildRequires: pkgconfig(gudev-1.0) >= 145 BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libexif) >= 0.6.16 +BuildRequires: pkgconfig(libgdata) BuildRequires: pkgconfig(libgphoto2) >= 2.5.0 BuildRequires: pkgconfig(libraw) >= 0.13.2 BuildRequires: pkgconfig(libsoup-2.4) >= 2.42.0 +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libwebpdemux) BuildRequires: pkgconfig(libxml-2.0) >= 2.6.32 BuildRequires: pkgconfig(sqlite3) >= 3.5.9 -BuildRequires: pkgconfig(webkit2gtk-4.0) >= 2.6.3 +BuildRequires: pkgconfig(webkit2gtk-4.0) >= 2.26 +BuildRequires: pkgconfig(libsecret-1) +BuildRequires: cmake # Needed by the publishing plugins BuildRequires: pkgconfig(rest-0.7) >= 0.7 -# used by shotwell-settings-migrator -Requires: dconf +# to fix symlinks +BuildRequires: symlinks fakechroot + +# provides the icon directories +Requires: hicolor-icon-theme %description Shotwell is an easy-to-use, fast photo organizer designed for the GNOME @@ -57,89 +79,51 @@ making it easy to experiment and correct errors. %prep -%setup -q - +%autosetup -p1 %build -%configure \ - --disable-schemas-compile \ - --disable-silent-rules \ - --disable-static -# --disable-rpath to configure doesn't seem to work -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -%make_build +%meson -Dinstall_apport_hook=false +%meson_build %install -# otherwise gettext always returns English text regardless of LANGUAGE asked -export LANG=en_US.utf8 -%make_install - -# Remove libtool .la files -find %{buildroot} -name '*.la' -delete - -# Update the screenshot shown in the software center -# -# NOTE: It would be *awesome* if this file was pushed upstream. -# -# See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details. -# -appstream-util replace-screenshots %{buildroot}%{_datadir}/metainfo/shotwell.appdata.xml \ - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/shotwell/a.png \ - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/shotwell/b.png \ - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/shotwell/c.png \ - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/shotwell/d.png +%meson_install +pushd %{buildroot} +fakechroot -- symlinks -C -cvr %{_datadir}/help +popd %find_lang %{name} --with-gnome %check -desktop-file-validate %{buildroot}%{_datadir}/applications/shotwell.desktop -desktop-file-validate %{buildroot}%{_datadir}/applications/shotwell-viewer.desktop - - -%post -/sbin/ldconfig -update-desktop-database &>/dev/null || : -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - - -%postun -/sbin/ldconfig -update-desktop-database &> /dev/null || : -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || : - /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : -fi - - -%posttrans -gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || : -/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : - +desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shotwell.desktop +desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shotwell-Viewer.desktop %files -f %{name}.lang %license COPYING -%doc README NEWS THANKS AUTHORS +%doc README.md NEWS THANKS AUTHORS %{_bindir}/shotwell %{_libdir}/shotwell %{_libdir}/libshotwell-authenticator.so.* %exclude %{_libdir}/libshotwell-authenticator.so %{_libdir}/libshotwell-plugin-common.so.* %exclude %{_libdir}/libshotwell-plugin-common.so +%{_libdir}/libshotwell-plugin-dev-1.0.so.* +%exclude %{_libdir}/libshotwell-plugin-dev-1.0.so %{_libexecdir}/shotwell -%{_datadir}/applications/shotwell.desktop -%{_datadir}/applications/shotwell-viewer.desktop -%{_datadir}/metainfo/shotwell.appdata.xml +%{_datadir}/applications/org.gnome.Shotwell.desktop +%{_datadir}/applications/org.gnome.Shotwell-Viewer.desktop %{_datadir}/glib-2.0/schemas/*.xml -%{_datadir}/icons/hicolor/*/apps/shotwell.png -%{_datadir}/icons/hicolor/symbolic/apps/shotwell-symbolic.svg +%{_datadir}/icons/hicolor/*/apps/org.gnome.Shotwell.png +%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Shotwell-symbolic.svg +%{_datadir}/metainfo/org.gnome.Shotwell.appdata.xml %{_mandir}/man1/* %changelog +* Thu Feb 10 2022 douyan - 0.31.3-1 +- update to upstream version 0.31.3 + * Mon Jan 18 2021 lvhan - 0.28.4-2 - fix zh_CN