Skip to content

Commit

Permalink
Merge branch 'master' into migrate/getdns
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur authored Feb 22, 2024
2 parents b505806 + aa62958 commit c10c87e
Show file tree
Hide file tree
Showing 22 changed files with 228 additions and 168 deletions.
2 changes: 2 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1290,3 +1290,5 @@ authorized_users:
- cnicolaescu
- mmomtchev
- ChristianHeinigk
- metalMajor
- joergbrech
21 changes: 3 additions & 18 deletions recipes/glaze/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.1.4":
url: "https://github.com/stephenberry/glaze/archive/v2.1.4.tar.gz"
sha256: "cbaba4dfbaaf342c8be8e6834cb79933b080ac89f3aa1470bc7a83197d9ebc1a"
"2.1.0":
url: "https://github.com/stephenberry/glaze/archive/v2.1.0.tar.gz"
sha256: "b3bb4d886f17d266f37a6eec2c42b2e57e287918b20511297c4eb6b9960f0f8f"
Expand All @@ -11,27 +14,9 @@ sources:
"2.0.6":
url: "https://github.com/stephenberry/glaze/archive/v2.0.6.tar.gz"
sha256: "aa5d4921382e9781998ebbf6d36964556daa3367a2aef5ca814122502b450abc"
"2.0.5":
url: "https://github.com/stephenberry/glaze/archive/v2.0.5.tar.gz"
sha256: "a826c823dd125e25ecd29881775df5db07ccacd5358a04efba2b290eb6c945eb"
"2.0.3":
url: "https://github.com/stephenberry/glaze/archive/v2.0.3.tar.gz"
sha256: "7e155d2970329ff4a13fe1d4c4e4b63509405a984b4f37ef9f92b8756bb3c8ce"
"2.0.2":
url: "https://github.com/stephenberry/glaze/archive/v2.0.2.tar.gz"
sha256: "af65752fb523c82313bfbe9c04ab47e332d881154f06c63967b973ee51e5923d"
"2.0.1":
url: "https://github.com/stephenberry/glaze/archive/v2.0.1.tar.gz"
sha256: "0f515588189796696a802c88b0308b5386376d202c7ff1875683f38316f09c90"
"2.0.0":
url: "https://github.com/stephenberry/glaze/archive/v2.0.0.tar.gz"
sha256: "8553ade81a20b1a7c8398f95490ab540f34a78f226f7fe5555dfcbbaf216e108"
"1.9.9":
url: "https://github.com/stephenberry/glaze/archive/v1.9.9.tar.gz"
sha256: "7e2605046742a89ec455887a5a0d6b3188ed5c14ea309c5eb9814848c26bedca"
"1.9.5":
url: "https://github.com/stephenberry/glaze/archive/v1.9.5.tar.gz"
sha256: "3800fa7283a1d4e5bd2c746fe9e268d2f8af76d3a75be7318b2084f38f529c7f"
"1.8.5":
url: "https://github.com/stephenberry/glaze/archive/v1.8.5.tar.gz"
sha256: "5d876eed5689f1947ea4eafd9f13a4e0b527611a6b1857c79a5d598a856287b4"
15 changes: 12 additions & 3 deletions recipes/glaze/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ def _min_cppstd(self):

@property
def _compilers_minimum_version(self):
return {
versions = {
"Visual Studio": "17",
"msvc": "193",
"gcc": "10" if Version(self.version) < "1.9.0" else "11",
"gcc": "10",
"clang": "12",
"apple-clang": "13.1",
}
if Version(self.version) >= "1.9.0":
versions["gcc"] = "11"
return versions

def layout(self):
basic_layout(self, src_folder="src")
Expand All @@ -40,7 +43,13 @@ def package_id(self):
self.info.clear()

def validate(self):
if self.settings.get_safe("compiler.cppstd"):
if Version(self.version) >= "2.1.4" and \
self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "11.3":
raise ConanInvalidConfiguration(
f"{self.ref} doesn't support 11.0<=gcc<11.3 due to gcc bug. Please use gcc>=11.3 and set compiler.version.(ex. compiler.version=11.3)",
)

if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, self._min_cppstd)
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
Expand Down
14 changes: 2 additions & 12 deletions recipes/glaze/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.1.4":
folder: all
"2.1.0":
folder: all
"2.0.9":
Expand All @@ -7,19 +9,7 @@ versions:
folder: all
"2.0.6":
folder: all
"2.0.5":
folder: all
"2.0.3":
folder: all
"2.0.2":
folder: all
"2.0.1":
folder: all
"2.0.0":
folder: all
"1.9.9":
folder: all
"1.9.5":
folder: all
"1.8.5":
folder: all
15 changes: 9 additions & 6 deletions recipes/glog/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
sources:
"0.7.0":
url: "https://github.com/google/glog/archive/refs/tags/v0.7.0.tar.gz"
sha256: "375106b5976231b92e66879c1a92ce062923b9ae573c42b56ba28b112ee4cc11"
"0.6.0":
sha256: 8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6
url: https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz
url: "https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz"
sha256: "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6"
"0.5.0":
sha256: eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5
url: https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz
url: "https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz"
sha256: "eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5"
"0.4.0":
sha256: f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
url: https://github.com/google/glog/archive/v0.4.0.tar.gz
url: "https://github.com/google/glog/archive/v0.4.0.tar.gz"
sha256: "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c"
patches:
"0.5.0":
- patch_file: "patches/0001-fix-msvc-snprintf.patch"
Expand Down
40 changes: 35 additions & 5 deletions recipes/glog/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir
from conan.tools.scm import Version
from conan.tools.build import check_min_cppstd
import os

required_conan_version = ">=1.54.0"


class GlogConan(ConanFile):
name = "glog"
description = "Google logging library"
license = "BSD-3-Clause"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/google/glog/"
description = "Google logging library"
topics = ("logging",)
license = "BSD-3-Clause"

package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
Expand All @@ -33,6 +34,20 @@ class GlogConan(ConanFile):
"with_unwind": True,
}

@property
def _min_cppstd(self):
return 14

@property
def _compilers_minimum_version(self):
return {
"apple-clang": "10",
"clang": "7",
"gcc": "7",
"msvc": "191",
"Visual Studio": "15",
}

def export_sources(self):
export_conandata_patches(self)

Expand All @@ -56,10 +71,23 @@ def requirements(self):
self.requires("gflags/2.2.2", transitive_headers=True, transitive_libs=True)
# 0.4.0 requires libunwind unconditionally
if self.options.get_safe("with_unwind") or (Version(self.version) < "0.5.0" and self.settings.os in ["Linux", "FreeBSD"]):
self.requires("libunwind/1.7.2")
self.requires("libunwind/1.8.0", transitive_headers=True, transitive_libs=True)

def validate(self):
if Version(self.version) < "0.7.0":
return
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, self._min_cppstd)
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)

def build_requirements(self):
if Version(self.version) >= "0.6.0":
if Version(self.version) >= "0.7.0":
self.tool_requires("cmake/[>=3.22 <4]")
elif Version(self.version) >= "0.6.0":
self.tool_requires("cmake/[>=3.16 <4]")

def source(self):
Expand Down Expand Up @@ -129,3 +157,5 @@ def package_info(self):
self.cpp_info.defines.append(f"GOOGLE_GLOG_DLL_DECL={decl}")
if self.options.with_gflags and not self.options.shared:
self.cpp_info.defines.extend(["GFLAGS_DLL_DECLARE_FLAG=", "GFLAGS_DLL_DEFINE_FLAG="])
if Version(self.version) >= "0.7.0":
self.cpp_info.defines.extend(["GLOG_USE_GLOG_EXPORT="])
3 changes: 3 additions & 0 deletions recipes/glog/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ find_package(glog REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE glog::glog)
if (glog_VERSION VERSION_GREATER_EQUAL "0.7.0")
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
endif()
2 changes: 2 additions & 0 deletions recipes/glog/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.7.0":
folder: all
"0.6.0":
folder: all
"0.5.0":
Expand Down
54 changes: 22 additions & 32 deletions recipes/lua/all/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,46 +63,36 @@ IF (UNIX)
ENDIF ()
ENDIF ()

include(GNUInstallDirs)

INSTALL ( TARGETS lua
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

IF (NOT DEFINED SKIP_INSTALL_TOOLS)
IF (NOT SKIP_INSTALL_TOOLS)
ADD_EXECUTABLE ( luac ${SRC_LUAC} ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly.
ADD_EXECUTABLE ( luai ${SRC_LUAI} ) # interpreter
TARGET_LINK_LIBRARIES ( luai lua )
SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai )
IF (UNIX)
IF (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
SET (_LIB_READLINE_NAME edit)
ELSE ()
SET (_LIB_READLINE_NAME readline)
ENDIF ()
FIND_LIBRARY (LIB_READLINE NAMES ${_LIB_READLINE_NAME})
IF (LIB_READLINE)
TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE)
TARGET_LINK_LIBRARIES(luai ${LIB_READLINE})
IF (_LIB_READLINE_NAME STREQUAL edit)
TARGET_INCLUDE_DIRECTORIES (luai PUBLIC /usr/include/edit)
ENDIF ()
ENDIF ()
IF (WITH_READLINE)
find_package(readline REQUIRED CONFIG)
TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE)
TARGET_LINK_LIBRARIES(luai readline::readline)
ENDIF ()
INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua )
INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
ENDIF ()

