Skip to content

Commit

Permalink
Merge branch 'migrate/openscenegraph' of github.com:valgur/conan-cent…
Browse files Browse the repository at this point in the history
…er-index into migrate/openscenegraph
  • Loading branch information
czoido committed Feb 1, 2024
2 parents 8db9464 + 66c0023 commit 751d488
Show file tree
Hide file tree
Showing 32 changed files with 147 additions and 74 deletions.
6 changes: 6 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ required_for_references:
- cppdap
- cppfront
- cppitertools
- cppkafka
- cpprestsdk
- cpptoml
- cpptrace
Expand Down Expand Up @@ -379,6 +380,7 @@ required_for_references:
- flex
- flint
- fltk
- flux
- fmi1
- fmi2
- fmi3
Expand Down Expand Up @@ -1042,6 +1044,7 @@ required_for_references:
- picojson
- picosha2
- pipes
- pistache
- pixman
- pkgconf
- platform.converters
Expand Down Expand Up @@ -1165,6 +1168,7 @@ required_for_references:
- safeint
- sail
- samurai
- sassc
- sbepp
- sbp
- scdoc
Expand Down Expand Up @@ -1237,6 +1241,7 @@ required_for_references:
- sqlpp11
- sqlpp11-connector-sqlite3
- squirrel
- srt
- ssht
- ssp
- st_tree
Expand Down Expand Up @@ -1349,6 +1354,7 @@ required_for_references:
- tsl-sparse-map
- tuplet
- turtle
- tweenerspp
- tweetnacl
- twitch-native-ipc
- twitchtv-libsoundtrackutil
Expand Down
3 changes: 3 additions & 0 deletions recipes/bshoshany-thread-pool/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"4.0.1":
sha256: "34d25503e17e58198613d9306313f8358cfaaa9320f2b7694dc599b90a1858a7"
url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v4.0.1.tar.gz"
"3.5.0":
sha256: "d3efd5c434f6e99f4cff7b8219cbb586dc06bc0aeaf17cd174813a2333961306"
url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v3.5.0.tar.gz"
Expand Down
53 changes: 6 additions & 47 deletions recipes/bshoshany-thread-pool/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,59 +1,18 @@
#include "BS_thread_pool.hpp"

BS::synced_stream sync_out;
BS::thread_pool pool;

std::condition_variable ID_cv, total_cv;
std::mutex ID_mutex, total_mutex;
BS::concurrency_t count_unique_threads()
{
const BS::concurrency_t num_tasks = pool.get_thread_count() * 2;
std::vector<std::thread::id> thread_IDs(num_tasks);
std::unique_lock<std::mutex> total_lock(total_mutex);
BS::concurrency_t total_count = 0;
bool ID_release = false;
pool.wait_for_tasks();
for (std::thread::id& id : thread_IDs)
pool.push_task(
[&total_count, &id, &ID_release]
{
id = std::this_thread::get_id();
{
const std::scoped_lock total_lock_local(total_mutex);
++total_count;
}
total_cv.notify_one();
std::unique_lock<std::mutex> ID_lock_local(ID_mutex);
ID_cv.wait(ID_lock_local, [&ID_release] { return ID_release; });
});
total_cv.wait(total_lock, [&total_count] { return total_count == pool.get_thread_count(); });
{
const std::scoped_lock ID_lock(ID_mutex);
ID_release = true;
}
ID_cv.notify_all();
total_cv.wait(total_lock, [&total_count, &num_tasks] { return total_count == num_tasks; });
pool.wait_for_tasks();
std::sort(thread_IDs.begin(), thread_IDs.end());
return static_cast<BS::concurrency_t>(std::unique(thread_IDs.begin(), thread_IDs.end()) - thread_IDs.begin());
}
#include <iostream>

int main()
{
const char* line = "------------------------------------------";
sync_out.println(line);
sync_out.println("Testing thread pool...");
BS::concurrency_t unique_threads = count_unique_threads();
if (pool.get_thread_count() == unique_threads)
BS::thread_pool pool;
std::cout << "Testing thread pool...\n";
if (pool.get_thread_count() == std::thread::hardware_concurrency())
{
sync_out.println("SUCCESS: Created ", unique_threads, " unique threads!");
sync_out.println(line);
std::cout << "SUCCESS: Created " << pool.get_thread_count() << " unique threads!\n";
return EXIT_SUCCESS;
}
else
{
sync_out.println("ERROR: Failed to create ", unique_threads, " unique threads!");
sync_out.println(line);
std::cout << "ERROR: Failed to create " << pool.get_thread_count() << " unique threads!\n";
return EXIT_FAILURE;
}
}
2 changes: 2 additions & 0 deletions recipes/bshoshany-thread-pool/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"4.0.1":
folder: all
"3.5.0":
folder: all
"3.4.0":
Expand Down
3 changes: 3 additions & 0 deletions recipes/circularbuffer/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.4.0":
url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.4.0.tar.gz"
sha256: "e01a837d2fe46fea168e8d36e1a4225d9414a855484d55b5a240f239ab53fc0a"
"1.3.3":
url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.3.3.tar.gz"
sha256: "d558029c9ab5012a8bbf9a89bd130eb320bdeb69e3f8bd96851ddc1e5dc24eba"
4 changes: 2 additions & 2 deletions recipes/circularbuffer/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
class CircularBufferConan(ConanFile):
name = "circularbuffer"
description = "Arduino circular buffer library"
topics = ("circular buffer", "arduino", "data-structures")
license = "LGPL-3.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/rlogiacco/CircularBuffer"
topics = ("circular buffer", "arduino", "data-structures", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True
Expand All @@ -29,7 +29,7 @@ def source(self):

def package(self):
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
copy(self, "CircularBuffer.h",
copy(self, "CircularBuffer.h*",
dst=os.path.join(self.package_folder, "include"), src=self.source_folder)
copy(self, "CircularBuffer.tpp",
dst=os.path.join(self.package_folder, "include"), src=self.source_folder)
Expand Down
4 changes: 4 additions & 0 deletions recipes/circularbuffer/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ find_package(circularbuffer CONFIG REQUIRED)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE circularbuffer::circularbuffer)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)

if(circularbuffer_VERSION VERSION_GREATER_EQUAL "1.4.0")
target_compile_definitions(${PROJECT_NAME} PRIVATE CIRCULARBUFFER_1_4_0_LATER)
endif()
4 changes: 4 additions & 0 deletions recipes/circularbuffer/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#ifdef CIRCULARBUFFER_1_4_0_LATER
#include <CircularBuffer.hpp>
#else
#include <CircularBuffer.h>
#endif

int main() {
CircularBuffer<int, 256> buffer;
Expand Down
2 changes: 2 additions & 0 deletions recipes/circularbuffer/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"1.4.0":
folder: all
"1.3.3":
folder: all
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.15.1":
url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.1.tar.gz"
sha256: "8d6a4a40ee8fd3f553b7e895882e60e674bd910883fc1857587dbbabee3cdb91"
"0.14.3":
url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.3.tar.gz"
sha256: "dcf6486d9030937636d8a4f820ca9531808fd7edb283893dddbaa05f99357e63"
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.15.1":
folder: all
"0.14.3":
folder: all
"0.14.2":
Expand Down
12 changes: 9 additions & 3 deletions recipes/cppkafka/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
sources:
"0.4.1":
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/v0.4.1.tar.gz"
sha256: "45770ae0404cb9ba73d659618c51cd55b574c66ed3c7b148360222fb524b0ff7"
"0.4.0":
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/0.4.0.tar.gz"
sha256: "f4f05eb7a180a856663b02ec0b777283275ef88e5523f3013fd51c6c4ab63b5a"
patches:
"0.4.1":
- patch_file: "patches/0.4.0-0001-no-template-export.patch"
- patch_file: "patches/0.4.1-0003-clean-rpath.patch"
"0.4.0":
- patch_file: "patches/0001-no-template-export.patch"
- patch_file: "patches/0002-cppstd.patch"
- patch_file: "patches/0003-clean-rpath.patch"
- patch_file: "patches/0.4.0-0001-no-template-export.patch"
- patch_file: "patches/0.4.0-0002-cppstd.patch"
- patch_file: "patches/0.4.0-0003-clean-rpath.patch"
12 changes: 6 additions & 6 deletions recipes/cppkafka/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
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.scm import Version
import os

required_conan_version = ">=1.53.0"
Expand All @@ -10,11 +11,10 @@
class CppKafkaConan(ConanFile):
name = "cppkafka"
description = "Modern C++ Apache Kafka client library (wrapper for librdkafka)"
topics = ("librdkafka", "kafka")
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/mfontanini/cppkafka"
license = "MIT"

topics = ("librdkafka", "kafka")
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
Expand All @@ -41,8 +41,8 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
self.requires("boost/1.81.0")
self.requires("librdkafka/2.0.2")
self.requires("boost/1.83.0", transitive_headers=True)
self.requires("librdkafka/2.3.0", transitive_headers=True)

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
Expand All @@ -57,7 +57,7 @@ def generate(self):
tc.variables["CPPKAFKA_DISABLE_TESTS"] = True
tc.variables["CPPKAFKA_DISABLE_EXAMPLES"] = True
tc.variables["CPPKAFKA_RDKAFKA_STATIC_LIB"] = False # underlying logic is useless
if self.settings.os == "Windows":
if Version(self.version) < "0.4.1" and self.settings.os == "Windows":
tc.preprocessor_definitions["NOMINMAX"] = 1
tc.generate()
cd = CMakeDeps(self)
Expand Down
28 changes: 28 additions & 0 deletions recipes/cppkafka/all/patches/0.4.1-0003-clean-rpath.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c667df..46c5590 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ if (NOT CMAKE_CXX_FLAGS)
add_definitions("-DNOGDI=1")
add_definitions("-DNOMINMAX=1")
else()
- set(CMAKE_CXX_FLAGS "-Wall")
+# set(CMAKE_CXX_FLAGS "-Wall")
endif()
endif()

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 214ccd4..d2667ce 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -46,8 +46,8 @@ set_target_properties(${TARGET_NAME} PROPERTIES
ARCHIVE_OUTPUT_NAME "${TARGET_NAME}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}"
LIBRARY_OUTPUT_NAME "${TARGET_NAME}"
- INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
- INSTALL_RPATH_USE_LINK_PATH TRUE
+ # INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
+ # INSTALL_RPATH_USE_LINK_PATH TRUE
VERSION ${CPPKAFKA_VERSION}
SOVERSION ${CPPKAFKA_VERSION})
# In CMake >= 3.15 Boost::boost == Boost::headers
2 changes: 2 additions & 0 deletions recipes/cppkafka/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.4.1":
folder: "all"
"0.4.0":
folder: "all"
3 changes: 3 additions & 0 deletions recipes/fast_float/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"6.1.0":
url: "https://github.com/fastfloat/fast_float/archive/v6.1.0.tar.gz"
sha256: "a9c8ca8ca7d68c2dbb134434044f9c66cfd4c383d5e85c36b704d30f6be82506"
"6.0.0":
url: "https://github.com/fastfloat/fast_float/archive/v6.0.0.tar.gz"
sha256: "7e98671ef4cc7ed7f44b3b13f80156c8d2d9244fac55deace28bd05b0a2c7c8e"
Expand Down
2 changes: 2 additions & 0 deletions recipes/fast_float/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"6.1.0":
folder: all
"6.0.0":
folder: all
"5.3.0":
Expand Down
14 changes: 10 additions & 4 deletions recipes/fftw/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def on_off(value):
cmake.configure(variables=variables)
cmake.build()

# Potentially avoid side effects due to build_folder property tweak.
self._current_precision = None

def package(self):
copy(self, "COPYRIGHT", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
for self._current_precision in self._all_precisions:
Expand All @@ -125,6 +128,9 @@ def package(self):
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))

