Compare commits
	
		
			34 Commits
		
	
	
		
			ab4b1a8202
			...
			f1c3a2dc15
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f1c3a2dc15 | |||
| 91a339e086 | |||
| 47f39a851b | |||
| 0bd0d9b2ba | |||
| 8d943b199e | |||
| b8ed6c8f6c | |||
| cbe26696c0 | |||
| 5323a66b9d | |||
| 696469c49a | |||
| 2cd2651c10 | |||
| b8b001ebb6 | |||
| 87bf56d70a | |||
| 7026ce1c40 | |||
| da749af80e | |||
| 48367f6c6b | |||
| c45516ad8e | |||
| 06c8dbc79b | |||
| 4ab521cf9f | |||
| 2fbd9faa87 | |||
| cab77497c1 | |||
| 9761196edf | |||
| ad2652a1bd | |||
| 17899a42a5 | |||
| 37ff0b9b72 | |||
| d5d53de9ef | |||
| aa287b29bd | |||
| 9d5ccfa930 | |||
| 4e33343447 | |||
| 75e7c121b4 | |||
| 46e4195d1a | |||
| 7e4f63f99e | |||
| c33b6099f1 | |||
| bc5a94aa3d | |||
| 87a934a722 | 
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -3,3 +3,5 @@ tmp/
 | 
				
			|||||||
upload.*
 | 
					upload.*
 | 
				
			||||||
.idea/
 | 
					.idea/
 | 
				
			||||||
build_tmp.py
 | 
					build_tmp.py
 | 
				
			||||||
 | 
					__pycache__
 | 
				
			||||||
 | 
					conanfile-old.py
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
from conans import ConanFile, tools
 | 
					from conan import ConanFile
 | 
				
			||||||
from conans.tools import os_info
 | 
					from conan.tools.files import get, collect_libs, copy
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class GcConan(ConanFile):
 | 
					class GcConan(ConanFile):
 | 
				
			||||||
    name = "cg-toolkit"
 | 
					    name = "cg-toolkit"
 | 
				
			||||||
@@ -9,23 +9,26 @@ class GcConan(ConanFile):
 | 
				
			|||||||
    settings = "os", "arch"
 | 
					    settings = "os", "arch"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package(self):
 | 
					    def package(self):
 | 
				
			||||||
        self.copy("*.h", src="include", dst="include")
 | 
					        copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder,"include"))
 | 
				
			||||||
        if os_info.is_linux:
 | 
					        if self.settings.os == "Windows":
 | 
				
			||||||
            if self.settings.arch.__contains__('64'):
 | 
					            if '64' in self.settings.arch:
 | 
				
			||||||
                self.copy("*.so", src="lib64", dst="lib", keep_path=False)
 | 
					                #copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include"))
 | 
				
			||||||
 | 
					                copy(self, "*.lib", os.path.join(self.source_folder, "lib64"), os.path.join(self.package_folder,"lib"))
 | 
				
			||||||
 | 
					                copy(self, "*.dll", os.path.join(self.source_folder, "bin64"), os.path.join(self.package_folder,"bin"))
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                self.copy("*.so", src="lib", dst="lib", keep_path=False)
 | 
					                copy(self, "*.lib", os.path.join(self.source_folder, "lib"), os.path.join(self.package_folder,"lib"))
 | 
				
			||||||
 | 
					                copy(self, "*.dll", os.path.join(self.source_folder, "bin"), os.path.join(self.package_folder,"bin"))
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            if self.settings.arch.__contains__('64'):
 | 
					            if '64' in self.settings.arch:
 | 
				
			||||||
                self.copy("*.lib", src="lib64", dst="lib", keep_path=False)
 | 
					                copy(self, "*.so", os.path.join(self.source_folder, "lib64"), os.path.join(self.package_folder,"lib"))
 | 
				
			||||||
                self.copy("*.dll", src="bin64", dst="bin", keep_path=False)
 | 
					 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                self.copy("*.lib", src="lib", dst="lib", keep_path=False)
 | 
					                copy(self, "*.so", os.path.join(self.source_folder, "lib"), os.path.join(self.package_folder,"lib"))
 | 
				
			||||||
                self.copy("*.dll", src="bin", dst="bin", keep_path=False)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.name = "Cg"
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "Cg")
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "Cg::Cg")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "Cg")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "Cg::Cg")
 | 
				
			||||||
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								directx-sdk/all/conandata.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								directx-sdk/all/conandata.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					sources:
 | 
				
			||||||
 | 
					  "9.0":
 | 
				
			||||||
 | 
					    url: "https://cdn.anotherfoxguy.com/DirectX-SDK.zip"
 | 
				
			||||||
 | 
					    sha256: "f73f10c4519f445e1ecc71bcc315c3c9da90f08bacf354e1b3fabba1bacef77d"
 | 
				
			||||||
							
								
								
									
										23
									
								
								directx-sdk/all/conanfile.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								directx-sdk/all/conanfile.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					from conan import ConanFile
 | 
				
			||||||
 | 
					from conan.tools.files import get, copy
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class DxConan(ConanFile):
 | 
				
			||||||
 | 
					    name = "directx-sdk"
 | 
				
			||||||
 | 
					    version = "9.0"
 | 
				
			||||||
 | 
					    author = "Edgar Edgar@AnotherFoxGuy.com"
 | 
				
			||||||
 | 
					    settings = "os", "arch"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def source(self):
 | 
				
			||||||
 | 
					        get(self, **self.conan_data["sources"][self.version])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package(self):
 | 
				
			||||||
 | 
					        copy(self, "*", os.path.join(self.source_folder, "Include"), os.path.join(self.package_folder, "include"))
 | 
				
			||||||
 | 
					        if '64' in self.settings.arch:
 | 
				
			||||||
 | 
					            copy(self, "*", os.path.join(self.source_folder, "Lib/x64"), os.path.join(self.package_folder, "lib"), keep_path=False)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            copy(self, "*", os.path.join(self.source_folder, "lib/x86"), os.path.join(self.package_folder, "lib"), keep_path=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package_info(self):
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "DirectX9")
 | 
				
			||||||
 | 
					        self.cpp_info.libs = ["d3d9", "d3dx9", "dxguid"]
 | 
				
			||||||
							
								
								
									
										3
									
								
								directx-sdk/config.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								directx-sdk/config.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					versions:
 | 
				
			||||||
 | 
					  "9.0":
 | 
				
			||||||
 | 
					    folder: all
 | 
				
			||||||
@@ -1,4 +1,6 @@
 | 
				
			|||||||
from conans import ConanFile, CMake, tools
 | 
					from conan import ConanFile
 | 
				
			||||||
 | 
					from conan.tools.files import get, collect_libs
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class DiscordrpcConan(ConanFile):
 | 
					class DiscordrpcConan(ConanFile):
 | 
				
			||||||
