From 3e6541c7933ea2b9328c59134f9203279eb77020 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Mon, 3 Apr 2023 12:33:05 +0300 Subject: [PATCH 01/14] add agg --- recipes/agg/all/conandata.yml | 4 + recipes/agg/all/conanfile.py | 137 ++++++++++++++++++ recipes/agg/all/test_package/CMakeLists.txt | 10 ++ recipes/agg/all/test_package/conanfile.py | 29 ++++ recipes/agg/all/test_package/test_package.cpp | 10 ++ .../agg/all/test_v1_package/CMakeLists.txt | 8 + recipes/agg/all/test_v1_package/conanfile.py | 17 +++ recipes/agg/config.yml | 3 + 8 files changed, 218 insertions(+) create mode 100644 recipes/agg/all/conandata.yml create mode 100644 recipes/agg/all/conanfile.py create mode 100644 recipes/agg/all/test_package/CMakeLists.txt create mode 100644 recipes/agg/all/test_package/conanfile.py create mode 100644 recipes/agg/all/test_package/test_package.cpp create mode 100644 recipes/agg/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/agg/all/test_v1_package/conanfile.py create mode 100644 recipes/agg/config.yml diff --git a/recipes/agg/all/conandata.yml b/recipes/agg/all/conandata.yml new file mode 100644 index 0000000000000..b86ea1ee30a08 --- /dev/null +++ b/recipes/agg/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.6.0": + url: "https://github.com/aggeom/agg-2.6/archive/3ee3b4bdb68fabfa0dbfb62a8adc3953c507e4e2.tar.gz" + sha256: a1b360925a9de2af3f31f6025bd6c1b3bcb7ab3bcf58f6082cb3897441b2f679 diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py new file mode 100644 index 0000000000000..ea3fbc6b5625f --- /dev/null +++ b/recipes/agg/all/conanfile.py @@ -0,0 +1,137 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.errors import ConanInvalidConfiguration + +import os + +required_conan_version = ">=1.52.0" + +class AggConan(ConanFile): + name = 'agg' + version = '2.6.0' + description = 'AGG Anti-Grain Geometry Library' + topics = ('graphics') + url = 'https://github.com/aggeom/agg-2.6' + homepage = 'https://github.com/aggeom' + license = 'BSD-3-Clause' + + settings = 'os', 'arch', 'compiler', 'build_type' + options = { + 'shared': [True, False], + 'fPIC': [True, False], + 'with_gpc': [True, False], + 'with_freetype': [True, False], + 'with_agg2d': [True, False], + 'with_agg2d_freetype': [True, False], + 'with_platform': [True, False], + 'with_controls': [True, False], + } + + default_options = { + 'shared': False, + 'fPIC': True, + 'with_gpc': True, + 'with_freetype': True, + 'with_agg2d': True, + 'with_agg2d_freetype': True, + 'with_platform': True, + 'with_controls': True, + } + + def validate(self): + if self.settings.os != "Windows" or self.settings.os != "Linux": + raise ConanInvalidConfiguration("Unsupported os") + if self.settings.options.shared: + raise ConanInvalidConfiguration("Invalid configuration") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def configure(self): + if self.options.shared: + del self.options.fPIC + + def layout(self): + cmake_layout(self) + + def requirements(self): + if self.options.with_freetype: + self.requires('freetype/2.13.0') + if self.options.with_platform and self.settings.os in ["Linux"]: + self.requires("xorg/system") + + def generate(self): + tc = CMakeToolchain(self) + tc.variables['agg_USE_EXPAT'] = False + tc.variables['agg_USE_SDL_PLATFORM'] = False + tc.variables['agg_BUILD_DEMO'] = False + tc.variables['agg_BUILD_EXAMPLES'] = False + + tc.variables['agg_USE_GPC'] = self.options.with_gpc + tc.variables['agg_USE_FREETYPE'] = self.options.with_freetype + tc.variables['agg_USE_AGG2D'] = self.options.with_agg2d + tc.variables['agg_USE_AGG2D_FREETYPE'] = self.options.with_agg2d_freetype + tc.variables['agg_BUILD_PLATFORM'] = self.options.with_platform + tc.variables['agg_BUILD_CONTROLS'] = self.options.with_controls + + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, src=self.source_folder, pattern='LICENSE', dst='licenses') + cmake = CMake(self) + cmake.configure() + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + + self.cpp_info.set_property("cmake_file_name", "agg") + + lib_suffix = "d" if self.settings.build_type == "Debug" and self.options.debug_suffix else "" + + self.cpp_info.components["agg"].set_property("cmake_target_name", "agg::agg") + self.cpp_info.components["agg"].libs = ["agg" + lib_suffix] + self.cpp_info.components["agg"].includedirs = [os.path.join("include", "agg")] + + if self.options.with_freetype: + self.cpp_info.components["fontfreetype"].set_property("cmake_target_name", "agg::fontfreetype") + self.cpp_info.components["fontfreetype"].libs = ["aggfontfreetype" + lib_suffix] + self.cpp_info.components["fontfreetype"].includedirs = [os.path.join("include", "agg","fontfreetype")] + self.cpp_info.components["2d"].requires = ["agg"] + + if self.options.with_gpc: + self.cpp_info.components["gpc"].set_property("cmake_target_name", "agg::gpc") + self.cpp_info.components["gpc"].libs = [ "agggpc" + lib_suffix] + self.cpp_info.components["gpc"].includedirs = [os.path.join("include", "agg","gpc")] + + + if self.options.with_agg2d: + self.cpp_info.components["2d"].set_property("cmake_target_name", "agg::2d") + self.cpp_info.components["2d"].libs = ["agg2d" + lib_suffix] + self.cpp_info.components["2d"].includedirs = [os.path.join("include", "agg","2d")] + self.cpp_info.components["2d"].requires = ["agg"] + if self.options.with_agg2d_freetype: + self.cpp_info.components["2d"].requires = ["agg", "fontfreetype"] + + if self.options.with_platform: + + self.cpp_info.components["platform"].set_property("cmake_target_name", "agg::platform") + self.cpp_info.components["platform"].libs = ["aggplatform" + lib_suffix] + self.cpp_info.components["platform"].includedirs = [os.path.join("include", "agg","platform")] + if self.settings.os in ["Linux"]: + self.cpp_info.components["platform"].requires = ["xorg::xorg", "agg"] + + if self.options.with_controls: + self.cpp_info.components["controls"].set_property("cmake_target_name", "agg::controls") + self.cpp_info.components["controls"].libs = ["aggctrl" + lib_suffix] + self.cpp_info.components["controls"].includedirs = [os.path.join("include", "agg","ctrl")] + self.cpp_info.components["controls"].requires = ["agg"] \ No newline at end of file diff --git a/recipes/agg/all/test_package/CMakeLists.txt b/recipes/agg/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5c9ab68de09d8 --- /dev/null +++ b/recipes/agg/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(agg REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE agg::agg agg::platform ) + +set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) diff --git a/recipes/agg/all/test_package/conanfile.py b/recipes/agg/all/test_package/conanfile.py new file mode 100644 index 0000000000000..6d529581ba2f5 --- /dev/null +++ b/recipes/agg/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/agg/all/test_package/test_package.cpp b/recipes/agg/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8fd51b67e8648 --- /dev/null +++ b/recipes/agg/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include +#include +enum flip_y_e { flip_y = true }; + +int agg_main(int argc, char* argv[]) { + agg::platform_support app(agg::pix_format_bgr24, flip_y); + app.caption("AGG Example. Anti-Aliasing Demo"); + + return 0; +} diff --git a/recipes/agg/all/test_v1_package/CMakeLists.txt b/recipes/agg/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..0d20897301b68 --- /dev/null +++ b/recipes/agg/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +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) diff --git a/recipes/agg/all/test_v1_package/conanfile.py b/recipes/agg/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/agg/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + 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) diff --git a/recipes/agg/config.yml b/recipes/agg/config.yml new file mode 100644 index 0000000000000..c12a20776f439 --- /dev/null +++ b/recipes/agg/config.yml @@ -0,0 +1,3 @@ +versions: + "2.6.0": + folder: "all" From 60e0b11a828420744251ddb147f2d05c7f6faad6 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Mon, 3 Apr 2023 12:46:59 +0300 Subject: [PATCH 02/14] linter fixes --- recipes/agg/all/conanfile.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index ea3fbc6b5625f..91fe6d81b0981 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -9,7 +9,6 @@ class AggConan(ConanFile): name = 'agg' - version = '2.6.0' description = 'AGG Anti-Grain Geometry Library' topics = ('graphics') url = 'https://github.com/aggeom/agg-2.6' @@ -40,9 +39,9 @@ class AggConan(ConanFile): } def validate(self): - if self.settings.os != "Windows" or self.settings.os != "Linux": + if self.settings.os == "Macos": raise ConanInvalidConfiguration("Unsupported os") - if self.settings.options.shared: + if self.options.shared: raise ConanInvalidConfiguration("Invalid configuration") def source(self): @@ -53,7 +52,7 @@ def configure(self): del self.options.fPIC def layout(self): - cmake_layout(self) + cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_freetype: From 84796e87b5613920fdefbc7fdc0aefa48cdeb0b4 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Mon, 3 Apr 2023 13:17:32 +0300 Subject: [PATCH 03/14] linter fixes --- recipes/agg/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index 91fe6d81b0981..dcd20ffa22a56 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -11,7 +11,7 @@ class AggConan(ConanFile): name = 'agg' description = 'AGG Anti-Grain Geometry Library' topics = ('graphics') - url = 'https://github.com/aggeom/agg-2.6' + url = "https://github.com/conan-io/conan-center-index" homepage = 'https://github.com/aggeom' license = 'BSD-3-Clause' @@ -133,4 +133,4 @@ def package_info(self): self.cpp_info.components["controls"].set_property("cmake_target_name", "agg::controls") self.cpp_info.components["controls"].libs = ["aggctrl" + lib_suffix] self.cpp_info.components["controls"].includedirs = [os.path.join("include", "agg","ctrl")] - self.cpp_info.components["controls"].requires = ["agg"] \ No newline at end of file + self.cpp_info.components["controls"].requires = ["agg"] From 090804a53b4963655b25319cc7fd0ba136f94d63 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Mon, 3 Apr 2023 13:36:20 +0300 Subject: [PATCH 04/14] fix requires --- recipes/agg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index dcd20ffa22a56..54b590f483c2f 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -105,7 +105,7 @@ def package_info(self): self.cpp_info.components["fontfreetype"].set_property("cmake_target_name", "agg::fontfreetype") self.cpp_info.components["fontfreetype"].libs = ["aggfontfreetype" + lib_suffix] self.cpp_info.components["fontfreetype"].includedirs = [os.path.join("include", "agg","fontfreetype")] - self.cpp_info.components["2d"].requires = ["agg"] + self.cpp_info.components["fontfreetype"].requires = ["agg", "freetype::freetype"] if self.options.with_gpc: self.cpp_info.components["gpc"].set_property("cmake_target_name", "agg::gpc") From 0570aa3f59260c9449ca00b49e20bfffa4b27b85 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 3 Apr 2023 15:32:36 +0300 Subject: [PATCH 05/14] Update conanfile.py add copying --- recipes/agg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index 54b590f483c2f..f810c94019cfc 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -85,7 +85,7 @@ def build(self): cmake.build() def package(self): - copy(self, src=self.source_folder, pattern='LICENSE', dst='licenses') + copy(self, src=self.source_folder, pattern='copying', dst='licenses') cmake = CMake(self) cmake.configure() cmake.install() From d218751550d775fac2f28889790deb27793d3aff Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 4 Apr 2023 11:33:53 +0300 Subject: [PATCH 06/14] fix copying --- recipes/agg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index f810c94019cfc..68d76e896d887 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -85,7 +85,7 @@ def build(self): cmake.build() def package(self): - copy(self, src=self.source_folder, pattern='copying', dst='licenses') + copy(self, "copying", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.configure() cmake.install() From 6bdf926c8e5ec48cd402a0f30d9de58c70819919 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 4 Apr 2023 12:24:59 +0300 Subject: [PATCH 07/14] fix debug suffix --- recipes/agg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index 68d76e896d887..6543cc0c593a1 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -95,7 +95,7 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "agg") - lib_suffix = "d" if self.settings.build_type == "Debug" and self.options.debug_suffix else "" + lib_suffix = "d" if self.settings.build_type == "Debug" else "" self.cpp_info.components["agg"].set_property("cmake_target_name", "agg::agg") self.cpp_info.components["agg"].libs = ["agg" + lib_suffix] From 97b4cb9729d968484d1b970433dde741a69d58fb Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 4 Apr 2023 13:04:57 +0300 Subject: [PATCH 08/14] remove suffix --- recipes/agg/all/conanfile.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index 6543cc0c593a1..328fc71f238cc 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -39,8 +39,8 @@ class AggConan(ConanFile): } def validate(self): - if self.settings.os == "Macos": - raise ConanInvalidConfiguration("Unsupported os") + if self.settings.os not in ("Windows", "Linux"): + raise ConanInvalidConfiguration("OS is not supported") if self.options.shared: raise ConanInvalidConfiguration("Invalid configuration") @@ -95,27 +95,25 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "agg") - lib_suffix = "d" if self.settings.build_type == "Debug" else "" - self.cpp_info.components["agg"].set_property("cmake_target_name", "agg::agg") - self.cpp_info.components["agg"].libs = ["agg" + lib_suffix] + self.cpp_info.components["agg"].libs = ["agg"] self.cpp_info.components["agg"].includedirs = [os.path.join("include", "agg")] if self.options.with_freetype: self.cpp_info.components["fontfreetype"].set_property("cmake_target_name", "agg::fontfreetype") - self.cpp_info.components["fontfreetype"].libs = ["aggfontfreetype" + lib_suffix] + self.cpp_info.components["fontfreetype"].libs = ["aggfontfreetype"] self.cpp_info.components["fontfreetype"].includedirs = [os.path.join("include", "agg","fontfreetype")] self.cpp_info.components["fontfreetype"].requires = ["agg", "freetype::freetype"] if self.options.with_gpc: self.cpp_info.components["gpc"].set_property("cmake_target_name", "agg::gpc") - self.cpp_info.components["gpc"].libs = [ "agggpc" + lib_suffix] + self.cpp_info.components["gpc"].libs = [ "agggpc"] self.cpp_info.components["gpc"].includedirs = [os.path.join("include", "agg","gpc")] if self.options.with_agg2d: self.cpp_info.components["2d"].set_property("cmake_target_name", "agg::2d") - self.cpp_info.components["2d"].libs = ["agg2d" + lib_suffix] + self.cpp_info.components["2d"].libs = ["agg2d"] self.cpp_info.components["2d"].includedirs = [os.path.join("include", "agg","2d")] self.cpp_info.components["2d"].requires = ["agg"] if self.options.with_agg2d_freetype: @@ -124,13 +122,13 @@ def package_info(self): if self.options.with_platform: self.cpp_info.components["platform"].set_property("cmake_target_name", "agg::platform") - self.cpp_info.components["platform"].libs = ["aggplatform" + lib_suffix] + self.cpp_info.components["platform"].libs = ["aggplatform"] self.cpp_info.components["platform"].includedirs = [os.path.join("include", "agg","platform")] if self.settings.os in ["Linux"]: self.cpp_info.components["platform"].requires = ["xorg::xorg", "agg"] if self.options.with_controls: self.cpp_info.components["controls"].set_property("cmake_target_name", "agg::controls") - self.cpp_info.components["controls"].libs = ["aggctrl" + lib_suffix] + self.cpp_info.components["controls"].libs = ["aggctrl"] self.cpp_info.components["controls"].includedirs = [os.path.join("include", "agg","ctrl")] self.cpp_info.components["controls"].requires = ["agg"] From 135ee5e815086e39cab809678ef2b6e8ae04b425 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 4 Apr 2023 15:32:47 +0300 Subject: [PATCH 09/14] fix fpic --- recipes/agg/all/conanfile.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index 328fc71f238cc..4f60098089611 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -44,13 +44,17 @@ def validate(self): if self.options.shared: raise ConanInvalidConfiguration("Invalid configuration") - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC def configure(self): if self.options.shared: del self.options.fPIC + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + def layout(self): cmake_layout(self, src_folder="src") From 292d1a5022ae19dbbb7ebc08ae4b54308843cf20 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 4 Apr 2023 16:39:25 +0300 Subject: [PATCH 10/14] fix fpic for v2 --- recipes/agg/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index 4f60098089611..4d3717955cbcf 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -49,8 +49,10 @@ def config_options(self): del self.options.fPIC def configure(self): - if self.options.shared: + try: del self.options.fPIC + except Exception: + pass def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From bf941860862dfb0d6d061b81a3891a638f98cdb5 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 14 Apr 2023 10:04:31 +0000 Subject: [PATCH 11/14] Apply suggestions from code review Co-authored-by: Chris Mc --- recipes/agg/all/conanfile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index 4d3717955cbcf..d39198584ddd0 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -5,7 +5,7 @@ import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class AggConan(ConanFile): name = 'agg' @@ -49,10 +49,7 @@ def config_options(self): del self.options.fPIC def configure(self): - try: - del self.options.fPIC - except Exception: - pass + self.options.sm_safe("fPIC") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 53c000ab110ae6c3922b8e0e343bb4ca8d0c83ef Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 14 Apr 2023 11:26:22 +0000 Subject: [PATCH 12/14] misprint --- recipes/agg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/agg/all/conanfile.py b/recipes/agg/all/conanfile.py index d39198584ddd0..cefaf544a6bf1 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/agg/all/conanfile.py @@ -49,7 +49,7 @@ def config_options(self): del self.options.fPIC def configure(self): - self.options.sm_safe("fPIC") + self.options.rm_safe("fPIC") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From c9b0cb78dd076b4366debcdb748c6d2681265257 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Wed, 3 May 2023 11:24:17 +0300 Subject: [PATCH 13/14] rename package with author prefix and move to tag 2.6.1 --- recipes/agg/all/conandata.yml | 4 ---- recipes/aggeom-agg/all/conandata.yml | 4 ++++ recipes/{agg => aggeom-agg}/all/conanfile.py | 2 +- recipes/{agg => aggeom-agg}/all/test_package/CMakeLists.txt | 0 recipes/{agg => aggeom-agg}/all/test_package/conanfile.py | 0 recipes/{agg => aggeom-agg}/all/test_package/test_package.cpp | 0 .../{agg => aggeom-agg}/all/test_v1_package/CMakeLists.txt | 0 recipes/{agg => aggeom-agg}/all/test_v1_package/conanfile.py | 0 recipes/{agg => aggeom-agg}/config.yml | 2 +- 9 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 recipes/agg/all/conandata.yml create mode 100644 recipes/aggeom-agg/all/conandata.yml rename recipes/{agg => aggeom-agg}/all/conanfile.py (99%) rename recipes/{agg => aggeom-agg}/all/test_package/CMakeLists.txt (100%) rename recipes/{agg => aggeom-agg}/all/test_package/conanfile.py (100%) rename recipes/{agg => aggeom-agg}/all/test_package/test_package.cpp (100%) rename recipes/{agg => aggeom-agg}/all/test_v1_package/CMakeLists.txt (100%) rename recipes/{agg => aggeom-agg}/all/test_v1_package/conanfile.py (100%) rename recipes/{agg => aggeom-agg}/config.yml (71%) diff --git a/recipes/agg/all/conandata.yml b/recipes/agg/all/conandata.yml deleted file mode 100644 index b86ea1ee30a08..0000000000000 --- a/recipes/agg/all/conandata.yml +++ /dev/null @@ -1,4 +0,0 @@ -sources: - "2.6.0": - url: "https://github.com/aggeom/agg-2.6/archive/3ee3b4bdb68fabfa0dbfb62a8adc3953c507e4e2.tar.gz" - sha256: a1b360925a9de2af3f31f6025bd6c1b3bcb7ab3bcf58f6082cb3897441b2f679 diff --git a/recipes/aggeom-agg/all/conandata.yml b/recipes/aggeom-agg/all/conandata.yml new file mode 100644 index 0000000000000..8b26697b0ef0d --- /dev/null +++ b/recipes/aggeom-agg/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.6.1": + url: "https://github.com/aggeom/agg-2.6/archive/refs/tags/agg-2.6.1.tar.gz" + sha256: 685966f880f1c2aae19479b60525fafba8cbd88e4c62d1947767780df8f6a3d0 diff --git a/recipes/agg/all/conanfile.py b/recipes/aggeom-agg/all/conanfile.py similarity index 99% rename from recipes/agg/all/conanfile.py rename to recipes/aggeom-agg/all/conanfile.py index cefaf544a6bf1..3cebe598229bf 100644 --- a/recipes/agg/all/conanfile.py +++ b/recipes/aggeom-agg/all/conanfile.py @@ -8,7 +8,7 @@ required_conan_version = ">=1.53.0" class AggConan(ConanFile): - name = 'agg' + name = 'aggeom-agg' description = 'AGG Anti-Grain Geometry Library' topics = ('graphics') url = "https://github.com/conan-io/conan-center-index" diff --git a/recipes/agg/all/test_package/CMakeLists.txt b/recipes/aggeom-agg/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/agg/all/test_package/CMakeLists.txt rename to recipes/aggeom-agg/all/test_package/CMakeLists.txt diff --git a/recipes/agg/all/test_package/conanfile.py b/recipes/aggeom-agg/all/test_package/conanfile.py similarity index 100% rename from recipes/agg/all/test_package/conanfile.py rename to recipes/aggeom-agg/all/test_package/conanfile.py diff --git a/recipes/agg/all/test_package/test_package.cpp b/recipes/aggeom-agg/all/test_package/test_package.cpp similarity index 100% rename from recipes/agg/all/test_package/test_package.cpp rename to recipes/aggeom-agg/all/test_package/test_package.cpp diff --git a/recipes/agg/all/test_v1_package/CMakeLists.txt b/recipes/aggeom-agg/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/agg/all/test_v1_package/CMakeLists.txt rename to recipes/aggeom-agg/all/test_v1_package/CMakeLists.txt diff --git a/recipes/agg/all/test_v1_package/conanfile.py b/recipes/aggeom-agg/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/agg/all/test_v1_package/conanfile.py rename to recipes/aggeom-agg/all/test_v1_package/conanfile.py diff --git a/recipes/agg/config.yml b/recipes/aggeom-agg/config.yml similarity index 71% rename from recipes/agg/config.yml rename to recipes/aggeom-agg/config.yml index c12a20776f439..cfb13334b8b03 100644 --- a/recipes/agg/config.yml +++ b/recipes/aggeom-agg/config.yml @@ -1,3 +1,3 @@ versions: - "2.6.0": + "2.6.1": folder: "all" From 134e59f0b440b1bd9ba1d2f04d7dedded21a81e3 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Mon, 8 May 2023 15:57:52 +0300 Subject: [PATCH 14/14] fix package name --- recipes/aggeom-agg/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/aggeom-agg/all/conanfile.py b/recipes/aggeom-agg/all/conanfile.py index 3cebe598229bf..55a67e88a5f75 100644 --- a/recipes/aggeom-agg/all/conanfile.py +++ b/recipes/aggeom-agg/all/conanfile.py @@ -97,6 +97,10 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "agg") + self.cpp_info.filenames["cmake_find_package"]="agg" + self.cpp_info.filenames["cmake_find_package_multi"]="agg" + self.cpp_info.names["cmake_find_package"]="agg" + self.cpp_info.names["cmake_find_package_multi"]="agg" self.cpp_info.components["agg"].set_property("cmake_target_name", "agg::agg") self.cpp_info.components["agg"].libs = ["agg"]