sci-astronomy/siril: add 1.4.0

Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Part-of: https://github.com/gentoo/gentoo/pull/44960
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Mario Haustein
2025-12-24 17:16:22 +00:00
committed by Sam James
parent 7ea159d440
commit 2dcaff24c5
7 changed files with 736 additions and 2 deletions
+1
View File
@@ -1 +1,2 @@
DIST siril-1.2.6.tar.bz2 4621526 BLAKE2B b0d2b69ac601a28f033c2b02eda8a418aba1bdbacb9f1abe52b69a4a133808e3c176274da5fb7e025aff558243e9a187d77dbecad302d4b437e4fc3b33483934 SHA512 bf1503a9759e08c2767dc267860d129be7ce345695db0c89a4bf199775c084f77e10f2675e9491074f21022dcbdd3fdb161be5d541405c18c25a758226703009
DIST siril-1.4.0.tar.bz2 14754666 BLAKE2B 8893fcaceb4263ade09e3e0e9063750845fbebb53ad9c8aa64b0254e2233ff9936132ea2cdd1f050dd42857418a0278d03013e55a9defb2227a555738011b1c6 SHA512 79655cf6110793452efac30d3be2b620e5ae4ba4fa53c88855d162f930df3980284dff1c17895f26922f4213be5cfc860bef67bc799f3eece1be87a2a1c1960a
@@ -0,0 +1,44 @@
--- a/meson.build
+++ b/meson.build
@@ -709,7 +709,6 @@ subdir('data')
subdir('po')
subdir('python_module')
subdir('scripts')
-subdir('3rdparty_licenses')
################################################################################
# Install misc
@@ -728,12 +727,6 @@ man_files = [
]
install_man(man_files)
-install_data(['AUTHORS', 'LICENSE.md'],
- rename : [
- 'doc/siril/AUTHORS',
- 'doc/siril/LICENSE.md',
- ],
- install_dir : siril_share)
################################################################################
--- a/python_module/meson.build
+++ b/python_module/meson.build
@@ -9,16 +9,7 @@ install_data(python_files,
install_dir: siril_datadir + '/python_module'
)
-install_data(['README.md'],
- install_dir: siril_share + 'doc/siril/python_module'
-)
-
-# Create the locale directory in doc and install its README.md
-install_data(['locale/README.md'],
- install_dir: siril_share + 'doc/siril/python_module/locale'
-)
-
# Install the entire 'sirilpy' subdirectory (this will handle all .py files in sirilpy/)
install_subdir('sirilpy',
install_dir: siril_datadir + '/python_module'
-)
\ No newline at end of file
+)
@@ -0,0 +1,503 @@
From 7ea2a86229acd35cb2e67d882ca4670afa9bd8eb Mon Sep 17 00:00:00 2001
From: Cyril Richard <cyril.richard42@gmail.com>
Date: Sun, 7 Dec 2025 21:58:36 +0100
Subject: [PATCH] Closes #1887 and #1888
Upstream: https://gitlab.com/free-astro/siril/-/issues/1887
Upstream: https://gitlab.com/free-astro/siril/-/issues/1888
(cherry picked from commit c5bcc5ae764813dc1a6d89af08d9d417f1288dda)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
siril-1.4.1
--/--/--
**Fixes**
-* Fixes build error when compiled without libgit2, libjpeg (#1886, #1889)
+* Fixes build error when compiled without libgit2, libjpeg and libcurl (#1886, #1887, #1888, #1889)
siril-1.4.0
12/05/25
--- a/src/core/siril_networking.c
+++ b/src/core/siril_networking.c
@@ -18,12 +18,6 @@
* along with Siril. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#if defined(HAVE_LIBCURL)
-#include <curl/curl.h>
-
#include <string.h>
#include "core/siril.h"
@@ -35,6 +29,13 @@
static gboolean online_status = TRUE;
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#if defined(HAVE_LIBCURL)
+
+#include <curl/curl.h>
+
static size_t cbk_curl(void *buffer, size_t size, size_t nmemb, void *userp) {
size_t realsize = size * nmemb;
struct ucontent *mem = (struct ucontent *) userp;
@@ -193,6 +194,41 @@ gboolean siril_compiled_with_networking() {
#else
+// Stub functions when libcurl is not available
+// These return errors but allow the code to compile and link
+
+gpointer fetch_url_async(gpointer p) {
+ fetch_url_async_data *args = (fetch_url_async_data *) p;
+ g_assert(args->idle_function != NULL);
+
+ siril_log_color_message(_("Error: Siril was compiled without libcurl support. Network features are unavailable.\n"), "red");
+
+ // Clean up and call the idle function with NULL content to signal failure
+ g_free(args->url);
+ args->url = NULL;
+ args->length = 0;
+ args->content = NULL;
+ args->code = 0;
+
+ siril_add_idle(args->idle_function, args);
+ return NULL;
+}
+
+char* fetch_url(const gchar *url, gsize *length, int *error, gboolean quiet) {
+ if (!quiet) {
+ siril_log_color_message(_("Error: Siril was compiled without libcurl support. Cannot fetch URL: %s\n"), "red", url);
+ }
+ *error = 1;
+ *length = 0;
+ return NULL;
+}
+
+int submit_post_request(const char *url, const char *post_data, char **post_response) {
+ siril_log_color_message(_("Error: Siril was compiled without libcurl support. Cannot submit POST request to: %s\n"), "red", url);
+ *post_response = NULL;
+ return 1;
+}
+
gboolean siril_compiled_with_networking() {
return FALSE;
}
@@ -209,4 +245,4 @@ gboolean set_online_status(gboolean status) {
if (!siril_compiled_with_networking())
return FALSE;
return online_status;
-}
+}
\ No newline at end of file
--- a/src/core/siril_networking.h
+++ b/src/core/siril_networking.h
@@ -21,12 +21,8 @@ gpointer fetch_url_async(gpointer p);
char *fetch_url(const gchar *url, gsize *length, int *error, gboolean quiet);
int submit_post_request(const char *url, const char *post_data, char **post_response);
-// HAVE_LIBCURL
-//#endif
-
gboolean siril_compiled_with_networking();
gboolean is_online();
gboolean set_online_status(gboolean status);
-// SIRIL_NETWORKING_H
-#endif
+#endif
\ No newline at end of file
--- a/src/core/siril_update.c
+++ b/src/core/siril_update.c
@@ -21,21 +21,21 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#if defined(HAVE_LIBCURL)
-#include "yyjson.h"
#include <string.h>
#include "core/siril.h"
-#include "core/siril_networking.h"
#include "core/proto.h"
-#include "core/processing.h"
#include "core/siril_log.h"
#include "gui/utils.h"
-#include "gui/message_dialog.h"
-#include "gui/progress_and_log.h"
#include "core/siril_update.h"
+#if defined(HAVE_LIBCURL)
+#include "yyjson.h"
+#include "core/siril_networking.h"
+#include "core/processing.h"
+#include "gui/message_dialog.h"
+#include "gui/progress_and_log.h"
#define SIRIL_DOMAIN "https://siril.org/"
#define SIRIL_VERSIONS SIRIL_DOMAIN"siril_versions.json"
@@ -43,6 +43,171 @@
#define GITLAB_URL "https://gitlab.com/free-astro/siril/raw"
#define BRANCH "master"
#define SIRIL_NOTIFICATIONS "notifications/siril_notifications.json"
+#endif
+
+// ============================================================================
+// UTILITY FUNCTIONS - Independent of libcurl
+// These functions work with version numbers and strings, no network required
+// ============================================================================
+
+static void remove_alpha(gchar *str, gboolean *is_rc, gboolean *is_beta) {
+ unsigned long i = 0;
+ unsigned long j = 0;
+ char c;
+
+ if (g_str_has_prefix(str, "beta")) {
+ *is_rc = FALSE;
+ *is_beta = TRUE;
+ } else if (g_str_has_prefix(str, "rc")) {
+ *is_rc = TRUE;
+ *is_beta = FALSE;
+ } else {
+ *is_rc = FALSE;
+ *is_beta = FALSE;
+ }
+
+ while ((c = str[i++]) != '\0') {
+ if (g_ascii_isdigit(c)) {
+ str[j++] = c;
+ }
+ }
+ str[j] = '\0';
+}
+
+/**
+ * Check if the version is a patched version.
+ * patched version are named like that x.y.z.patch where patch only contains digits.
+ * if patch contains alpha char it is because that's a RC or beta version. Not a patched one.
+ * @param version version to be tested
+ * @return 0 if the version is not patched. The version of the patch is returned otherwise.
+ */
+static guint check_for_patch(gchar *version, gboolean *is_rc, gboolean *is_beta) {
+ remove_alpha(version, is_rc, is_beta);
+ return (g_ascii_strtoull(version, NULL, 10));
+}
+
+version_number get_version_number_from_string(const gchar *input) {
+ version_number version = { 0 };
+ gchar **version_string = NULL;
+ const gchar *string = find_first_numeric(input);
+ if (!string)
+ goto the_end;
+ version_string = g_strsplit_set(string, ".-", -1);
+ version.major_version = g_ascii_strtoull(version_string[0], NULL, 10);
+ if (version_string[1])
+ version.minor_version = g_ascii_strtoull(version_string[1], NULL, 10);
+ else
+ goto the_end;
+ if (version_string[2])
+ version.micro_version = g_ascii_strtoull(version_string[2], NULL, 10);
+ else
+ goto the_end;
+ if (version_string[3] == NULL) {
+ version.patched_version = 0;
+ version.rc_version = FALSE;
+ version.beta_version = FALSE;
+ } else {
+ version.patched_version = check_for_patch(version_string[3], &version.rc_version, &version.beta_version);
+ }
+the_end:
+ g_strfreev(version_string);
+ return version;
+}
+
+version_number get_current_version_number() {
+ return get_version_number_from_string(PACKAGE_VERSION);
+}
+
+/**
+ * This function compares two version numbers following the pattern x.y.z[-type#]
+ * where type can be beta, rc, or a stable patch number.
+ * Version ordering: beta < rc < stable < stable-patch
+ * Examples: 1.4.0-beta1 < 1.4.0-rc2 < 1.4.0 < 1.4.0-1
+ * @param v1 First version number to be tested
+ * @param v2 Second version number to be tested
+ * @return -1 if v1 < v2, 1 if v1 > v2 and 0 if v1 is equal to v2
+ */
+int compare_version(version_number v1, version_number v2) {
+ if (v1.major_version < v2.major_version)
+ return -1;
+ else if (v1.major_version > v2.major_version)
+ return 1;
+ else {
+ if (v1.minor_version < v2.minor_version)
+ return -1;
+ else if (v1.minor_version > v2.minor_version)
+ return 1;
+ else {
+ if (v1.micro_version < v2.micro_version)
+ return -1;
+ else if (v1.micro_version > v2.micro_version)
+ return 1;
+ else {
+ // Determine version type
+ int v1_is_stable = !v1.rc_version && !v1.beta_version;
+ int v2_is_stable = !v2.rc_version && !v2.beta_version;
+
+ // Order: beta < rc < stable
+ if (v1.beta_version && !v2.beta_version) return -1; // beta < (rc or stable)
+ if (v2.beta_version && !v1.beta_version) return 1; // (rc or stable) > beta
+ if (v1.rc_version && v2_is_stable) return -1; // rc < stable
+ if (v2.rc_version && v1_is_stable) return 1; // stable > rc
+
+ // Same type: compare patched_version
+ if (v1.beta_version && v2.beta_version) {
+ // Both beta versions
+ if (v1.patched_version < v2.patched_version)
+ return -1;
+ else if (v1.patched_version > v2.patched_version)
+ return 1;
+ }
+ else if (v1.rc_version && v2.rc_version) {
+ // Both rc versions
+ if (v1.patched_version < v2.patched_version)
+ return -1;
+ else if (v1.patched_version > v2.patched_version)
+ return 1;
+ }
+ else if (v1_is_stable && v2_is_stable) {
+ // Both stable versions: compare patches
+ // 1.4.0 (patch=0) < 1.4.0-1 (patch=1)
+ if (v1.patched_version < v2.patched_version)
+ return -1;
+ else if (v1.patched_version > v2.patched_version)
+ return 1;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+// ============================================================================
+// NETWORK-DEPENDENT FUNCTIONS - Require libcurl
+// ============================================================================
+
+#if defined(HAVE_LIBCURL)
+
+static version_number get_last_version_number(gchar *version_str) {
+ gchar **v;
+ version_number version = { 0 };
+
+ v = g_strsplit_set(version_str, ".-", -1);
+
+ if (v[0])
+ version.major_version = g_ascii_strtoull(v[0], NULL, 10);
+ if (v[0] && v[1])
+ version.minor_version = g_ascii_strtoull(v[1], NULL, 10);
+ if (v[0] && v[1] && v[2])
+ version.micro_version = g_ascii_strtoull(v[2], NULL, 10);
+ if (v[0] && v[1] && v[2] && v[3]) {
+ remove_alpha(v[3], &version.rc_version, &version.beta_version);
+ version.patched_version = g_ascii_strtoull(v[3], NULL, 10);
+ }
+
+ g_strfreev(v);
+ return version;
+}
static gboolean siril_update_get_highest(yyjson_doc *doc,
gchar **highest_version, gint64 *release_timestamp,
@@ -195,159 +360,6 @@ static gboolean siril_update_get_highest(yyjson_doc *doc,
return FALSE;
}
-static void remove_alpha(gchar *str, gboolean *is_rc, gboolean *is_beta) {
- unsigned long i = 0;
- unsigned long j = 0;
- char c;
-
- if (g_str_has_prefix(str, "beta")) {
- *is_rc = FALSE;
- *is_beta = TRUE;
- } else if (g_str_has_prefix(str, "rc")) {
- *is_rc = TRUE;
- *is_beta = FALSE;
- } else {
- *is_rc = FALSE;
- *is_beta = FALSE;
- }
-
- while ((c = str[i++]) != '\0') {
- if (g_ascii_isdigit(c)) {
- str[j++] = c;
- }
- }
- str[j] = '\0';
-}
-
-/**
- * Check if the version is a patched version.
- * patched version are named like that x.y.z.patch where patch only contains digits.
- * if patch contains alpha char it is because that's a RC or beta version. Not a patched one.
- * @param version version to be tested
- * @return 0 if the version is not patched. The version of the patch is returned otherwise.
- */
-static guint check_for_patch(gchar *version, gboolean *is_rc, gboolean *is_beta) {
- remove_alpha(version, is_rc, is_beta);
- return (g_ascii_strtoull(version, NULL, 10));
-}
-
-version_number get_version_number_from_string(const gchar *input) {
- version_number version = { 0 };
- gchar **version_string = NULL;
- const gchar *string = find_first_numeric(input);
- if (!string)
- goto the_end;
- version_string = g_strsplit_set(string, ".-", -1);
- version.major_version = g_ascii_strtoull(version_string[0], NULL, 10);
- if (version_string[1])
- version.minor_version = g_ascii_strtoull(version_string[1], NULL, 10);
- else
- goto the_end;
- if (version_string[2])
- version.micro_version = g_ascii_strtoull(version_string[2], NULL, 10);
- else
- goto the_end;
- if (version_string[3] == NULL) {
- version.patched_version = 0;
- version.rc_version = FALSE;
- version.beta_version = FALSE;
- } else {
- version.patched_version = check_for_patch(version_string[3], &version.rc_version, &version.beta_version);
- }
-the_end:
- g_strfreev(version_string);
- return version;
-}
-
-version_number get_current_version_number() {
- return get_version_number_from_string(PACKAGE_VERSION);
-}
-
-static version_number get_last_version_number(gchar *version_str) {
- gchar **v;
- version_number version = { 0 };
-
- v = g_strsplit_set(version_str, ".-", -1);
-
- if (v[0])
- version.major_version = g_ascii_strtoull(v[0], NULL, 10);
- if (v[0] && v[1])
- version.minor_version = g_ascii_strtoull(v[1], NULL, 10);
- if (v[0] && v[1] && v[2])
- version.micro_version = g_ascii_strtoull(v[2], NULL, 10);
- if (v[0] && v[1] && v[2] && v[3]) {
- remove_alpha(v[3], &version.rc_version, &version.beta_version);
- version.patched_version = g_ascii_strtoull(v[3], NULL, 10);
- }
-
- g_strfreev(v);
- return version;
-}
-
-/**
- * This function compares two version numbers following the pattern x.y.z[-type#]
- * where type can be beta, rc, or a stable patch number.
- * Version ordering: beta < rc < stable < stable-patch
- * Examples: 1.4.0-beta1 < 1.4.0-rc2 < 1.4.0 < 1.4.0-1
- * @param v1 First version number to be tested
- * @param v2 Second version number to be tested
- * @return -1 if v1 < v2, 1 if v1 > v2 and 0 if v1 is equal to v2
- */
-int compare_version(version_number v1, version_number v2) {
- if (v1.major_version < v2.major_version)
- return -1;
- else if (v1.major_version > v2.major_version)
- return 1;
- else {
- if (v1.minor_version < v2.minor_version)
- return -1;
- else if (v1.minor_version > v2.minor_version)
- return 1;
- else {
- if (v1.micro_version < v2.micro_version)
- return -1;
- else if (v1.micro_version > v2.micro_version)
- return 1;
- else {
- // Determine version type
- int v1_is_stable = !v1.rc_version && !v1.beta_version;
- int v2_is_stable = !v2.rc_version && !v2.beta_version;
-
- // Order: beta < rc < stable
- if (v1.beta_version && !v2.beta_version) return -1; // beta < (rc or stable)
- if (v2.beta_version && !v1.beta_version) return 1; // (rc or stable) > beta
- if (v1.rc_version && v2_is_stable) return -1; // rc < stable
- if (v2.rc_version && v1_is_stable) return 1; // stable > rc
-
- // Same type: compare patched_version
- if (v1.beta_version && v2.beta_version) {
- // Both beta versions
- if (v1.patched_version < v2.patched_version)
- return -1;
- else if (v1.patched_version > v2.patched_version)
- return 1;
- }
- else if (v1.rc_version && v2.rc_version) {
- // Both rc versions
- if (v1.patched_version < v2.patched_version)
- return -1;
- else if (v1.patched_version > v2.patched_version)
- return 1;
- }
- else if (v1_is_stable && v2_is_stable) {
- // Both stable versions: compare patches
- // 1.4.0 (patch=0) < 1.4.0-1 (patch=1)
- if (v1.patched_version < v2.patched_version)
- return -1;
- else if (v1.patched_version > v2.patched_version)
- return 1;
- }
- }
- }
- }
- return 0;
-}
-
static gchar *parse_changelog(gchar *changelog) {
gchar **token;
GString *strResult;
@@ -683,4 +695,4 @@ void siril_check_notifications(gboolean verbose) {
g_thread_new("siril-notifications", fetch_url_async, args);
}
-#endif
+#endif // HAVE_LIBCURL
\ No newline at end of file
--- a/src/core/siril_update.h
+++ b/src/core/siril_update.h
@@ -20,11 +20,12 @@
#ifndef SRC_CORE_SIRIL_UPDATE_H_
#define SRC_CORE_SIRIL_UPDATE_H_
-#if ( defined(HAVE_LIBCURL) || defined(HAVE_LIBGIT2) )
-
int compare_version(version_number v1, version_number v2);
version_number get_version_number_from_string(const gchar *string);
version_number get_current_version_number();
+
+#if ( defined(HAVE_LIBCURL) || defined(HAVE_LIBGIT2) )
+
void siril_check_updates(gboolean verbose);
void siril_check_notifications(gboolean verbose);
--
GitLab
@@ -0,0 +1,33 @@
From 0ea30faf4236432a43aa552f53447c9bcdb3a57c Mon Sep 17 00:00:00 2001
From: Cyril Richard <cyril.richard42@gmail.com>
Date: Sun, 7 Dec 2025 21:09:34 +0100
Subject: [PATCH] Closes #1886
Upstream: https://gitlab.com/free-astro/siril/-/issues/1886
(cherry picked from commit 4b74c4de02e5341d82999837bc9d46e889780356)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+siril-1.4.1
+--/--/--
+**Fixes**
+* Fixes build error when compiled without libgit2 (#1886)
+
siril-1.4.0
12/05/25
**Improvements**
--- a/src/io/siril_pythonmodule.c
+++ b/src/io/siril_pythonmodule.c
@@ -2153,7 +2153,9 @@ static PythonVenvInfo* prepare_venv_environment(const gchar *venv_path) {
// this repopulates gui.repo_scripts and updates the script menu
// the reason for doing it on completion of python installation is that pyscript_version_check
// cannot check python script versions until it knows what module version is installed
+#ifdef HAVE_LIBGIT2
g_thread_unref(g_thread_new("update_scripts_list", update_repo_scripts_list_and_menu_in_thread, NULL));
+#endif
}
g_free(module_path);
--
GitLab
@@ -0,0 +1,45 @@
From 8a38018889873055e26490e77975f151e5f4137f Mon Sep 17 00:00:00 2001
From: Cyril Richard <cyril.richard42@gmail.com>
Date: Sun, 7 Dec 2025 21:20:27 +0100
Subject: [PATCH] Closes #1889
Upstream: https://gitlab.com/free-astro/siril/-/issues/1889
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
siril-1.4.1
--/--/--
**Fixes**
-* Fixes build error when compiled without libgit2 (#1886)
+* Fixes build error when compiled without libgit2, libjpeg (#1886, #1889)
siril-1.4.0
12/05/25
--- a/src/gui/save_dialog.c
+++ b/src/gui/save_dialog.c
@@ -532,6 +532,7 @@ static void initialize_data(gpointer p) {
args->checksum = gtk_toggle_button_get_active(checksum);
}
+#ifdef HAVE_JPEG
static long calculate_jpeg_size(struct savedial_data *args) {
char const *tmp_dir = g_get_tmp_dir();
gchar *tmp_filename;
@@ -596,6 +597,14 @@ static gpointer calculate_jpeg_size_thread(gpointer p) {
return NULL;
}
+#else
+static gpointer calculate_jpeg_size_thread(gpointer p) {
+ printf("Should not happen\n");
+ return NULL;
+}
+
+#endif
+
static gpointer mini_save_dialog(gpointer p) {
struct savedial_data *args = (struct savedial_data *) p;
#ifdef HAVE_LIBPNG
--
GitLab
@@ -1,5 +1,3 @@
diff --git a/meson.build b/meson.build
index 0bc3f0d8e..e08989aa9 100644
--- a/meson.build
+++ b/meson.build
@@ -710,12 +710,6 @@ man_files = [
+110
View File
@@ -0,0 +1,110 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="tk"
inherit meson python-r1 toolchain-funcs xdg
DESCRIPTION="A free astronomical image processing software"
HOMEPAGE="https://siril.org/"
if [[ ${PV} == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/free-astro/${PN}.git"
else
SRC_URI="https://gitlab.com/free-astro/siril/-/archive/${PV/_/-}/${PN}-${PV/_/-}.tar.bz2"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${PN}-${PV/_/-}"
fi
LICENSE="GPL-3+ Boost-1.0"
SLOT="0"
IUSE="curl exif ffmpeg git heif jpeg jpegxl openmp png raw tiff"
# TODO: Siril depends optionally on gtksourceview-4, which is deprecated. Add
# gui-libs/gtksourceview if version 5 is supported by upstream.
DEPEND="
>=dev-libs/glib-2.56.0:2
>=dev-libs/yyjson-0.10.0:=
media-libs/lcms:=
media-libs/librtprocess
>=media-libs/opencv-4.2.0:=[features2d]
>=sci-astronomy/wcslib-7.12:=
sci-libs/cfitsio:=
sci-libs/fftw:3.0=
sci-libs/gsl:=
x11-libs/gdk-pixbuf:2
x11-libs/cairo
x11-libs/pango
>=x11-libs/gtk+-3.22.0:3
virtual/zlib:=
curl? ( net-misc/curl )
exif? ( >=media-gfx/exiv2-0.25:= )
ffmpeg? ( media-video/ffmpeg:= )
git? ( dev-libs/libgit2:= )
heif? ( media-libs/libheif:= )
jpeg? ( media-libs/libjpeg-turbo:= )
jpegxl? ( media-libs/libjxl:= )
png? ( >=media-libs/libpng-1.6.0:= )
raw? ( media-libs/libraw:= )
tiff? ( media-libs/tiff:= )
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${DEPEND}
${PYTHON_DEPS}
dev-python/pip[${PYTHON_USEDEP}]
dev-python/virtualenv[${PYTHON_USEDEP}]
"
BDEPEND="
dev-build/cmake
x11-base/xorg-proto
"
PATCHES=(
"${FILESDIR}/${PN}-1.4-docfiles.patch"
"${FILESDIR}/${PN}-1.4.0-libgit2.patch"
"${FILESDIR}/${PN}-1.4.0-libjpeg.patch"
"${FILESDIR}/${PN}-1.4.0-libcurl.patch"
)
DOCS=( README.md ChangeLog AUTHORS )
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
src_configure() {
local emesonargs=(
-DlibXISF=false
-Dffms2=false
-Dcriterion=false
$(meson_use curl libcurl)
$(meson_use exif exiv2)
$(meson_use ffmpeg)
$(meson_use git libgit2)
$(meson_use heif libheif)
$(meson_use jpeg libjpeg)
$(meson_use jpegxl libjxl)
$(meson_use openmp)
$(meson_use png libpng)
$(meson_use raw libraw)
$(meson_use tiff libtiff)
)
meson_src_configure
}
pkg_postinst() {
xdg_desktop_database_update
xdg_icon_cache_update
xdg_mimeinfo_database_update
}