Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
LevWi authored Jun 30, 2023
2 parents 444829d + 4643036 commit 5fbddd7
Show file tree
Hide file tree
Showing 12 changed files with 176 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ required_for_references:
- celero
- cereal
- ceres-solver
- certify
- cfgfile
- cfitsio
- cgal
Expand Down Expand Up @@ -147,6 +148,7 @@ required_for_references:
- concurrencpp
- concurrentqueue
- console_bridge
- continuable
- cpp-httplib
- cpp-jwt
- cpp-lazy
Expand All @@ -155,6 +157,7 @@ required_for_references:
- cpp-sort
- cppbenchmark
- cppcheck
- cppcmd
- cppcodec
- cppcommon
- cppdap
Expand All @@ -170,17 +173,20 @@ required_for_references:
- cqrlib
- crc32c
- create-dmg
- croncpp
- crunch
- cryptopp
- cs_libguarded
- csm
- cspice
- csvmonkey
- ctml
- ctre
- cub
- cubicinterpolation
- cuda-api-wrappers
- cuda-kat
- cute_headers
- cwalk
- cxxopts
- cyclonedds
Expand All @@ -194,6 +200,7 @@ required_for_references:
- daw_utf_range
- dbcppp
- dbus
- debug_assert
- decimal_for_cpp
- dirent
- discount
Expand Down Expand Up @@ -293,6 +300,7 @@ required_for_references:
- gperf
- gperftools
- graphene
- greatest
- grpc
- grpc-proto
- gsl
Expand All @@ -316,6 +324,7 @@ required_for_references:
- hiredis
- homog2d
- http_parser
- icecream-cpp
- icu
- id3v2lib
- iir1
Expand All @@ -337,8 +346,11 @@ required_for_references:
- json-schema-validator
- jsoncons
- jsoncpp
- jsonnet
- jwt-cpp
- kainjow-mustache
- kangaru
- khrplatform
- kmod
- ktx
- kuba-zip
Expand Down Expand Up @@ -384,6 +396,7 @@ required_for_references:
- libgphoto2
- libiberty
- libiconv
- libinterpolate
- libjpeg
- libjpeg-turbo
- libkml
Expand Down Expand Up @@ -420,6 +433,7 @@ required_for_references:
- libressl
- librttopo
- libsamplerate
- libsecret
- libselinux
- libserial
- libsgp4
Expand Down Expand Up @@ -460,6 +474,7 @@ required_for_references:
- libzip
- libzippp
- lief
- linux-headers-generic
- linux-syscall-support
- llhttp
- lodepng
Expand All @@ -475,6 +490,7 @@ required_for_references:
- make
- mariadb-connector-c
- matchit
- mattiasgustavsson-libs
- mawk
- mbedtls
- mbits-args
Expand Down Expand Up @@ -518,6 +534,7 @@ required_for_references:
- nasm
- netcdf
- nettle
- nextsilicon-cpp-subprocess
- ninja
- nlohmann_json
- nng
Expand All @@ -526,6 +543,7 @@ required_for_references:
- nsync
- numcpp
- nuraft
- nv-codec-headers
- octomap
- odbc
- ogdf
Expand Down Expand Up @@ -574,6 +592,7 @@ required_for_references:
- plutovg
- poco
- popt
- portable-file-dialogs
- proj
- prometheus-cpp
- proposal
Expand All @@ -591,11 +610,13 @@ required_for_references:
- quantlib
- quill
- quirc
- r8brain-free-src
- rabbitmq-c
- ragel
- rang
- range-v3
- rapidcheck
- rapidcsv
- rapidfuzz
- rapidjson
- rapidxml
Expand All @@ -619,6 +640,7 @@ required_for_references:
- s2n
- samurai
- sbepp
- sbp
- scnlib
- scons
- screen_capture_lite
Expand All @@ -629,6 +651,7 @@ required_for_references:
- semimap
- sentry-breakpad
- sentry-crashpad
- sentry-native
- serd
- sfml
- shield
Expand All @@ -640,6 +663,7 @@ required_for_references:
- sml
- snappy
- soci
- sonic-cpp
- sophus
- soplex
- soxr
Expand All @@ -658,6 +682,7 @@ required_for_references:
- stlab
- strawberryperl
- string-view-lite
- stringtoolbox
- strong_type
- svgwrite
- symengine
Expand Down Expand Up @@ -686,6 +711,7 @@ required_for_references:
- tlx
- toml11
- trantor
- tsl-hopscotch-map
- turtle
- tz
- uni-algo
Expand All @@ -708,6 +734,7 @@ required_for_references:
- vo-amrwbenc
- volk
- vorbis
- vsg
- vtu11
- vulkan-headers
- vulkan-loader
Expand All @@ -721,6 +748,7 @@ required_for_references:
- wayland-protocols
- websocketpp
- wg21-linear_algebra
- wglext
- wil
- winflexbison
- wiringpi
Expand Down
4 changes: 4 additions & 0 deletions recipes/dr_libs/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"cci.20230529":
url: "https://github.com/mackron/dr_libs/archive/dbbd08d81fd2b084c5ae931531871d0c5fd83b87.tar.gz"
sha256: "9e8d488092c9a0a6b08d9aafc631b1c8d75e707bc10a56a5f4bb1709213702c1"
71 changes: 71 additions & 0 deletions recipes/dr_libs/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
from conan import ConanFile
from conan.tools.files import get, copy
from conan.tools.build import check_min_cppstd
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, check_min_vs
from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration

import os

required_conan_version = ">=1.52.0"


class DrLibsConan(ConanFile):
name = "dr_libs"
description = "Public domain, single file audio decoding libraries for C and C++."
license = ("Unlicense", "MIT-0")
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/mackron/dr_libs"
topics = ("audio", "encoding", "header-only")
no_copy_source = True
settings = "os", "arch", "compiler", "build_type"
package_type = "header-library"

@property
def _min_cppstd(self):
return 11

@property
def _compilers_minimum_version(self):
return {
"gcc": "4.7",
"clang": "3.4",
"apple-clang": "6",
}

def validate(self):
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, self._min_cppstd)
check_min_vs(self, 180)
if not is_msvc(self):
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 layout(self):
basic_layout(self, src_folder="src")

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

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

def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(
self.package_folder, "licenses"), src=self.source_folder)
copy(
self,
pattern="*.h",
dst=os.path.join(self.package_folder, "include"),
src=self.source_folder,
excludes=("old/*", "wip/*", "tests/*")
)

def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
7 changes: 7 additions & 0 deletions recipes/dr_libs/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(test_DrLibs LANGUAGES CXX)
find_package(dr_libs REQUIRED CONFIG)

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


# It will become the standard on Conan 2.x
class TestDrLibsConan(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_DrLibs")
self.run(bin_path, env="conanrun")
24 changes: 24 additions & 0 deletions recipes/dr_libs/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#define DR_WAV_IMPLEMENTATION
#include "dr_wav.h"
#include <vector>
#include <iostream>
#include <random>

#define BUFFER_SIZE 255

int main() {
srand(time(NULL));

// Create fake PCM data
std::vector<drwav_int16> buffer(BUFFER_SIZE);
for (size_t i = 0; i < BUFFER_SIZE; i++)
buffer[i] = rand() % std::numeric_limits<drwav_int16>::max();

// Convert it to 32-bit floating point
std::vector<float> asFloat(buffer.size());
drwav_s16_to_f32(asFloat.data(), buffer.data(), buffer.size());

// If we get here with no issues, then it's a success
std::cout << "Test success!" << std::endl;
return DRWAV_SUCCESS;
}
3 changes: 3 additions & 0 deletions recipes/dr_libs/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"cci.20230529":
folder: all
3 changes: 3 additions & 0 deletions recipes/nss/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.91":
url: "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_91_RTM/src/nss-3.91.tar.gz"
sha256: "84bd46376df17118c55f6d73d30fd93a0af21296c66e7690471547e5898fc4b3"
"3.89":
url: "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_89_RTM/src/nss-3.89.tar.gz"
sha256: "55c37a3f4da010d0574fb8b39264cb1e7b4ce9e6c2954c1c7ecf9f41ee00bed5"
Expand Down
2 changes: 2 additions & 0 deletions recipes/nss/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.91":
folder: all
"3.89":
folder: all
"3.88.1":
Expand Down
3 changes: 3 additions & 0 deletions recipes/tinyexr/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.0.6":
url: "https://github.com/syoyo/tinyexr/archive/v1.0.6.tar.gz"
sha256: "807a5665a7da8dc5ba4dd2c0f69079d87f37a147399680a54e3b38f86486aa67"
"1.0.1":
url: "https://github.com/syoyo/tinyexr/archive/v1.0.1.tar.gz"
sha256: "4dbbd8c7d17597ad557518de5eb923bd02683d26d0de765f9224e8d57d121677"
Expand Down
4 changes: 2 additions & 2 deletions recipes/tinyexr/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TinyExrConan(ConanFile):
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/syoyo/tinyexr"
topics = ("exr", "header-only")

package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
options = {
"with_z": ["zlib", "miniz"],
Expand All @@ -38,7 +38,7 @@ def layout(self):

def requirements(self):
if self.options.with_z == "miniz":
self.requires("miniz/3.0.1")
self.requires("miniz/3.0.2")
else:
self.requires("zlib/1.2.13")
if self.options.with_zfp:
Expand Down
2 changes: 2 additions & 0 deletions recipes/tinyexr/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.0.6":
folder: all
"1.0.1":
folder: all
"1.0.0":
Expand Down

0 comments on commit 5fbddd7

Please sign in to comment.