Skip to content

Commit

Permalink
Merge remote-tracking branch 'cci/master' into openjph/add-recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
irieger committed Sep 6, 2024
2 parents 7e40578 + e50cb79 commit 8f5288f
Show file tree
Hide file tree
Showing 154 changed files with 2,316 additions and 1,018 deletions.
5 changes: 5 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1407,3 +1407,8 @@ authorized_users:
- mattangus
- arnaudmathias
- hankhsu1996
- stephematician
- awest03
- sun-mir
- fhamonic
- simbahebinbo
2 changes: 2 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ required_for_references:
- inversify-cpp
- iowow
- ipaddress
- iphreeqc
- iqa
- irrxml
- isa-l
Expand Down Expand Up @@ -1328,6 +1329,7 @@ required_for_references:
- sdf
- sdl
- sdl_image
- sdl_mixer
- sdl_net
- sdl_ttf
- seadex-essentials
Expand Down
1 change: 1 addition & 0 deletions .c3i/waitlist_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ waitlist_users:
- connor-i-clark
- NeXuS4Developer
- sabapathim
- pixelsoba
3 changes: 3 additions & 0 deletions recipes/ada/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.9.2":
url: "https://github.com/ada-url/ada/archive/v2.9.2.tar.gz"
sha256: "f41575ad7eec833afd9f6a0d6101ee7dc2f947fdf19ae8f1b54a71d59f4ba5ec"
"2.9.1":
url: "https://github.com/ada-url/ada/archive/v2.9.1.tar.gz"
sha256: "64eb3d91db941645d1b68ac8d1cbb7b534fbe446b66c1da11e384e17fca975e7"
Expand Down
2 changes: 2 additions & 0 deletions recipes/ada/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.9.2":
folder: all
"2.9.1":
folder: all
"2.9.0":
Expand Down
3 changes: 2 additions & 1 deletion recipes/arrow/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ def package_info(self):
if self._requires_rapidjson():
self.cpp_info.components["libarrow"].requires.append("rapidjson::rapidjson")
if self.options.with_s3:
self.cpp_info.components["libarrow"].requires.append("aws-sdk-cpp::s3")
# https://github.com/apache/arrow/blob/6b268f62a8a172249ef35f093009c740c32e1f36/cpp/src/arrow/CMakeLists.txt#L98
self.cpp_info.components["libarrow"].requires.extend([f"aws-sdk-cpp::{x}" for x in ["cognito-identity", "core", "identity-management", "s3", "sts"]])
if self.options.get_safe("with_gcs"):
self.cpp_info.components["libarrow"].requires.append("google-cloud-cpp::storage")
if self.options.with_orc:
Expand Down
2 changes: 1 addition & 1 deletion recipes/bzip2/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Bzip2Conan(ConanFile):
name = "bzip2"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://sourceware.org/bzip2"
license = "bzip2-1.0.8"
license = "bzip2-1.0.6"
description = "bzip2 is a free and open-source file compression program that uses the Burrows Wheeler algorithm."
topics = ("data-compressor", "file-compression")
package_type = "library"
Expand Down
7 changes: 7 additions & 0 deletions recipes/chipmunk2d/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ sources:
"7.0.3":
url: "https://chipmunk-physics.net/release/Chipmunk-7.x/Chipmunk-7.0.3.tgz"
sha256: "048b0c9eff91c27bab8a54c65ad348cebd5a982ac56978e8f63667afbb63491a"

patches:
"7.0.3":
- patch_file: "patches/0001-remove-sysctl-linux-win.patch"
patch_type: bugfix
patch_source: https://github.com/slembcke/Chipmunk2D/pull/175
patch_description: "Needed to build with glib > 2.30"
6 changes: 5 additions & 1 deletion recipes/chipmunk2d/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import copy, get, replace_in_file
from conan.tools.files import copy, get, replace_in_file, apply_conandata_patches, export_conandata_patches
import os

required_conan_version = ">=1.53.0"
Expand Down Expand Up @@ -52,9 +52,13 @@ def generate(self):
tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True
tc.generate()

def export_sources(self):
export_conandata_patches(self)

def _patch_sources(self):
# The finite-math-only optimization has no effect and can cause linking errors
# when linked against glibc >= 2.31
apply_conandata_patches(self)
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
"-ffast-math", "-ffast-math -fno-finite-math-only")

Expand Down
16 changes: 16 additions & 0 deletions recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- a/src/cpHastySpace.c
+++ b/src/cpHastySpace.c
@@ -7,8 +7,12 @@
//TODO: Move all the thread stuff to another file