@@ -9,12 +11,19 @@ class DiscordrpcConan(ConanFile):
 | 
				
			|||||||
    description = "This is a library for interfacing your game with a locally running Discord desktop client. It's known to work on Windows, macOS, and Linux."
 | 
					    description = "This is a library for interfacing your game with a locally running Discord desktop client. It's known to work on Windows, macOS, and Linux."
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.variables["BUILD_EXAMPLES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
        cmake.definitions['BUILD_EXAMPLES'] = 'OFF'
 | 
					 | 
				
			||||||
        cmake.configure()
 | 
					        cmake.configure()
 | 
				
			||||||
        cmake.build()
 | 
					        cmake.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -23,4 +32,4 @@ class DiscordrpcConan(ConanFile):
 | 
				
			|||||||
        cmake.install()
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								discord-rpc/config.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								discord-rpc/config.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					versions:
 | 
				
			||||||
 | 
					  "3.4.0":
 | 
				
			||||||
 | 
					    folder: all
 | 
				
			||||||
							
								
								
									
										0
									
								
								linter/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								linter/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										28
									
								
								linter/check_import_conanfile.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								linter/check_import_conanfile.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					from pylint.checkers import BaseChecker
 | 
				
			||||||
 | 
					from pylint.interfaces import IAstroidChecker
 | 
				
			||||||
 | 
					from astroid import nodes, Const, AssignName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ImportConanFile(BaseChecker):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					       Import ConanFile from new 'conan' module
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    __implements__ = IAstroidChecker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = "conan-import-conanfile"
 | 
				
			||||||
 | 
					    msgs = {
 | 
				
			||||||
 | 
					        "E9006": (
 | 
				
			||||||
 | 
					            "Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					            "conan-import-conanfile",
 | 
				
			||||||
 | 
					            "Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def visit_importfrom(self, node: nodes.ImportFrom) -> None:
 | 
				
			||||||
 | 
					        basename = node.modname
 | 
				
			||||||
 | 
					        if basename == 'conans':
 | 
				
			||||||
 | 
					            names = [name for name, _ in node.names]
 | 
				
			||||||
 | 
					            if 'ConanFile' in names:
 | 
				
			||||||
 | 
					                self.add_message("conan-import-conanfile", node=node)
 | 
				
			||||||
							
								
								
									
										77
									
								
								linter/check_import_errors.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								linter/check_import_errors.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					from pylint.checkers import BaseChecker
 | 
				
			||||||
 | 
					from pylint.interfaces import IAstroidChecker
 | 
				
			||||||
 | 
					from astroid import nodes, Const, AssignName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ImportErrors(BaseChecker):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					       Import errors from new 'conan' module
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    __implements__ = IAstroidChecker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = "conan-import-errors"
 | 
				
			||||||
 | 
					    msgs = {
 | 
				
			||||||
 | 
					        "E9008": (
 | 
				
			||||||
 | 
					            "Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					            "conan-import-errors",
 | 
				
			||||||
 | 
					            "Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def visit_importfrom(self, node: nodes.ImportFrom) -> None:
 | 
				
			||||||
 | 
					        basename = node.modname
 | 
				
			||||||
 | 
					        if basename == 'conans':
 | 
				
			||||||
 | 
					            names = [name for name, _ in node.names]
 | 
				
			||||||
 | 
					            if 'errors' in names:
 | 
				
			||||||
 | 
					                self.add_message("conan-import-errors", node=node)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ImportErrorsConanException(BaseChecker):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					       Import errors from new 'conan' module
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    __implements__ = IAstroidChecker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = "conan-import-error-conanexception"
 | 
				
			||||||
 | 
					    msgs = {
 | 
				
			||||||
 | 
					        "E9009": (
 | 
				
			||||||
 | 
					            "Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					            "conan-import-error-conanexception",
 | 
				
			||||||
 | 
					            "Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def visit_importfrom(self, node: nodes.ImportFrom) -> None:
 | 
				
			||||||
 | 
					        basename = node.modname
 | 
				
			||||||
 | 
					        if basename == 'conans.errors':
 | 
				
			||||||
 | 
					            names = [name for name, _ in node.names]
 | 
				
			||||||
 | 
					            if 'ConanException' in names:
 | 
				
			||||||
 | 
					                self.add_message("conan-import-error-conanexception", node=node)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ImportErrorsConanInvalidConfiguration(BaseChecker):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					       Import errors from new 'conan' module
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    __implements__ = IAstroidChecker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = "conan-import-error-conaninvalidconfiguration"
 | 
				
			||||||
 | 
					    msgs = {
 | 
				
			||||||
 | 
					        "E9010": (
 | 
				
			||||||
 | 
					            "Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					            "conan-import-error-conaninvalidconfiguration",
 | 
				
			||||||
 | 
					            "Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.",
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def visit_importfrom(self, node: nodes.ImportFrom) -> None:
 | 
				
			||||||
 | 
					        basename = node.modname
 | 
				
			||||||
 | 
					        if basename == 'conans.errors':
 | 
				
			||||||
 | 
					            names = [name for name, _ in node.names]
 | 
				
			||||||
 | 
					            if 'ConanInvalidConfiguration' in names:
 | 
				
			||||||
 | 
					                self.add_message("conan-import-error-conaninvalidconfiguration", node=node)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										30
									
								
								linter/check_import_tools.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								linter/check_import_tools.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					import re
 | 
				
			||||||
 | 
					from email.mime import base
 | 
				
			||||||
 | 
					from pylint.checkers import BaseChecker
 | 
				
			||||||
 | 
					from pylint.interfaces import IAstroidChecker
 | 
				
			||||||
 | 
					from astroid import nodes, Const, AssignName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ImportTools(BaseChecker):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					       Import tools following pattern 'from conan.tools.xxxx import yyyyy'
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    __implements__ = IAstroidChecker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = "conan-import-tools"
 | 
				
			||||||
 | 
					    msgs = {
 | 
				
			||||||
 | 
					        "E9011": (
 | 
				
			||||||
 | 
					            "Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).",
 | 
				
			||||||
 | 
					            "conan-import-tools",
 | 
				
			||||||
 | 
					            "Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).",
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def visit_importfrom(self, node: nodes.ImportFrom) -> None:
 | 
				
			||||||
 | 
					        basename = node.modname
 | 
				
			||||||
 | 
					        names = [name for name, _ in node.names]
 | 
				
			||||||
 | 
					        if basename == 'conan' and 'tools' in names:
 | 
				
			||||||
 | 
					            self.add_message("conan-import-tools", node=node)
 | 
				
			||||||
 | 
					        elif re.match(r'conan\.tools\.[^.]+\..+', basename):
 | 
				
			||||||
 | 
					            self.add_message("conan-import-tools", node=node)
 | 
				
			||||||
							
								
								
									
										30
									
								
								linter/check_no_test_package_name.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								linter/check_no_test_package_name.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					from pylint.checkers import BaseChecker
 | 
				
			||||||
 | 
					from pylint.interfaces import IAstroidChecker
 | 
				
			||||||
 | 
					from astroid import nodes, Const, AssignName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class NoPackageName(BaseChecker):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					       Conanfile used for testing a package should NOT provide a name
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    __implements__ = IAstroidChecker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = "conan-test-package-name"
 | 
				
			||||||
 | 
					    msgs = {
 | 
				
			||||||
 | 
					        "E9007": (
 | 
				
			||||||
 | 
					            "No 'name' attribute in test_package conanfile",
 | 
				
			||||||
 | 
					            "conan-test-no-name",
 | 
				
			||||||
 | 
					            "No 'name' attribute in test_package conanfile."
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def visit_classdef(self, node: nodes) -> None:
 | 
				
			||||||
 | 
					        if node.basenames == ['ConanFile']:
 | 
				
			||||||
 | 
					            for attr in node.body:
 | 
				
			||||||
 | 
					                children = list(attr.get_children())
 | 
				
			||||||
 | 
					                if len(children) == 2 and \
 | 
				
			||||||
 | 
					                   isinstance(children[0], AssignName) and \
 | 
				
			||||||
 | 
					                   children[0].name == "name" and \
 | 
				
			||||||
 | 
					                   isinstance(children[1], Const):
 | 
				
			||||||
 | 
					                    self.add_message("conan-test-no-name", node=attr, line=attr.lineno)
 | 
				
			||||||
							
								
								
									
										39
									
								
								linter/check_package_name.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								linter/check_package_name.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
				
			|||||||
 | 
					from pylint.checkers import BaseChecker
 | 
				
			||||||
 | 
					from pylint.interfaces import IAstroidChecker
 | 
				
			||||||
 | 
					from astroid import nodes, Const, AssignName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class PackageName(BaseChecker):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					       All packages must have a lower-case name
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    __implements__ = IAstroidChecker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = "conan-package-name"
 | 
				
			||||||
 | 
					    msgs = {
 | 
				
			||||||
 | 
					        "E9004": (
 | 
				
			||||||
 | 
					            "Reference name should be all lowercase",
 | 
				
			||||||
 | 
					            "conan-bad-name",
 | 
				
			||||||
 | 
					            "Use only lower-case on the package name: `name = 'foobar'`."
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					        "E9005": (
 | 
				
			||||||
 | 
					            "Missing name attribute",
 | 
				
			||||||
 | 
					            "conan-missing-name",
 | 
				
			||||||
 | 
					            "The member attribute `name` must be declared: `name = 'foobar'`."
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def visit_classdef(self, node: nodes) -> None:
 | 
				
			||||||
 | 
					        if node.basenames == ['ConanFile']:
 | 
				
			||||||
 | 
					            for attr in node.body:
 | 
				
			||||||
 | 
					                children = list(attr.get_children())
 | 
				
			||||||
 | 
					                if len(children) == 2 and \
 | 
				
			||||||
 | 
					                   isinstance(children[0], AssignName) and \
 | 
				
			||||||
 | 
					                   children[0].name == "name" and \
 | 
				
			||||||
 | 
					                   isinstance(children[1], Const):
 | 
				
			||||||
 | 
					                    value = children[1].as_string()
 | 
				
			||||||
 | 
					                    if value.lower() != value:
 | 
				
			||||||
 | 
					                        self.add_message("conan-bad-name", node=attr, line=attr.lineno)
 | 
				
			||||||
 | 
					                    return
 | 
				
			||||||
 | 
					            self.add_message("conan-missing-name", node=node)
 | 
				
			||||||
							
								
								
									
										20
									
								
								linter/conanv2_test_transition.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								linter/conanv2_test_transition.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Pylint plugin/rules for test_package folder in Conan Center Index
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from pylint.lint import PyLinter
 | 
				
			||||||
 | 
					from linter.check_import_conanfile import ImportConanFile
 | 
				
			||||||
 | 
					from linter.check_no_test_package_name import NoPackageName
 | 
				
			||||||
 | 
					from linter.check_import_errors import ImportErrorsConanException, ImportErrorsConanInvalidConfiguration, ImportErrors
 | 
				
			||||||
 | 
					from linter.check_import_tools import ImportTools
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def register(linter: PyLinter) -> None:
 | 
				
			||||||
 | 
					    linter.register_checker(NoPackageName(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportConanFile(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportErrors(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportErrorsConanException(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportErrorsConanInvalidConfiguration(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportTools(linter))
 | 
				
			||||||
							
								
								
									
										20
									
								
								linter/conanv2_transition.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								linter/conanv2_transition.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Pylint plugin/rules for conanfiles in Conan Center Index
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from pylint.lint import PyLinter
 | 
				
			||||||
 | 
					from linter.check_package_name import PackageName
 | 
				
			||||||
 | 
					from linter.check_import_conanfile import ImportConanFile
 | 
				
			||||||
 | 
					from linter.check_import_errors import ImportErrorsConanException, ImportErrorsConanInvalidConfiguration, ImportErrors
 | 
				
			||||||
 | 
					from linter.check_import_tools import ImportTools
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def register(linter: PyLinter) -> None:
 | 
				
			||||||
 | 
					    linter.register_checker(PackageName(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportConanFile(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportErrors(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportErrorsConanException(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportErrorsConanInvalidConfiguration(linter))
 | 
				
			||||||
 | 
					    linter.register_checker(ImportTools(linter))
 | 
				
			||||||
							
								
								
									
										30
									
								
								linter/pylintrc_recipe
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								linter/pylintrc_recipe
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					[MASTER]
 | 
				
			||||||
 | 
					load-plugins=linter.conanv2_transition,
 | 
				
			||||||
 | 
					             linter.transform_conanfile,
 | 
				
			||||||
 | 
					             linter.transform_imports
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					py-version=3.6
 | 
				
			||||||
 | 
					recursive=no
 | 
				
			||||||
 | 
					suggestion-mode=yes
 | 
				
			||||||
 | 
					unsafe-load-any-extension=no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[MESSAGES CONTROL]
 | 
				
			||||||
 | 
					disable=fixme,
 | 
				
			||||||
 | 
					        line-too-long,
 | 
				
			||||||
 | 
					        missing-module-docstring,
 | 
				
			||||||
 | 
					        missing-function-docstring,
 | 
				
			||||||
 | 
					        missing-class-docstring,
 | 
				
			||||||
 | 
					        invalid-name,
 | 
				
			||||||
 | 
					        wrong-import-order,  # TODO: Remove
 | 
				
			||||||
 | 
					        import-outside-toplevel  # TODO: Remove
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enable=conan-bad-name,
 | 
				
			||||||
 | 
					       conan-missing-name,
 | 
				
			||||||
 | 
					       conan-import-conanfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[REPORTS]
 | 
				
			||||||
 | 
					evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error) / statement) * 10))
 | 
				
			||||||
 | 
					output-format=text
 | 
				
			||||||
 | 
					reports=no
 | 
				
			||||||
 | 
					score=no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										27
									
								
								linter/pylintrc_testpackage
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								linter/pylintrc_testpackage
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					[MASTER]
 | 
				
			||||||
 | 
					load-plugins=linter.conanv2_test_transition,
 | 
				
			||||||
 | 
					             linter.transform_conanfile,
 | 
				
			||||||
 | 
					             linter.transform_imports
 | 
				
			||||||
 | 
					py-version=3.6
 | 
				
			||||||
 | 
					recursive=no
 | 
				
			||||||
 | 
					suggestion-mode=yes
 | 
				
			||||||
 | 
					unsafe-load-any-extension=no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[MESSAGES CONTROL]
 | 
				
			||||||
 | 
					disable=fixme,
 | 
				
			||||||
 | 
					        line-too-long,
 | 
				
			||||||
 | 
					        missing-module-docstring,
 | 
				
			||||||
 | 
					        missing-function-docstring,
 | 
				
			||||||
 | 
					        missing-class-docstring,
 | 
				
			||||||
 | 
					        invalid-name,
 | 
				
			||||||
 | 
					        wrong-import-order,  # TODO: Remove
 | 
				
			||||||
 | 
					        import-outside-toplevel  # TODO: Remove
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enable=conan-test-no-name,
 | 
				
			||||||
 | 
					       conan-import-conanfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[REPORTS]
 | 
				
			||||||
 | 
					evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error) / statement) * 10))
 | 
				
			||||||
 | 
					output-format=text
 | 
				
			||||||
 | 
					reports=no
 | 
				
			||||||
 | 
					score=no
 | 
				
			||||||
							
								
								
									
										43
									
								
								linter/recipe_linter.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								linter/recipe_linter.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "problemMatcher": [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "owner": "recipe_linter_fatals",
 | 
				
			||||||
 | 
					            "severity": "error",
 | 
				
			||||||
 | 
					            "pattern": [
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    "regexp": "(\\S+):(\\d+): \\[(F\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)",
 | 
				
			||||||
 | 
					                    "file": 1,
 | 
				
			||||||
 | 
					                    "line": 2,
 | 
				
			||||||
 | 
					                    "message": 5,
 | 
				
			||||||
 | 
					                    "code": 3
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "owner": "recipe_linter_errors",
 | 
				
			||||||
 | 
					            "severity": "error",
 | 
				
			||||||
 | 
					            "pattern": [
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    "regexp": "(\\S+):(\\d+): \\[(E\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)",
 | 
				
			||||||
 | 
					                    "file": 1,
 | 
				
			||||||
 | 
					                    "line": 2,
 | 
				
			||||||
 | 
					                    "message": 5,
 | 
				
			||||||
 | 
					                    "code": 3
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "owner": "recipe_linter_warnings",
 | 
				
			||||||
 | 
					            "severity": "warning",
 | 
				
			||||||
 | 
					            "pattern": [
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    "regexp": "(\\S+):(\\d+): \\[(W\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)",
 | 
				
			||||||
 | 
					                    "file": 1,
 | 
				
			||||||
 | 
					                    "line": 2,
 | 
				
			||||||
 | 
					                    "message": 5,
 | 
				
			||||||
 | 
					                    "code": 3
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										74
									
								
								linter/transform_conanfile.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								linter/transform_conanfile.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,74 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					# Class ConanFile doesn't declare all the valid members and functions,
 | 
				
			||||||
 | 
					#   some are injected by Conan dynamically to the class.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import textwrap
 | 
				
			||||||
 | 
					import astroid
 | 
				
			||||||
 | 
					from astroid.builder import AstroidBuilder
 | 
				
			||||||
 | 
					from astroid.manager import AstroidManager
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def _settings_transform():
 | 
				
			||||||
 | 
					    module = AstroidBuilder(AstroidManager()).string_build(
 | 
				
			||||||
 | 
					        textwrap.dedent("""
 | 
				
			||||||
 | 
					            class Settings(object):
 | 
				
			||||||
 | 
					                os = None
 | 
				
			||||||
 | 
					                arch = None
 | 
				
			||||||
 | 
					                compiler = None
 | 
				
			||||||
 | 
					                build_type = None
 | 
				
			||||||
 | 
					            """)
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    return module['Settings']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def _user_info_build_transform():
 | 
				
			||||||
 | 
					    module = AstroidBuilder(AstroidManager()).string_build(
 | 
				
			||||||
 | 
					        textwrap.dedent("""
 | 
				
			||||||
 | 
					            class UserInfoBuild(defaultdict):
 | 
				
			||||||
 | 
					                pass
 | 
				
			||||||
 | 
					            """)
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    return module['UserInfoBuild']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def register(_):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def transform_conanfile(node):
 | 
				
			||||||
 | 
					    """Transform definition of ConanFile class so dynamic fields are visible to pylint"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    str_class = astroid.builtin_lookup("str")
 | 
				
			||||||
 | 
					    dict_class = astroid.builtin_lookup("dict")
 | 
				
			||||||
 | 
					    info_class = astroid.MANAGER.ast_from_module_name("conans.model.info").lookup(
 | 
				
			||||||
 | 
					        "ConanInfo")
 | 
				
			||||||
 | 
					    build_requires_class = astroid.MANAGER.ast_from_module_name(
 | 
				
			||||||
 | 
					        "conans.client.graph.graph_manager").lookup("_RecipeBuildRequires")
 | 
				
			||||||
 | 
					    file_copier_class = astroid.MANAGER.ast_from_module_name(
 | 
				
			||||||
 | 
					        "conans.client.file_copier").lookup("FileCopier")
 | 
				
			||||||
 | 
					    file_importer_class = astroid.MANAGER.ast_from_module_name(
 | 
				
			||||||
 | 
					        "conans.client.importer").lookup("_FileImporter")
 | 
				
			||||||
 | 
					    python_requires_class = astroid.MANAGER.ast_from_module_name(
 | 
				
			||||||
 | 
					        "conans.client.graph.python_requires").lookup("PyRequires")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dynamic_fields = {
 | 
				
			||||||
 | 
					        "conan_data": str_class,
 | 
				
			||||||
 | 
					        "build_requires": build_requires_class,
 | 
				
			||||||
 | 
					        "tool_requires": build_requires_class,
 | 
				
			||||||
 | 
					        "info_build": info_class,
 | 
				
			||||||
 | 
					        "user_info_build": [_user_info_build_transform()],
 | 
				
			||||||
 | 
					        "info": info_class,
 | 
				
			||||||
 | 
					        "copy": file_copier_class,
 | 
				
			||||||
 | 
					        "copy_deps": file_importer_class,
 | 
				
			||||||
 | 
					        "python_requires": [str_class, python_requires_class],
 | 
				
			||||||
 | 
					        "recipe_folder": str_class,
 | 
				
			||||||
 | 
					        "settings_build": [_settings_transform()],
 | 
				
			||||||
 | 
					        "settings_target": [_settings_transform()],
 | 
				
			||||||
 | 
					        "conf": dict_class,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    for f, t in dynamic_fields.items():
 | 
				
			||||||
 | 
					        node.locals[f] = [i for i in t]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					astroid.MANAGER.register_transform(
 | 
				
			||||||
 | 
					    astroid.ClassDef, transform_conanfile,
 | 
				
			||||||
 | 
					    lambda node: node.qname() == "conans.model.conan_file.ConanFile")
 | 
				
			||||||
							
								
								
									
										46
									
								
								linter/transform_imports.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								linter/transform_imports.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					import astroid
 | 
				
			||||||
 | 
					from pylint.lint import PyLinter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					Here we are transforming the imports to mimic future Conan v2 release. With
 | 
				
			||||||
 | 
					these changes, built-in checks in Pylint will raise with different errors, so
 | 
				
			||||||
 | 
					we are modifying the messages to point users in the right direction.
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def register(linter: PyLinter):
 | 
				
			||||||
 | 
					    msge1101 = linter.msgs_store._messages_definitions["E1101"]
 | 
				
			||||||
 | 
					    msge1101.msg += ". Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md"
 | 
				
			||||||
 | 
					    linter.msgs_store.register_message(msge1101)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    msge0611 = linter.msgs_store._messages_definitions["E0611"]
 | 
				
			||||||
 | 
					    msge0611.msg += ". Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md"
 | 
				
			||||||
 | 
					    linter.msgs_store.register_message(msge0611)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def transform_tools(module):
 | 
				
			||||||
 | 
					    """ Transform import module """
 | 
				
			||||||
 | 
					    if 'get' in module.locals:
 | 
				
			||||||
 | 
					        del module.locals['get']
 | 
				
			||||||
 | 
					    if 'cross_building' in module.locals:
 | 
				
			||||||
 | 
					        del module.locals['cross_building']
 | 
				
			||||||
 | 
					    if 'rmdir' in module.locals:
 | 
				
			||||||
 | 
					        del module.locals['rmdir']
 | 
				
			||||||
 | 
					    if 'Version' in module.locals:
 | 
				
			||||||
 | 
					        del module.locals['Version']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def transform_errors(module):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					    #if 'ConanInvalidConfiguration' in module.locals:
 | 
				
			||||||
 | 
					    #    del module.locals['ConanInvalidConfiguration']
 | 
				
			||||||
 | 
					    #if 'ConanException' in module.locals:
 | 
				
			||||||
 | 
					    #    del module.locals['ConanException']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					astroid.MANAGER.register_transform(
 | 
				
			||||||
 | 
					    astroid.Module, transform_tools,
 | 
				
			||||||
 | 
					    lambda node: node.qname() == "conans.tools")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					astroid.MANAGER.register_transform(
 | 
				
			||||||
 | 
					    astroid.Module, transform_errors,
 | 
				
			||||||
 | 
					    lambda node: node.qname() == "conans.errors")
 | 
				
			||||||
							
								
								
									
										26
									
								
								linter/yamllint_rules.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								linter/yamllint_rules.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					extends: default
 | 
				
			||||||
 | 
					rules:
 | 
				
			||||||
 | 
					  document-start:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
 | 
					    present: false
 | 
				
			||||||
 | 
					  document-end:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
 | 
					    present: false
 | 
				
			||||||
 | 
					  empty-values:
 | 
				
			||||||
 | 
					    forbid-in-block-mappings: true
 | 
				
			||||||
 | 
					    forbid-in-flow-mappings: true
 | 
				
			||||||
 | 
					  line-length: disable
 | 
				
			||||||
 | 
					  indentation:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
 | 
					  new-line-at-end-of-file:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
 | 
					  trailing-spaces:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
 | 
					  comments:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
 | 
					  comments-indentation:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
 | 
					  new-lines:
 | 
				
			||||||
 | 
					    type: unix
 | 
				
			||||||
 | 
					  key-duplicates:
 | 
				
			||||||
 | 
					    level: error
 | 
				
			||||||
@@ -5,12 +5,3 @@ sources:
 | 
				
			|||||||
  "3.4.1":
 | 
					  "3.4.1":
 | 
				
			||||||
    url: "https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz"
 | 
					    url: "https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz"
 | 
				
			||||||
    sha256: "bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a"
 | 
					    sha256: "bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a"
 | 
				
			||||||
patches:
 | 
					 | 
				
			||||||
  "3.4.0":
 | 
					 | 
				
			||||||
    - patch_file: "patches/3.4.0/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
  "3.4.1":
 | 
					 | 
				
			||||||
    - patch_file: "patches/3.4.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
requirements:
 | 
					 | 
				
			||||||
  - "ogre3d/[1.x]@anotherfoxguy/stable"
 | 
					 | 
				
			||||||
  - "freetype/[2.x]"
 | 
					 | 
				
			||||||
  - "zlib/[1.x]"
 | 
					 | 
				
			||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
from conans import ConanFile, CMake, tools
 | 
					from conan import ConanFile
 | 
				
			||||||
from conans.tools import os_info, SystemPackageTool
 | 
					from conan.tools.files import get, collect_libs, replace_in_file
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MyGUIConan(ConanFile):
 | 
					class MyGUIConan(ConanFile):
 | 
				
			||||||
@@ -8,30 +10,49 @@ class MyGUIConan(ConanFile):
 | 
				
			|||||||
    url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
 | 
					    url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
 | 
				
			||||||
    description = "Fast, flexible and simple GUI."
 | 
					    description = "Fast, flexible and simple GUI."
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
    generators = "cmake_paths", "cmake_find_package"
 | 
					 | 
				
			||||||
    exports_sources = "patches/**"
 | 
					 | 
				
			||||||
    options = {"system_ogre": [True, False]}
 | 
					    options = {"system_ogre": [True, False]}
 | 
				
			||||||
    default_options = {"system_ogre": False}
 | 
					    default_options = {"system_ogre": False}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def requirements(self):
 | 
					    def requirements(self):
 | 
				
			||||||
        if not self.options.system_ogre:
 | 
					        if not self.options.system_ogre:
 | 
				
			||||||
            for req in self.conan_data["requirements"]:
 | 
					            self.requires("ogre3d/[>=1 <14]@anotherfoxguy/stable")
 | 
				
			||||||
                self.requires(req)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
        if not self.options.system_ogre:
 | 
					
 | 
				
			||||||
            for patch in self.conan_data["patches"][self.version]:
 | 
					    def generate(self):
 | 
				
			||||||
                tools.patch(**patch)
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_DOCS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_TEST_APP"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_PLUGINS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_TOOLS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_RENDERSYSTEM"] = "3"
 | 
				
			||||||
 | 
					        tc.variables["OIS_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OIS_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OIS_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _patch_sources(self):
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "MyGUIEngine/CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "${FREETYPE_LIBRARIES}",
 | 
				
			||||||
 | 
					            "freetype",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "Platforms/Ogre/OgrePlatform/CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "${OGRE_LIBRARIES}",
 | 
				
			||||||
 | 
					            "OGRE::OGRE",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
 | 
					        self._patch_sources()
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
        cmake.definitions['MYGUI_BUILD_DEMOS'] = 'OFF'
 | 
					 | 
				
			||||||
        cmake.definitions['MYGUI_BUILD_DOCS'] = 'OFF'
 | 
					 | 
				
			||||||
        cmake.definitions['MYGUI_BUILD_TEST_APP'] = 'OFF'
 | 
					 | 
				
			||||||
        cmake.definitions['MYGUI_BUILD_PLUGINS'] = 'OFF'
 | 
					 | 
				
			||||||
        cmake.definitions['MYGUI_BUILD_TOOLS'] = 'OFF'
 | 
					 | 
				
			||||||
        cmake.definitions['MYGUI_RENDERSYSTEM'] = '3'
 | 
					 | 
				
			||||||
        cmake.configure()
 | 
					        cmake.configure()
 | 
				
			||||||
        cmake.build()
 | 
					        cmake.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -40,10 +61,14 @@ class MyGUIConan(ConanFile):
 | 
				
			|||||||
        cmake.install()
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "MyGUI")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "MyGUI::MyGUI")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "MyGUI")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "MyGUI::MyGUI")
 | 
				
			||||||
        self.cpp_info.includedirs = ['include/MYGUI']
 | 
					        self.cpp_info.includedirs = ['include/MYGUI']
 | 
				
			||||||
        # Directories where libraries can be found
 | 
					        # Directories where libraries can be found
 | 
				
			||||||
        self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
 | 
					        self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_id(self):
 | 
					    def package_id(self):
 | 
				
			||||||
        if not self.options.system_ogre:
 | 
					        if not self.options.system_ogre:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt      
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -11,8 +11,11 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 project(MYGUI)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 # Include necessary submodules
 | 
					 | 
				
			||||||
 set(CMAKE_MODULE_PATH
 | 
					 | 
				
			||||||
+	"${CMAKE_BINARY_DIR}"
 | 
					 | 
				
			||||||
 	"${MYGUI_SOURCE_DIR}/CMake"
 | 
					 | 
				
			||||||
 	"${MYGUI_SOURCE_DIR}/CMake/Utils"
 | 
					 | 
				
			||||||
 	"${MYGUI_SOURCE_DIR}/CMake/Packages"
 | 
					 | 
				
			||||||
@@ -1,14 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt      
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -22,8 +22,11 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 project(MYGUI)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 # Include necessary submodules
 | 
					 | 
				
			||||||
 set(CMAKE_MODULE_PATH
 | 
					 | 
				
			||||||
+	"${CMAKE_BINARY_DIR}"
 | 
					 | 
				
			||||||
 	"${MYGUI_SOURCE_DIR}/CMake"
 | 
					 | 
				
			||||||
 	"${MYGUI_SOURCE_DIR}/CMake/Utils"
 | 
					 | 
				
			||||||
 	"${MYGUI_SOURCE_DIR}/CMake/Packages"
 | 
					 | 
				
			||||||
							
								
								
									
										4
									
								
								mygui/next/conandata.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mygui/next/conandata.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					sources:
 | 
				
			||||||
 | 
					  "2022.10":
 | 
				
			||||||
 | 
					    url: "https://github.com/cryham/mygui-next/archive/3f1194e5075078f0a9428b052f97749486b6fd72.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "13f084a95e9e22bbb1f1d216b55527fd03f4a4e525484e45b97f98ba307732a4"
 | 
				
			||||||
							
								
								
									
										83
									
								
								mygui/next/conanfile.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								mygui/next/conanfile.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
				
			|||||||
 | 
					from conan import ConanFile
 | 
				
			||||||
 | 
					from conan.tools.files import get, collect_libs, replace_in_file
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class MyGUIConan(ConanFile):
 | 
				
			||||||
 | 
					    name = "mygui-next"
 | 
				
			||||||
 | 
					    license = "MIT"
 | 
				
			||||||
 | 
					    url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
 | 
				
			||||||
 | 
					    description = "Fast, flexible and simple GUI."
 | 
				
			||||||
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
 | 
					    options = {"system_ogre": [True, False]}
 | 
				
			||||||
 | 
					    default_options = {"system_ogre": False}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def requirements(self):
 | 
				
			||||||
 | 
					        if not self.options.system_ogre:
 | 
				
			||||||
 | 
					            # self.requires("ogre3d-next/[2.x]@anotherfoxguy/stable")
 | 
				
			||||||
 | 
					            self.requires("ogre3d-next/2023.01@anotherfoxguy/testing")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def source(self):
 | 
				
			||||||
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_DOCS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_TEST_APP"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_PLUGINS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_BUILD_TOOLS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_DONT_USE_OBSOLETE"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_USE_FREETYPE"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["MYGUI_RENDERSYSTEM"] = "8"
 | 
				
			||||||
 | 
					        tc.variables["OIS_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OIS_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OIS_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _patch_sources(self):
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "MyGUIEngine/CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "${FREETYPE_LIBRARIES}",
 | 
				
			||||||
 | 
					            "freetype",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "# Find dependencies",
 | 
				
			||||||
 | 
					            "find_package(OGRE REQUIRED)",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "Platforms/Ogre2/Ogre2Platform/CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "${OGRE_LIBRARIES}",
 | 
				
			||||||
 | 
					            "OGRE::OGRE",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def build(self):
 | 
				
			||||||
 | 
					        self._patch_sources()
 | 
				
			||||||
 | 
					        cmake = CMake(self)
 | 
				
			||||||
 | 
					        cmake.configure()
 | 
				
			||||||
 | 
					        cmake.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package(self):
 | 
				
			||||||
 | 
					        cmake = CMake(self)
 | 
				
			||||||
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package_info(self):
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "MyGUI")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "MyGUI::MyGUI")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "MyGUI")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "MyGUI::MyGUI")
 | 
				
			||||||
 | 
					        self.cpp_info.includedirs = ['include/MYGUI']
 | 
				
			||||||
 | 
					        # Directories where libraries can be found
 | 
				
			||||||
 | 
					        self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
 | 
				
			||||||
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package_id(self):
 | 
				
			||||||
 | 
					        if not self.options.system_ogre:
 | 
				
			||||||
 | 
					            self.info.requires["ogre3d-next"].full_recipe_mode()
 | 
				
			||||||
@@ -2,16 +2,15 @@ sources:
 | 
				
			|||||||
  "0.6.3":
 | 
					  "0.6.3":
 | 
				
			||||||
    url: "https://github.com/OGRECave/ogre-caelum/archive/94913d2040a41148c14001c33a0bdc0f100842f8.zip"
 | 
					    url: "https://github.com/OGRECave/ogre-caelum/archive/94913d2040a41148c14001c33a0bdc0f100842f8.zip"
 | 
				
			||||||
    sha256: "9de4159ae8050fd0858b3c1c09005aa50b36079a3a06accfb67203669be9a09e"
 | 
					    sha256: "9de4159ae8050fd0858b3c1c09005aa50b36079a3a06accfb67203669be9a09e"
 | 
				
			||||||
 | 
					  "0.6.3.1":
 | 
				
			||||||
 | 
					    url: "https://github.com/RigsOfRods/ogre-caelum/archive/70fcf62f306288c9472cc03a42367c9625c839ea.zip"
 | 
				
			||||||
 | 
					    sha256: "b4b4b6fe2997c3da4537ada2ab69032647e65773886e57c9803fc90aac2dd158"
 | 
				
			||||||
  "0.6.4":
 | 
					  "0.6.4":
 | 
				
			||||||
    url: "https://github.com/OGRECave/ogre-caelum/archive/7763bff99f758bbfcc5e7f9d751b2551e975545b.zip"
 | 
					    url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
 | 
				
			||||||
    sha256: "069050b1039194324b0d1dddef887e83442b04d5843b4572ae5035da3e2d1ef6"
 | 
					    sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
 | 
				
			||||||
 | 
					  "2022.08":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
 | 
				
			||||||
 | 
					    sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
 | 
				
			||||||
patches:
 | 
					patches:
 | 
				
			||||||
  "0.6.3":
 | 
					  "2022.08":
 | 
				
			||||||
    - patch_file: "patches/0.6.3/CMakeLists.txt.patch" 
 | 
					    - patch_file: "patches/2022.08/CMakeLists.txt.patch"
 | 
				
			||||||
  "0.6.4":
 | 
					 | 
				
			||||||
    - patch_file: "patches/0.6.4/CMakeLists.txt.patch" 
 | 
					 | 
				
			||||||
requirements:
 | 
					 | 
				
			||||||
  "0.6.3":
 | 
					 | 
				
			||||||
    - "ogre3d/[1.x]@anotherfoxguy/stable"
 | 
					 | 
				
			||||||
  "0.6.4":
 | 
					 | 
				
			||||||
    - "ogre3d/[13.x]@anotherfoxguy/stable"
 | 
					 | 
				
			||||||
@@ -1,25 +1,45 @@
 | 
				
			|||||||
from conans import ConanFile, CMake, tools
 | 
					from conan import ConanFile
 | 
				
			||||||
 | 
					from conan.tools.files import (
 | 
				
			||||||
 | 
					    get,
 | 
				
			||||||
 | 
					    collect_libs,
 | 
				
			||||||
 | 
					    apply_conandata_patches,
 | 
				
			||||||
 | 
					    export_conandata_patches,
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CaelumConan(ConanFile):
 | 
					class CaelumConan(ConanFile):
 | 
				
			||||||
    name = "ogre3d-caelum"
 | 
					    name = "ogre3d-caelum"
 | 
				
			||||||
    license = "GNU Lesser General Public License v2.1"
 | 
					    license = "GNU Lesser General Public License v2.1"
 | 
				
			||||||
    url = "https://github.com/RigsOfRods/Caelum/issues"
 | 
					    url = "https://github.com/RigsOfRods/Caelum/issues"
 | 
				
			||||||
    description = "Caelum is a library which provides cross-platform socket abstraction"
 | 
					    description = "Library for rendering of dynamic and realistic skies"
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
    generators = "cmake_find_package"
 | 
					
 | 
				
			||||||
    exports_sources = "patches/**"
 | 
					    def export_sources(self):
 | 
				
			||||||
 | 
					        export_conandata_patches(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def requirements(self):
 | 
					    def requirements(self):
 | 
				
			||||||
        for req in self.conan_data["requirements"][self.version]:
 | 
					        self.requires("ogre3d/[13.x]@anotherfoxguy/stable")
 | 
				
			||||||
            self.requires(req)
 | 
					        self.requires("libpng/1.6.38")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
        for patch in self.conan_data["patches"][self.version]:
 | 
					
 | 
				
			||||||
            tools.patch(**patch)
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _patch_sources(self):
 | 
				
			||||||
 | 
					        apply_conandata_patches(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
 | 
					        self._patch_sources()
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
        cmake.configure()
 | 
					        cmake.configure()
 | 
				
			||||||
        cmake.build()
 | 
					        cmake.build()
 | 
				
			||||||
@@ -29,12 +49,12 @@ class CaelumConan(ConanFile):
 | 
				
			|||||||
        cmake.install()
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.name = "Caelum"
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "Caelum")
 | 
				
			||||||
        self.cpp_info.includedirs = [
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "Caelum::Caelum")
 | 
				
			||||||
            'include',
 | 
					        self.cpp_info.set_property("cmake_file_name", "Caelum")
 | 
				
			||||||
            'include/Caelum'
 | 
					        self.cpp_info.set_property("cmake_target_name", "Caelum::Caelum")
 | 
				
			||||||
        ]
 | 
					        self.cpp_info.includedirs = ["include", "include/Caelum"]
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_id(self):
 | 
					    def package_id(self):
 | 
				
			||||||
        self.info.requires["ogre3d"].full_recipe_mode()
 | 
					        self.info.requires["ogre3d"].full_recipe_mode()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,20 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -7,7 +7,7 @@
 | 
					 | 
				
			||||||
 # cmake system for Caelum updated on 6-10-2017 by Edgar{at}AnotherFoxGuy{DOT}com
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 cmake_minimum_required(VERSION 3.0.2)
 | 
					 | 
				
			||||||
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
 | 
					 | 
				
			||||||
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # add some functions we use that are shipped with cmake
 | 
					 | 
				
			||||||
@@ -34,7 +34,7 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 SET(CMAKE_USE_RELATIVE_PATHS OFF)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-find_package(OGRE REQUIRED CONFIG)
 | 
					 | 
				
			||||||
+find_package(OGRE REQUIRED)
 | 
					 | 
				
			||||||
 link_directories(${OGRE_LIBRARY_DIRS})
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # setup paths
 | 
					 | 
				
			||||||
@@ -1,25 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -8,6 +8,8 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 cmake_minimum_required(VERSION 3.0.2)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH})
 | 
					 | 
				
			||||||
+set(CMAKE_DEBUG_POSTFIX _d)
 | 
					 | 
				
			||||||
 # define the project
 | 
					 | 
				
			||||||
 project(
 | 
					 | 
				
			||||||
         Caelum
 | 
					 | 
				
			||||||
@@ -29,7 +31,12 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 SET(CMAKE_USE_RELATIVE_PATHS OFF)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-find_package(OGRE REQUIRED CONFIG)
 | 
					 | 
				
			||||||
+find_package(OGRE REQUIRED)
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+add_library(OgreMain INTERFACE IMPORTED GLOBAL)
 | 
					 | 
				
			||||||
+target_include_directories(OgreMain INTERFACE ${OGRE_INCLUDE_DIRS})
 | 
					 | 
				
			||||||
+target_link_libraries(OgreMain INTERFACE ${OGRE_LIBRARIES})
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # setup paths
 | 
					 | 
				
			||||||
 SET(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/")
 | 
					 | 
				
			||||||
							
								
								
									
										8
									
								
								ogre-caelum/all/patches/2022.08/CMakeLists.txt.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								ogre-caelum/all/patches/2022.08/CMakeLists.txt.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					--- a/main/CMakeLists.txt
 | 
				
			||||||
 | 
					+++ b/main/CMakeLists.txt
 | 
				
			||||||
 | 
					@@ -34,4 +34,4 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/main/include/ DESTINATION ${CMAKE_INSTALL_
 | 
				
			||||||
 | 
					 install(DIRECTORY ${CMAKE_BINARY_DIR}/main/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Caelum FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 # --- Ogre 3D graphics engine ---
 | 
				
			||||||
 | 
					-target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC OgreMain)
 | 
				
			||||||
 | 
					+target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC OGRE::OGRE)
 | 
				
			||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
versions:
 | 
					versions:
 | 
				
			||||||
  "0.6.3":
 | 
					  "0.6.3":
 | 
				
			||||||
    folder: all
 | 
					    folder: all
 | 
				
			||||||
  "0.6.4":
 | 
					  "2022.08":
 | 
				
			||||||
    folder: all
 | 
					    folder: all
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,13 +5,6 @@ sources:
 | 
				
			|||||||
  "1.3.0":
 | 
					  "1.3.0":
 | 
				
			||||||
    url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/18ca8a0abd26cb5d52b99ad8e8fa0c8f7e6e7d79.zip"
 | 
					    url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/18ca8a0abd26cb5d52b99ad8e8fa0c8f7e6e7d79.zip"
 | 
				
			||||||
    sha256: "4a3d97d75f7417208403bd0f5e8c3b010ae0dd9a36968f78ecc5cd0161b2ddb9"
 | 
					    sha256: "4a3d97d75f7417208403bd0f5e8c3b010ae0dd9a36968f78ecc5cd0161b2ddb9"
 | 
				
			||||||
patches:
 | 
					  "2022.08":
 | 
				
			||||||
  "1.2.0":
 | 
					    url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/8637c7f4b6238ced28e741bb6e4d4ddc8b60b477.zip"
 | 
				
			||||||
    - patch_file: "patches/1.2.0/CMakeLists.txt.patch" 
 | 
					    sha256: "b83884652dc773e6c58e8efebfb950de714f6e34161a0fb388d2f546efea3a87"
 | 
				
			||||||
  "1.3.0":
 | 
					 | 
				
			||||||
    - patch_file: "patches/1.3.0/CMakeLists.txt.patch" 
 | 
					 | 
				
			||||||
requirements:
 | 
					 | 
				
			||||||
  "1.2.0":
 | 
					 | 
				
			||||||
    - "ogre3d/[1.x]@anotherfoxguy/stable"
 | 
					 | 
				
			||||||
  "1.3.0":
 | 
					 | 
				
			||||||
    - "ogre3d/[13.x]@anotherfoxguy/stable"
 | 
					 | 
				
			||||||
@@ -1,4 +1,6 @@
 | 
				
			|||||||
from conans import ConanFile, CMake, tools
 | 
					from conan import ConanFile
 | 
				
			||||||
 | 
					from conan.tools.files import get, collect_libs
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PagedGeometryConan(ConanFile):
 | 
					class PagedGeometryConan(ConanFile):
 | 
				
			||||||
@@ -7,17 +9,22 @@ class PagedGeometryConan(ConanFile):
 | 
				
			|||||||
    url = "https://github.com/RigsOfRods/Caelum/issues"
 | 
					    url = "https://github.com/RigsOfRods/Caelum/issues"
 | 
				
			||||||
    description = "PagedGeometry is a plugin for OGRE for rendering of dense vegetation "
 | 
					    description = "PagedGeometry is a plugin for OGRE for rendering of dense vegetation "
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
    generators = "cmake_find_package"
 | 
					
 | 
				
			||||||
    exports_sources = "patches/**"
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def requirements(self):
 | 
					    def requirements(self):
 | 
				
			||||||
        for req in self.conan_data["requirements"][self.version]:
 | 
					        self.requires("ogre3d/[13.x]@anotherfoxguy/stable")
 | 
				
			||||||
            self.requires(req)
 | 
					        self.requires("libpng/1.6.38")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
        for patch in self.conan_data["patches"][self.version]:
 | 
					
 | 
				
			||||||
            tools.patch(**patch)
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
@@ -29,12 +36,15 @@ class PagedGeometryConan(ConanFile):
 | 
				
			|||||||
        cmake.install()
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.name = "PagedGeometry"
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "PagedGeometry")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "PagedGeometry::PagedGeometry")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "PagedGeometry")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "PagedGeometry::PagedGeometry")
 | 
				
			||||||
        self.cpp_info.includedirs = [
 | 
					        self.cpp_info.includedirs = [
 | 
				
			||||||
            'include',
 | 
					            'include',
 | 
				
			||||||
            'include/PagedGeometry'
 | 
					            'include/PagedGeometry'
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_id(self):
 | 
					    def package_id(self):
 | 
				
			||||||
        self.info.requires["ogre3d"].full_recipe_mode()
 | 
					        self.info.requires["ogre3d"].full_recipe_mode()
 | 
				
			||||||
@@ -1,20 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -7,7 +7,7 @@
 | 
					 | 
				
			||||||
 # cmake system for PagedGeometry updated on 2-9-2021 by Edgar{at}AnotherFoxGuy{DOT}com
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 cmake_minimum_required(VERSION 3.0.2)
 | 
					 | 
				
			||||||
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
 | 
					 | 
				
			||||||
+set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # define the project
 | 
					 | 
				
			||||||
 project(
 | 
					 | 
				
			||||||
@@ -101,7 +101,7 @@
 | 
					 | 
				
			||||||
 ENDIF ()
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # --- Ogre 3D graphics engine ---
 | 
					 | 
				
			||||||
-find_package(OGRE REQUIRED CONFIG)
 | 
					 | 
				
			||||||
+find_package(OGRE REQUIRED)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # now add the directories
 | 
					 | 
				
			||||||
 add_subdirectory(source)
 | 
					 | 
				
			||||||
							
								
								
									
										20
									
								
								ogre-pagedgeometry/all/patches/2022.08/CMakeLists.txt.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								ogre-pagedgeometry/all/patches/2022.08/CMakeLists.txt.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					--- CMakeLists.txt
 | 
				
			||||||
 | 
					+++ CMakeLists.txt
 | 
				
			||||||
 | 
					@@ -8,6 +8,8 @@
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 cmake_minimum_required(VERSION 3.1)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH})
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					 # define the project
 | 
				
			||||||
 | 
					 project(
 | 
				
			||||||
 | 
					         PagedGeometry
 | 
				
			||||||
 | 
					@@ -100,7 +102,7 @@
 | 
				
			||||||
 | 
					 ENDIF ()
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 # --- Ogre 3D graphics engine ---
 | 
				
			||||||
 | 
					-find_package(OGRE REQUIRED CONFIG)
 | 
				
			||||||
 | 
					+find_package(OGRE REQUIRED)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 # now add the directories
 | 
				
			||||||
 | 
					 add_subdirectory(source)
 | 
				
			||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
versions:
 | 
					versions:
 | 
				
			||||||
  "1.2.0":
 | 
					  "1.2.0":
 | 
				
			||||||
    folder: all
 | 
					    folder: all
 | 
				
			||||||
  "1.3.0":
 | 
					  "2022.08":
 | 
				
			||||||
    folder: all
 | 
					    folder: all
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,14 +4,7 @@ sources:
 | 
				
			|||||||
    sha256: "31c84051ffe9a3710c553cfa27ebda7b176c9dfe3b4d2a113d4f02caf48ecd5b"
 | 
					    sha256: "31c84051ffe9a3710c553cfa27ebda7b176c9dfe3b4d2a113d4f02caf48ecd5b"
 | 
				
			||||||
patches:
 | 
					patches:
 | 
				
			||||||
  "1.11.6.1":
 | 
					  "1.11.6.1":
 | 
				
			||||||
    - patch_file: "patches/1.11.6.1/CMakeLists.txt.patch"
 | 
					    - patch_file: "patches/1.11.6.1/FixFreeImage.patch"
 | 
				
			||||||
    - patch_file: "patches/1.11.6.1/Samples-CMakeList.txt.patch"
 | 
					    - patch_file: "patches/1.11.6.1/FixSamples.patch"
 | 
				
			||||||
    - patch_file: "patches/1.11.6.1/FixOverlayCMakeLists.txt.patch"
 | 
					    - patch_file: "patches/1.11.6.1/FixOverlay.patch"
 | 
				
			||||||
    - patch_file: "patches/1.11.6.1/scriptlexer.patch"
 | 
					    - patch_file: "patches/1.11.6.1/scriptlexer.patch"
 | 
				
			||||||
requirements:
 | 
					 | 
				
			||||||
  - "zlib/[1.x]"
 | 
					 | 
				
			||||||
  - "zziplib/[0.13.x]"
 | 
					 | 
				
			||||||
  - "freetype/[2.x]"
 | 
					 | 
				
			||||||
  - "freeimage/[3.x]"
 | 
					 | 
				
			||||||
  - "cg-toolkit/3.1@anotherfoxguy/stable"
 | 
					 | 
				
			||||||
  - "pugixml/[1.x]"
 | 
					 | 
				
			||||||
@@ -1,7 +1,8 @@
 | 
				
			|||||||
import shutil
 | 
					from conan import ConanFile
 | 
				
			||||||
from conans import ConanFile, CMake, tools
 | 
					from conan.tools.files import get, collect_libs, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches
 | 
				
			||||||
from conans.tools import os_info, SystemPackageTool
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					from conan.tools.system.package_manager import Apt
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class OGREConan(ConanFile):
 | 
					class OGREConan(ConanFile):
 | 
				
			||||||
    name = "ogre3d"
 | 
					    name = "ogre3d"
 | 
				
			||||||
@@ -9,88 +10,93 @@ class OGREConan(ConanFile):
 | 
				
			|||||||
    url = "https://github.com/AnotherFoxGuy/conan-OGRE"
 | 
					    url = "https://github.com/AnotherFoxGuy/conan-OGRE"
 | 
				
			||||||
    description = "scene-oriented, flexible 3D engine written in C++"
 | 
					    description = "scene-oriented, flexible 3D engine written in C++"
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
    generators = "cmake_paths", "cmake_find_package"
 | 
					
 | 
				
			||||||
    exports_sources = "patches/**"
 | 
					    def export_sources(self):
 | 
				
			||||||
 | 
					        export_conandata_patches(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def requirements(self):
 | 
					    def requirements(self):
 | 
				
			||||||
        for req in self.conan_data["requirements"]:
 | 
					        self.requires("zlib/[~1]")
 | 
				
			||||||
            self.requires(req)
 | 
					        self.requires("zziplib/[~0]")
 | 
				
			||||||
 | 
					        self.requires("freetype/[~2]")
 | 
				
			||||||
        if os_info.is_windows:
 | 
					        self.requires("freeimage/[~3]")
 | 
				
			||||||
 | 
					        self.requires("cg-toolkit/3.1@anotherfoxguy/stable")
 | 
				
			||||||
 | 
					        self.requires("pugixml/[~1]")
 | 
				
			||||||
 | 
					        if self.settings.os == "Windows":
 | 
				
			||||||
            self.requires("directx-sdk/9.0@anotherfoxguy/stable")
 | 
					            self.requires("directx-sdk/9.0@anotherfoxguy/stable")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def system_requirements(self):
 | 
					    def system_requirements(self):
 | 
				
			||||||
        if os_info.is_linux:
 | 
					        Apt(self).install([
 | 
				
			||||||
            if os_info.with_apt:
 | 
					                "libx11-dev",
 | 
				
			||||||
                installer = SystemPackageTool()
 | 
					                "libxaw7-dev",
 | 
				
			||||||
                installer.install("libgles2-mesa-dev")
 | 
					                "libxrandr-dev",
 | 
				
			||||||
                installer.install("libglu1-mesa-dev")
 | 
					                "libgles2-mesa-dev",
 | 
				
			||||||
                installer.install("libx11-dev")
 | 
					                "libvulkan-dev",
 | 
				
			||||||
                installer.install("libxaw7-dev")
 | 
					                "glslang-dev"
 | 
				
			||||||
                installer.install("libxrandr-dev")
 | 
					        ], check=True)
 | 
				
			||||||
                installer.install("libxt-dev")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
        tools.replace_in_file(
 | 
					
 | 
				
			||||||
            "CMake/Dependencies.cmake",
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_BITES"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_DEPENDENCIES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_STBI"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_SAMPLES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_INSTALL_SAMPLES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if self.settings.os == "Windows":
 | 
				
			||||||
 | 
					            tc.variables["CMAKE_CXX_FLAGS"] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _patch_sources(self):
 | 
				
			||||||
 | 
					        apply_conandata_patches(self)
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "CMake/Dependencies.cmake"),
 | 
				
			||||||
            "find_package(DirectX)",
 | 
					            "find_package(DirectX)",
 | 
				
			||||||
            "find_package(DirectX9)",
 | 
					            "find_package(DirectX9)",
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        tools.replace_in_file(
 | 
					        replace_in_file(self,
 | 
				
			||||||
            "CMake/Dependencies.cmake",
 | 
					            os.path.join(self.source_folder, "CMake/Packages/FindDirectX11.cmake"),
 | 
				
			||||||
            "find_package(FreeImage)",
 | 
					 | 
				
			||||||
            "find_package(ConanFreeImage)",
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
        tools.replace_in_file(
 | 
					 | 
				
			||||||
            "CMake/Dependencies.cmake",
 | 
					 | 
				
			||||||
            "find_package(ZZip)",
 | 
					 | 
				
			||||||
            "find_package(ConanZZip)",
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
        tools.replace_in_file(
 | 
					 | 
				
			||||||
            "CMake/Packages/FindDirectX11.cmake",
 | 
					 | 
				
			||||||
            'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
 | 
					            'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
 | 
				
			||||||
            'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
 | 
					            'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        shutil.copyfile(
 | 
					 | 
				
			||||||
            "patches/FindFreeImage.cmake", "CMake/Packages/FindConanFreeImage.cmake"
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
        shutil.copyfile("patches/FindZZip.cmake", "CMake/Packages/FindConanZZip.cmake")
 | 
					 | 
				
			||||||
        for patch in self.conan_data["patches"][self.version]:
 | 
					 | 
				
			||||||
            tools.patch(**patch)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
 | 
					        self._patch_sources()
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_COMPONENT_BITES"] = "ON"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_DEPENDENCIES"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_PLUGIN_STBI"] = "ON"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_BUILD_SAMPLES"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_INSTALL_SAMPLES"] = "OFF"
 | 
					 | 
				
			||||||
        cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 0
 | 
					 | 
				
			||||||
        if os_info.is_windows:
 | 
					 | 
				
			||||||
            cmake.definitions["CMAKE_CXX_FLAGS"] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
 | 
					 | 
				
			||||||
        cmake.configure()
 | 
					        cmake.configure()
 | 
				
			||||||
        cmake.build()
 | 
					        cmake.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package(self):
 | 
					    def package(self):
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
        cmake.install()
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					        rmdir(self, os.path.join(self.package_folder, "CMake"))
 | 
				
			||||||
 | 
					        rmdir(self, os.path.join(self.package_folder, "Docs"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.name = "OGRE"
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "OGRE::OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "OGRE::OGRE")
 | 
				
			||||||
        self.cpp_info.includedirs = [
 | 
					        self.cpp_info.includedirs = [
 | 
				
			||||||
            "include",
 | 
					            "include",
 | 
				
			||||||
            "include/OGRE",
 | 
					            "include/OGRE",
 | 
				
			||||||
            "include/OGRE/Bites",
 | 
					            "include/OGRE/Bites",
 | 
				
			||||||
            "include/OGRE/HLMS",
 | 
					 | 
				
			||||||
            "include/OGRE/MeshLodGenerator",
 | 
					            "include/OGRE/MeshLodGenerator",
 | 
				
			||||||
            "include/OGRE/Overlay",
 | 
					            "include/OGRE/Overlay",
 | 
				
			||||||
            "include/OGRE/Paging",
 | 
					            "include/OGRE/Paging",
 | 
				
			||||||
@@ -102,4 +108,4 @@ class OGREConan(ConanFile):
 | 
				
			|||||||
            "include/OGRE/Threading",
 | 
					            "include/OGRE/Threading",
 | 
				
			||||||
            "include/OGRE/Volume",
 | 
					            "include/OGRE/Volume",
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,20 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt      
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -16,6 +16,8 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 cmake_minimum_required(VERSION 3.3.0)
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 set(CMAKE_CXX_STANDARD 11)
 | 
					 | 
				
			||||||
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 | 
					 | 
				
			||||||
 set(CMAKE_CXX_EXTENSIONS OFF)
 | 
					 | 
				
			||||||
@@ -63,6 +65,7 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # Include necessary submodules
 | 
					 | 
				
			||||||
 set(CMAKE_MODULE_PATH
 | 
					 | 
				
			||||||
+  "${CMAKE_BINARY_DIR}"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake/Utils"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake/Packages"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							
								
								
									
										11
									
								
								ogre/1.11/patches/1.11.6.1/FixFreeImage.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								ogre/1.11/patches/1.11.6.1/FixFreeImage.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					--- a/PlugIns/FreeImageCodec/CMakeLists.txt
 | 
				
			||||||
 | 
					+++ b/PlugIns/FreeImageCodec/CMakeLists.txt
 | 
				
			||||||
 | 
					@@ -13,7 +13,7 @@ set(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreFreeImageCodec.cpp")
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 add_definitions(-DFREEIMAGE_LIB)
 | 
				
			||||||
 | 
					 add_library(Codec_FreeImage ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCES})
 | 
				
			||||||
 | 
					-target_link_libraries(Codec_FreeImage PUBLIC OgreMain ${FreeImage_LIBRARIES})
 | 
				
			||||||
 | 
					+target_link_libraries(Codec_FreeImage PUBLIC OgreMain freeimage::FreeImage)
 | 
				
			||||||
 | 
					 target_include_directories(Codec_FreeImage PUBLIC 
 | 
				
			||||||
 | 
					     "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
 | 
				
			||||||
 | 
					     $<INSTALL_INTERFACE:include/OGRE/Plugins/FreeImageCodec>
 | 
				
			||||||
@@ -1,11 +1,13 @@
 | 
				
			|||||||
--- Components/Overlay/CMakeLists.txt
 | 
					diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt
 | 
				
			||||||
+++ Components/Overlay/CMakeLists.txt
 | 
					index 1ed646080..3f0b75c33 100644
 | 
				
			||||||
@@ -21,7 +21,7 @@
 | 
					--- a/Components/Overlay/CMakeLists.txt
 | 
				
			||||||
 | 
					+++ b/Components/Overlay/CMakeLists.txt
 | 
				
			||||||
 | 
					@@ -21,7 +21,7 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
 | 
				
			||||||
 # setup target
 | 
					 # setup target
 | 
				
			||||||
 add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
 | 
					 add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
 | 
				
			||||||
 set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
 | 
					 set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
 | 
				
			||||||
-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB)
 | 
					-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB)
 | 
				
			||||||
+target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE Freetype::Freetype ZLIB::ZLIB)
 | 
					+target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB)
 | 
				
			||||||
 target_include_directories(OgreOverlay PUBLIC 
 | 
					 target_include_directories(OgreOverlay PUBLIC 
 | 
				
			||||||
   "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
 | 
					   "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
 | 
				
			||||||
   $<INSTALL_INTERFACE:include/OGRE/Overlay>
 | 
					   $<INSTALL_INTERFACE:include/OGRE/Overlay>
 | 
				
			||||||
@@ -23,43 +23,70 @@ sources:
 | 
				
			|||||||
  "13.4.4":
 | 
					  "13.4.4":
 | 
				
			||||||
    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.4.4.tar.gz"
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.4.4.tar.gz"
 | 
				
			||||||
    sha256: "7cf05dbb3acbfc9326daecb60429a8ae9ce7625fb425e6a29de00cf77454596f"
 | 
					    sha256: "7cf05dbb3acbfc9326daecb60429a8ae9ce7625fb425e6a29de00cf77454596f"
 | 
				
			||||||
 | 
					  "13.5.0":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.0.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "94d514d03d421c43af09e916ecd127685e15afed62e2f4cde8949b7818bc4900"
 | 
				
			||||||
 | 
					  "13.5.1":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.1.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "ce7e0c65d3395ad214567bdd616ee20df16769f452f1fd3e1ac6c5970890df81"
 | 
				
			||||||
 | 
					  "13.5.2":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.2.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "165d4c7cfdf4a6026398a8ca466c6e656118569b549eaf37b6de68d843012d1f"
 | 
				
			||||||
 | 
					  "13.5.3":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.3.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "8f966174cd537a1eb3da763d86a1da29ab8465ca29a54093bba3457b53bbde29"
 | 
				
			||||||
 | 
					  "13.6.0":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.6.0.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "d32e58ad18d5fd9518f6a0dff4e566c281adc7a458b8231aa730983a8646bf95"
 | 
				
			||||||
 | 
					  "13.6.1":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.6.1.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "9fe7410fec4852daf83a52cc137226592430696b1c96896f97f677d90421a44c"
 | 
				
			||||||
 | 
					  "13.6.2":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.6.2.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "76b6e7708a429bae8bf2974569eac759604c7175a43a04cfe4e43eef0ad17abf"
 | 
				
			||||||
patches:
 | 
					patches:
 | 
				
			||||||
  "13.2.4":
 | 
					  "13.2.4":
 | 
				
			||||||
    - patch_file: "patches/13.2.4/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.2.4/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.2.4/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.2.4/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.2.4/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  "13.3.1":
 | 
					  "13.3.1":
 | 
				
			||||||
    - patch_file: "patches/13.3.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  "13.3.2":
 | 
					  "13.3.2":
 | 
				
			||||||
    - patch_file: "patches/13.3.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  "13.3.3":
 | 
					  "13.3.3":
 | 
				
			||||||
    - patch_file: "patches/13.3.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  "13.4.1":
 | 
					  "13.4.1":
 | 
				
			||||||
    - patch_file: "patches/13.3.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  "13.4.2":
 | 
					  "13.4.2":
 | 
				
			||||||
    - patch_file: "patches/13.3.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  "13.4.3":
 | 
					  "13.4.3":
 | 
				
			||||||
    - patch_file: "patches/13.3.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  "13.4.4":
 | 
					  "13.4.4":
 | 
				
			||||||
    - patch_file: "patches/13.3.1/CMakeLists.txt.patch"
 | 
					 | 
				
			||||||
    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
requirements:
 | 
					  "13.5.0":
 | 
				
			||||||
  - "zlib/[1.x]"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
  - "zziplib/[0.13.x]"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  - "freetype/[2.x]"
 | 
					  "13.5.1":
 | 
				
			||||||
  - "freeimage/[3.x]"
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
  - "cg-toolkit/3.1@anotherfoxguy/stable"
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
  - "pugixml/[1.x]"
 | 
					  "13.5.2":
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
 | 
					  "13.5.3":
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
 | 
					  "13.6.0":
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
 | 
					  "13.6.1":
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
 | 
					  "13.6.2":
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/pugixml-fix.patch"
 | 
				
			||||||
 | 
					    - patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
 | 
				
			||||||
@@ -1,7 +1,8 @@
 | 
				
			|||||||
import shutil
 | 
					from conan import ConanFile
 | 
				
			||||||
from conans import ConanFile, CMake, tools
 | 
					from conan.tools.files import get, collect_libs, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches
 | 
				
			||||||
from conans.tools import os_info, SystemPackageTool
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					from conan.tools.system.package_manager import Apt
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class OGREConan(ConanFile):
 | 
					class OGREConan(ConanFile):
 | 
				
			||||||
    name = "ogre3d"
 | 
					    name = "ogre3d"
 | 
				
			||||||
@@ -9,117 +10,129 @@ class OGREConan(ConanFile):
 | 
				
			|||||||
    url = "https://github.com/AnotherFoxGuy/conan-OGRE"
 | 
					    url = "https://github.com/AnotherFoxGuy/conan-OGRE"
 | 
				
			||||||
    description = "scene-oriented, flexible 3D engine written in C++"
 | 
					    description = "scene-oriented, flexible 3D engine written in C++"
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
    generators = "cmake_find_package"
 | 
					 | 
				
			||||||
    exports_sources = "patches/**"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    options = {
 | 
					    options = {
 | 
				
			||||||
        "resourcemanager_strict": ["off", "pedantic", "strict"],
 | 
					        "resourcemanager_strict": ["off", "pedantic", "strict"],
 | 
				
			||||||
        "nodeless_positioning": [True, False],
 | 
					        "nodeless_positioning": [True, False],
 | 
				
			||||||
 | 
					        "codec_rsimage": [True, False],
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    default_options = {
 | 
					    default_options = {
 | 
				
			||||||
        "resourcemanager_strict": "strict",
 | 
					        "resourcemanager_strict": "strict",
 | 
				
			||||||
        "nodeless_positioning": False,
 | 
					        "nodeless_positioning": False,
 | 
				
			||||||
 | 
					        "codec_rsimage": False,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _cmake = None
 | 
					    def export_sources(self):
 | 
				
			||||||
 | 
					        export_conandata_patches(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _configure_cmake(self):
 | 
					    def layout(self):
 | 
				
			||||||
        if self._cmake:
 | 
					        cmake_layout(self)
 | 
				
			||||||
            return self._cmake
 | 
					 | 
				
			||||||
        self._cmake = CMake(self)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_COMPONENT_BITES"] = "ON"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_DEPENDENCIES"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_PLUGIN_STBI"] = "ON"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_BUILD_SAMPLES"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_COPY_DEPENDENCIES"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_INSTALL_DEPENDENCIES"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions["OGRE_INSTALL_SAMPLES"] = "OFF"
 | 
					 | 
				
			||||||
        self._cmake.definitions[
 | 
					 | 
				
			||||||
            "OGRE_NODELESS_POSITIONING"
 | 
					 | 
				
			||||||
        ] = self.options.nodeless_positioning
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if self.options.resourcemanager_strict == "off":
 | 
					 | 
				
			||||||
            self._cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 0
 | 
					 | 
				
			||||||
        elif self.options.resourcemanager_strict == "pedantic":
 | 
					 | 
				
			||||||
            self._cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 1
 | 
					 | 
				
			||||||
        else:
 | 
					 | 
				
			||||||
            self._cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if os_info.is_windows:
 | 
					 | 
				
			||||||
            self._cmake.definitions[
 | 
					 | 
				
			||||||
                "CMAKE_CXX_FLAGS"
 | 
					 | 
				
			||||||
            ] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        self._cmake.configure()
 | 
					 | 
				
			||||||
        return self._cmake
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def requirements(self):
 | 
					    def requirements(self):
 | 
				
			||||||
        for req in self.conan_data["requirements"]:
 | 
					        self.requires("zlib/[1.x]")
 | 
				
			||||||
            self.requires(req)
 | 
					        self.requires("zziplib/[0.13.x]")
 | 
				
			||||||
 | 
					        self.requires("freetype/[2.x]")
 | 
				
			||||||
        if os_info.is_windows:
 | 
					        self.requires("freeimage/[3.x]")
 | 
				
			||||||
 | 
					        self.requires("cg-toolkit/3.1@anotherfoxguy/stable")
 | 
				
			||||||
 | 
					        self.requires("pugixml/[1.x]")
 | 
				
			||||||
 | 
					        self.requires("libpng/1.6.38")
 | 
				
			||||||
 | 
					        self.requires("sdl/[2.x]")
 | 
				
			||||||
 | 
					        if self.settings.os == "Windows":
 | 
				
			||||||
            self.requires("directx-sdk/9.0@anotherfoxguy/stable")
 | 
					            self.requires("directx-sdk/9.0@anotherfoxguy/stable")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def system_requirements(self):
 | 
					    def system_requirements(self):
 | 
				
			||||||
        if os_info.is_linux:
 | 
					        Apt(self).install([
 | 
				
			||||||
            if os_info.with_apt:
 | 
					                "libx11-dev",
 | 
				
			||||||
                installer = SystemPackageTool()
 | 
					                "libxaw7-dev",
 | 
				
			||||||
                installer.install("libx11-dev")
 | 
					                "libxrandr-dev",
 | 
				
			||||||
                installer.install("libxaw7-dev")
 | 
					                "libgles2-mesa-dev",
 | 
				
			||||||
                installer.install("libxrandr-dev")
 | 
					                "libvulkan-dev",
 | 
				
			||||||
                installer.install("libgles2-mesa-dev")
 | 
					                "glslang-dev"
 | 
				
			||||||
                installer.install("libvulkan-dev")
 | 
					        ], check=True)
 | 
				
			||||||
                installer.install("glslang-dev")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
        tools.replace_in_file(
 | 
					
 | 
				
			||||||
            "CMake/Dependencies.cmake",
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_BITES"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_BULLET"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_DEPENDENCIES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_STBI"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_SAMPLES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_COPY_DEPENDENCIES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_INSTALL_DEPENDENCIES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_INSTALL_SAMPLES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_RSIMAGE"] = self.options.codec_rsimage
 | 
				
			||||||
 | 
					        tc.variables["OGRE_NODELESS_POSITIONING"] = self.options.nodeless_positioning
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if self.options.resourcemanager_strict == "off":
 | 
				
			||||||
 | 
					            tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 0
 | 
				
			||||||
 | 
					        elif self.options.resourcemanager_strict == "pedantic":
 | 
				
			||||||
 | 
					            tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 1
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if self.settings.os == "Windows":
 | 
				
			||||||
 | 
					            tc.variables["CMAKE_CXX_FLAGS"] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _patch_sources(self):
 | 
				
			||||||
 | 
					        apply_conandata_patches(self)
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "CMake/Dependencies.cmake"),
 | 
				
			||||||
            "find_package(DirectX)",
 | 
					            "find_package(DirectX)",
 | 
				
			||||||
            "find_package(DirectX9)",
 | 
					            "find_package(DirectX9)",
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        tools.replace_in_file(
 | 
					        replace_in_file(self,
 | 
				
			||||||
            "CMake/Dependencies.cmake",
 | 
					            os.path.join(self.source_folder, "PlugIns/FreeImageCodec/CMakeLists.txt"),
 | 
				
			||||||
            "find_package(FreeImage)",
 | 
					            "${FreeImage_LIBRARIES}",
 | 
				
			||||||
            "find_package(ConanFreeImage)",
 | 
					            "freeimage::FreeImage",
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        tools.replace_in_file(
 | 
					        replace_in_file(self,
 | 
				
			||||||
            "CMake/Packages/FindDirectX11.cmake",
 | 
					            os.path.join(self.source_folder, "Components/Overlay/CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "${FREETYPE_LIBRARIES}",
 | 
				
			||||||
 | 
					            "freetype",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "CMake/Packages/FindDirectX11.cmake"),
 | 
				
			||||||
            'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
 | 
					            'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
 | 
				
			||||||
            'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
 | 
					            'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        shutil.copyfile(
 | 
					 | 
				
			||||||
            "patches/FindFreeImage.cmake", "CMake/Packages/FindConanFreeImage.cmake"
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
        for patch in self.conan_data["patches"][self.version]:
 | 
					 | 
				
			||||||
            tools.patch(**patch)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
        cmake = self._configure_cmake()
 | 
					        self._patch_sources()
 | 
				
			||||||
 | 
					        cmake = CMake(self)
 | 
				
			||||||
 | 
					        cmake.configure()
 | 
				
			||||||
        cmake.build()
 | 
					        cmake.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package(self):
 | 
					    def package(self):
 | 
				
			||||||
        cmake = self._configure_cmake()
 | 
					        cmake = CMake(self)
 | 
				
			||||||
        cmake.install()
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					        rmdir(self, os.path.join(self.package_folder, "CMake"))
 | 
				
			||||||
 | 
					        rmdir(self, os.path.join(self.package_folder, "Docs"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.name = "OGRE"
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "OGRE::OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "OGRE::OGRE")
 | 
				
			||||||
        self.cpp_info.includedirs = [
 | 
					        self.cpp_info.includedirs = [
 | 
				
			||||||
            "include",
 | 
					            "include",
 | 
				
			||||||
            "include/OGRE",
 | 
					            "include/OGRE",
 | 
				
			||||||
            "include/OGRE/Bites",
 | 
					            "include/OGRE/Bites",
 | 
				
			||||||
            "include/OGRE/HLMS",
 | 
					 | 
				
			||||||
            "include/OGRE/MeshLodGenerator",
 | 
					            "include/OGRE/MeshLodGenerator",
 | 
				
			||||||
            "include/OGRE/Overlay",
 | 
					            "include/OGRE/Overlay",
 | 
				
			||||||
            "include/OGRE/Paging",
 | 
					            "include/OGRE/Paging",
 | 
				
			||||||
@@ -131,4 +144,4 @@ class OGREConan(ConanFile):
 | 
				
			|||||||
            "include/OGRE/Threading",
 | 
					            "include/OGRE/Threading",
 | 
				
			||||||
            "include/OGRE/Volume",
 | 
					            "include/OGRE/Volume",
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt      
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -76,6 +76,7 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # Include necessary submodules
 | 
					 | 
				
			||||||
 set(CMAKE_MODULE_PATH
 | 
					 | 
				
			||||||
+  "${CMAKE_BINARY_DIR}"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake/Utils"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake/Packages"
 | 
					 | 
				
			||||||
@@ -1,10 +0,0 @@
 | 
				
			|||||||
--- CMakeLists.txt      
 | 
					 | 
				
			||||||
+++ CMakeLists.txt
 | 
					 | 
				
			||||||
@@ -80,6 +80,7 @@
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 # Include necessary submodules
 | 
					 | 
				
			||||||
 set(CMAKE_MODULE_PATH
 | 
					 | 
				
			||||||
+  "${CMAKE_BINARY_DIR}"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake/Utils"
 | 
					 | 
				
			||||||
   "${PROJECT_SOURCE_DIR}/CMake/Packages"
 | 
					 | 
				
			||||||
							
								
								
									
										7
									
								
								ogre/2.3/conandata.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								ogre/2.3/conandata.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					sources:
 | 
				
			||||||
 | 
					  "2022.10":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre-next/archive/ede1690bb3dcf932df6a06f06e9e6de585e5eeea.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "6baf05cc4dc14cb70b6f4a958dbc7ac79a209eb9658733d0b19f651a5f96da08"
 | 
				
			||||||
 | 
					  "2023.01":
 | 
				
			||||||
 | 
					    url: "https://github.com/OGRECave/ogre-next/archive/186ea7ee972860ed09bcdbcdd99f609348c6aa8b.tar.gz"
 | 
				
			||||||
 | 
					    sha256: "38a93399b5ce2b053894e858cafa3830118ff938f40204c727a77c9233744e8f"
 | 
				
			||||||
							
								
								
									
										137
									
								
								ogre/2.3/conanfile.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								ogre/2.3/conanfile.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					from conan import ConanFile
 | 
				
			||||||
 | 
					from conan.tools.files import get, collect_libs, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					from conan.tools.system.package_manager import Apt
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class OGRENextConan(ConanFile):
 | 
				
			||||||
 | 
					    name = "ogre3d-next"
 | 
				
			||||||
 | 
					    license = "MIT"
 | 
				
			||||||
 | 
					    url = "https://github.com/AnotherFoxGuy/conan-OGRE"
 | 
				
			||||||
 | 
					    description = "scene-oriented, flexible 3D engine written in C++"
 | 
				
			||||||
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def export_sources(self):
 | 
				
			||||||
 | 
					        export_conandata_patches(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def requirements(self):
 | 
				
			||||||
 | 
					        self.requires("zlib/[1.x]")
 | 
				
			||||||
 | 
					        self.requires("zziplib/[0.13.x]")
 | 
				
			||||||
 | 
					        self.requires("freetype/[2.x]")
 | 
				
			||||||
 | 
					        self.requires("freeimage/[3.x]")
 | 
				
			||||||
 | 
					        self.requires("rapidjson/cci.20220822")
 | 
				
			||||||
 | 
					        self.requires("libpng/1.6.38")
 | 
				
			||||||
 | 
					        self.requires("sdl/[2.x]")
 | 
				
			||||||
 | 
					        self.requires("tinyxml/[2.x]")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def system_requirements(self):
 | 
				
			||||||
 | 
					        Apt(self).install([
 | 
				
			||||||
 | 
					                "libx11-dev",
 | 
				
			||||||
 | 
					                "libxaw7-dev",
 | 
				
			||||||
 | 
					                "libxrandr-dev",
 | 
				
			||||||
 | 
					                "libgles2-mesa-dev",
 | 
				
			||||||
 | 
					                "libvulkan-dev",
 | 
				
			||||||
 | 
					                "glslang-dev"
 | 
				
			||||||
 | 
					        ], check=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def source(self):
 | 
				
			||||||
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_ATMOSPHERE"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_BITES"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_COMPONENT_TERRAIN"] = "ON"
 | 
				
			||||||
 | 
					        #tc.variables["OGRE_BUILD_COMPONENT_PAGING"] = "ON" # Completly broken
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_DEPENDENCIES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_SAMPLES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_BUILD_SAMPLES2"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_CONFIG_ENABLE_JSON"] = "ON"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_COPY_DEPENDENCIES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_INSTALL_DEPENDENCIES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.variables["OGRE_INSTALL_SAMPLES"] = "OFF"
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _patch_sources(self):  
 | 
				
			||||||
 | 
					        apply_conandata_patches(self)
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "CMake/Dependencies.cmake"),
 | 
				
			||||||
 | 
					            "find_package(Rapidjson)", 
 | 
				
			||||||
 | 
					            """
 | 
				
			||||||
 | 
					            find_package(RapidJSON)
 | 
				
			||||||
 | 
					            set(Rapidjson_FOUND TRUE)
 | 
				
			||||||
 | 
					            """,
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "Components/Overlay/CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "${FREETYPE_LIBRARIES}",
 | 
				
			||||||
 | 
					            "freetype",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "CMake/InstallDependencies.cmake"),
 | 
				
			||||||
 | 
					            "# Install dependencies",
 | 
				
			||||||
 | 
					            "return()",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        replace_in_file(self,
 | 
				
			||||||
 | 
					            os.path.join(self.source_folder, "OgreMain/CMakeLists.txt"),
 | 
				
			||||||
 | 
					            "target_link_libraries(${OGRE_NEXT}Main ${LIBRARIES})",
 | 
				
			||||||
 | 
					            "target_link_libraries(${OGRE_NEXT}Main ${LIBRARIES} rapidjson freeimage::FreeImage)",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def build(self):
 | 
				
			||||||
 | 
					        self._patch_sources()
 | 
				
			||||||
 | 
					        cmake = CMake(self)
 | 
				
			||||||
 | 
					        cmake.configure()
 | 
				
			||||||
 | 
					        cmake.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package(self):
 | 
				
			||||||
 | 
					        cmake = CMake(self)
 | 
				
			||||||
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					        rmdir(self, os.path.join(self.package_folder, "CMake"))
 | 
				
			||||||
 | 
					        rmdir(self, os.path.join(self.package_folder, "Docs"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package_info(self):
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "OGRE::OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "OGRE::OGRE")
 | 
				
			||||||
 | 
					        self.cpp_info.includedirs = [
 | 
				
			||||||
 | 
					            "include",
 | 
				
			||||||
 | 
					            "include/OGRE",
 | 
				
			||||||
 | 
					            "include/OGRE/Animation",
 | 
				
			||||||
 | 
					            "include/OGRE/Atmosphere",
 | 
				
			||||||
 | 
					            "include/OGRE/CommandBuffer",
 | 
				
			||||||
 | 
					            "include/OGRE/Compositor",
 | 
				
			||||||
 | 
					            "include/OGRE/Compute",
 | 
				
			||||||
 | 
					            "include/OGRE/Hash",
 | 
				
			||||||
 | 
					            "include/OGRE/Hlms",
 | 
				
			||||||
 | 
					            "include/OGRE/Hlms/Common",
 | 
				
			||||||
 | 
					            "include/OGRE/Hlms/Pbs",
 | 
				
			||||||
 | 
					            "include/OGRE/Hlms/Unlit",
 | 
				
			||||||
 | 
					            "include/OGRE/Math",
 | 
				
			||||||
 | 
					            "include/OGRE/MeshLodGenerator",
 | 
				
			||||||
 | 
					            "include/OGRE/ogrestd",
 | 
				
			||||||
 | 
					            "include/OGRE/Overlay",
 | 
				
			||||||
 | 
					            "include/OGRE/Plugins",
 | 
				
			||||||
 | 
					            "include/OGRE/RenderSystems",
 | 
				
			||||||
 | 
					            "include/OGRE/SceneFormat",
 | 
				
			||||||
 | 
					            "include/OGRE/Threading",
 | 
				
			||||||
 | 
					            "include/OGRE/Vao",
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					        # Directories where libraries can be found
 | 
				
			||||||
 | 
					        self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
 | 
				
			||||||
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
							
								
								
									
										11
									
								
								ogre/2.3/patches/2.3.1/FindPkgMacros.cmake.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								ogre/2.3/patches/2.3.1/FindPkgMacros.cmake.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					--- CMake/Utils/FindPkgMacros.cmake
 | 
				
			||||||
 | 
					+++ CMake/Utils/FindPkgMacros.cmake
 | 
				
			||||||
 | 
					@@ -82,7 +82,7 @@
 | 
				
			||||||
 | 
					   if (${PREFIX}_FWK)
 | 
				
			||||||
 | 
					     set(${PREFIX} ${${PREFIX}_FWK})
 | 
				
			||||||
 | 
					   elseif (${PREFIX}_REL AND ${PREFIX}_DBG)
 | 
				
			||||||
 | 
					-    set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG})
 | 
				
			||||||
 | 
					+    set(${PREFIX} "$<$<CONFIG:Debug>:${${PREFIX}_DBG}>$<$<NOT:$<CONFIG:Debug>>:${${PREFIX}_REL}>")
 | 
				
			||||||
 | 
					   elseif (${PREFIX}_REL)
 | 
				
			||||||
 | 
					     set(${PREFIX} ${${PREFIX}_REL})
 | 
				
			||||||
 | 
					   elseif (${PREFIX}_DBG)
 | 
				
			||||||
							
								
								
									
										11
									
								
								ogre/2.3/patches/2.3.1/RapidJSON-fix.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								ogre/2.3/patches/2.3.1/RapidJSON-fix.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					--- OgreMain/CMakeLists.txt
 | 
				
			||||||
 | 
					+++ OgreMain/CMakeLists.txt
 | 
				
			||||||
 | 
					@@ -475,7 +475,7 @@
 | 
				
			||||||
 | 
					     set_target_properties(OgreMain PROPERTIES	OUTPUT_NAME Ogre)
 | 
				
			||||||
 | 
					   endif ()
 | 
				
			||||||
 | 
					 endif ()
 | 
				
			||||||
 | 
					-target_link_libraries(OgreMain ${LIBRARIES})
 | 
				
			||||||
 | 
					+target_link_libraries(OgreMain ${LIBRARIES} RapidJSON::RapidJSON freeimage::FreeImage)
 | 
				
			||||||
 | 
					 if (MINGW)
 | 
				
			||||||
 | 
					   # may need winsock htons functions for FreeImage
 | 
				
			||||||
 | 
					   target_link_libraries(OgreMain ws2_32)
 | 
				
			||||||
@@ -1,5 +1,3 @@
 | 
				
			|||||||
versions:
 | 
					versions:
 | 
				
			||||||
  "1.11.6.1":
 | 
					  "13.5.3":
 | 
				
			||||||
    folder: "1.11"
 | 
					 | 
				
			||||||
  "13.4.4":
 | 
					 | 
				
			||||||
    folder: "13"
 | 
					    folder: "13"
 | 
				
			||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
from conans import ConanFile, CMake, tools
 | 
					from conan import ConanFile
 | 
				
			||||||
from conans.tools import os_info, SystemPackageTool
 | 
					from conan.tools.files import get, collect_libs
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
 | 
				
			||||||
 | 
					from conan.tools.system import package_manager
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class OisConan(ConanFile):
 | 
					class OisConan(ConanFile):
 | 
				
			||||||
@@ -11,18 +13,22 @@ class OisConan(ConanFile):
 | 
				
			|||||||
    topics = ("Input", "System")
 | 
					    topics = ("Input", "System")
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def system_requirements(self):
 | 
					    def system_requirements(self):
 | 
				
			||||||
        if os_info.is_linux:
 | 
					        package_manager.Apt(self).install(["libx11-dev"])
 | 
				
			||||||
            if os_info.with_apt:
 | 
					 | 
				
			||||||
                installer = SystemPackageTool()
 | 
					 | 
				
			||||||
                installer.install("libx11-dev")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.variables["OIS_BUILD_DEMOS"] = "OFF"
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
        cmake.definitions['OIS_BUILD_DEMOS'] = 'OFF'
 | 
					 | 
				
			||||||
        cmake.configure()
 | 
					        cmake.configure()
 | 
				
			||||||
        cmake.build()
 | 
					        cmake.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -32,4 +38,4 @@ class OisConan(ConanFile):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.includedirs = ['include', 'include/ois']
 | 
					        self.cpp_info.includedirs = ['include', 'include/ois']
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								run_linter.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								run_linter.bat
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					@echo off
 | 
				
			||||||
 | 
					set PYTHONPATH=%~dp0
 | 
				
			||||||
 | 
					pylint --rcfile=linter/pylintrc_recipe %*
 | 
				
			||||||
@@ -1,5 +1,6 @@
 | 
				
			|||||||
from conans import ConanFile, CMake, tools
 | 
					from conan import ConanFile
 | 
				
			||||||
 | 
					from conan.tools.files import get, collect_libs
 | 
				
			||||||
 | 
					from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SocketwConan(ConanFile):
 | 
					class SocketwConan(ConanFile):
 | 
				
			||||||
    name = "socketw"
 | 
					    name = "socketw"
 | 
				
			||||||
@@ -7,14 +8,22 @@ class SocketwConan(ConanFile):
 | 
				
			|||||||
    url = "https://github.com/RigsOfRods/socketw/issues"
 | 
					    url = "https://github.com/RigsOfRods/socketw/issues"
 | 
				
			||||||
    description = "SocketW is a library which provides cross-platform socket abstraction"
 | 
					    description = "SocketW is a library which provides cross-platform socket abstraction"
 | 
				
			||||||
    settings = "os", "compiler", "build_type", "arch"
 | 
					    settings = "os", "compiler", "build_type", "arch"
 | 
				
			||||||
    generators = "cmake"
 | 
					
 | 
				
			||||||
 | 
					    def layout(self):
 | 
				
			||||||
 | 
					        cmake_layout(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def requirements(self):
 | 
					    def requirements(self):
 | 
				
			||||||
        for req in self.conan_data["requirements"]:
 | 
					        for req in self.conan_data["requirements"]:
 | 
				
			||||||
            self.requires(req)
 | 
					            self.requires(req)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def source(self):
 | 
					    def source(self):
 | 
				
			||||||
        tools.get(**self.conan_data["sources"][self.version], strip_root=True)
 | 
					        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def generate(self):
 | 
				
			||||||
 | 
					        tc = CMakeToolchain(self)
 | 
				
			||||||
 | 
					        tc.generate()
 | 
				
			||||||
 | 
					        deps = CMakeDeps(self)
 | 
				
			||||||
 | 
					        deps.generate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
        cmake = CMake(self)
 | 
					        cmake = CMake(self)
 | 
				
			||||||
@@ -26,4 +35,8 @@ class SocketwConan(ConanFile):
 | 
				
			|||||||
        cmake.install()
 | 
					        cmake.install()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def package_info(self):
 | 
					    def package_info(self):
 | 
				
			||||||
        self.cpp_info.libs = tools.collect_libs(self)
 | 
					        self.cpp_info.set_property("cmake_module_file_name", "SocketW")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_module_target_name", "SocketW::SocketW")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_file_name", "SocketW")
 | 
				
			||||||
 | 
					        self.cpp_info.set_property("cmake_target_name", "SocketW::SocketW")
 | 
				
			||||||
 | 
					        self.cpp_info.libs = collect_libs(self)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										21
									
								
								tools/conanfile.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								tools/conanfile.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					import os
 | 
				
			||||||
 | 
					from conans import ConanFile
 | 
				
			||||||
 | 
					from conans.errors import ConanInvalidConfiguration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class conantoolsConan(ConanFile):
 | 
				
			||||||
 | 
					    name = "afg-conan-tools"
 | 
				
			||||||
 | 
					    version = "1.0"
 | 
				
			||||||
 | 
					    description = "helper-tools"
 | 
				
			||||||
 | 
					    settings = "os", "arch"
 | 
				
			||||||
 | 
					    exports_sources = "bin/**"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def validate(self):
 | 
				
			||||||
 | 
					        if self.settings.os != "Linux":
 | 
				
			||||||
 | 
					            raise ConanInvalidConfiguration("Only Linux supported")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package(self):
 | 
				
			||||||
 | 
					        self.copy("*", src="bin", dst="bin", keep_path=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def package_info(self):
 | 
				
			||||||
 | 
					        self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
 | 
				
			||||||
		Reference in New Issue
	
	Block a user