IF (NOT DEFINED SKIP_INSTALL_HEADERS)
INSTALL(
FILES
${SOURCE_DIR}/src/lualib.h
${SOURCE_DIR}/src/lua.h
${SOURCE_DIR}/src/luaconf.h
${SOURCE_DIR}/src/lauxlib.h
DESTINATION include
)
# If using C++, don't install extern "C" wrapper.
IF (NOT COMPILE_AS_CPP)
INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION include)
ENDIF ()
INSTALL(
FILES
${SOURCE_DIR}/src/lualib.h
${SOURCE_DIR}/src/lua.h
${SOURCE_DIR}/src/luaconf.h
${SOURCE_DIR}/src/lauxlib.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
# If using C++, don't install extern "C" wrapper.
IF (NOT COMPILE_AS_CPP)
INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
ENDIF ()
20 changes: 18 additions & 2 deletions recipes/lua/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os

from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.errors import ConanInvalidConfiguration
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import get, copy, load, save, export_conandata_patches, apply_conandata_patches, collect_libs
from conan.tools.apple import fix_apple_shared_install_name

Expand All @@ -22,11 +23,15 @@ class LuaConan(ConanFile):
"shared": [False, True],
"fPIC": [True, False],
"compile_as_cpp": [True, False],
"with_tools": [True, False],
"with_readline": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"compile_as_cpp": False,
"with_tools": False,
"with_readline": False,
}

def export_sources(self):
Expand All @@ -47,15 +52,26 @@ def configure(self):
def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
if self.options.with_tools and self.options.with_readline:
self.requires("readline/8.2")

def validate(self):
if not self.options.with_tools and self.options.with_readline:
raise ConanInvalidConfiguration(f"{self.ref} requires readline only with with_tools=True")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def generate(self):
tc = CMakeToolchain(self)
tc.variables["LUA_SRC_DIR"] = self.source_folder.replace("\\", "/")
tc.variables["SKIP_INSTALL_TOOLS"] = True
tc.variables["COMPILE_AS_CPP"] = self.options.compile_as_cpp
tc.variables["SKIP_INSTALL_TOOLS"] = not self.options.with_tools
tc.variables["WITH_READLINE"] = self.options.with_readline
tc.generate()
deps = CMakeDeps(self)
deps.generate()

def build(self):
apply_conandata_patches(self)
Expand Down
32 changes: 0 additions & 32 deletions recipes/openexr/2.x/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ sources:
"2.5.7":
url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.7.tar.gz"
sha256: "36ecb2290cba6fc92b2ec9357f8dc0e364b4f9a90d727bf9a57c84760695272d"
"2.5.5":
url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.tar.gz"
sha256: "59e98361cb31456a9634378d0f653a2b9554b8900f233450f2396ff495ea76b3"
"2.5.4":
url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.4.tar.gz"
sha256: "dba19e9c6720c6f64fbc8b9d1867eaa75da6438109b941eefdc75ed141b6576d"
"2.5.3":
url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.3.tar.gz"
sha256: "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf"
"2.5.2":
url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.2.tar.gz"
sha256: "5da8dff448d0c4a529e52c97daf238a461d01cd233944f75095668d6d7528761"
"2.4.0":
url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.4.0.tar.gz"
sha256: "4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1"
Expand All @@ -26,26 +14,6 @@ patches:
patch_description: "Add #include <cstdint> as required by newer gcc versions"
patch_type: "portability"
patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600"
"2.5.5":
- patch_file: "patches/2.5.7-0001-cstdint-include.patch"
patch_description: "Add #include <cstdint> as required by newer gcc versions"
patch_type: "portability"
patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600"
"2.5.4":
- patch_file: "patches/2.5.4-0001-cstdint-include.patch"
patch_description: "Add #include <cstdint> as required by newer gcc versions"
patch_type: "portability"
patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600"
"2.5.3":
- patch_file: "patches/2.5.4-0001-cstdint-include.patch"
patch_description: "Add #include <cstdint> as required by newer gcc versions"
patch_type: "portability"
patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600"
"2.5.2":
- patch_file: "patches/2.5.4-0001-cstdint-include.patch"
patch_description: "Add #include <cstdint> as required by newer gcc versions"
patch_type: "portability"
patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600"
"2.4.0":
- patch_file: "patches/2.4.0-0001-cstdint-include.patch"
patch_description: "Add #include <cstdint> as required by newer gcc versions"
Expand Down
Loading

0 comments on commit c10c87e

Please sign in to comment.