-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
176 additions
and
6 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
srcpkgs/siril/patches/0001-Use-stdint-types-instead-of-libtiff-specific-ones.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
From 009434df15de6b5a8ff1eab79f3d79e91371499d Mon Sep 17 00:00:00 2001 | ||
From: Andreas Kempe <kempe@lysator.liu.se> | ||
Date: Thu, 27 May 2021 19:53:22 +0200 | ||
Subject: [PATCH 1/3] Use stdint types instead of libtiff specific ones | ||
|
||
libtiff has deprecated its own fixed sized types. Switch to stdint fixed | ||
size types instead. | ||
--- | ||
src/core/command.c | 3 ++- | ||
src/core/proto.h | 2 +- | ||
src/io/image_formats_libraries.c | 7 ++++--- | ||
3 files changed, 7 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/src/core/command.c b/src/core/command.c | ||
index ebe4359e..6330a6bd 100644 | ||
--- a/src/core/command.c | ||
+++ b/src/core/command.c | ||
@@ -18,6 +18,7 @@ | ||
* along with Siril. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
+#include <stdint.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
@@ -221,7 +222,7 @@ int process_savepng(int nb){ | ||
|
||
#ifdef HAVE_LIBTIFF | ||
int process_savetif(int nb){ | ||
- uint16 bitspersample = 16; | ||
+ uint16_t bitspersample = 16; | ||
|
||
if (!single_image_is_loaded()) { | ||
PRINT_NOT_FOR_SEQUENCE; | ||
diff --git a/src/core/proto.h b/src/core/proto.h | ||
index efbab418..5a6cac27 100644 | ||
--- a/src/core/proto.h | ||
+++ b/src/core/proto.h | ||
@@ -43,7 +43,7 @@ int readpic(const char *name, fits *fit); | ||
/****************** image_formats_libraries.h ******************/ | ||
#ifdef HAVE_LIBTIFF | ||
int readtif(const char *name, fits *fit, gboolean force_float); | ||
-int savetif(const char *name, fits *fit, uint16 bitspersample); | ||
+int savetif(const char *name, fits *fit, uint16_t bitspersample); | ||
#endif | ||
|
||
#ifdef HAVE_LIBJPEG | ||
diff --git a/src/io/image_formats_libraries.c b/src/io/image_formats_libraries.c | ||
index 92becc34..98b203e4 100644 | ||
--- a/src/io/image_formats_libraries.c | ||
+++ b/src/io/image_formats_libraries.c | ||
@@ -21,6 +21,7 @@ | ||
#ifdef HAVE_CONFIG_H | ||
#include <config.h> | ||
#endif | ||
+#include <stdint.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <math.h> | ||
@@ -60,7 +61,7 @@ | ||
|
||
#ifdef HAVE_LIBTIFF | ||
|
||
-static int readtifstrip(TIFF* tif, uint32 width, uint32 height, uint16 nsamples, WORD **data) { | ||
+static int readtifstrip(TIFF* tif, uint32_t width, uint32_t height, uint16_t nsamples, WORD **data) { | ||
uint32_t rowsperstrip; | ||
uint16_t config; | ||
int retval = nsamples; | ||
@@ -344,8 +345,8 @@ int readtif(const char *name, fits *fit, gboolean force_float) { | ||
uint16_t nbits, nsamples, color; | ||
WORD *data = NULL; | ||
float *fdata = NULL; | ||
- uint16 sampleformat = 0; | ||
- | ||
+ uint16_t sampleformat = 0; | ||
+ | ||
TIFF* tif = Siril_TIFFOpen(name, "r"); | ||
if (!tif) { | ||
siril_log_message(_("Could not open the TIFF file %s\n"), name); | ||
-- | ||
2.31.1 | ||
|
37 changes: 37 additions & 0 deletions
37
srcpkgs/siril/patches/0002-Use-g_memdup2-if-glib-2.68.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 1fdd1df83f793cf9878ed6e47eae4fe1f1d4f6d5 Mon Sep 17 00:00:00 2001 | ||
From: Andreas Kempe <kempe@lysator.liu.se> | ||
Date: Thu, 27 May 2021 19:59:06 +0200 | ||
Subject: [PATCH 2/3] Use g_memdup2 if glib >= 2.68 | ||
|
||
g_memdup has been deprecated in favour of g_memdup2 starting with glib | ||
2.68. Define g_memdup to g_memdup2 if glib >= 2.68. | ||
--- | ||
src/core/utils.c | 5 +++++ | ||
1 file changed, 5 insertions(+) | ||
|
||
diff --git a/src/core/utils.c b/src/core/utils.c | ||
index aa7aea11..e88dc4ac 100644 | ||
--- a/src/core/utils.c | ||
+++ b/src/core/utils.c | ||
@@ -34,6 +34,7 @@ | ||
#ifdef _WIN32 | ||
#include <windows.h> | ||
#endif | ||
+#include <glib.h> | ||
|
||
#include "core/siril.h" | ||
#include "core/proto.h" | ||
@@ -46,6 +47,10 @@ | ||
#include "gui/progress_and_log.h" | ||
#include "io/single_image.h" | ||
|
||
+#if GLIB_CHECK_VERSION(2,68,0) | ||
+#define g_memdup g_memdup2 | ||
+#endif | ||
+ | ||
/** | ||
* Round double value to an integer | ||
* @param x value to round | ||
-- | ||
2.31.1 | ||
|
41 changes: 41 additions & 0 deletions
41
srcpkgs/siril/patches/0003-Use-C-linkage-for-OpenMP-in-core-exif.cpp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
From 450801b210f522b7b3f79a157e2b3cd5f265dcb8 Mon Sep 17 00:00:00 2001 | ||
From: Andreas Kempe <kempe@lysator.liu.se> | ||
Date: Thu, 27 May 2021 20:23:24 +0200 | ||
Subject: [PATCH 3/3] Use C++ linkage for OpenMP in core/exif.cpp | ||
|
||
Including omp.h using C linkage causes compilation errors with gcc 10.2 | ||
and llvm12. Change it to C++ linkage which is used in other places in | ||
the code. | ||
--- | ||
src/core/exif.cpp | 6 +----- | ||
1 file changed, 1 insertion(+), 5 deletions(-) | ||
|
||
diff --git a/src/core/exif.cpp b/src/core/exif.cpp | ||
index dd58b1dc..ad11767d 100644 | ||
--- a/src/core/exif.cpp | ||
+++ b/src/core/exif.cpp | ||
@@ -18,20 +18,16 @@ | ||
* along with Siril. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
-#ifdef __cplusplus | ||
extern "C" { | ||
-#endif | ||
#ifdef HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
+} | ||
|
||
#include <glib.h> | ||
#ifdef _OPENMP | ||
#include <omp.h> | ||
#endif | ||
-#ifdef __cplusplus | ||
-} | ||
-#endif | ||
|
||
#include <cassert> | ||
#include <fstream> | ||
-- | ||
2.31.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters