mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	Add Conan Building For Development (#432)
This commit is contained in:
		
							
								
								
									
										193
									
								
								external/rocksdb/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										193
									
								
								external/rocksdb/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,193 @@
 | 
			
		||||
import os
 | 
			
		||||
import shutil
 | 
			
		||||
from conans import ConanFile, CMake
 | 
			
		||||
from conan.tools import microsoft as ms
 | 
			
		||||
 | 
			
		||||
class RocksDB(ConanFile):
 | 
			
		||||
    name = 'rocksdb'
 | 
			
		||||
    version = '6.27.3'
 | 
			
		||||
 | 
			
		||||
    license = ('GPL-2.0-only', 'Apache-2.0')
 | 
			
		||||
    url = 'https://github.com/conan-io/conan-center-index'
 | 
			
		||||
    description = 'A library that provides an embeddable, persistent key-value store for fast storage'
 | 
			
		||||
    topics = ('rocksdb', 'database', 'leveldb', 'facebook', 'key-value')
 | 
			
		||||
 | 
			
		||||
    settings = 'os', 'compiler', 'build_type', 'arch'
 | 
			
		||||
    options = {
 | 
			
		||||
        'enable_sse': [False, 'sse42', 'avx2'],
 | 
			
		||||
        'fPIC': [True, False],
 | 
			
		||||
        'lite': [True, False],
 | 
			
		||||
        'shared': [True, False],
 | 
			
		||||
        'use_rtti': [True, False],
 | 
			
		||||
        'with_gflags': [True, False],
 | 
			
		||||
        'with_jemalloc': [True, False],
 | 
			
		||||
        'with_lz4': [True, False],
 | 
			
		||||
        'with_snappy': [True, False],
 | 
			
		||||
        'with_tbb': [True, False],
 | 
			
		||||
        'with_zlib': [True, False],
 | 
			
		||||
        'with_zstd': [True, False],
 | 
			
		||||
    }
 | 
			
		||||
    default_options = {
 | 
			
		||||
        'enable_sse': False,
 | 
			
		||||
        'fPIC': True,
 | 
			
		||||
        'lite': False,
 | 
			
		||||
        'shared': False,
 | 
			
		||||
        'use_rtti': False,
 | 
			
		||||
        'with_gflags': False,
 | 
			
		||||
        'with_jemalloc': False,
 | 
			
		||||
        'with_lz4': False,
 | 
			
		||||
        'with_snappy': False,
 | 
			
		||||
        'with_tbb': False,
 | 
			
		||||
        'with_zlib': False,
 | 
			
		||||
        'with_zstd': False,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    def requirements(self):
 | 
			
		||||
        if self.options.with_gflags:
 | 
			
		||||
            self.requires('gflags/2.2.2')
 | 
			
		||||
        if self.options.with_jemalloc:
 | 
			
		||||
            self.requires('jemalloc/5.2.1')
 | 
			
		||||
        if self.options.with_lz4:
 | 
			
		||||
            self.requires('lz4/1.9.3')
 | 
			
		||||
        if self.options.with_snappy:
 | 
			
		||||
            self.requires('snappy/1.1.9')
 | 
			
		||||
        if self.options.with_tbb:
 | 
			
		||||
            self.requires('onetbb/2020.3')
 | 
			
		||||
        if self.options.with_zlib:
 | 
			
		||||
            self.requires('zlib/1.2.11')
 | 
			
		||||
        if self.options.with_zstd:
 | 
			
		||||
            self.requires('zstd/1.5.2')
 | 
			
		||||
 | 
			
		||||
    def config_options(self):
 | 
			
		||||
        if self.settings.os == 'Windows':
 | 
			
		||||
            del self.options.fPIC
 | 
			
		||||
 | 
			
		||||
    def configure(self):
 | 
			
		||||
        if self.options.shared:
 | 
			
		||||
            del self.options.fPIC
 | 
			
		||||
 | 
			
		||||
    generators = 'cmake', 'cmake_find_package'
 | 
			
		||||
 | 
			
		||||
    scm = {
 | 
			
		||||
        'type': 'git',
 | 
			
		||||
        'url': 'https://github.com/facebook/rocksdb.git',
 | 
			
		||||
        'revision': 'v6.27.3',
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    exports_sources = 'thirdparty.inc'
 | 
			
		||||
    # For out-of-source build.
 | 
			
		||||
    no_copy_source = True
 | 
			
		||||
 | 
			
		||||
    _cmake = None
 | 
			
		||||
 | 
			
		||||
    def _configure_cmake(self):
 | 
			
		||||
        if self._cmake:
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        self._cmake = CMake(self)
 | 
			
		||||
 | 
			
		||||
        self._cmake.definitions['CMAKE_POSITION_INDEPENDENT_CODE'] = True
 | 
			
		||||
 | 
			
		||||
        self._cmake.definitions['DISABLE_STALL_NOTIF'] = False
 | 
			
		||||
        self._cmake.definitions['FAIL_ON_WARNINGS'] = False
 | 
			
		||||
        self._cmake.definitions['OPTDBG'] = True
 | 
			
		||||
        self._cmake.definitions['WITH_TESTS'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_TOOLS'] = False
 | 
			
		||||
 | 
			
		||||
        self._cmake.definitions['WITH_GFLAGS'] = self.options.with_gflags
 | 
			
		||||
        self._cmake.definitions['WITH_JEMALLOC'] = self.options.with_jemalloc
 | 
			
		||||
        self._cmake.definitions['WITH_LZ4'] = self.options.with_lz4
 | 
			
		||||
        self._cmake.definitions['WITH_SNAPPY'] = self.options.with_snappy
 | 
			
		||||
        self._cmake.definitions['WITH_TBB'] = self.options.with_tbb
 | 
			
		||||
        self._cmake.definitions['WITH_ZLIB'] = self.options.with_zlib
 | 
			
		||||
        self._cmake.definitions['WITH_ZSTD'] = self.options.with_zstd
 | 
			
		||||
 | 
			
		||||
        self._cmake.definitions['USE_RTTI'] = self.options.use_rtti
 | 
			
		||||
        self._cmake.definitions['ROCKSDB_LITE'] = self.options.lite
 | 
			
		||||
        self._cmake.definitions['ROCKSDB_INSTALL_ON_WINDOWS'] = (
 | 
			
		||||
            self.settings.os == 'Windows'
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if not self.options.enable_sse:
 | 
			
		||||
            self._cmake.definitions['PORTABLE'] = True
 | 
			
		||||
            self._cmake.definitions['FORCE_SSE42'] = False
 | 
			
		||||
        elif self.options.enable_sse == 'sse42':
 | 
			
		||||
            self._cmake.definitions['PORTABLE'] = True
 | 
			
		||||
            self._cmake.definitions['FORCE_SSE42'] = True
 | 
			
		||||
        elif self.options.enable_sse == 'avx2':
 | 
			
		||||
            self._cmake.definitions['PORTABLE'] = False
 | 
			
		||||
            self._cmake.definitions['FORCE_SSE42'] = False
 | 
			
		||||
 | 
			
		||||
        self._cmake.definitions['WITH_ASAN'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_BZ2'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_JNI'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_LIBRADOS'] = False
 | 
			
		||||
        if ms.is_msvc(self):
 | 
			
		||||
            self._cmake.definitions['WITH_MD_LIBRARY'] = (
 | 
			
		||||
                ms.msvc_runtime_flag(self).startswith('MD')
 | 
			
		||||
            )
 | 
			
		||||
            self._cmake.definitions['WITH_RUNTIME_DEBUG'] = (
 | 
			
		||||
                ms.msvc_runtime_flag(self).endswith('d')
 | 
			
		||||
            )
 | 
			
		||||
        self._cmake.definitions['WITH_NUMA'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_TSAN'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_UBSAN'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_WINDOWS_UTF8_FILENAMES'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_XPRESS'] = False
 | 
			
		||||
        self._cmake.definitions['WITH_FALLOCATE'] = True
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def build(self):
 | 
			
		||||
        if ms.is_msvc(self):
 | 
			
		||||
            file = os.path.join(
 | 
			
		||||
                self.recipe_folder, '..', 'export_source', 'thirdparty.inc'
 | 
			
		||||
            )
 | 
			
		||||
            shutil.copy(file, self.build_folder)
 | 
			
		||||
        self._configure_cmake()
 | 
			
		||||
        self._cmake.configure()
 | 
			
		||||
        self._cmake.build()
 | 
			
		||||
 | 
			
		||||
    def package(self):
 | 
			
		||||
        self._configure_cmake()
 | 
			
		||||
        self._cmake.install()
 | 
			
		||||
 | 
			
		||||
    def package_info(self):
 | 
			
		||||
        self.cpp_info.filenames['cmake_find_package'] = 'RocksDB'
 | 
			
		||||
        self.cpp_info.filenames['cmake_find_package_multi'] = 'RocksDB'
 | 
			
		||||
        self.cpp_info.set_property('cmake_file_name', 'RocksDB')
 | 
			
		||||
 | 
			
		||||
        self.cpp_info.names['cmake_find_package'] = 'RocksDB'
 | 
			
		||||
        self.cpp_info.names['cmake_find_package_multi'] = 'RocksDB'
 | 
			
		||||
 | 
			
		||||
        self.cpp_info.components['librocksdb'].names['cmake_find_package'] = 'rocksdb'
 | 
			
		||||
        self.cpp_info.components['librocksdb'].names['cmake_find_package_multi'] = 'rocksdb'
 | 
			
		||||
        self.cpp_info.components['librocksdb'].set_property(
 | 
			
		||||
            'cmake_target_name', 'RocksDB::rocksdb'
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        self.cpp_info.components['librocksdb'].libs = ['rocksdb']
 | 
			
		||||
 | 
			
		||||
        if self.settings.os == "Windows":
 | 
			
		||||
            self.cpp_info.components["librocksdb"].system_libs = ["shlwapi", "rpcrt4"]
 | 
			
		||||
            if self.options.shared:
 | 
			
		||||
                self.cpp_info.components["librocksdb"].defines = ["ROCKSDB_DLL"]
 | 
			
		||||
        elif self.settings.os in ["Linux", "FreeBSD"]:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].system_libs = ["pthread", "m"]
 | 
			
		||||
 | 
			
		||||
        if self.options.lite:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].defines.append("ROCKSDB_LITE")
 | 
			
		||||
 | 
			
		||||
        if self.options.with_gflags:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].requires.append("gflags::gflags")
 | 
			
		||||
        if self.options.with_jemalloc:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].requires.append("jemalloc::jemalloc")
 | 
			
		||||
        if self.options.with_lz4:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].requires.append("lz4::lz4")
 | 
			
		||||
        if self.options.with_snappy:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].requires.append("snappy::snappy")
 | 
			
		||||
        if self.options.with_tbb:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].requires.append("onetbb::onetbb")
 | 
			
		||||
        if self.options.with_zlib:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].requires.append("zlib::zlib")
 | 
			
		||||
        if self.options.with_zstd:
 | 
			
		||||
            self.cpp_info.components["librocksdb"].requires.append("zstd::zstd")
 | 
			
		||||
							
								
								
									
										62
									
								
								external/rocksdb/thirdparty.inc
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								external/rocksdb/thirdparty.inc
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
if(WITH_GFLAGS)
 | 
			
		||||
  # Config with namespace available since gflags 2.2.2
 | 
			
		||||
  find_package(gflags REQUIRED)
 | 
			
		||||
  set(GFLAGS_LIB gflags::gflags)
 | 
			
		||||
  list(APPEND THIRDPARTY_LIBS ${GFLAGS_LIB})
 | 
			
		||||
  add_definitions(-DGFLAGS=1)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(WITH_SNAPPY)
 | 
			
		||||
  find_package(Snappy REQUIRED)
 | 
			
		||||
  add_definitions(-DSNAPPY)
 | 
			
		||||
  list(APPEND THIRDPARTY_LIBS Snappy::snappy)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(WITH_LZ4)
 | 
			
		||||
  find_package(lz4 REQUIRED)
 | 
			
		||||
  add_definitions(-DLZ4)
 | 
			
		||||
  list(APPEND THIRDPARTY_LIBS lz4::lz4)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(WITH_ZLIB)
 | 
			
		||||
  find_package(ZLIB REQUIRED)
 | 
			
		||||
  add_definitions(-DZLIB)
 | 
			
		||||
  list(APPEND THIRDPARTY_LIBS ZLIB::ZLIB)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
option(WITH_BZ2 "build with bzip2" OFF)
 | 
			
		||||
if(WITH_BZ2)
 | 
			
		||||
  find_package(BZip2 REQUIRED)
 | 
			
		||||
  add_definitions(-DBZIP2)
 | 
			
		||||
  list(APPEND THIRDPARTY_LIBS BZip2::BZip2)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(WITH_ZSTD)
 | 
			
		||||
  find_package(zstd REQUIRED)
 | 
			
		||||
  add_definitions(-DZSTD)
 | 
			
		||||
  list(APPEND THIRDPARTY_LIBS zstd::zstd)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
# ================================================== XPRESS ==================================================
 | 
			
		||||
# This makes use of built-in Windows API, no additional includes, links to a system lib
 | 
			
		||||
 | 
			
		||||
if(WITH_XPRESS)
 | 
			
		||||
  message(STATUS "XPRESS is enabled")
 | 
			
		||||
  add_definitions(-DXPRESS)
 | 
			
		||||
  # We are using the implementation provided by the system
 | 
			
		||||
  list(APPEND SYSTEM_LIBS Cabinet.lib)
 | 
			
		||||
else()
 | 
			
		||||
  message(STATUS "XPRESS is disabled")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
# ================================================== JEMALLOC ==================================================
 | 
			
		||||
if(WITH_JEMALLOC)
 | 
			
		||||
  message(STATUS "JEMALLOC library is enabled")
 | 
			
		||||
  add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_EXPORT= -DJEMALLOC_NO_RENAME)
 | 
			
		||||
  list(APPEND THIRDPARTY_LIBS jemalloc::jemalloc)
 | 
			
		||||
  set(ARTIFACT_SUFFIX "_je")
 | 
			
		||||
 | 
			
		||||
else ()
 | 
			
		||||
  set(ARTIFACT_SUFFIX "")
 | 
			
		||||
  message(STATUS "JEMALLOC library is disabled")
 | 
			
		||||
endif ()
 | 
			
		||||
							
								
								
									
										40
									
								
								external/snappy/conandata.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								external/snappy/conandata.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
sources:
 | 
			
		||||
  "1.1.10":
 | 
			
		||||
    url: "https://github.com/google/snappy/archive/1.1.10.tar.gz"
 | 
			
		||||
    sha256: "49d831bffcc5f3d01482340fe5af59852ca2fe76c3e05df0e67203ebbe0f1d90"
 | 
			
		||||
  "1.1.9":
 | 
			
		||||
    url: "https://github.com/google/snappy/archive/1.1.9.tar.gz"
 | 
			
		||||
    sha256: "75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7"
 | 
			
		||||
  "1.1.8":
 | 
			
		||||
    url: "https://github.com/google/snappy/archive/1.1.8.tar.gz"
 | 
			
		||||
    sha256: "16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f"
 | 
			
		||||
  "1.1.7":
 | 
			
		||||
    url: "https://github.com/google/snappy/archive/1.1.7.tar.gz"
 | 
			
		||||
    sha256: "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4"
 | 
			
		||||
patches:
 | 
			
		||||
  "1.1.10":
 | 
			
		||||
    - patch_file: "patches/1.1.10-0001-fix-inlining-failure.patch"
 | 
			
		||||
      patch_description: "disable inlining for compilation error"
 | 
			
		||||
      patch_type: "portability"
 | 
			
		||||
    - patch_file: "patches/1.1.9-0002-no-Werror.patch"
 | 
			
		||||
      patch_description: "disable 'warning as error' options"
 | 
			
		||||
      patch_type: "portability"
 | 
			
		||||
    - patch_file: "patches/1.1.10-0003-fix-clobber-list-older-llvm.patch"
 | 
			
		||||
      patch_description: "disable inline asm on apple-clang"
 | 
			
		||||
      patch_type: "portability"
 | 
			
		||||
    - patch_file: "patches/1.1.9-0004-rtti-by-default.patch"
 | 
			
		||||
      patch_description: "remove 'disable rtti'"
 | 
			
		||||
      patch_type: "conan"
 | 
			
		||||
  "1.1.9":
 | 
			
		||||
    - patch_file: "patches/1.1.9-0001-fix-inlining-failure.patch"
 | 
			
		||||
      patch_description: "disable inlining for compilation error"
 | 
			
		||||
      patch_type: "portability"
 | 
			
		||||
    - patch_file: "patches/1.1.9-0002-no-Werror.patch"
 | 
			
		||||
      patch_description: "disable 'warning as error' options"
 | 
			
		||||
      patch_type: "portability"
 | 
			
		||||
    - patch_file: "patches/1.1.9-0003-fix-clobber-list-older-llvm.patch"
 | 
			
		||||
      patch_description: "disable inline asm on apple-clang"
 | 
			
		||||
      patch_type: "portability"
 | 
			
		||||
    - patch_file: "patches/1.1.9-0004-rtti-by-default.patch"
 | 
			
		||||
      patch_description: "remove 'disable rtti'"
 | 
			
		||||
      patch_type: "conan"
 | 
			
		||||
							
								
								
									
										89
									
								
								external/snappy/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								external/snappy/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,89 @@
 | 
			
		||||
from conan import ConanFile
 | 
			
		||||
from conan.tools.build import check_min_cppstd
 | 
			
		||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
 | 
			
		||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
 | 
			
		||||
