Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk: migrate to Conan v2 #21123

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 7 additions & 35 deletions recipes/gtk/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,13 @@
sources:
"4.14.3":
url: "https://download.gnome.org/sources/gtk/4.14/gtk-4.14.3.tar.xz"
sha256: "2be5c858bdef1104d37848c9779c089372c8d31503f6efc4b94e53b546fc9a43"
"4.7.0":
sha256: "913fcd9d065efb348723e18c3b9113e23b92072e927ebd2f61d32745c8228b94"
url: "https://download.gnome.org/sources/gtk/4.7/gtk-4.7.0.tar.xz"
"4.6.2":
url: "https://download.gnome.org/sources/gtk/4.6/gtk-4.6.2.tar.xz"
sha256: "ff263af609a50eb76056653592d929459aef4819a444c436f6d52c6f63c1faec"
"4.4.0":
url: "https://download.gnome.org/sources/gtk/4.4/gtk-4.4.0.tar.xz"
sha256: "e0a1508f441686c3a20dfec48af533b19a4b2e017c18eaee31dccdb7d292505b"
"4.3.2":
url: "https://download.gnome.org/sources/gtk/4.3/gtk-4.3.2.tar.xz"
sha256: "20639bb2be8b9f58304f14480e3d957abd2c9fa3f671bb7e05193f9a8389d93f"
"4.2.1":
url: "https://download.gnome.org/sources/gtk/4.2/gtk-4.2.1.tar.xz"
sha256: "023169775de43f0a1fde066fbc19d78545ea6a7562c1915abde9b8ae4a7309e6"
"4.1.2":
url: "https://download.gnome.org/sources/gtk/4.1/gtk-4.1.2.tar.xz"
sha256: "33407da437c5e5ac09e7a463ba3bd025da3d80ba1953b8bbe2bce97dd2609677"
"4.0.2":
url: "https://download.gnome.org/sources/gtk/4.0/gtk-4.0.2.tar.xz"
sha256: "626707ac6751426ed76fed49c5b2d052dfee45757ce3827088ba87ca7f1dbc84"
sha256: "913fcd9d065efb348723e18c3b9113e23b92072e927ebd2f61d32745c8228b94"
"3.24.41":
url: "https://download.gnome.org/sources/gtk+/3.24/gtk+-3.24.41.tar.xz"
sha256: "47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa"
"3.24.24":
url: "https://download.gnome.org/sources/gtk+/3.24/gtk+-3.24.24.tar.xz"
sha256: "cc9d4367c55b724832f6b09ab85481738ea456871f0381768a6a99335a98378a"
patches:
"4.4.0":
- patch_file: "patches/0001-fix-UAC-manifest-rc.patch"
base_path: "source_subfolder"
- patch_file: "patches/0002-fix-version-resource-for-Windows-11-sdk.patch"
base_path: "source_subfolder"
"4.3.2":
- patch_file: "patches/0001-fix-UAC-manifest-rc.patch"
base_path: "source_subfolder"
- patch_file: "patches/0002-fix-version-resource-for-Windows-11-sdk.patch"
base_path: "source_subfolder"
"4.2.1":
- patch_file: "patches/0001-fix-UAC-manifest-rc.patch"
base_path: "source_subfolder"
- patch_file: "patches/0002-fix-version-resource-for-Windows-11-sdk.patch"
base_path: "source_subfolder"
282 changes: 138 additions & 144 deletions recipes/gtk/all/conanfile.py

Large diffs are not rendered by default.

36 changes: 0 additions & 36 deletions recipes/gtk/all/patches/0001-fix-UAC-manifest-rc.patch

This file was deleted.

This file was deleted.

10 changes: 4 additions & 6 deletions recipes/gtk/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.1)
project(test_package)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C)


include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
find_package(gtk REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.c)
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
target_link_libraries(${PROJECT_NAME} PRIVATE gtk::gtk)
21 changes: 15 additions & 6 deletions recipes/gtk/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
from conans import ConanFile, CMake, tools
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
test_type = "explicit"

def requirements(self):
self.requires(self.tested_reference_str)

def layout(self):
cmake_layout(self)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
8 changes: 8 additions & 0 deletions recipes/gtk/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.15)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/
${CMAKE_CURRENT_BINARY_DIR}/test_package/)
17 changes: 17 additions & 0 deletions recipes/gtk/all/test_v1_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from conans import ConanFile, CMake, tools
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package_multi"

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
28 changes: 10 additions & 18 deletions recipes/gtk/config.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
versions:
"system":
folder: "system"
"4.7.0":
folder: all
"4.6.2":
folder: all
"4.4.0":
folder: all
"4.3.2":
folder: all
"4.2.1":
folder: all
"4.1.2":
folder: all
"4.0.2":
folder: all
"3.24.24":
folder: all
"system":
folder: "system"
"4.14.3":
folder: all
"4.7.0":
folder: all
"3.24.41":
folder: all
"3.24.24":
folder: all
Loading