[niepce] flatpak: add a patch to Exempi to reduce the imported symbols that conflict with Exiv2
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] flatpak: add a patch to Exempi to reduce the imported symbols that conflict with Exiv2
- Date: Sun, 17 Feb 2019 15:14:42 +0000 (UTC)
commit b2a7d87fdc613fadf690503e1f3fd4c0cf9e95bb
Author: Hubert Figuière <hub figuiere net>
Date: Tue Jan 1 19:06:21 2019 -0500
flatpak: add a patch to Exempi to reduce the imported symbols that conflict with Exiv2
flatpak/exempi-api-export.diff | 543 +++++++++++++++++++++++++++++++++++++++++
flatpak/org.gnome.Niepce.json | 7 +
2 files changed, 550 insertions(+)
---
diff --git a/flatpak/exempi-api-export.diff b/flatpak/exempi-api-export.diff
new file mode 100644
index 0000000..1fed7e0
--- /dev/null
+++ b/flatpak/exempi-api-export.diff
@@ -0,0 +1,543 @@
+commit 60217e0c1cd6b8d56c2e141a8f5a26a69562e763
+Author: Hubert Figuière <hub figuiere net>
+Date: Tue Jan 1 10:14:09 2019 -0500
+
+ Issue #5 - Limit the list of exported symbols
+
+ https://gitlab.freedesktop.org/libopenraw/exempi/issues/5
+
+diff --git a/exempi/exempi.cpp b/exempi/exempi.cpp
+index 584aaf1..d7a9748 100644
+--- a/exempi/exempi.cpp
++++ b/exempi/exempi.cpp
+@@ -1,7 +1,7 @@
+ /*
+ * exempi - exempi.cpp
+ *
+- * Copyright (C) 2007-2016 Hubert Figuière
++ * Copyright (C) 2007-2019 Hubert Figuière
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -51,6 +51,11 @@
+ #include "XMP.incl_cpp"
+ #include "XMPUtils.hpp"
+
++/*
++ * Use this to mark a symbol to be exported
++ */
++#define API_EXPORT __attribute__ ((visibility ("default")))
++
+ #if HAVE_NATIVE_TLS
+
+ static TLS int g_error = 0;
+@@ -146,25 +151,25 @@ static void set_error(const XMP_Error &e)
+ extern "C" {
+ #endif
+
+-const char NS_XMP_META[] = "adobe:ns:meta/";
+-const char NS_RDF[] = kXMP_NS_RDF;
+-const char NS_EXIF[] = kXMP_NS_EXIF;
+-const char NS_TIFF[] = kXMP_NS_TIFF;
+-const char NS_XAP[] = kXMP_NS_XMP;
+-const char NS_XAP_RIGHTS[] = kXMP_NS_XMP_Rights;
+-const char NS_DC[] = kXMP_NS_DC;
+-const char NS_EXIF_AUX[] = kXMP_NS_EXIF_Aux;
+-const char NS_CRS[] = kXMP_NS_CameraRaw;
+-const char NS_LIGHTROOM[] = "http://ns.adobe.com/lightroom/1.0/";
+-const char NS_CAMERA_RAW_SETTINGS[] = kXMP_NS_CameraRaw;
+-const char NS_CAMERA_RAW_SAVED_SETTINGS[] =
++API_EXPORT extern const char NS_XMP_META[] = "adobe:ns:meta/";
++API_EXPORT extern const char NS_RDF[] = kXMP_NS_RDF;
++API_EXPORT extern const char NS_EXIF[] = kXMP_NS_EXIF;
++API_EXPORT extern const char NS_TIFF[] = kXMP_NS_TIFF;
++API_EXPORT extern const char NS_XAP[] = kXMP_NS_XMP;
++API_EXPORT extern const char NS_XAP_RIGHTS[] = kXMP_NS_XMP_Rights;
++API_EXPORT extern const char NS_DC[] = kXMP_NS_DC;
++API_EXPORT extern const char NS_EXIF_AUX[] = kXMP_NS_EXIF_Aux;
++API_EXPORT extern const char NS_CRS[] = kXMP_NS_CameraRaw;
++API_EXPORT extern const char NS_LIGHTROOM[] = "http://ns.adobe.com/lightroom/1.0/";
++API_EXPORT extern const char NS_CAMERA_RAW_SETTINGS[] = kXMP_NS_CameraRaw;
++API_EXPORT extern const char NS_CAMERA_RAW_SAVED_SETTINGS[] =
+ "http://ns.adobe.com/camera-raw-saved-settings/1.0/";
+-const char NS_PHOTOSHOP[] = kXMP_NS_Photoshop;
+-const char NS_IPTC4XMP[] = kXMP_NS_IPTCCore;
+-const char NS_TPG[] = kXMP_NS_XMP_PagedFile;
+-const char NS_DIMENSIONS_TYPE[] = kXMP_NS_XMP_Dimensions;
+-const char NS_CC[] = "http://creativecommons.org/ns#";
+-const char NS_PDF[] = kXMP_NS_PDF;
++API_EXPORT extern const char NS_PHOTOSHOP[] = kXMP_NS_Photoshop;
++API_EXPORT extern const char NS_IPTC4XMP[] = kXMP_NS_IPTCCore;
++API_EXPORT extern const char NS_TPG[] = kXMP_NS_XMP_PagedFile;
++API_EXPORT extern const char NS_DIMENSIONS_TYPE[] = kXMP_NS_XMP_Dimensions;
++API_EXPORT extern const char NS_CC[] = "http://creativecommons.org/ns#";
++API_EXPORT extern const char NS_PDF[] = kXMP_NS_PDF;
+
+ #define STRING(x) reinterpret_cast<std::string *>(x)
+
+@@ -174,6 +179,7 @@ const char NS_PDF[] = kXMP_NS_PDF;
+ return r; \
+ }
+
++API_EXPORT
+ int xmp_get_error()
+ {
+ #if HAVE_NATIVE_TLS
+@@ -190,6 +196,7 @@ static bool _xmp_error_callback(void* context, XMP_ErrorSeverity severity,
+ return false;
+ }
+
++API_EXPORT
+ bool xmp_init()
+ {
+ RESET_ERROR;
+@@ -207,12 +214,14 @@ bool xmp_init()
+ return false;
+ }
+
++API_EXPORT
+ void xmp_terminate()
+ {
+ RESET_ERROR;
+ SXMPFiles::Terminate();
+ }
+
++API_EXPORT
+ bool xmp_register_namespace(const char *namespaceURI,
+ const char *suggestedPrefix,
+ XmpStringPtr registeredPrefix)
+@@ -228,6 +237,7 @@ bool xmp_register_namespace(const char *namespaceURI,
+ return false;
+ }
+
++API_EXPORT
+ bool xmp_namespace_prefix(const char *ns, XmpStringPtr prefix)
+ {
+ CHECK_PTR(ns, false);
+@@ -241,6 +251,7 @@ bool xmp_namespace_prefix(const char *ns, XmpStringPtr prefix)
+ return false;
+ }
+
++API_EXPORT
+ bool xmp_prefix_namespace_uri(const char *prefix, XmpStringPtr ns)
+ {
+ CHECK_PTR(prefix, false);
+@@ -254,6 +265,7 @@ bool xmp_prefix_namespace_uri(const char *prefix, XmpStringPtr ns)
+ return false;
+ }
+
++API_EXPORT
+ XmpFilePtr xmp_files_new()
+ {
+ RESET_ERROR;
+@@ -269,6 +281,7 @@ XmpFilePtr xmp_files_new()
+ return NULL;
+ }
+
++API_EXPORT
+ XmpFilePtr xmp_files_open_new(const char *path, XmpOpenFileOptions options)
+ {
+ CHECK_PTR(path, NULL);
+@@ -288,6 +301,7 @@ XmpFilePtr xmp_files_open_new(const char *path, XmpOpenFileOptions options)
+ return NULL;
+ }
+
++API_EXPORT
+ bool xmp_files_open(XmpFilePtr xf, const char *path, XmpOpenFileOptions options)
+ {
+ CHECK_PTR(xf, false);
+@@ -302,6 +316,7 @@ bool xmp_files_open(XmpFilePtr xf, const char *path, XmpOpenFileOptions options)
+ return false;
+ }
+
++API_EXPORT
+ bool xmp_files_close(XmpFilePtr xf, XmpCloseFileOptions options)
+ {
+ CHECK_PTR(xf, false);
+@@ -317,6 +332,7 @@ bool xmp_files_close(XmpFilePtr xf, XmpCloseFileOptions options)
+ return true;
+ }
+
++API_EXPORT
+ XmpPtr xmp_files_get_new_xmp(XmpFilePtr xf)
+ {
+ CHECK_PTR(xf, NULL);
+@@ -337,6 +353,7 @@ XmpPtr xmp_files_get_new_xmp(XmpFilePtr xf)
+ return NULL;
+ }
+
++API_EXPORT
+ bool xmp_files_get_xmp(XmpFilePtr xf, XmpPtr xmp)
+ {
+ CHECK_PTR(xf, false);
+@@ -354,6 +371,7 @@ bool xmp_files_get_xmp(XmpFilePtr xf, XmpPtr xmp)
+ return result;
+ }
+
++API_EXPORT
+ bool xmp_files_get_xmp_xmpstring(XmpFilePtr xf, XmpStringPtr xmp_packet,
+ XmpPacketInfo* packet_info)
+ {
+@@ -385,6 +403,7 @@ bool xmp_files_get_xmp_xmpstring(XmpFilePtr xf, XmpStringPtr xmp_packet,
+ }
+
+
++API_EXPORT
+ bool xmp_files_can_put_xmp(XmpFilePtr xf, XmpPtr xmp)
+ {
+ CHECK_PTR(xf, false);
+@@ -402,6 +421,7 @@ bool xmp_files_can_put_xmp(XmpFilePtr xf, XmpPtr xmp)
+ return result;
+ }
+
++API_EXPORT
+ bool xmp_files_can_put_xmp_xmpstring(XmpFilePtr xf, XmpStringPtr xmp_packet)
+ {
+ CHECK_PTR(xf, false);
+@@ -419,6 +439,7 @@ bool xmp_files_can_put_xmp_xmpstring(XmpFilePtr xf, XmpStringPtr xmp_packet)
+ return result;
+ }
+
++API_EXPORT
+ bool xmp_files_can_put_xmp_cstr(XmpFilePtr xf, const char* xmp_packet, size_t len)
+ {
+ CHECK_PTR(xf, false);
+@@ -436,6 +457,7 @@ bool xmp_files_can_put_xmp_cstr(XmpFilePtr xf, const char* xmp_packet, size_t le
+ return result;
+ }
+
++API_EXPORT
+ bool xmp_files_put_xmp(XmpFilePtr xf, XmpPtr xmp)
+ {
+ CHECK_PTR(xf, false);
+@@ -453,6 +475,7 @@ bool xmp_files_put_xmp(XmpFilePtr xf, XmpPtr xmp)
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_files_put_xmp_xmpstring(XmpFilePtr xf, XmpStringPtr xmp_packet)
+ {
+ CHECK_PTR(xf, false);
+@@ -470,6 +493,7 @@ bool xmp_files_put_xmp_xmpstring(XmpFilePtr xf, XmpStringPtr xmp_packet)
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_files_put_xmp_cstr(XmpFilePtr xf, const char* xmp_packet, size_t len)
+ {
+ CHECK_PTR(xf, false);
+@@ -487,6 +511,7 @@ bool xmp_files_put_xmp_cstr(XmpFilePtr xf, const char* xmp_packet, size_t len)
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_files_get_file_info(XmpFilePtr xf, XmpStringPtr filePath,
+ XmpOpenFileOptions *options,
+ XmpFileType *file_format,
+@@ -510,6 +535,7 @@ bool xmp_files_get_file_info(XmpFilePtr xf, XmpStringPtr filePath,
+ return result;
+ }
+
++API_EXPORT
+ bool xmp_files_free(XmpFilePtr xf)
+ {
+ CHECK_PTR(xf, false);
+@@ -525,6 +551,7 @@ bool xmp_files_free(XmpFilePtr xf)
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_files_get_format_info(XmpFileType format,
+ XmpFileFormatOptions *options)
+ {
+@@ -541,6 +568,7 @@ bool xmp_files_get_format_info(XmpFileType format,
+ return result;
+ }
+
++API_EXPORT
+ XmpFileType xmp_files_check_file_format(const char *filePath)
+ {
+ CHECK_PTR(filePath, XMP_FT_UNKNOWN);
+@@ -557,6 +585,7 @@ XmpFileType xmp_files_check_file_format(const char *filePath)
+ return file_type;
+ }
+
++API_EXPORT
+ XmpPtr xmp_new_empty()
+ {
+ RESET_ERROR;
+@@ -564,6 +593,7 @@ XmpPtr xmp_new_empty()
+ return (XmpPtr)txmp;
+ }
+
++API_EXPORT
+ XmpPtr xmp_new(const char *buffer, size_t len)
+ {
+ CHECK_PTR(buffer, NULL);
+@@ -579,6 +609,7 @@ XmpPtr xmp_new(const char *buffer, size_t len)
+ return NULL;
+ }
+
++API_EXPORT
+ XmpPtr xmp_copy(XmpPtr xmp)
+ {
+ CHECK_PTR(xmp, NULL);
+@@ -594,6 +625,7 @@ XmpPtr xmp_copy(XmpPtr xmp)
+ return NULL;
+ }
+
++API_EXPORT
+ bool xmp_parse(XmpPtr xmp, const char *buffer, size_t len)
+ {
+ CHECK_PTR(xmp, false);
+@@ -610,6 +642,7 @@ bool xmp_parse(XmpPtr xmp, const char *buffer, size_t len)
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_serialize(XmpPtr xmp, XmpStringPtr buffer, uint32_t options,
+ uint32_t padding)
+ {
+@@ -618,6 +651,7 @@ bool xmp_serialize(XmpPtr xmp, XmpStringPtr buffer, uint32_t options,
+ 0);
+ }
+
++API_EXPORT
+ bool xmp_serialize_and_format(XmpPtr xmp, XmpStringPtr buffer, uint32_t options,
+ uint32_t padding, const char *newline,
+ const char *tab, int32_t indent)
+@@ -638,6 +672,7 @@ bool xmp_serialize_and_format(XmpPtr xmp, XmpStringPtr buffer, uint32_t options,
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_free(XmpPtr xmp)
+ {
+ CHECK_PTR(xmp, false);
+@@ -647,6 +682,7 @@ bool xmp_free(XmpPtr xmp)
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_get_property(XmpPtr xmp, const char *schema, const char *name,
+ XmpStringPtr property, uint32_t *propsBits)
+ {
+@@ -668,6 +704,7 @@ bool xmp_get_property(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_get_property_date(XmpPtr xmp, const char *schema, const char *name,
+ XmpDateTime *property, uint32_t *propsBits)
+ {
+@@ -692,6 +729,7 @@ bool xmp_get_property_date(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_get_property_float(XmpPtr xmp, const char *schema, const char *name,
+ double *property, uint32_t *propsBits)
+ {
+@@ -713,6 +751,7 @@ bool xmp_get_property_float(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_get_property_bool(XmpPtr xmp, const char *schema, const char *name,
+ bool *property, uint32_t *propsBits)
+ {
+@@ -734,6 +773,7 @@ bool xmp_get_property_bool(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_get_property_int32(XmpPtr xmp, const char *schema, const char *name,
+ int32_t *property, uint32_t *propsBits)
+ {
+@@ -757,6 +797,7 @@ bool xmp_get_property_int32(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_get_property_int64(XmpPtr xmp, const char *schema, const char *name,
+ int64_t *property, uint32_t *propsBits)
+ {
+@@ -778,6 +819,7 @@ bool xmp_get_property_int64(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_get_array_item(XmpPtr xmp, const char *schema, const char *name,
+ int32_t index, XmpStringPtr property,
+ uint32_t *propsBits)
+@@ -801,6 +843,7 @@ bool xmp_get_array_item(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_property(XmpPtr xmp, const char *schema, const char *name,
+ const char *value, uint32_t optionBits)
+ {
+@@ -828,6 +871,7 @@ bool xmp_set_property(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_property_date(XmpPtr xmp, const char *schema, const char *name,
+ const XmpDateTime *value, uint32_t optionBits)
+ {
+@@ -850,6 +894,7 @@ bool xmp_set_property_date(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_property_float(XmpPtr xmp, const char *schema, const char *name,
+ double value, uint32_t optionBits)
+ {
+@@ -870,6 +915,7 @@ bool xmp_set_property_float(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_property_bool(XmpPtr xmp, const char *schema, const char *name,
+ bool value, uint32_t optionBits)
+ {
+@@ -890,6 +936,7 @@ bool xmp_set_property_bool(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_property_int32(XmpPtr xmp, const char *schema, const char *name,
+ int32_t value, uint32_t optionBits)
+ {
+@@ -910,6 +957,7 @@ bool xmp_set_property_int32(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_property_int64(XmpPtr xmp, const char *schema, const char *name,
+ int64_t value, uint32_t optionBits)
+ {
+@@ -930,6 +978,7 @@ bool xmp_set_property_int64(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_array_item(XmpPtr xmp, const char *schema, const char *name,
+ int32_t index, const char *value, uint32_t optionBits)
+ {
+@@ -950,6 +999,7 @@ bool xmp_set_array_item(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_append_array_item(XmpPtr xmp, const char *schema, const char *name,
+ uint32_t arrayOptions, const char *value,
+ uint32_t optionBits)
+@@ -971,6 +1021,7 @@ bool xmp_append_array_item(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_delete_property(XmpPtr xmp, const char *schema, const char *name)
+ {
+ CHECK_PTR(xmp, false);
+@@ -991,6 +1042,7 @@ bool xmp_delete_property(XmpPtr xmp, const char *schema, const char *name)
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_has_property(XmpPtr xmp, const char *schema, const char *name)
+ {
+ CHECK_PTR(xmp, false);
+@@ -1011,6 +1063,7 @@ bool xmp_has_property(XmpPtr xmp, const char *schema, const char *name)
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_get_localized_text(XmpPtr xmp, const char *schema, const char *name,
+ const char *genericLang, const char *specificLang,
+ XmpStringPtr actualLang, XmpStringPtr itemValue,
+@@ -1037,6 +1090,7 @@ bool xmp_get_localized_text(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_set_localized_text(XmpPtr xmp, const char *schema, const char *name,
+ const char *genericLang, const char *specificLang,
+ const char *value, uint32_t optionBits)
+@@ -1060,6 +1114,7 @@ bool xmp_set_localized_text(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ bool xmp_delete_localized_text(XmpPtr xmp, const char *schema, const char *name,
+ const char *genericLang,
+ const char *specificLang)
+@@ -1082,29 +1137,34 @@ bool xmp_delete_localized_text(XmpPtr xmp, const char *schema, const char *name,
+ return ret;
+ }
+
++API_EXPORT
+ XmpStringPtr xmp_string_new()
+ {
+ return (XmpStringPtr) new std::string;
+ }
+
++API_EXPORT
+ void xmp_string_free(XmpStringPtr s)
+ {
+ auto str = reinterpret_cast<std::string *>(s);
+ delete str;
+ }
+
++API_EXPORT
+ const char *xmp_string_cstr(XmpStringPtr s)
+ {
+ CHECK_PTR(s, NULL);
+ return reinterpret_cast<const std::string *>(s)->c_str();
+ }
+
++API_EXPORT
+ size_t xmp_string_len(XmpStringPtr s)
+ {
+ CHECK_PTR(s, 0);
+ return reinterpret_cast<const std::string *>(s)->size();
+ }
+
++API_EXPORT
+ XmpIteratorPtr xmp_iterator_new(XmpPtr xmp, const char *schema,
+ const char *propName, XmpIterOptions options)
+ {
+@@ -1124,6 +1184,7 @@ XmpIteratorPtr xmp_iterator_new(XmpPtr xmp, const char *schema,
+ return NULL;
+ }
+
++API_EXPORT
+ bool xmp_iterator_free(XmpIteratorPtr iter)
+ {
+ CHECK_PTR(iter, false);
+@@ -1133,6 +1194,7 @@ bool xmp_iterator_free(XmpIteratorPtr iter)
+ return true;
+ }
+
++API_EXPORT
+ bool xmp_iterator_next(XmpIteratorPtr iter, XmpStringPtr schema,
+ XmpStringPtr propName, XmpStringPtr propValue,
+ uint32_t *options)
+@@ -1145,6 +1207,7 @@ bool xmp_iterator_next(XmpIteratorPtr iter, XmpStringPtr schema,
+ reinterpret_cast<std::string *>(propValue), options);
+ }
+
++API_EXPORT
+ bool xmp_iterator_skip(XmpIteratorPtr iter, XmpIterSkipOptions options)
+ {
+ CHECK_PTR(iter, false);
+@@ -1154,6 +1217,7 @@ bool xmp_iterator_skip(XmpIteratorPtr iter, XmpIterSkipOptions options)
+ return true;
+ }
+
++API_EXPORT
+ int xmp_datetime_compare(XmpDateTime *left, XmpDateTime *right)
+ {
+ if (!left && !right) {
diff --git a/flatpak/org.gnome.Niepce.json b/flatpak/org.gnome.Niepce.json
index 942187e..edb26a7 100644
--- a/flatpak/org.gnome.Niepce.json
+++ b/flatpak/org.gnome.Niepce.json
@@ -279,11 +279,18 @@
},
{
"name" : "exempi",
+ "build-options": {
+ "cxxflags": "-fvisibility=hidden"
+ },
"sources" : [
{
"type" : "archive",
"url" : "https://libopenraw.freedesktop.org/download/exempi-2.4.5.tar.bz2",
"sha256" : "406185feb88e84ea1d4b4251370be2991205790d7113a7e28e192ff46a4f221e"
+ },
+ {
+ "type": "patch",
+ "path": "exempi-api-export.diff"
}
]
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]