mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-08-06 02:37:55 +00:00
(#21684) dependencies: new recipe
This commit is contained in:
11
recipes/dependencies/all/conandata.yml
Normal file
11
recipes/dependencies/all/conandata.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
sources:
|
||||
"1.11.1":
|
||||
"x86_64":
|
||||
url: "https://github.com/lucasg/Dependencies/releases/download/v1.11.1/Dependencies_x64_Release.zip"
|
||||
sha256: "7d22dc00f1c09fd4415d48ad74d1cf801893e83b9a39944b0fce6dea7ceaea99"
|
||||
"x86":
|
||||
url: "https://github.com/lucasg/Dependencies/releases/download/v1.11.1/Dependencies_x86_Release.zip"
|
||||
sha256: "3e6bc62b4163c4e8035e8a597515c116343fcb76fa4315317c3cafe0bdc9e257"
|
||||
"license":
|
||||
url: "https://raw.githubusercontent.com/lucasg/Dependencies/v1.11.1/LICENSE"
|
||||
sha256: "5d7cbf9b08285c1f89e4f4f1341090c662f4078dbf7ce8a7d392d2482e550fb6"
|
50
recipes/dependencies/all/conanfile.py
Normal file
50
recipes/dependencies/all/conanfile.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from conan import ConanFile
|
||||
from conan.errors import ConanInvalidConfiguration
|
||||
from conan.tools.files import copy, get, download
|
||||
import os
|
||||
|
||||
required_conan_version = ">=1.47.0"
|
||||
|
||||
|
||||
class PackageConan(ConanFile):
|
||||
name = "dependencies"
|
||||
description = ("Dependencies can help Windows developers troubleshooting their DLL-loading dependency issues. "
|
||||
"It is a rewrite of the legacy Dependency Walker software, which was shipped along Windows SDKs, "
|
||||
"but whose development stopped around 2006.")
|
||||
license = "MIT"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
homepage = "https://github.com/lucasg/Dependencies"
|
||||
topics = ("windows", "dll", "debugging", "pre-built")
|
||||
package_type = "application"
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
|
||||
def package_id(self):
|
||||
del self.info.settings.compiler
|
||||
del self.info.settings.build_type
|
||||
|
||||
def validate(self):
|
||||
if self.settings.os != "Windows":
|
||||
raise ConanInvalidConfiguration("Dependencies is only available on Windows")
|
||||
if self.settings.arch not in ["x86_64", "x86"]:
|
||||
raise ConanInvalidConfiguration("Dependencies is only available for x86_64 and x86 architectures")
|
||||
|
||||
def build(self):
|
||||
get(self, **self.conan_data["sources"][self.version][str(self.settings.arch)], strip_root=False)
|
||||
download(self, **self.conan_data["sources"][self.version]["license"], filename="LICENSE")
|
||||
|
||||
def package(self):
|
||||
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
|
||||
copy(self, "*.exe", self.source_folder, os.path.join(self.package_folder, "bin"))
|
||||
copy(self, "*.dll", self.source_folder, os.path.join(self.package_folder, "bin"),
|
||||
excludes=["msvcp*.dll", "msvcr*.dll", "vcruntime*.dll"])
|
||||
copy(self, "*.config", self.source_folder, os.path.join(self.package_folder, "bin"))
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.frameworkdirs = []
|
||||
self.cpp_info.libdirs = []
|
||||
self.cpp_info.resdirs = []
|
||||
self.cpp_info.includedirs = []
|
||||
|
||||
# TODO: Legacy, to be removed on Conan 2.0
|
||||
bin_folder = os.path.join(self.package_folder, "bin")
|
||||
self.env_info.PATH.append(bin_folder)
|
22
recipes/dependencies/all/test_package/conanfile.py
Normal file
22
recipes/dependencies/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import sys
|
||||
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import cmake_layout
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
generators = "VirtualBuildEnv"
|
||||
test_type = "explicit"
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires(self.tested_reference_str)
|
||||
|
||||
def test(self):
|
||||
self.run(f"dependencies -chain -depth 1 {sys.executable}")
|
||||
|
||||
# FYI, you can get similar info with a VCVars generator and
|
||||
# self.run(f"dumpbin /imports {sys.executable}")
|
3
recipes/dependencies/config.yml
Normal file
3
recipes/dependencies/config.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
versions:
|
||||
"1.11.1":
|
||||
folder: all
|
Reference in New Issue
Block a user