Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dpp: add version 10.0.35 #25805

Merged
merged 7 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions recipes/dpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
sources:
"10.0.35":
url:
- "https://github.com/brainboxdotcc/DPP/archive/refs/tags/v10.0.35.zip"
sha256: "ebe82b0c3c7678d31bc26ad7ab9aedfd66057a559c541750ede5d19a0ed0c245"
"10.0.34":
url:
- "https://github.com/brainboxdotcc/DPP/archive/refs/tags/v10.0.34.zip"
Expand Down
38 changes: 12 additions & 26 deletions recipes/dpp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,24 @@
import os
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.build import check_min_cppstd, cross_building
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
from conan.tools.files import get, copy, rmdir
from conan.tools.scm import Version

required_conan_version = ">=1.54"
required_conan_version = ">=2"

class DPPConan(ConanFile):
name = "dpp"
license = "Apache-2.0"
package_type = "shared-library"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/brainboxdotcc/DPP"
description = "D++ is a lightweight and efficient library for Discord"
topics = ("discord")
package_type = "shared-library"
settings = "os", "compiler", "build_type", "arch"

@property
def _min_cppstd(self):
return 17

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

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."
)
check_min_cppstd(self, "17")

def requirements(self):
self.requires("nlohmann_json/3.11.2", transitive_libs=True, transitive_headers=True)
Expand Down Expand Up @@ -67,7 +46,14 @@ def generate(self):
tc.cache_variables["BUILD_VOICE_SUPPORT"] = True
tc.cache_variables["DPP_BUILD_TEST"] = False
tc.cache_variables["BUILD_SHARED_LIBS"] = True
tc.cache_variables["AVX_TYPE"] = "AVX0"
if Version(self.version) <= "10.0.34":
# Workaround for Neon not compiling in old versions
tc.cache_variables["AVX_TYPE"] = "AVX0"
if self.settings.os == "Macos" and cross_building(self) and self.settings.arch == "x86_64":
tc.cache_variables["AVX1_EXITCODE"] = "0"
tc.cache_variables["AVX2_EXITCODE"] = "0"
tc.cache_variables["AVX512_EXITCODE"] = "-1"
tc.cache_variables["AVX1024_EXITCODE"] = "-1"
tc.generate()

def build(self):
Expand Down
2 changes: 2 additions & 0 deletions recipes/dpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"10.0.35":
folder: all
"10.0.34":
folder: all