//#include <sys/param.h >
-#ifndef _WIN32
+
+#ifdef __APPLE__
#include <sys/sysctl.h>
+#endif
+
+#ifndef _WIN32
#include <pthread.h>
#else
#ifndef WIN32_LEAN_AND_MEAN
3 changes: 3 additions & 0 deletions recipes/cpp-httplib/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.17.1":
url: "https://github.com/yhirose/cpp-httplib/archive/v0.17.1.tar.gz"
sha256: "044c5a233da242e981d9543dd136a5945e0549c5641a0373934db88bbd192f41"
"0.16.3":
url: "https://github.com/yhirose/cpp-httplib/archive/v0.16.3.tar.gz"
sha256: "c1742fc7179aaae2a67ad9bba0740b7e9ffaf4f5e62feef53101ecdef1478716"
Expand Down
2 changes: 2 additions & 0 deletions recipes/cpp-httplib/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.17.1":
folder: all
"0.16.3":
folder: all
"0.16.0":
Expand Down
9 changes: 3 additions & 6 deletions recipes/cppcheck/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
sources:
"2.15.0":
url: "https://github.com/danmar/cppcheck/archive/2.15.0.tar.gz"
sha256: "98bcc40ac8062635b492fb096d7815376a176ae26749d6c708083f4637f7c0bb"
"2.14.2":
url: "https://github.com/danmar/cppcheck/archive/2.14.2.tar.gz"
sha256: "9c3acea5f489336bd83a8ea33917a9a04a80c56d874bf270287e7de27acf2d00"
"2.14.1":
url: "https://github.com/danmar/cppcheck/archive/2.14.1.tar.gz"
sha256: "22d1403fbc3158f35b5216d7b0a50bbaf0c80bf6663933a71f65cc4fc307ff3d"
"2.13.4":
url: "https://github.com/danmar/cppcheck/archive/2.13.4.tar.gz"
sha256: "d6ea064ebab76c6aa000795440479767d8d814dd29405918df4c1bbfcd6cb86c"
"2.13.3":
url: "https://github.com/danmar/cppcheck/archive/2.13.3.tar.gz"
sha256: "ac8c526d19496038c09bf4781bd804ab1f7aaadee4c3b699629830d24742dd81"
"2.12.1":
url: "https://github.com/danmar/cppcheck/archive/2.12.1.tar.gz"
sha256: "2a3d4ba1179419612183ab3d6aed6d3b18be75e98cd6f138ea8e2020905dced2"
Expand Down
6 changes: 2 additions & 4 deletions recipes/cppcheck/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
versions:
"2.14.2":
"2.15.0":
folder: all
"2.14.1":
"2.14.2":
folder: all
"2.13.4":
folder: all
"2.13.3":
folder: all
"2.12.1":
folder: all
"2.11.1":
Expand Down
4 changes: 4 additions & 0 deletions recipes/cutlass/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"3.5.0":
url: "https://github.com/NVIDIA/cutlass/archive/refs/tags/v3.5.0.tar.gz"
sha256: "ef6af8526e3ad04f9827f35ee57eec555d09447f70a0ad0cf684a2e426ccbcb6"
105 changes: 105 additions & 0 deletions recipes/cutlass/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import os

from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import copy, get, rmdir, replace_in_file
from conan.tools.scm import Version

required_conan_version = ">=1.52.0"


class CutlassConan(ConanFile):
name = "cutlass"
description = "CUTLASS: CUDA Templates for Linear Algebra Subroutines"
license = "BSD-3-Clause"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/project/package"
topics = ("linear-algebra", "gpu", "cuda", "deep-learning", "nvidia", "header-only")

package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
# TODO: add header_only=False option

@property
def _min_cppstd(self):
return 17

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

def layout(self):
cmake_layout(self, src_folder="src")

def package_id(self):
self.info.clear()

def validate(self):
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):
self.tool_requires("cmake/[>=3.19 <4]")

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

def generate(self):
# Install via CMake to ensure headers are configured correctly
tc = CMakeToolchain(self)
tc.cache_variables["CMAKE_SUPPRESS_REGENERATION"] = True
tc.cache_variables["CUTLASS_REVISION"]=f"v{self.version}"
tc.cache_variables["CUTLASS_NATIVE_CUDA"] = False
tc.cache_variables["CUTLASS_ENABLE_HEADERS_ONLY"] = True
tc.cache_variables["CUTLASS_ENABLE_TOOLS"] = False
tc.cache_variables["CUTLASS_ENABLE_LIBRARY"] = False
tc.cache_variables["CUTLASS_ENABLE_PROFILER"] = False
tc.cache_variables["CUTLASS_ENABLE_PERFORMANCE"] = False
tc.cache_variables["CUTLASS_ENABLE_TESTS"] = False
tc.cache_variables["CUTLASS_ENABLE_GTEST_UNIT_TESTS"] = False
tc.cache_variables["CUTLASS_ENABLE_CUBLAS"] = False
tc.cache_variables["CUTLASS_ENABLE_CUDNN"] = False
tc.generate()
VirtualBuildEnv(self).generate()