# Potentially avoid side effects due to build_folder property tweak.
self._current_precision = None

def package_info(self):
cmake_config_name = cmake_namespace = "FFTW3"

Expand All @@ -136,10 +142,10 @@ def package_info(self):
self.cpp_info.names["cmake_find_package"] = cmake_namespace
self.cpp_info.names["cmake_find_package_multi"] = cmake_namespace

for self._current_precision in self._all_precisions:
prec_suffix = self._prec_suffix[self._current_precision]
for precision in self._all_precisions:
prec_suffix = self._prec_suffix[precision]
cmake_target_name = pkgconfig_name = lib_name = "fftw3" + prec_suffix
component_name = f"fftwlib_{self._current_precision}"
component_name = f"fftwlib_{precision}"
component = self.cpp_info.components[component_name]

# TODO: back to global scope in conan v2 once cmake_find_package_* & pkg_config generators removed
Expand All @@ -150,7 +156,7 @@ def package_info(self):
self.cpp_info.components[component_name].libs.append(lib_name)
if self.settings.os in ["Linux", "FreeBSD"]:
component.system_libs.append("m")
if self._current_precision == QUAD:
if precision == QUAD:
component.system_libs.extend(['quadmath'])
if self.options.threads:
component.system_libs.append("pthread")
Expand Down
3 changes: 3 additions & 0 deletions recipes/libjpeg-turbo/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.0.2":
url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.2/libjpeg-turbo-3.0.2.tar.gz"
sha256: "c2ce515a78d91b09023773ef2770d6b0df77d674e144de80d63e0389b3a15ca6"
"3.0.1":
url: "https://sourceforge.net/projects/libjpeg-turbo/files/3.0.1/libjpeg-turbo-3.0.1.tar.gz"
sha256: "22429507714ae147b3acacd299e82099fce5d9f456882fc28e252e4579ba2a75"
Expand Down
2 changes: 2 additions & 0 deletions recipes/libjpeg-turbo/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.0.2":
folder: all
"3.0.1":
folder: all
"3.0.0":
Expand Down
3 changes: 3 additions & 0 deletions recipes/libpng/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.6.41":
url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.41/libpng-1.6.41.tar.xz"
sha256: "d6a49a7a4abca7e44f72542030e53319c081fea508daccf4ecc7c6d9958d190f"
"1.6.40":
url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.40/libpng-1.6.40.tar.xz"
sha256: "535b479b2467ff231a3ec6d92a525906fb8ef27978be4f66dbe05d3f3a01b3a1"
Expand Down
5 changes: 4 additions & 1 deletion recipes/libpng/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def generate(self):
tc.variables["PNG_INTEL_SSE"] = self._neon_msa_sse_vsx_mapping[str(self.options.sse)]
if self._has_vsx_support:
tc.variables["PNG_POWERPC_VSX"] = self._neon_msa_sse_vsx_mapping[str(self.options.vsx)]
if Version(self.version) >= "1.6.38":
if Version(self.version) >= "1.6.41":
tc.variables["PNG_FRAMEWORK"] = False # changed from False to True by default in PNG 1.6.41
tc.variables["PNG_TOOLS"] = False
elif Version(self.version) >= "1.6.38":
tc.variables["PNG_EXECUTABLES"] = False

tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False
Expand Down
2 changes: 1 addition & 1 deletion recipes/libpng/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C)

find_package(PNG REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions recipes/libpng/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.6.41":
folder: all
"1.6.40":
folder: all
"1.6.39":
Expand Down
Loading

0 comments on commit 751d488

Please sign in to comment.