from conan.tools.scm import Version
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
required_conan_version = ">=1.54.0"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class SnappyConan(ConanFile):
 | 
			
		||||
    name = "snappy"
 | 
			
		||||
    description = "A fast compressor/decompressor"
 | 
			
		||||
    topics = ("google", "compressor", "decompressor")
 | 
			
		||||
    url = "https://github.com/conan-io/conan-center-index"
 | 
			
		||||
    homepage = "https://github.com/google/snappy"
 | 
			
		||||
    license = "BSD-3-Clause"
 | 
			
		||||
 | 
			
		||||
    package_type = "library"
 | 
			
		||||
    settings = "os", "arch", "compiler", "build_type"
 | 
			
		||||
    options = {
 | 
			
		||||
        "shared": [True, False],
 | 
			
		||||
        "fPIC": [True, False],
 | 
			
		||||
    }
 | 
			
		||||
    default_options = {
 | 
			
		||||
        "shared": False,
 | 
			
		||||
        "fPIC": True,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    def export_sources(self):
 | 
			
		||||
        export_conandata_patches(self)
 | 
			
		||||
 | 
			
		||||
    def config_options(self):
 | 
			
		||||
        if self.settings.os == 'Windows':
 | 
			
		||||
            del self.options.fPIC
 | 
			
		||||
 | 
			
		||||
    def configure(self):
 | 
			
		||||
        if self.options.shared:
 | 
			
		||||
            self.options.rm_safe("fPIC")
 | 
			
		||||
 | 
			
		||||
    def layout(self):
 | 
			
		||||
        cmake_layout(self, src_folder="src")
 | 
			
		||||
 | 
			
		||||
    def validate(self):
 | 
			
		||||
        if self.settings.compiler.get_safe("cppstd"):
 | 
			
		||||
            check_min_cppstd(self, 11)
 | 
			
		||||
 | 
			
		||||
    def source(self):
 | 
			
		||||
        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
			
		||||
 | 
			
		||||
    def generate(self):
 | 
			
		||||
        tc = CMakeToolchain(self)
 | 
			
		||||
        tc.variables["SNAPPY_BUILD_TESTS"] = False
 | 
			
		||||
        if Version(self.version) >= "1.1.8":
 | 
			
		||||
            tc.variables["SNAPPY_FUZZING_BUILD"] = False
 | 
			
		||||
            tc.variables["SNAPPY_REQUIRE_AVX"] = False
 | 
			
		||||
            tc.variables["SNAPPY_REQUIRE_AVX2"] = False
 | 
			
		||||
            tc.variables["SNAPPY_INSTALL"] = True
 | 
			
		||||
        if Version(self.version) >= "1.1.9":
 | 
			
		||||
            tc.variables["SNAPPY_BUILD_BENCHMARKS"] = False
 | 
			
		||||
        tc.generate()
 | 
			
		||||
 | 
			
		||||
    def build(self):
 | 
			
		||||
        apply_conandata_patches(self)
 | 
			
		||||
        cmake = CMake(self)
 | 
			
		||||
        cmake.configure()
 | 
			
		||||
        cmake.build()
 | 
			
		||||
 | 
			
		||||
    def package(self):
 | 
			
		||||
        copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
 | 
			
		||||
        cmake = CMake(self)
 | 
			
		||||
        cmake.install()
 | 
			
		||||
        rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
 | 
			
		||||
 | 
			
		||||
    def package_info(self):
 | 
			
		||||
        self.cpp_info.set_property("cmake_file_name", "Snappy")
 | 
			
		||||
        self.cpp_info.set_property("cmake_target_name", "Snappy::snappy")
 | 
			
		||||
        # TODO: back to global scope in conan v2 once cmake_find_package* generators removed
 | 
			
		||||
        self.cpp_info.components["snappylib"].libs = ["snappy"]
 | 
			
		||||
        if not self.options.shared:
 | 
			
		||||
            if self.settings.os in ["Linux", "FreeBSD"]:
 | 
			
		||||
                self.cpp_info.components["snappylib"].system_libs.append("m")
 | 
			
		||||
 | 
			
		||||
        # TODO: to remove in conan v2 once cmake_find_package* generators removed
 | 
			
		||||
        self.cpp_info.names["cmake_find_package"] = "Snappy"
 | 
			
		||||
        self.cpp_info.names["cmake_find_package_multi"] = "Snappy"
 | 
			
		||||
        self.cpp_info.components["snappylib"].names["cmake_find_package"] = "snappy"
 | 
			
		||||
        self.cpp_info.components["snappylib"].names["cmake_find_package_multi"] = "snappy"
 | 
			
		||||
        self.cpp_info.components["snappylib"].set_property("cmake_target_name", "Snappy::snappy")
 | 
			
		||||
							
								
								
									
										13
									
								
								external/snappy/patches/1.1.10-0001-fix-inlining-failure.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								external/snappy/patches/1.1.10-0001-fix-inlining-failure.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h
 | 
			
		||||
index 1548ed7..3b4a9f3 100644
 | 
			
		||||
--- a/snappy-stubs-internal.h
 | 
			
		||||
+++ b/snappy-stubs-internal.h
 | 
			
		||||
@@ -100,7 +100,7 @@
 | 
			
		||||
 
 | 
			
		||||
 // Inlining hints.
 | 
			
		||||
 #if HAVE_ATTRIBUTE_ALWAYS_INLINE
 | 
			
		||||
-#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline))
 | 
			
		||||
+#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE
 | 
			
		||||
 #else
 | 
			
		||||
 #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE
 | 
			
		||||
 #endif  // HAVE_ATTRIBUTE_ALWAYS_INLINE
 | 
			
		||||
							
								
								
									
										13
									
								
								external/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								external/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
diff --git a/snappy.cc b/snappy.cc
 | 
			
		||||
index d414718..e4efb59 100644
 | 
			
		||||
--- a/snappy.cc
 | 
			
		||||
+++ b/snappy.cc
 | 
			
		||||
@@ -1132,7 +1132,7 @@ inline size_t AdvanceToNextTagX86Optimized(const uint8_t** ip_p, size_t* tag) {
 | 
			
		||||
   size_t literal_len = *tag >> 2;
 | 
			
		||||
   size_t tag_type = *tag;
 | 
			
		||||
   bool is_literal;
 | 
			
		||||
-#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__)
 | 
			
		||||
+#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__) && ( (!defined(__clang__) && !defined(__APPLE__)) || (!defined(__APPLE__) && defined(__clang__) && (__clang_major__ >= 9)) || (defined(__APPLE__) && defined(__clang__) && (__clang_major__ > 11)) )
 | 
			
		||||
   // TODO clang misses the fact that the (c & 3) already correctly
 | 
			
		||||
   // sets the zero flag.
 | 
			
		||||
   asm("and $3, %k[tag_type]\n\t"
 | 
			
		||||
							
								
								
									
										14
									
								
								external/snappy/patches/1.1.9-0001-fix-inlining-failure.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								external/snappy/patches/1.1.9-0001-fix-inlining-failure.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
Fixes the following error:
 | 
			
		||||
error: inlining failed in call to ‘always_inline’ ‘size_t snappy::AdvanceToNextTag(const uint8_t**, size_t*)’: function body can be overwritten at link time
 | 
			
		||||
 | 
			
		||||
--- snappy-stubs-internal.h
 | 
			
		||||
+++ snappy-stubs-internal.h
 | 
			
		||||
@@ -100,7 +100,7 @@
 | 
			
		||||
 
 | 
			
		||||
 // Inlining hints.
 | 
			
		||||
 #ifdef HAVE_ATTRIBUTE_ALWAYS_INLINE
 | 
			
		||||
-#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline))
 | 
			
		||||
+#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE
 | 
			
		||||
 #else
 | 
			
		||||
 #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE
 | 
			
		||||
 #endif
 | 
			
		||||
							
								
								
									
										12
									
								
								external/snappy/patches/1.1.9-0002-no-Werror.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								external/snappy/patches/1.1.9-0002-no-Werror.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
--- CMakeLists.txt
 | 
			
		||||
+++ CMakeLists.txt
 | 
			
		||||
@@ -69,7 +69,7 @@
 | 
			
		||||
-  # Use -Werror for clang only.
 | 
			
		||||
+if(0)
 | 
			
		||||
   if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 | 
			
		||||
     if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
 | 
			
		||||
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
 | 
			
		||||
     endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
 | 
			
		||||
   endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 | 
			
		||||
-
 | 
			
		||||
+endif()
 | 
			
		||||
							
								
								
									
										12
									
								
								external/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								external/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
asm clobbers do not work for clang < 9 and apple-clang < 11 (found by SpaceIm)
 | 
			
		||||
--- snappy.cc
 | 
			
		||||
+++ snappy.cc
 | 
			
		||||
@@ -1026,7 +1026,7 @@
 | 
			
		||||
   size_t literal_len = *tag >> 2;
 | 
			
		||||
   size_t tag_type = *tag;
 | 
			
		||||
   bool is_literal;
 | 
			
		||||
-#if defined(__GNUC__) && defined(__x86_64__)
 | 
			
		||||
+#if defined(__GNUC__) && defined(__x86_64__) && ( (!defined(__clang__) && !defined(__APPLE__)) || (!defined(__APPLE__) && defined(__clang__) && (__clang_major__ >= 9)) || (defined(__APPLE__) && defined(__clang__) && (__clang_major__ > 11)) )
 | 
			
		||||
   // TODO clang misses the fact that the (c & 3) already correctly
 | 
			
		||||
   // sets the zero flag.
 | 
			
		||||
   asm("and $3, %k[tag_type]\n\t"
 | 
			
		||||
							
								
								
									
										20
									
								
								external/snappy/patches/1.1.9-0004-rtti-by-default.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								external/snappy/patches/1.1.9-0004-rtti-by-default.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
--- a/CMakeLists.txt
 | 
			
		||||
+++ b/CMakeLists.txt
 | 
			
		||||
@@ -53,8 +53,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 | 
			
		||||
   add_definitions(-D_HAS_EXCEPTIONS=0)
 | 
			
		||||
 
 | 
			
		||||
   # Disable RTTI.
 | 
			
		||||
-  string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 | 
			
		||||
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
 | 
			
		||||
 else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 | 
			
		||||
   # Use -Wall for clang and gcc.
 | 
			
		||||
   if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
 | 
			
		||||
@@ -78,8 +76,6 @@ endif()
 | 
			
		||||
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
 | 
			
		||||
 
 | 
			
		||||
   # Disable RTTI.
 | 
			
		||||
-  string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 | 
			
		||||
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
 | 
			
		||||
 endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 | 
			
		||||
 
 | 
			
		||||
 # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
 | 
			
		||||
							
								
								
									
										12
									
								
								external/soci/conandata.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								external/soci/conandata.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
sources:
 | 
			
		||||
  "4.0.3":
 | 
			
		||||
    url: "https://github.com/SOCI/soci/archive/v4.0.3.tar.gz"
 | 
			
		||||
    sha256: "4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928"
 | 
			
		||||
patches:
 | 
			
		||||
  "4.0.3":
 | 
			
		||||
    - patch_file: "patches/0001-Remove-hardcoded-INSTALL_NAME_DIR-for-relocatable-li.patch"
 | 
			
		||||
      patch_description: "Generate relocatable libraries on MacOS"
 | 
			
		||||
      patch_type: "portability"
 | 
			
		||||
    - patch_file: "patches/0002-Fix-soci_backend.patch"
 | 
			
		||||
      patch_description: "Fix variable names for dependencies"
 | 
			
		||||
      patch_type: "conan"
 | 
			
		||||
							
								
								
									
										212
									
								
								external/soci/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										212
									
								
								external/soci/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,212 @@
 | 
			
		||||
from conan import ConanFile
 | 
			
		||||
from conan.tools.build import check_min_cppstd
 | 
			
		||||
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
 | 
			
		||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
 | 
			
		||||
from conan.tools.microsoft import is_msvc
 | 
			
		||||
from conan.tools.scm import Version
 | 
			
		||||
from conan.errors import ConanInvalidConfiguration
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
required_conan_version = ">=1.55.0"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class SociConan(ConanFile):
 | 
			
		||||
    name = "soci"
 | 
			
		||||
    homepage = "https://github.com/SOCI/soci"
 | 
			
		||||
    url = "https://github.com/conan-io/conan-center-index"
 | 
			
		||||
    description = "The C++ Database Access Library "
 | 
			
		||||
    topics = ("mysql", "odbc", "postgresql", "sqlite3")
 | 
			
		||||
    license = "BSL-1.0"
 | 
			
		||||
 | 
			
		||||
    settings = "os", "arch", "compiler", "build_type"
 | 
			
		||||
    options = {
 | 
			
		||||
        "shared":           [True, False],
 | 
			
		||||
        "fPIC":             [True, False],
 | 
			
		||||
        "empty":            [True, False],
 | 
			
		||||
        "with_sqlite3":     [True, False],
 | 
			
		||||
        "with_db2":         [True, False],
 | 
			
		||||
        "with_odbc":        [True, False],
 | 
			
		||||
        "with_oracle":      [True, False],
 | 
			
		||||
        "with_firebird":    [True, False],
 | 
			
		||||
        "with_mysql":       [True, False],
 | 
			
		||||
        "with_postgresql":  [True, False],
 | 
			
		||||
        "with_boost":       [True, False],
 | 
			
		||||
    }
 | 
			
		||||
    default_options = {
 | 
			
		||||
        "shared":           False,
 | 
			
		||||
        "fPIC":             True,
 | 
			
		||||
        "empty":            False,
 | 
			
		||||
        "with_sqlite3":     False,
 | 
			
		||||
        "with_db2":         False,
 | 
			
		||||
        "with_odbc":        False,
 | 
			
		||||
        "with_oracle":      False,
 | 
			
		||||
        "with_firebird":    False,
 | 
			
		||||
        "with_mysql":       False,
 | 
			
		||||
        "with_postgresql":  False,
 | 
			
		||||
        "with_boost":       False,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    def export_sources(self):
 | 
			
		||||
        export_conandata_patches(self)
 | 
			
		||||
 | 
			
		||||
    def layout(self):
 | 
			
		||||
        cmake_layout(self, src_folder="src")
 | 
			
		||||
 | 
			
		||||
    def config_options(self):
 | 
			
		||||
        if self.settings.os == "Windows":
 | 
			
		||||
            self.options.rm_safe("fPIC")
 | 
			
		||||
 | 
			
		||||
    def configure(self):
 | 
			
		||||
        if self.options.shared:
 | 
			
		||||
            self.options.rm_safe("fPIC")
 | 
			
		||||
 | 
			
		||||
    def requirements(self):
 | 
			
		||||
        if self.options.with_sqlite3:
 | 
			
		||||
            self.requires("sqlite3/3.41.1")
 | 
			
		||||
        if self.options.with_odbc and self.settings.os != "Windows":
 | 
			
		||||
            self.requires("odbc/2.3.11")
 | 
			
		||||
        if self.options.with_mysql:
 | 
			
		||||
            self.requires("libmysqlclient/8.0.31")
 | 
			
		||||
        if self.options.with_postgresql:
 | 
			
		||||
            self.requires("libpq/14.7")
 | 
			
		||||
        if self.options.with_boost:
 | 
			
		||||
            self.requires("boost/1.81.0")
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def _minimum_compilers_version(self):
 | 
			
		||||
        return {
 | 
			
		||||
            "Visual Studio": "14",
 | 
			
		||||
            "gcc": "4.8",
 | 
			
		||||
            "clang": "3.8",
 | 
			
		||||
            "apple-clang": "8.0"
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    def validate(self):
 | 
			
		||||
        if self.settings.compiler.get_safe("cppstd"):
 | 
			
		||||
            check_min_cppstd(self, 11)
 | 
			
		||||
 | 
			
		||||
        compiler = str(self.settings.compiler)
 | 
			
		||||
        compiler_version = Version(self.settings.compiler.version.value)
 | 
			
		||||
        if compiler not in self._minimum_compilers_version:
 | 
			
		||||
            self.output.warning("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler))
 | 
			
		||||
        elif compiler_version < self._minimum_compilers_version[compiler]:
 | 
			
		||||
            raise ConanInvalidConfiguration("{} requires a {} version >= {}".format(self.name, compiler, compiler_version))
 | 
			
		||||
 | 
			
		||||
        prefix  = "Dependencies for"
 | 
			
		||||
        message = "not configured in this conan package."
 | 
			
		||||
        if self.options.with_db2:
 | 
			
		||||
            # self.requires("db2/0.0.0") # TODO add support for db2
 | 
			
		||||
            raise ConanInvalidConfiguration("{} DB2 {} ".format(prefix, message))
 | 
			
		||||
        if self.options.with_oracle:
 | 
			
		||||
            # self.requires("oracle_db/0.0.0") # TODO add support for oracle
 | 
			
		||||
            raise ConanInvalidConfiguration("{} ORACLE {} ".format(prefix, message))
 | 
			
		||||
        if self.options.with_firebird:
 | 
			
		||||
            # self.requires("firebird/0.0.0") # TODO add support for firebird
 | 
			
		||||
            raise ConanInvalidConfiguration("{} firebird {} ".format(prefix, message))
 | 
			
		||||
 | 
			
		||||
    def source(self):
 | 
			
		||||
        get(self, **self.conan_data["sources"][self.version], strip_root=True)
 | 
			
		||||
 | 
			
		||||
    def generate(self):
 | 
			
		||||
        tc = CMakeToolchain(self)
 | 
			
		||||
 | 
			
		||||
        tc.variables["SOCI_SHARED"] = self.options.shared
 | 
			
		||||
        tc.variables["SOCI_STATIC"] = not self.options.shared
 | 
			
		||||
        tc.variables["SOCI_TESTS"] = False
 | 
			
		||||
        tc.variables["SOCI_CXX11"] = True
 | 
			
		||||
        tc.variables["SOCI_EMPTY"] = self.options.empty
 | 
			
		||||
        tc.variables["WITH_SQLITE3"] = self.options.with_sqlite3
 | 
			
		||||
        tc.variables["WITH_DB2"] = self.options.with_db2
 | 
			
		||||
        tc.variables["WITH_ODBC"] = self.options.with_odbc
 | 
			
		||||
        tc.variables["WITH_ORACLE"] = self.options.with_oracle
 | 
			
		||||
        tc.variables["WITH_FIREBIRD"] = self.options.with_firebird
 | 
			
		||||
        tc.variables["WITH_MYSQL"] = self.options.with_mysql
 | 
			
		||||
        tc.variables["WITH_POSTGRESQL"] = self.options.with_postgresql
 | 
			
		||||
        tc.variables["WITH_BOOST"] = self.options.with_boost
 | 
			
		||||
        tc.generate()
 | 
			
		||||
 | 
			
		||||
        deps = CMakeDeps(self)
 | 
			
		||||
        deps.generate()
 | 
			
		||||
 | 
			
		||||
    def build(self):
 | 
			
		||||
        apply_conandata_patches(self)
 | 
			
		||||
        cmake = CMake(self)
 | 
			
		||||
        cmake.configure()
 | 
			
		||||
        cmake.build()
 | 
			
		||||
 | 
			
		||||
    def package(self):
 | 
			
		||||
        copy(self, "LICENSE_1_0.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
 | 
			
		||||
 | 
			
		||||
        cmake = CMake(self)
 | 
			
		||||
        cmake.install()
 | 
			
		||||
 | 
			
		||||
        rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
 | 
			
		||||
 | 
			
		||||
    def package_info(self):
 | 
			
		||||
        self.cpp_info.set_property("cmake_file_name", "SOCI")
 | 
			
		||||
 | 
			
		||||
        target_suffix = "" if self.options.shared else "_static"
 | 
			
		||||
        lib_prefix = "lib" if is_msvc(self) and not self.options.shared else ""
 | 
			
		||||
        version = Version(self.version)
 | 
			
		||||
        lib_suffix = "_{}_{}".format(version.major, version.minor) if self.settings.os == "Windows" else ""
 | 
			
		||||
 | 
			
		||||
        # soci_core
 | 
			
		||||
        self.cpp_info.components["soci_core"].set_property("cmake_target_name", "SOCI::soci_core{}".format(target_suffix))
 | 
			
		||||
        self.cpp_info.components["soci_core"].libs = ["{}soci_core{}".format(lib_prefix, lib_suffix)]
 | 
			
		||||
        if self.options.with_boost:
 | 
			
		||||
            self.cpp_info.components["soci_core"].requires.append("boost::boost")
 | 
			
		||||
 | 
			
		||||
        # soci_empty
 | 
			
		||||
        if self.options.empty:
 | 
			
		||||
            self.cpp_info.components["soci_empty"].set_property("cmake_target_name", "SOCI::soci_empty{}".format(target_suffix))
 | 
			
		||||
            self.cpp_info.components["soci_empty"].libs = ["{}soci_empty{}".format(lib_prefix, lib_suffix)]
 | 
			
		||||
            self.cpp_info.components["soci_empty"].requires = ["soci_core"]
 | 
			
		||||
 | 
			
		||||
        # soci_sqlite3
 | 
			
		||||
        if self.options.with_sqlite3:
 | 
			
		||||
            self.cpp_info.components["soci_sqlite3"].set_property("cmake_target_name", "SOCI::soci_sqlite3{}".format(target_suffix))
 | 
			
		||||
            self.cpp_info.components["soci_sqlite3"].libs = ["{}soci_sqlite3{}".format(lib_prefix, lib_suffix)]
 | 
			
		||||
            self.cpp_info.components["soci_sqlite3"].requires = ["soci_core", "sqlite3::sqlite3"]
 | 
			
		||||
 | 
			
		||||
        # soci_odbc
 | 
			
		||||
        if self.options.with_odbc:
 | 
			
		||||
            self.cpp_info.components["soci_odbc"].set_property("cmake_target_name", "SOCI::soci_odbc{}".format(target_suffix))
 | 
			
		||||
            self.cpp_info.components["soci_odbc"].libs = ["{}soci_odbc{}".format(lib_prefix, lib_suffix)]
 | 
			
		||||
            self.cpp_info.components["soci_odbc"].requires = ["soci_core"]
 | 
			
		||||
            if self.settings.os == "Windows":
 | 
			
		||||
                self.cpp_info.components["soci_odbc"].system_libs.append("odbc32")
 | 
			
		||||
            else:
 | 
			
		||||
                self.cpp_info.components["soci_odbc"].requires.append("odbc::odbc")
 | 
			
		||||
 | 
			
		||||
        # soci_mysql
 | 
			
		||||
        if self.options.with_mysql:
 | 
			
		||||
            self.cpp_info.components["soci_mysql"].set_property("cmake_target_name", "SOCI::soci_mysql{}".format(target_suffix))
 | 
			
		||||
            self.cpp_info.components["soci_mysql"].libs = ["{}soci_mysql{}".format(lib_prefix, lib_suffix)]
 | 
			
		||||
            self.cpp_info.components["soci_mysql"].requires = ["soci_core", "libmysqlclient::libmysqlclient"]
 | 
			
		||||
 | 
			
		||||
        # soci_postgresql
 | 
			
		||||
        if self.options.with_postgresql:
 | 
			
		||||
            self.cpp_info.components["soci_postgresql"].set_property("cmake_target_name", "SOCI::soci_postgresql{}".format(target_suffix))
 | 
			
		||||
            self.cpp_info.components["soci_postgresql"].libs = ["{}soci_postgresql{}".format(lib_prefix, lib_suffix)]
 | 
			
		||||
            self.cpp_info.components["soci_postgresql"].requires = ["soci_core", "libpq::libpq"]
 | 
			
		||||
 | 
			
		||||
        # TODO: to remove in conan v2 once cmake_find_package* generators removed
 | 
			
		||||
        self.cpp_info.names["cmake_find_package"] = "SOCI"
 | 
			
		||||
        self.cpp_info.names["cmake_find_package_multi"] = "SOCI"
 | 
			
		||||
        self.cpp_info.components["soci_core"].names["cmake_find_package"] = "soci_core{}".format(target_suffix)
 | 
			
		||||
        self.cpp_info.components["soci_core"].names["cmake_find_package_multi"] = "soci_core{}".format(target_suffix)
 | 
			
		||||
        if self.options.empty:
 | 
			
		||||
            self.cpp_info.components["soci_empty"].names["cmake_find_package"] = "soci_empty{}".format(target_suffix)
 | 
			
		||||
            self.cpp_info.components["soci_empty"].names["cmake_find_package_multi"] = "soci_empty{}".format(target_suffix)
 | 
			
		||||
        if self.options.with_sqlite3:
 | 
			
		||||
            self.cpp_info.components["soci_sqlite3"].names["cmake_find_package"] = "soci_sqlite3{}".format(target_suffix)
 | 
			
		||||
            self.cpp_info.components["soci_sqlite3"].names["cmake_find_package_multi"] = "soci_sqlite3{}".format(target_suffix)
 | 
			
		||||
        if self.options.with_odbc:
 | 
			
		||||
            self.cpp_info.components["soci_odbc"].names["cmake_find_package"] = "soci_odbc{}".format(target_suffix)
 | 
			
		||||
            self.cpp_info.components["soci_odbc"].names["cmake_find_package_multi"] = "soci_odbc{}".format(target_suffix)
 | 
			
		||||
        if self.options.with_mysql:
 | 
			
		||||
            self.cpp_info.components["soci_mysql"].names["cmake_find_package"] = "soci_mysql{}".format(target_suffix)
 | 
			
		||||
            self.cpp_info.components["soci_mysql"].names["cmake_find_package_multi"] = "soci_mysql{}".format(target_suffix)
 | 
			
		||||
        if self.options.with_postgresql:
 | 
			
		||||
            self.cpp_info.components["soci_postgresql"].names["cmake_find_package"] = "soci_postgresql{}".format(target_suffix)
 | 
			
		||||
            self.cpp_info.components["soci_postgresql"].names["cmake_find_package_multi"] = "soci_postgresql{}".format(target_suffix)
 | 
			
		||||
							
								
								
									
										39
									
								
								external/soci/patches/0001-Remove-hardcoded-INSTALL_NAME_DIR-for-relocatable-li.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								external/soci/patches/0001-Remove-hardcoded-INSTALL_NAME_DIR-for-relocatable-li.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
From d491bf7b5040d314ffd0c6310ba01f78ff44c85e Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Rasmus Thomsen <rasmus.thomsen@dampsoft.de>
 | 
			
		||||
Date: Fri, 14 Apr 2023 09:16:29 +0200
 | 
			
		||||
Subject: [PATCH] Remove hardcoded INSTALL_NAME_DIR for relocatable libraries
 | 
			
		||||
 on MacOS
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 cmake/SociBackend.cmake | 2 +-
 | 
			
		||||
 src/core/CMakeLists.txt | 1 -
 | 
			
		||||
 2 files changed, 1 insertion(+), 2 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake
 | 
			
		||||
index 5d4ef0df..39fe1f77 100644
 | 
			
		||||
--- a/cmake/SociBackend.cmake
 | 
			
		||||
+++ b/cmake/SociBackend.cmake
 | 
			
		||||
@@ -171,7 +171,7 @@ macro(soci_backend NAME)
 | 
			
		||||
           set_target_properties(${THIS_BACKEND_TARGET}
 | 
			
		||||
             PROPERTIES
 | 
			
		||||
             SOVERSION ${${PROJECT_NAME}_SOVERSION}
 | 
			
		||||
-            INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
 | 
			
		||||
+          )
 | 
			
		||||
 
 | 
			
		||||
           if(APPLE)
 | 
			
		||||
             set_target_properties(${THIS_BACKEND_TARGET}
 | 
			
		||||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
 | 
			
		||||
index 3e7deeae..f9eae564 100644
 | 
			
		||||
--- a/src/core/CMakeLists.txt
 | 
			
		||||
+++ b/src/core/CMakeLists.txt
 | 
			
		||||
@@ -59,7 +59,6 @@ if (SOCI_SHARED)
 | 
			
		||||
       PROPERTIES
 | 
			
		||||
       VERSION ${SOCI_VERSION}
 | 
			
		||||
       SOVERSION ${SOCI_SOVERSION}
 | 
			
		||||
-      INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib
 | 
			
		||||
       CLEAN_DIRECT_OUTPUT 1)
 | 
			
		||||
   endif()
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
2.25.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										24
									
								
								external/soci/patches/0002-Fix-soci_backend.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								external/soci/patches/0002-Fix-soci_backend.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake
 | 
			
		||||
index 0a664667..3fa2ed95 100644
 | 
			
		||||
--- a/cmake/SociBackend.cmake
 | 
			
		||||
+++ b/cmake/SociBackend.cmake
 | 
			
		||||
@@ -31,14 +31,13 @@ macro(soci_backend_deps_found NAME DEPS SUCCESS)
 | 
			
		||||
     if(NOT DEPEND_FOUND)
 | 
			
		||||
       list(APPEND DEPS_NOT_FOUND ${dep})
 | 
			
		||||
     else()
 | 
			
		||||
-      string(TOUPPER "${dep}" DEPU)
 | 
			
		||||
-      if( ${DEPU}_INCLUDE_DIR )
 | 
			
		||||
-        list(APPEND DEPS_INCLUDE_DIRS ${${DEPU}_INCLUDE_DIR})
 | 
			
		||||
+      if( ${dep}_INCLUDE_DIR )
 | 
			
		||||
+        list(APPEND DEPS_INCLUDE_DIRS ${${dep}_INCLUDE_DIR})
 | 
			
		||||
       endif()
 | 
			
		||||
-      if( ${DEPU}_INCLUDE_DIRS )
 | 
			
		||||
-        list(APPEND DEPS_INCLUDE_DIRS ${${DEPU}_INCLUDE_DIRS})
 | 
			
		||||
+      if( ${dep}_INCLUDE_DIRS )
 | 
			
		||||
+        list(APPEND DEPS_INCLUDE_DIRS ${${dep}_INCLUDE_DIRS})
 | 
			
		||||
       endif()
 | 
			
		||||
-      list(APPEND DEPS_LIBRARIES ${${DEPU}_LIBRARIES})
 | 
			
		||||
+      list(APPEND DEPS_LIBRARIES ${${dep}_LIBRARIES})
 | 
			
		||||
     endif()
 | 
			
		||||
   endforeach()
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										194
									
								
								external/wasmedge/conandata.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										194
									
								
								external/wasmedge/conandata.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,194 @@
 | 
			
		||||
sources:
 | 
			
		||||
  "0.13.5":
 | 
			
		||||
    Windows:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        Visual Studio:
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.13.5/WasmEdge-0.13.5-windows.zip"
 | 
			
		||||
            sha256: "db533289ba26ec557b5193593c9ed03db75be3bc7aa737e2caa5b56b8eef888a"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.13.5/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Linux:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.13.5/WasmEdge-0.13.5-manylinux2014_x86_64.tar.gz"
 | 
			
		||||
            sha256: "3686e0226871bf17b62ec57e1c15778c2947834b90af0dfad14f2e0202bf9284"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.13.5/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.13.5/WasmEdge-0.13.5-manylinux2014_aarch64.tar.gz"
 | 
			
		||||
            sha256: "472de88e0257c539c120b33fdd1805e1e95063121acc2df1d5626e4676b93529"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Macos:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.13.5/WasmEdge-0.13.5-darwin_x86_64.tar.gz"
 | 
			
		||||
            sha256: "b7fdfaf59805951241f47690917b501ddfa06d9b6f7e0262e44e784efe4a7b33"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.13.5/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.13.5/WasmEdge-0.13.5-darwin_arm64.tar.gz"
 | 
			
		||||
            sha256: "acc93721210294ced0887352f360e42e46dcc05332e6dd78c1452fb3a35d5255"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.13.5/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Android:
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.13.5/WasmEdge-0.13.5-android_aarch64.tar.gz"
 | 
			
		||||
            sha256: "59a0d68a0c7368b51cc65cb5a44a68037d79fd449883ef42792178d57c8784a8"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.13.5/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
  "0.11.2":
 | 
			
		||||
    Windows:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        Visual Studio:
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.2/WasmEdge-0.11.2-windows.zip"
 | 
			
		||||
            sha256: "ca49b98c0cf5f187e08c3ba71afc8d71365fde696f10b4219379a4a4d1a91e6d"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.2/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Linux:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.2/WasmEdge-0.11.2-manylinux2014_x86_64.tar.gz"
 | 
			
		||||
            sha256: "784bf1eb25928e2cf02aa88e9372388fad682b4a188485da3cd9162caeedf143"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.2/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.2/WasmEdge-0.11.2-manylinux2014_aarch64.tar.gz"
 | 
			
		||||
            sha256: "a2766a4c1edbaea298a30e5431a4e795003a10d8398a933d923f23d4eb4fa5d1"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Macos:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.2/WasmEdge-0.11.2-darwin_x86_64.tar.gz"
 | 
			
		||||
            sha256: "aedec53f29b1e0b657e46e67dba3e2f32a2924f4d9136e60073ea1aba3073e70"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.2/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.2/WasmEdge-0.11.2-darwin_arm64.tar.gz"
 | 
			
		||||
            sha256: "fe391df90e1eee69cf1e976f5ddf60c20f29b651710aaa4fc03e2ab4fe52c0d3"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.2/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Android:
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.2/WasmEdge-0.11.2-android_aarch64.tar.gz"
 | 
			
		||||
            sha256: "69e308f5927c753b2bb5639569d10219b60598174d8b304bdf310093fd7b2464"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.2/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
  "0.11.1":
 | 
			
		||||
    Windows:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        Visual Studio:
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.1/WasmEdge-0.11.1-windows.zip"
 | 
			
		||||
            sha256: "c86f6384555a0484a5dd81faba5636bba78f5e3d6eaf627d880e34843f9e24bf"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Linux:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.1/WasmEdge-0.11.1-manylinux2014_x86_64.tar.gz"
 | 
			
		||||
            sha256: "76ce4ea0eb86adfa52c73f6c6b44383626d94990e0923cae8b1e6f060ef2bf5b"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.1/WasmEdge-0.11.1-manylinux2014_aarch64.tar.gz"
 | 
			
		||||
            sha256: "cb9ea32932360463991cfda80e09879b2cf6c69737f12f3f2b371cd0af4e9ce8"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Macos:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.1/WasmEdge-0.11.1-darwin_x86_64.tar.gz"
 | 
			
		||||
            sha256: "56df2b00669c25b8143ea2c17370256cd6a33f3b316d3b47857dd38d603cb69a"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.1/WasmEdge-0.11.1-darwin_arm64.tar.gz"
 | 
			
		||||
            sha256: "82f7da1a7a36ec1923fb045193784dd090a03109e84da042af97297205a71f08"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Android:
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.11.1/WasmEdge-0.11.1-android_aarch64.tar.gz"
 | 
			
		||||
            sha256: "af8694e93bf72ac5506450d4caebccc340fbba254dca3d58ec0712e96ec9dedd"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
  "0.10.0":
 | 
			
		||||
    Windows:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        Visual Studio:
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.0-windows.zip"
 | 
			
		||||
            sha256: "63b8a02cced52a723aa283dba02bbe887656256ecca69bb0fff17872c0fb5ebc"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.10.0/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Linux:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.0-manylinux2014_x86_64.tar.gz"
 | 
			
		||||
            sha256: "4c1ffca9fd8cbdeb8f0951ddaffbbefe81ae123d5b80f61e80ea8d9b56853cde"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.10.0/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.0-manylinux2014_aarch64.tar.gz"
 | 
			
		||||
            sha256: "c000bf96d0a73a1d360659246c0806c2ce78620b6f78c1147fbf9e2be0280bd9"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.10.0/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
  "0.9.1":
 | 
			
		||||
    Windows:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        Visual Studio:
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.9.1/WasmEdge-0.9.1-windows.zip"
 | 
			
		||||
            sha256: "68240d8aee23d44db5cc252d8c1cf5d0c77ab709a122af2747a4b836ba461671"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.9.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Linux:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.9.1/WasmEdge-0.9.1-manylinux2014_x86_64.tar.gz"
 | 
			
		||||
            sha256: "bcb6fe3d6e30db0d0aa267ec3bd9b7248f8c8c387620cef4049d682d293c8371"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.9.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.9.1/WasmEdge-0.9.1-manylinux2014_aarch64.tar.gz"
 | 
			
		||||
            sha256: "515bcac3520cd546d9d14372b7930ab48b43f1c5dc258a9f61a82b22c0107eef"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.9.1/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
  "0.9.0":
 | 
			
		||||
    Windows:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        Visual Studio:
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.9.0/WasmEdge-0.9.0-windows.zip"
 | 
			
		||||
            sha256: "f81bfea4cf09053510e3e74c16c1ee010fc93def8a7e78744443b950f0011c3b"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.9.0/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Linux:
 | 
			
		||||
      "x86_64":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.9.0/WasmEdge-0.9.0-manylinux2014_x86_64.tar.gz"
 | 
			
		||||
            sha256: "27847f15e4294e707486458e857d7cb11806481bb67a26f076a717a1446827ed"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.9.0/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.9.0/WasmEdge-0.9.0-manylinux2014_aarch64.tar.gz"
 | 
			
		||||
            sha256: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.9.0/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
    Macos:
 | 
			
		||||
      "armv8":
 | 
			
		||||
        "gcc":
 | 
			
		||||
          - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.9.0/WasmEdge-0.9.0-darwin_arm64.tar.gz"
 | 
			
		||||
            sha256: "236a407a646f746ab78a1d0a39fa4e85fe28eae219b1635ba49f908d7944686d"
 | 
			
		||||
          - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.9.0/LICENSE"
 | 
			
		||||
            sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
 | 
			
		||||
							
								
								
									
										92
									
								
								external/wasmedge/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								external/wasmedge/conanfile.py
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,92 @@
 | 
			
		||||
from conan import ConanFile
 | 
			
		||||
from conan.tools.files import get, copy, download
 | 
			
		||||
from conan.tools.scm import Version
 | 
			
		||||
from conan.errors import ConanInvalidConfiguration
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
required_conan_version = ">=1.53.0"
 | 
			
		||||
 | 
			
		||||
class WasmedgeConan(ConanFile):
 | 
			
		||||
    name = "wasmedge"
 | 
			
		||||
    description = ("WasmEdge is a lightweight, high-performance, and extensible WebAssembly runtime"
 | 
			
		||||
                "for cloud native, edge, and decentralized applications."
 | 
			
		||||
                "It powers serverless apps, embedded functions, microservices, smart contracts, and IoT devices.")
 | 
			
		||||
    license = "Apache-2.0"
 | 
			
		||||
    url = "https://github.com/conan-io/conan-center-index"
 | 
			
		||||
    homepage = "https://github.com/WasmEdge/WasmEdge/"
 | 
			
		||||
    topics = ("webassembly", "wasm", "wasi", "emscripten")
 | 
			
		||||
    package_type = "shared-library"
 | 
			
		||||
    settings = "os", "arch", "compiler", "build_type"
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def _compiler_alias(self):
 | 
			
		||||
        return {
 | 
			
		||||
            "Visual Studio": "Visual Studio",
 | 
			
		||||
            # "Visual Studio": "msvc",
 | 
			
		||||
            "msvc": "msvc",
 | 
			
		||||
        }.get(str(self.info.settings.compiler), "gcc")
 | 
			
		||||
 | 
			
		||||
    def configure(self):
 | 
			
		||||
        self.settings.compiler.rm_safe("libcxx")
 | 
			
		||||
        self.settings.compiler.rm_safe("cppstd")
 | 
			
		||||
 | 
			
		||||
    def validate(self):
 | 
			
		||||
        try:
 | 
			
		||||
            self.conan_data["sources"][self.version][str(self.settings.os)][str(self.settings.arch)][self._compiler_alias]
 | 
			
		||||
        except KeyError:
 | 
			
		||||
            raise ConanInvalidConfiguration("Binaries for this combination of version/os/arch/compiler are not available")
 | 
			
		||||
 | 
			
		||||
    def package_id(self):
 | 
			
		||||
        del self.info.settings.compiler.version
 | 
			
		||||
        self.info.settings.compiler = self._compiler_alias
 | 
			
		||||
 | 
			
		||||
    def build(self):
 | 
			
		||||
        # This is packaging binaries so the download needs to be in build
 | 
			
		||||
        get(self, **self.conan_data["sources"][self.version][str(self.settings.os)][str(self.settings.arch)][self._compiler_alias][0],
 | 
			
		||||
            destination=self.source_folder, strip_root=True)
 | 
			
		||||
        download(self, filename="LICENSE",
 | 
			
		||||
                 **self.conan_data["sources"][self.version][str(self.settings.os)][str(self.settings.arch)][self._compiler_alias][1])
 | 
			
		||||
 | 
			
		||||
    def package(self):
 | 
			
		||||
        copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include"), keep_path=True)
 | 
			
		||||
        copy(self, pattern="*.inc", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include"), keep_path=True)
 | 
			
		||||
 | 
			
		||||
        srclibdir = os.path.join(self.source_folder, "lib64" if self.settings.os == "Linux" else "lib")
 | 
			
		||||
        srcbindir = os.path.join(self.source_folder, "bin")
 | 
			
		||||
        dstlibdir = os.path.join(self.package_folder, "lib")
 | 
			
		||||
        dstbindir = os.path.join(self.package_folder, "bin")
 | 
			
		||||
        if Version(self.version) >= "0.11.1":
 | 
			
		||||
            copy(self, pattern="wasmedge.lib", src=srclibdir, dst=dstlibdir, keep_path=False)
 | 
			
		||||
            copy(self, pattern="wasmedge.dll", src=srcbindir, dst=dstbindir, keep_path=False)
 | 
			
		||||
            copy(self, pattern="libwasmedge.so*", src=srclibdir, dst=dstlibdir, keep_path=False)
 | 
			
		||||
            copy(self, pattern="libwasmedge*.dylib", src=srclibdir,  dst=dstlibdir, keep_path=False)
 | 
			
		||||
        else:
 | 
			
		||||
            copy(self, pattern="wasmedge_c.lib", src=srclibdir, dst=dstlibdir, keep_path=False)
 | 
			
		||||
            copy(self, pattern="wasmedge_c.dll", src=srcbindir, dst=dstbindir, keep_path=False)
 | 
			
		||||
            copy(self, pattern="libwasmedge_c.so*", src=srclibdir, dst=dstlibdir, keep_path=False)
 | 
			
		||||
            copy(self, pattern="libwasmedge_c*.dylib", src=srclibdir,  dst=dstlibdir, keep_path=False)
 | 
			
		||||
 | 
			
		||||
        copy(self, pattern="wasmedge*", src=srcbindir, dst=dstbindir, keep_path=False)
 | 
			
		||||
        copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"), keep_path=False)
 | 
			
		||||
 | 
			
		||||
    def package_info(self):
 | 
			
		||||
        if Version(self.version) >= "0.11.1":
 | 
			
		||||
            self.cpp_info.libs = ["wasmedge"]
 | 
			
		||||
        else:
 | 
			
		||||
            self.cpp_info.libs = ["wasmedge_c"]
 | 
			
		||||
 | 
			
		||||
        bindir = os.path.join(self.package_folder, "bin")
 | 
			
		||||
        self.output.info("Appending PATH environment variable: {}".format(bindir))
 | 
			
		||||
        self.env_info.PATH.append(bindir)
 | 
			
		||||
 | 
			
		||||
        if self.settings.os == "Windows":
 | 
			
		||||
            self.cpp_info.system_libs.append("ws2_32")
 | 
			
		||||
            self.cpp_info.system_libs.append("wsock32")
 | 
			
		||||
            self.cpp_info.system_libs.append("shlwapi")
 | 
			
		||||
 | 
			
		||||
        if self.settings.os in ["Linux", "FreeBSD"]:
 | 
			
		||||
            self.cpp_info.system_libs.append("m")
 | 
			
		||||
            self.cpp_info.system_libs.append("dl")
 | 
			
		||||
            self.cpp_info.system_libs.append("rt")
 | 
			
		||||
            self.cpp_info.system_libs.append("pthread")
 | 
			
		||||
		Reference in New Issue
	
	Block a user