def _patch_sources(self):
# Don't look for CUDA, we're only installing the headers
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake)",
"""
if(NOT CUTLASS_ENABLE_HEADERS_ONLY)
include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake)
endif()""")

def build(self):
self._patch_sources()
cmake = CMake(self)
cmake.configure()
cmake.build()

def package(self):
copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses"))
cmake = CMake(self)
cmake.install()
rmdir(self, os.path.join(self.package_folder, "lib"))
rmdir(self, os.path.join(self.package_folder, "test"))


def package_info(self):
self.cpp_info.set_property("cmake_file_name", "NvidiaCutlass")
self.cpp_info.set_property("cmake_target_name", "nvidia::cutlass::cutlass")
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
8 changes: 8 additions & 0 deletions recipes/cutlass/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)

find_package(NvidiaCutlass REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE nvidia::cutlass::cutlass)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
26 changes: 26 additions & 0 deletions recipes/cutlass/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os


class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
test_type = "explicit"

def layout(self):
cmake_layout(self)

def requirements(self):
self.requires(self.tested_reference_str)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
10 changes: 10 additions & 0 deletions recipes/cutlass/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cutlass/version.h>

#include <iostream>

int main() {
std::cout << "CUTLASS version: " <<
cutlass::getVersionMajor() << "." <<
cutlass::getVersionMinor() << "." <<
cutlass::getVersionPatch() << std::endl;
}
3 changes: 3 additions & 0 deletions recipes/cutlass/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"3.5.0":
folder: all
24 changes: 6 additions & 18 deletions recipes/date/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,13 @@ def build(self):

def package(self):
copy(self, "LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
if self.options.header_only:
src = os.path.join(self.source_folder, "include", "date")
dst = os.path.join(self.package_folder, "include", "date")
copy(self, "date.h", dst=dst, src=src)
copy(self, "tz.h", dst=dst, src=src)
copy(self, "ptz.h", dst=dst, src=src)
copy(self, "iso_week.h", dst=dst, src=src)
copy(self, "julian.h", dst=dst, src=src)
copy(self, "islamic.h", dst=dst, src=src)
else:
if not self.options.header_only:
cmake = CMake(self)
cmake.install()
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
rmdir(self, os.path.join(self.package_folder, "CMake"))
copy(self, "*.h", dst=os.path.join(self.package_folder, "include", "date"),
src=os.path.join(self.source_folder, "include", "date"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "date")
Expand All @@ -120,18 +113,13 @@ def package_info(self):
lib_name = "{}tz".format("date-" if Version(self.version) >= "3.0.0" else "")
self.cpp_info.components["date-tz"].libs = [lib_name]
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["date-tz"].system_libs.append("pthread")
self.cpp_info.components["date-tz"].system_libs.append("m")
self.cpp_info.components["date-tz"].system_libs.extend(["m", "pthread"])

if not self.options.use_system_tz_db:
self.cpp_info.components["date-tz"].requires.append("libcurl::libcurl")

if self.options.use_system_tz_db and not self.settings.os == "Windows":
use_os_tzdb = 1
else:
use_os_tzdb = 0

defines = ["USE_OS_TZDB={}".format(use_os_tzdb)]
use_os_tzdb = 1 if self.options.use_system_tz_db and not self.settings.os == "Windows" else 0
defines = [f"USE_OS_TZDB={use_os_tzdb}"]
if self.settings.os == "Windows" and self.options.shared:
defines.append("DATE_USE_DLL=1")

Expand Down
3 changes: 3 additions & 0 deletions recipes/daw_header_libraries/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.110.0":
url: "https://github.com/beached/header_libraries/archive/v2.110.0.tar.gz"
sha256: "6515bb7a130656adff9f1f17d6be69dbd7c40dbcebbe418e9d0cf15bbc71bffc"
"2.107.0":
url: "https://github.com/beached/header_libraries/archive/v2.107.0.tar.gz"
sha256: "b84f7666d004da466d0035e9f475797395e90b6e8f23e000816b45aa13d4fc35"
Expand Down
6 changes: 5 additions & 1 deletion recipes/daw_header_libraries/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ project(test_package LANGUAGES CXX)

find_package(daw-header-libraries REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
if(daw-header-libraries_VERSION VERSION_LESS "2.109.0")
add_executable(${PROJECT_NAME} test_package_old.cpp)
else()
add_executable(${PROJECT_NAME} test_package.cpp)
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE daw::daw-header-libraries)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
Loading

0 comments on commit 8f5288f

Please sign in to comment.