Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1171245
| From | David Bremner <david@tethera.net> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1053661: [Miloš Komarčević] Re: [darktable-org/darktable] imageio: adjust for libavif 1.0.0 API change (PR #15128) |
| Date | 2023-10-09 14:30 +0200 |
| Message-ID | <HmXyx-eBWD-1@gated-at.bofh.it> (permalink) |
| References | <HmXyx-eBWD-3@gated-at.bofh.it> <HmxkJ-elKz-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Date: Mon, 09 Oct 2023 04:28:29 -0700
From: =?utf-8?B?TWlsb8WhIEtvbWFyxI1ldmnEhw==?= <notifications@github.com>
To: darktable-org/darktable <darktable@noreply.github.com>
Cc: bremner <david@tethera.net>,
Comment <comment@noreply.github.com>
Subject: Re: [darktable-org/darktable] imageio: adjust for libavif 1.0.0 API
change (PR #15128)
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="==-=-="
--==-=-=
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
I think we only need the following CMake change on 4.4.x branch, the source code changes only apply to 4.6:
```
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e3eaa697fe..5cb3bf9fd8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -353,16 +353,22 @@ if(USE_WEBP)
endif(USE_WEBP)
if (USE_AVIF)
- find_package(libavif 0.8.2 CONFIG)
- if (TARGET avif)
- list(APPEND LIBS avif)
- add_definitions(-DHAVE_LIBAVIF=1)
- list(APPEND SOURCES "imageio/imageio_avif.c")
- set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} avif CACHE INTERNAL "")
+ # no version check in config mode because of major only match policy
+ find_package(libavif CONFIG)
+ if (TARGET avif)
+ if(libavif_VERSION VERSION_GREATER_EQUAL 0.8.2)
+ list(APPEND LIBS avif)
+ add_definitions(-DHAVE_LIBAVIF=1)
+ list(APPEND SOURCES "imageio/imageio_avif.c")
+ set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} avif CACHE INTERNAL "")
+ else()
+ set(libavif_FOUND NOTFOUND)
endif()
+ endif()
endif()
if(USE_HEIF)
+ # no version check in config mode because of exact match policy
find_package(libheif CONFIG)
if(NOT TARGET heif)
find_package(libheif 1.13.0 MODULE)
@@ -373,7 +379,7 @@ if(USE_HEIF)
add_definitions(-DHAVE_LIBHEIF=1)
list(APPEND SOURCES "imageio/imageio_heif.c")
set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} heif heic hif CACHE INTERNAL "")
- if(NOT TARGET avif)
+ if(NOT libavif_FOUND)
# libheif can handle avif, too
set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} avif CACHE INTERNAL "")
endif()
```
I'll let @TurboGit decide if he wants to commit this to the branch...
P.S. Arch e.g. already patched this in a more minimal way: https://gitlab.archlinux.org/archlinux/packaging/packages/darktable/-/commit/9826742182bf9ebf8c8ea3c51f0545a60bcdec23
--
Reply to this email directly or view it on GitHub:
https://github.com/darktable-org/darktable/pull/15128#issuecomment-1752830715
You are receiving this because you commented.
Message ID: <darktable-org/darktable/pull/15128/c1752830715@github.com>
--==-=-=
Content-Type: text/html; charset=utf-8
<p></p>
<p dir="auto">I think we only need the following CMake change on 4.4.x branch, the source code changes only apply to 4.6:</p>
<pre class="notranslate"><code class="notranslate">diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e3eaa697fe..5cb3bf9fd8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -353,16 +353,22 @@ if(USE_WEBP)
endif(USE_WEBP)
if (USE_AVIF)
- find_package(libavif 0.8.2 CONFIG)
- if (TARGET avif)
- list(APPEND LIBS avif)
- add_definitions(-DHAVE_LIBAVIF=1)
- list(APPEND SOURCES "imageio/imageio_avif.c")
- set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} avif CACHE INTERNAL "")
+ # no version check in config mode because of major only match policy
+ find_package(libavif CONFIG)
+ if (TARGET avif)
+ if(libavif_VERSION VERSION_GREATER_EQUAL 0.8.2)
+ list(APPEND LIBS avif)
+ add_definitions(-DHAVE_LIBAVIF=1)
+ list(APPEND SOURCES "imageio/imageio_avif.c")
+ set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} avif CACHE INTERNAL "")
+ else()
+ set(libavif_FOUND NOTFOUND)
endif()
+ endif()
endif()
if(USE_HEIF)
+ # no version check in config mode because of exact match policy
find_package(libheif CONFIG)
if(NOT TARGET heif)
find_package(libheif 1.13.0 MODULE)
@@ -373,7 +379,7 @@ if(USE_HEIF)
add_definitions(-DHAVE_LIBHEIF=1)
list(APPEND SOURCES "imageio/imageio_heif.c")
set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} heif heic hif CACHE INTERNAL "")
- if(NOT TARGET avif)
+ if(NOT libavif_FOUND)
# libheif can handle avif, too
set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} avif CACHE INTERNAL "")
endif()
</code></pre>
<p dir="auto">I'll let <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/TurboGit/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/TurboGit">@TurboGit</a> decide if he wants to commit this to the branch...</p>
<p dir="auto">P.S. Arch e.g. already patched this in a more minimal way: <a href="https://gitlab.archlinux.org/archlinux/packaging/packages/darktable/-/commit/9826742182bf9ebf8c8ea3c51f0545a60bcdec23" rel="nofollow">https://gitlab.archlinux.org/archlinux/packaging/packages/darktable/-/commit/9826742182bf9ebf8c8ea3c51f0545a60bcdec23</a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/darktable-org/darktable/pull/15128#issuecomment-1752830715">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAANX2JNLJPDXSB7P3BCKG3X6PNV3AVCNFSM6AAAAAA4CQVN2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSHAZTANZRGU">unsubscribe</a>.<br />You are receiving this because you commented.<img src="https://github.com/notifications/beacon/AAANX2ITLE26PP4UOJAYBQTX6PNV3A5CNFSM6AAAAAA4CQVN2KWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTIPIJPW.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><darktable-org/darktable/pull/15128/c1752830715</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/darktable-org/darktable/pull/15128#issuecomment-1752830715",
"url": "https://github.com/darktable-org/darktable/pull/15128#issuecomment-1752830715",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
--==-=-=--
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#1053661: darktable: no longer detects libavif Sebastian Ramacher <sramacher@debian.org> - 2023-10-08 10:30 +0200 Bug#1053661: darktable: no longer detects libavif David Bremner <david@tethera.net> - 2023-10-09 12:30 +0200 Bug#1053661: [Miloš Komarčević] Re: [darktable-org/darktable] imageio: adjust for libavif 1.0.0 API change (PR #15128) David Bremner <david@tethera.net> - 2023-10-09 14:30 +0200
csiph-web