diff --git a/graphics/darktable/Makefile b/graphics/darktable/Makefile index 0cb4946e6be..362ca0b2548 100644 --- a/graphics/darktable/Makefile +++ b/graphics/darktable/Makefile @@ -1,14 +1,13 @@ -# $OpenBSD: Makefile,v 1.106 2021/01/23 15:10:41 sthen Exp $ +# $OpenBSD: Makefile,v 1.107 2021/02/07 22:13:21 sthen Exp $ ONLY_FOR_ARCHS= amd64 aarch64 COMMENT= virtual lighttable and darkroom for photographers -V= 3.2.1 +V= 3.4.1 DISTNAME= darktable-$V PORTROACH= limitw:1,even skipv:release-$V EXTRACT_SUFX= .tar.xz -REVISION= 0 CATEGORIES= graphics x11 @@ -18,12 +17,14 @@ HOMEPAGE= https://www.darktable.org/ PERMIT_PACKAGE= Yes WANTLIB += ${COMPILER_LIBCXX} ${MODLUA_WANTLIB} -WANTLIB += GraphicsMagick Iex-2_5 IlmImf-2_5 X11 Xrandr avif c -WANTLIB += cairo cups curl exiv2 gdk-3 gdk_pixbuf-2.0 gio-2.0 -WANTLIB += glib-2.0 gmodule-2.0 gobject-2.0 gphoto2 gphoto2_port -WANTLIB += gtk-3 intl jpeg json-glib-1.0 lcms2 lensfun m openjp2 -WANTLIB += osmgpsmap-1.0 pango-1.0 pangocairo-1.0 png pugixml -WANTLIB += rsvg-2 secret-1 soup-2.4 sqlite3 tiff webp xml2 z +WANTLIB += GraphicsMagick ICE Iex-2_5 IlmImf-2_5 IlmThread-2_5 +WANTLIB += Imath-2_5 SM X11 Xext Xrandr atk-1.0 avif c cairo cairo-gobject +WANTLIB += cups curl exiv2 gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 +WANTLIB += gmodule-2.0 gobject-2.0 gphoto2 gphoto2_port gthread-2.0 +WANTLIB += gtk-3 harfbuzz intl jpeg json-glib-1.0 lcms2 lensfun +WANTLIB += m openjp2 osmgpsmap-1.0 pango-1.0 pangocairo-1.0 png +WANTLIB += pugixml rsvg-2 secret-1 soup-2.4 sqlite3 tiff webp +WANTLIB += xml2 z MASTER_SITES= https://github.com/darktable-org/darktable/releases/download/release-$V/ diff --git a/graphics/darktable/distinfo b/graphics/darktable/distinfo index 65e3dee9bb4..99bb1fc01c4 100644 --- a/graphics/darktable/distinfo +++ b/graphics/darktable/distinfo @@ -1,2 +1,2 @@ -SHA256 (darktable-3.2.1.tar.xz) = bjaD6ojcCgJxvn7KT9WUueRrG3GUhHglqNCgwSveuQw= -SIZE (darktable-3.2.1.tar.xz) = 3920728 +SHA256 (darktable-3.4.1.tar.xz) = f8P4UdqbzXxQU+zQnyGqPrYQO+mKbFj1IBC28iF0lB4= +SIZE (darktable-3.4.1.tar.xz) = 4456192 diff --git a/graphics/darktable/patches/patch-CMakeLists_txt b/graphics/darktable/patches/patch-CMakeLists_txt index bc8e56b360b..fb4c02263bf 100644 --- a/graphics/darktable/patches/patch-CMakeLists_txt +++ b/graphics/darktable/patches/patch-CMakeLists_txt @@ -1,4 +1,4 @@ -$OpenBSD: patch-CMakeLists_txt,v 1.3 2021/01/23 15:10:41 sthen Exp $ +$OpenBSD: patch-CMakeLists_txt,v 1.4 2021/02/07 22:13:21 sthen Exp $ fails with _XOPEN_SOURCE set; @@ -8,7 +8,7 @@ fails with _XOPEN_SOURCE set; Index: CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt -@@ -493,6 +493,8 @@ set(THEME_DIRECTORY "${CMAKE_INSTALL_DATAROOTDIR}/icon +@@ -502,6 +502,8 @@ endif(BUILD_TESTING) if(NOT WIN32) if(CMAKE_SYSTEM MATCHES "SunOS.*") add_definitions("-D_XOPEN_SOURCE=600") diff --git a/graphics/darktable/patches/patch-src_CMakeLists_txt b/graphics/darktable/patches/patch-src_CMakeLists_txt new file mode 100644 index 00000000000..80a663295e1 --- /dev/null +++ b/graphics/darktable/patches/patch-src_CMakeLists_txt @@ -0,0 +1,13 @@ +$OpenBSD: patch-src_CMakeLists_txt,v 1.5 2021/02/07 22:13:21 sthen Exp $ + +Index: src/CMakeLists.txt +--- src/CMakeLists.txt.orig ++++ src/CMakeLists.txt +@@ -882,7 +882,6 @@ endif() + + target_link_libraries(lib_darktable PUBLIC ${STATIC_LIBS}) + target_link_libraries(lib_darktable PRIVATE rawspeed) +-target_link_libraries(lib_darktable PRIVATE whereami) + target_link_libraries(lib_darktable PUBLIC ${LIBS}) + + unset(LIBS) diff --git a/graphics/darktable/patches/patch-src_cli_CMakeLists_txt b/graphics/darktable/patches/patch-src_cli_CMakeLists_txt new file mode 100644 index 00000000000..a0e216b1bc6 --- /dev/null +++ b/graphics/darktable/patches/patch-src_cli_CMakeLists_txt @@ -0,0 +1,14 @@ +$OpenBSD: patch-src_cli_CMakeLists_txt,v 1.1 2021/02/07 22:13:21 sthen Exp $ + +Index: src/cli/CMakeLists.txt +--- src/cli/CMakeLists.txt.orig ++++ src/cli/CMakeLists.txt +@@ -2,7 +2,7 @@ include_directories(${DARKTABLE_BINDIR}) + add_executable(darktable-cli main.c) + + set_target_properties(darktable-cli PROPERTIES LINKER_LANGUAGE C) +-target_link_libraries(darktable-cli lib_darktable whereami) ++target_link_libraries(darktable-cli lib_darktable) + + if (WIN32) + _detach_debuginfo (darktable-cli bin) diff --git a/graphics/darktable/patches/patch-src_common_file_location_c b/graphics/darktable/patches/patch-src_common_file_location_c new file mode 100644 index 00000000000..01507373a00 --- /dev/null +++ b/graphics/darktable/patches/patch-src_common_file_location_c @@ -0,0 +1,29 @@ +$OpenBSD: patch-src_common_file_location_c,v 1.1 2021/02/07 22:13:21 sthen Exp $ + +Index: src/common/file_location.c +--- src/common/file_location.c.orig ++++ src/common/file_location.c +@@ -38,12 +38,12 @@ + #include "common/grealpath.h" + #include "darktable.h" + #include "file_location.h" +-#include "whereami.h" + + void dt_loc_init(const char *datadir, const char *moduledir, const char *localedir, const char *configdir, const char *cachedir, const char *tmpdir) + { + // Assemble pathes + char* application_directory = NULL; ++#if 0 + int dirname_length; + // calling wai_getExecutablePath twice as recommended in the docs: + // the first call retrieves the length of the path +@@ -56,6 +56,9 @@ void dt_loc_init(const char *datadir, const char *modu + // strip of the executable name from the path to retrieve the path alone + application_directory[dirname_length] = '\0'; + } ++#else ++ asprintf(&application_directory, "%s", "/usr/local/bin"); ++#endif + dt_print(DT_DEBUG_DEV, "application_directory: %s\n", application_directory); + + // set up absolute pathes based on their relative value diff --git a/graphics/darktable/patches/patch-src_common_imageio_avif_c b/graphics/darktable/patches/patch-src_common_imageio_avif_c deleted file mode 100644 index b5f8c89c80a..00000000000 --- a/graphics/darktable/patches/patch-src_common_imageio_avif_c +++ /dev/null @@ -1,528 +0,0 @@ -$OpenBSD: patch-src_common_imageio_avif_c,v 1.3 2021/01/23 15:10:41 sthen Exp $ - -From e531b66f486f31a7119b418ba0ecfee9cd49a79b Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Wed, 21 Oct 2020 18:25:41 +0200 -Subject: [PATCH] common:imageio: Add support for libavif >= 0.8.2 - -Index: src/common/imageio_avif.c ---- src/common/imageio_avif.c.orig -+++ src/common/imageio_avif.c -@@ -40,71 +40,12 @@ - - #include - --static dt_imageio_retval_t read_image(const char *filename, avifROData *raw) --{ -- size_t nread; -- size_t avif_file_size; -- FILE *f = NULL; -- avifRWData raw_data = AVIF_DATA_EMPTY; -- dt_imageio_retval_t ret; -- int rc; -- const char *ext = strrchr(filename, '.'); -- int cmp; -- -- cmp = strncmp(ext, ".avif", 5); -- if (cmp != 0) { -- return DT_IMAGEIO_FILE_CORRUPTED; -- } -- -- f = g_fopen(filename, "rb"); -- if (f == NULL) { -- return DT_IMAGEIO_FILE_NOT_FOUND; -- } -- -- rc = fseek(f, 0, SEEK_END); -- if (rc != 0) { -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- avif_file_size = ftell(f); -- if (avif_file_size < 10) { -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- rc = fseek(f, 0, SEEK_SET); -- if (rc != 0) { -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- -- avifRWDataRealloc(&raw_data, avif_file_size); -- if (raw_data.data == NULL) { -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- -- nread = fread(raw_data.data, 1, raw_data.size, f); -- if (nread != avif_file_size) { -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- -- raw->data = raw_data.data; -- raw->size = raw_data.size; -- -- ret = DT_IMAGEIO_OK; --out: -- fclose(f); -- -- return ret; --} -- - dt_imageio_retval_t dt_imageio_open_avif(dt_image_t *img, - const char *filename, - dt_mipmap_buffer_t *mbuf) - { - dt_imageio_retval_t ret; -- avifROData raw = AVIF_DATA_EMPTY; -+ avifImage avif_image = {0}; - avifImage *avif = NULL; - avifRGBImage rgb = { - .format = AVIF_RGB_FORMAT_RGB, -@@ -112,23 +53,6 @@ dt_imageio_retval_t dt_imageio_open_avif(dt_image_t *i - avifDecoder *decoder = NULL; - avifResult result; - -- ret = read_image(filename, &raw); -- if (ret != DT_IMAGEIO_OK) { -- dt_print(DT_DEBUG_IMAGEIO, -- "Failed to read image [%s]\n", -- filename); -- return ret; -- } -- -- avifBool ok = avifPeekCompatibleFileType(&raw); -- if (!ok) { -- dt_print(DT_DEBUG_IMAGEIO, -- "Invalid avif image [%s]\n", -- filename); -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- - decoder = avifDecoderCreate(); - if (decoder == NULL) { - dt_print(DT_DEBUG_IMAGEIO, -@@ -138,7 +62,7 @@ dt_imageio_retval_t dt_imageio_open_avif(dt_image_t *i - goto out; - } - -- result = avifDecoderParse(decoder, &raw); -+ result = avifDecoderReadFile(decoder, &avif_image, filename); - if (result != AVIF_RESULT_OK) { - dt_print(DT_DEBUG_IMAGEIO, - "Failed to parse AVIF image [%s]: %s\n", -@@ -146,20 +70,8 @@ dt_imageio_retval_t dt_imageio_open_avif(dt_image_t *i - ret = DT_IMAGEIO_FILE_CORRUPTED; - goto out; - } -- if (decoder->imageCount > 1) { -- dt_control_log(_("image '%s' has more than one frame!"), filename); -- } -- result = avifDecoderNthImage(decoder, 0); -- if (result != AVIF_RESULT_OK) { -- dt_print(DT_DEBUG_IMAGEIO, -- "Failed to decode first frame of AVIF image [%s]: %s\n", -- filename, avifResultToString(result)); -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -+ avif = &avif_image; - -- avif = decoder->image; -- - /* This will set the depth from the avif */ - avifRGBImageSetDefaults(&rgb, avif); - -@@ -268,7 +180,6 @@ dt_imageio_retval_t dt_imageio_open_avif(dt_image_t *i - out: - avifRGBImageFreePixels(&rgb); - avifDecoderDestroy(decoder); -- avifFree((void *)raw.data); /* discard const */ - - return ret; - } -@@ -276,27 +187,11 @@ out: - dt_imageio_retval_t dt_imageio_avif_read_color_profile(const char *filename, struct avif_color_profile *cp) - { - dt_imageio_retval_t ret; -- avifROData raw = AVIF_DATA_EMPTY; - avifDecoder *decoder = NULL; -+ avifImage avif_image = {0}; -+ avifImage *avif = NULL; - avifResult result; - -- ret = read_image(filename, &raw); -- if (ret != DT_IMAGEIO_OK) { -- dt_print(DT_DEBUG_IMAGEIO, -- "Failed to read image [%s]\n", -- filename); -- return ret; -- } -- -- avifBool ok = avifPeekCompatibleFileType(&raw); -- if (!ok) { -- dt_print(DT_DEBUG_IMAGEIO, -- "Invalid avif image [%s]\n", -- filename); -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- - decoder = avifDecoderCreate(); - if (decoder == NULL) { - dt_print(DT_DEBUG_IMAGEIO, -@@ -306,7 +201,7 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - goto out; - } - -- result = avifDecoderParse(decoder, &raw); -+ result = avifDecoderReadFile(decoder, &avif_image, filename); - if (result != AVIF_RESULT_OK) { - dt_print(DT_DEBUG_IMAGEIO, - "Failed to parse AVIF image [%s]: %s\n", -@@ -314,24 +209,11 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - ret = DT_IMAGEIO_FILE_CORRUPTED; - goto out; - } -+ avif = &avif_image; - -- if (decoder->imageCount > 1) { -- dt_control_log(_("image '%s' has more than one frame!"), filename); -- } -+ if (avif->icc.size > 0) { -+ avifRWData icc = avif->icc; - -- result = avifDecoderNthImage(decoder, 0); -- if (result != AVIF_RESULT_OK) { -- dt_print(DT_DEBUG_IMAGEIO, -- "Failed to decode first frame of AVIF image [%s]: %s\n", -- filename, avifResultToString(result)); -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- --#if AVIF_VERSION >= 800 -- if (decoder->image->icc.size > 0) { -- avifRWData icc = decoder->image->icc; -- - if (icc.data == NULL || icc.size == 0) { - ret = DT_IMAGEIO_FILE_CORRUPTED; - goto out; -@@ -350,19 +232,19 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - cp->icc_profile_size = icc.size; - cp->icc_profile = data; - } else { -- switch(decoder->image->colorPrimaries) { -+ switch(avif->colorPrimaries) { - /* - * BT709 - */ - case AVIF_COLOR_PRIMARIES_BT709: - -- switch (decoder->image->transferCharacteristics) { -+ switch (avif->transferCharacteristics) { - /* - * SRGB - */ - case AVIF_TRANSFER_CHARACTERISTICS_SRGB: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_BT709: - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_SRGB; -@@ -378,7 +260,7 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - */ - case AVIF_TRANSFER_CHARACTERISTICS_BT470M: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_BT709: - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_REC709; -@@ -394,7 +276,7 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - */ - case AVIF_TRANSFER_CHARACTERISTICS_LINEAR: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_BT709: - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_LIN_REC709; -@@ -416,13 +298,13 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - */ - case AVIF_COLOR_PRIMARIES_BT2020: - -- switch (decoder->image->transferCharacteristics) { -+ switch (avif->transferCharacteristics) { - /* - * LINEAR BT2020 - */ - case AVIF_TRANSFER_CHARACTERISTICS_LINEAR: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_BT2020_NCL: - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_LIN_REC2020; -@@ -438,7 +320,7 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - */ - case AVIF_TRANSFER_CHARACTERISTICS_SMPTE2084: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_BT2020_NCL: - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_PQ_REC2020; -@@ -454,7 +336,7 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - */ - case AVIF_TRANSFER_CHARACTERISTICS_HLG: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_BT2020_NCL: - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_HLG_REC2020; -@@ -476,13 +358,13 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - */ - case AVIF_COLOR_PRIMARIES_SMPTE432: - -- switch (decoder->image->transferCharacteristics) { -+ switch (avif->transferCharacteristics) { - /* - * PQ P3 - */ - case AVIF_TRANSFER_CHARACTERISTICS_SMPTE2084: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_PQ_P3; - break; -@@ -497,7 +379,7 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - */ - case AVIF_TRANSFER_CHARACTERISTICS_HLG: - -- switch (decoder->image->matrixCoefficients) { -+ switch (avif->matrixCoefficients) { - case AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: - cp->type = DT_COLORSPACE_PQ_P3; - break; -@@ -520,214 +402,10 @@ dt_imageio_retval_t dt_imageio_avif_read_color_profile - break; - } - } --#else /* AVIF_VERSION 700 */ -- switch(decoder->image->profileFormat) { -- case AVIF_PROFILE_FORMAT_NCLX: { -- avifNclxColorProfile nclx = decoder->image->nclx; - -- switch(nclx.colourPrimaries) { -- /* -- * BT709 -- */ -- case AVIF_NCLX_COLOUR_PRIMARIES_BT709: -- -- switch (nclx.transferCharacteristics) { -- /* -- * SRGB -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_SRGB: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_BT709: -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_SRGB; -- break; -- default: -- break; -- } -- -- break; /* SRGB */ -- -- /* -- * GAMMA22 BT709 -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_BT470M: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_BT709: -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_REC709; -- break; -- default: -- break; -- } -- -- break; /* GAMMA22 BT709 */ -- -- /* -- * LINEAR BT709 -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_LINEAR: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_BT709: -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_LIN_REC709; -- break; -- default: -- break; -- } -- -- break; /* LINEAR BT709 */ -- -- default: -- break; -- } -- -- break; /* BT709 */ -- -- /* -- * BT2020 -- */ -- case AVIF_NCLX_COLOUR_PRIMARIES_BT2020: -- -- switch (nclx.transferCharacteristics) { -- /* -- * LINEAR BT2020 -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_LINEAR: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_BT2020_NCL: -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_LIN_REC2020; -- break; -- default: -- break; -- } -- -- break; /* LINEAR BT2020 */ -- -- /* -- * PQ BT2020 -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_SMPTE2084: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_BT2020_NCL: -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_PQ_REC2020; -- break; -- default: -- break; -- } -- -- break; /* PQ BT2020 */ -- -- /* -- * HLG BT2020 -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_HLG: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_BT2020_NCL: -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_HLG_REC2020; -- break; -- default: -- break; -- } -- -- break; /* HLG BT2020 */ -- -- default: -- break; -- } -- -- break; /* BT2020 */ -- -- /* -- * P3 -- */ -- case AVIF_NCLX_COLOUR_PRIMARIES_SMPTE432: -- -- switch (nclx.transferCharacteristics) { -- /* -- * PQ P3 -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_SMPTE2084: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_PQ_P3; -- break; -- default: -- break; -- } -- -- break; /* PQ P3 */ -- -- /* -- * HLG P3 -- */ -- case AVIF_NCLX_TRANSFER_CHARACTERISTICS_HLG: -- -- switch (nclx.matrixCoefficients) { -- case AVIF_NCLX_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: -- cp->type = DT_COLORSPACE_PQ_P3; -- break; -- default: -- break; -- } -- -- break; /* HLG P3 */ -- -- default: -- break; -- } -- -- break; /* P3 */ -- -- default: -- dt_print(DT_DEBUG_IMAGEIO, -- "Unsupported color profile for %s\n", -- filename); -- break; -- } -- -- break; /* AVIF_PROFILE_FORMAT_NCLX */ -- } -- case AVIF_PROFILE_FORMAT_ICC: { -- avifRWData icc = decoder->image->icc; -- -- if (icc.data == NULL || icc.size == 0) { -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- -- uint8_t *data = (uint8_t *)g_malloc0(icc.size * sizeof(uint8_t)); -- if (data == NULL) { -- dt_print(DT_DEBUG_IMAGEIO, -- "Failed to allocate ICC buffer for AVIF image [%s]\n", -- filename); -- ret = DT_IMAGEIO_FILE_CORRUPTED; -- goto out; -- } -- memcpy(data, icc.data, icc.size); -- -- cp->icc_profile_size = icc.size; -- cp->icc_profile = data; -- break; -- } -- case AVIF_PROFILE_FORMAT_NONE: -- break; -- } --#endif /* AVIF_VERSION */ -- - ret = DT_IMAGEIO_OK; - out: - avifDecoderDestroy(decoder); -- avifFree((void *)raw.data); /* discard const */ - - return ret; - } diff --git a/graphics/darktable/patches/patch-src_external_CMakeLists_txt b/graphics/darktable/patches/patch-src_external_CMakeLists_txt new file mode 100644 index 00000000000..499096b3d6b --- /dev/null +++ b/graphics/darktable/patches/patch-src_external_CMakeLists_txt @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_external_CMakeLists_txt,v 1.1 2021/02/07 22:13:21 sthen Exp $ + +Index: src/external/CMakeLists.txt +--- src/external/CMakeLists.txt.orig ++++ src/external/CMakeLists.txt +@@ -2,9 +2,6 @@ if(USE_XCF) + add_subdirectory(libxcf) + endif() + +-add_library(whereami STATIC "${CMAKE_CURRENT_SOURCE_DIR}/whereami/src/whereami.c") +-target_include_directories(whereami PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/whereami/src/") +- + set(BUILD_TESTING_SAVE "${BUILD_TESTING}") + + set(BUILD_TESTING OFF CACHE BOOL "" FORCE) diff --git a/graphics/darktable/patches/patch-src_generate-cache_CMakeLists_txt b/graphics/darktable/patches/patch-src_generate-cache_CMakeLists_txt new file mode 100644 index 00000000000..a02bba598a6 --- /dev/null +++ b/graphics/darktable/patches/patch-src_generate-cache_CMakeLists_txt @@ -0,0 +1,14 @@ +$OpenBSD: patch-src_generate-cache_CMakeLists_txt,v 1.1 2021/02/07 22:13:21 sthen Exp $ + +Index: src/generate-cache/CMakeLists.txt +--- src/generate-cache/CMakeLists.txt.orig ++++ src/generate-cache/CMakeLists.txt +@@ -2,7 +2,7 @@ include_directories(${DARKTABLE_BINDIR}) + add_executable(darktable-generate-cache main.c) + + set_target_properties(darktable-generate-cache PROPERTIES LINKER_LANGUAGE C) +-target_link_libraries(darktable-generate-cache lib_darktable whereami) ++target_link_libraries(darktable-generate-cache lib_darktable) + + if (WIN32) + _detach_debuginfo (darktable-generate-cache bin) diff --git a/graphics/darktable/pkg/PLIST b/graphics/darktable/pkg/PLIST index 43c4af64f2e..70c583ef681 100644 --- a/graphics/darktable/pkg/PLIST +++ b/graphics/darktable/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.26 2020/08/24 09:47:06 sthen Exp $ +@comment $OpenBSD: PLIST,v 1.27 2021/02/07 22:13:21 sthen Exp $ @bin bin/darktable @bin bin/darktable-chart @bin bin/darktable-cli @@ -38,6 +38,7 @@ lib/darktable/plugins/imageio/storage/ @so lib/darktable/plugins/libborders.so @so lib/darktable/plugins/libcacorrect.so @so lib/darktable/plugins/libchannelmixer.so +@so lib/darktable/plugins/libchannelmixerrgb.so @so lib/darktable/plugins/libclahe.so @so lib/darktable/plugins/libclipping.so @so lib/darktable/plugins/libcolisa.so @@ -130,13 +131,13 @@ lib/darktable/plugins/lighttable/ @so lib/darktable/plugins/lighttable/liblighttable_mode.so @so lib/darktable/plugins/lighttable/liblive_view.so @so lib/darktable/plugins/lighttable/liblocation.so +@so lib/darktable/plugins/lighttable/libmap_locations.so @so lib/darktable/plugins/lighttable/libmap_settings.so @so lib/darktable/plugins/lighttable/libmasks.so @so lib/darktable/plugins/lighttable/libmetadata.so @so lib/darktable/plugins/lighttable/libmetadata_view.so @so lib/darktable/plugins/lighttable/libmodule_toolbox.so @so lib/darktable/plugins/lighttable/libmodulegroups.so -@so lib/darktable/plugins/lighttable/libmodulelist.so @so lib/darktable/plugins/lighttable/libnavigation.so @so lib/darktable/plugins/lighttable/libprint_settings.so @so lib/darktable/plugins/lighttable/libratings.so @@ -179,6 +180,7 @@ share/darktable/luarc share/darktable/noiseprofiles.json share/darktable/pixmaps/ share/darktable/pixmaps/dt_logo_128x128.png +share/darktable/pixmaps/dt_text.svg share/darktable/pixmaps/idbutton-1.png share/darktable/pixmaps/idbutton-1.svg share/darktable/pixmaps/idbutton-2.png @@ -366,14 +368,19 @@ share/icons/hicolor/scalable/apps/darktable-1.svg share/icons/hicolor/scalable/apps/darktable-2.svg share/icons/hicolor/scalable/apps/darktable-3.svg share/icons/hicolor/scalable/apps/darktable.svg +share/locale/af/LC_MESSAGES/darktable.mo +share/locale/cs/LC_MESSAGES/darktable.mo share/locale/de/LC_MESSAGES/darktable.mo share/locale/es/LC_MESSAGES/darktable.mo +share/locale/fi/LC_MESSAGES/darktable.mo share/locale/fr/LC_MESSAGES/darktable.mo share/locale/he/LC_MESSAGES/darktable.mo +share/locale/hu/LC_MESSAGES/darktable.mo share/locale/it/LC_MESSAGES/darktable.mo share/locale/pl/LC_MESSAGES/darktable.mo share/locale/pt_BR/LC_MESSAGES/darktable.mo share/locale/ru/LC_MESSAGES/darktable.mo +share/locale/sk/LC_MESSAGES/darktable.mo share/locale/sl/LC_MESSAGES/darktable.mo @tag gtk-update-icon-cache %D/share/icons/hicolor @tag update-desktop-database