Skip to content

Commit

Permalink
sdl_image: add v2.8.2 (#25991)
Browse files Browse the repository at this point in the history
  • Loading branch information
kambala-decapitator authored Nov 25, 2024
1 parent fe08d45 commit 1a2e1ea
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
9 changes: 9 additions & 0 deletions recipes/sdl_image/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
sources:
"2.8.2":
url: "https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-2.8.2.tar.gz"
sha256: "8f486bbfbcf8464dd58c9e5d93394ab0255ce68b51c5a966a918244820a76ddc"
"2.6.3":
url: "https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.3/SDL2_image-2.6.3.tar.gz"
sha256: "931c9be5bf1d7c8fae9b7dc157828b7eee874e23c7f24b44ba7eff6b4836312c"
"2.0.5":
url: "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.5.tar.gz"
sha256: "bdd5f6e026682f7d7e1be0b6051b209da2f402a2dd8bd1c4bd9c25ad263108d0"
patches:
"2.8.2":
- patch_description: "Fix webpdemux cmake target name"
patch_file: "patches/webpdemux-target.patch"
patch_source: "https://github.com/libsdl-org/SDL_image/pull/479"
patch_type: "portability"
7 changes: 6 additions & 1 deletion recipes/sdl_image/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from conan.errors import ConanInvalidConfiguration
from conan.tools.apple import is_apple_os
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import copy, get, rmdir
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.scm import Version
import os

Expand Down Expand Up @@ -67,6 +67,7 @@ class SDLImageConan(ConanFile):
}

def export_sources(self):
export_conandata_patches(self)
if Version(self.version) < "2.6":
copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder)

Expand Down Expand Up @@ -119,8 +120,12 @@ def build_requirements(self):
if Version(self.version) >= "2.6":
self.tool_requires("cmake/[>=3.16 <4]")

def _patch_sources(self):
apply_conandata_patches(self)

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
self._patch_sources()

def generate(self):
tc = CMakeToolchain(self)
Expand Down
23 changes: 23 additions & 0 deletions recipes/sdl_image/all/patches/webpdemux-target.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 35e3cb865f8394bdc8bb2d2cf6e9f91dfd3c94bd Mon Sep 17 00:00:00 2001
From: Andrey Filipenkov <[email protected]>
Date: Sat, 23 Nov 2024 00:47:15 +0300
Subject: [PATCH] fix name case of webpdemux target

(cherry picked from commit 0d418a2a2dc562699854d9c2fc264304ec404e2c)
---
cmake/Findwebp.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/Findwebp.cmake b/cmake/Findwebp.cmake
index 58891318..e07b377c 100644
--- a/cmake/Findwebp.cmake
+++ b/cmake/Findwebp.cmake
@@ -43,7 +43,7 @@ if (webp_FOUND)
INTERFACE_LINK_FLAGS "${webp_LINK_FLAGS}"
)
endif()
- if (NOT TARGET WEBP::webpdemux)
+ if (NOT TARGET WebP::webpdemux)
add_library(WebP::webpdemux UNKNOWN IMPORTED)
set_target_properties(WebP::webpdemux PROPERTIES
IMPORTED_LOCATION "${webpdemux_LIBRARY}"
2 changes: 2 additions & 0 deletions recipes/sdl_image/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.8.2":
folder: "all"
"2.6.3":
folder: "all"
"2.0.5":
Expand Down

0 comments on commit 1a2e1ea

Please sign in to comment.