mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-08-12 01:09:02 +00:00
(#9854) [package] dav1d/1.0.0
* Add version 1.0.0 * Use helpers from conan v2 package * Require Conan older than 1.46.0 * Remove option with_avx512 for dav1d 1.0.0
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
sources:
|
||||
"0.8.1":
|
||||
url: "https://code.videolan.org/videolan/dav1d/-/archive/0.8.1/dav1d-0.8.1.tar.gz"
|
||||
sha256: "39f52cccc31180c7180ebe8f223de6d12351c0407de0dfac087e8a9cc3feb8da"
|
||||
"1.0.0":
|
||||
url: "https://code.videolan.org/videolan/dav1d/-/archive/1.0.0/dav1d-1.0.0.tar.gz"
|
||||
sha256: "047b8229511a82b5718a1d34c86c067b078efd02f602986d2ed09b23182ec136"
|
||||
"0.9.1":
|
||||
url: "https://code.videolan.org/videolan/dav1d/-/archive/0.9.1/dav1d-0.9.1.tar.gz"
|
||||
sha256: "097db6f370b88bf09fec62919c0d3af64e07d58210c665ec461d63f4ec79f6a2"
|
||||
"0.8.1":
|
||||
url: "https://code.videolan.org/videolan/dav1d/-/archive/0.8.1/dav1d-0.8.1.tar.gz"
|
||||
sha256: "39f52cccc31180c7180ebe8f223de6d12351c0407de0dfac087e8a9cc3feb8da"
|
||||
|
@@ -1,5 +1,7 @@
|
||||
import os
|
||||
from conans import ConanFile, Meson, tools
|
||||
from conan import ConanFile
|
||||
from conan.tools.files import rename, get
|
||||
from conans import Meson, tools
|
||||
from conans.errors import ConanInvalidConfiguration
|
||||
|
||||
required_conan_version = ">=1.33.0"
|
||||
@@ -9,7 +11,7 @@ class Dav1dConan(ConanFile):
|
||||
name = "dav1d"
|
||||
description = "dav1d is a new AV1 cross-platform decoder, open-source, and focused on speed, size and correctness."
|
||||
homepage = "https://www.videolan.org/projects/dav1d.html"
|
||||
topics = ("conan", "av1", "codec", "video", "decoding")
|
||||
topics = ("av1", "codec", "video", "decoding")
|
||||
license = "BSD-2-Clause"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
options = {
|
||||
@@ -47,6 +49,8 @@ class Dav1dConan(ConanFile):
|
||||
if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug":
|
||||
# debug builds with assembly often causes linker hangs or LNK1000
|
||||
self.options.assembly = False
|
||||
if tools.Version(self.version) < "1.0.0":
|
||||
del self.options.with_avx512
|
||||
|
||||
def validate(self):
|
||||
if hasattr(self, "settings_build") and tools.cross_building(self):
|
||||
@@ -69,8 +73,8 @@ class Dav1dConan(ConanFile):
|
||||
self.build_requires("nasm/2.15.05")
|
||||
|
||||
def source(self):
|
||||
tools.get(**self.conan_data["sources"][self.version],
|
||||
destination=self._source_subfolder, strip_root=True)
|
||||
get(self, **self.conan_data["sources"][self.version],
|
||||
destination=self._source_subfolder, strip_root=True)
|
||||
|
||||
def _patch_sources(self):
|
||||
tools.replace_in_file(os.path.join(self._source_subfolder, "meson.build"),
|
||||
@@ -82,7 +86,8 @@ class Dav1dConan(ConanFile):
|
||||
self._meson = Meson(self)
|
||||
self._meson.options["enable_tests"] = False
|
||||
self._meson.options["enable_asm"] = self.options.assembly
|
||||
self._meson.options["enable_avx512"] = self.options.get_safe("with_avx512", False)
|
||||
if tools.Version(self.version) < "1.0.0":
|
||||
self._meson.options["enable_avx512"] = self.options.get_safe("with_avx512", False)
|
||||
self._meson.options["enable_tools"] = self.options.with_tools
|
||||
if self.options.bit_depth == "all":
|
||||
self._meson.options["bitdepths"] = "8,16"
|
||||
@@ -108,8 +113,9 @@ class Dav1dConan(ConanFile):
|
||||
|
||||
if self.settings.compiler == "Visual Studio" and not self.options.shared:
|
||||
# https://github.com/mesonbuild/meson/issues/7378
|
||||
os.rename(os.path.join(self.package_folder, "lib", "libdav1d.a"),
|
||||
os.path.join(self.package_folder, "lib", "dav1d.lib"))
|
||||
rename(self,
|
||||
os.path.join(self.package_folder, "lib", "libdav1d.a"),
|
||||
os.path.join(self.package_folder, "lib", "dav1d.lib"))
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.libs = ["dav1d"]
|
||||
|
@@ -1,4 +1,5 @@
|
||||
from conans import ConanFile, CMake, tools
|
||||
from conan import ConanFile
|
||||
from conans import CMake, tools
|
||||
import os
|
||||
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
versions:
|
||||
"0.8.1":
|
||||
"1.0.0":
|
||||
folder: "all"
|
||||
"0.9.1":
|
||||
folder: "all"
|
||||
"0.8.1":
|
||||
folder: "all"
|
||||
|
Reference in New Issue
Block a user