Skip to content

Commit

Permalink
siril: update to 0.99.8.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
andkem committed May 27, 2021
1 parent 29f3c72 commit ec36ad5
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 6 deletions.
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 srcpkgs/siril/patches/0002-Use-g_memdup2-if-glib-2.68.patch
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

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

22 changes: 16 additions & 6 deletions srcpkgs/siril/template
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
# Template file for 'siril'
pkgname=siril
version=0.9.12
revision=3
version=0.99.8.1
revision=1
wrksrc="${pkgname}-${version}"
build_style=gnu-configure
hostmakedepends="pkg-config intltool autoconf automake gettext-devel"
makedepends="fftw-devel libconfig-devel libopencv-devel libffms2-devel
gsl-devel libraw-devel tiff-devel libpng-devel libcurl-devel
ffmpeg-devel gtk+3-devel cfitsio-devel gsl-devel"
makedepends="glib-devel json-glib-devel exiv2-devel gtk+3-devel
cairo-devel fftw-devel gsl-devel cfitsio-devel libconfig-devel
libopencv4-devel librtprocess-devel libraw-devel tiff-devel
libjpeg-turbo-devel libpng-devel libheif-devel libffms2-devel
ffmpeg-devel libcurl-devel wcslib-devel libgomp-devel"
depends="gnuplot"
short_desc="Free astronomical image processing software"
maintainer="Andreas Kempe <kempe@lysator.liu.se>"
license="GPL-3.0-or-later"
homepage="https://www.siril.org/"
distfiles="https://free-astro.org/download/${pkgname}-${version}.tar.bz2"
checksum=9fb7f8a10630ea028137e8f213727519ae9916ea1d88cd8d0cc87f336d8d53b1
checksum=45b73ee8d1e1bd7ff184478f90da59c729ca1bd5285fb2f7ac0237c6b5cdbdb2
# make check doesn't really do anything and is broken.
make_check=no
patch_args="-p1"

if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
Expand Down

0 comments on commit ec36ad5

Please sign in to comment.