From 306e5f4f69f8da2e532f6314dfbd681b50b61e06 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 18 Aug 2020 20:06:53 +0200 Subject: [PATCH 01/16] libsndfile 1.0.29: cmake recipe --- recipes/libsndfile/1.0.29/conandata.yml | 4 ++ recipes/libsndfile/1.0.29/conanfile.py | 58 +++++++++++++++++++ .../1.0.29/test_package/CMakeLists.txt | 8 +++ .../1.0.29/test_package/conanfile.py | 18 ++++++ .../1.0.29/test_package/example.cpp | 12 ++++ recipes/libsndfile/config.yml | 2 + 6 files changed, 102 insertions(+) create mode 100644 recipes/libsndfile/1.0.29/conandata.yml create mode 100644 recipes/libsndfile/1.0.29/conanfile.py create mode 100644 recipes/libsndfile/1.0.29/test_package/CMakeLists.txt create mode 100644 recipes/libsndfile/1.0.29/test_package/conanfile.py create mode 100644 recipes/libsndfile/1.0.29/test_package/example.cpp diff --git a/recipes/libsndfile/1.0.29/conandata.yml b/recipes/libsndfile/1.0.29/conandata.yml new file mode 100644 index 0000000000000..7034bdbc31718 --- /dev/null +++ b/recipes/libsndfile/1.0.29/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.29": + url: "https://github.com/erikd/libsndfile/archive/v1.0.29.tar.gz" + sha256: "c5541ccfa672b3f461ac21a38cdd37b1fe061cc62a422800b9d53649dee549ee" diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py new file mode 100644 index 0000000000000..63e23298f713f --- /dev/null +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -0,0 +1,58 @@ +from conans import ConanFile, CMake, tools +import os + + +class LibsndfileConan(ConanFile): + name = "libsndfile" + license = "LGPL-2.1" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://www.mega-nerd.com/libsndfile" + description = "Libsndfile is a library of C routines for reading and writing files containing sampled audio data." + topics = ("audio") + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + generators = "cmake" + + _cmake = None + + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + del self.options.fPIC + + def source(self): + tools.get("https://github.com/erikd/libsndfile/archive/v{0}.tar.gz".format(self.version)) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder()) + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.configure(source_folder=self._source_subfolder()) + return self._cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder()) + cmake = self._configure_cmake() + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["sndfile"] diff --git a/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt b/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d4fdee1a8a79c --- /dev/null +++ b/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(PackageTest CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(example example.cpp) +target_link_libraries(example ${CONAN_LIBS}) diff --git a/recipes/libsndfile/1.0.29/test_package/conanfile.py b/recipes/libsndfile/1.0.29/test_package/conanfile.py new file mode 100644 index 0000000000000..90b540e6c6ef7 --- /dev/null +++ b/recipes/libsndfile/1.0.29/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class LibsndfileTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/libsndfile/1.0.29/test_package/example.cpp b/recipes/libsndfile/1.0.29/test_package/example.cpp new file mode 100644 index 0000000000000..f57cb6d29eb41 --- /dev/null +++ b/recipes/libsndfile/1.0.29/test_package/example.cpp @@ -0,0 +1,12 @@ +#include +#include "sndfile.hh" + +int main(int argc, char *argv[]) { + if (argc < 2) { + std::cout << "Usage: example " << std::endl; + } else { + SndfileHandle handle(argv[1]); + std::cout << "Sample rate: " << handle.samplerate() << std::endl; + } + return 0; +} diff --git a/recipes/libsndfile/config.yml b/recipes/libsndfile/config.yml index 6fd3a3df924e3..85b497bba5f59 100644 --- a/recipes/libsndfile/config.yml +++ b/recipes/libsndfile/config.yml @@ -1,3 +1,5 @@ versions: "1.0.28": folder: "1.0.28" + "1.0.29": + folder: "1.0.29 From 94be8d8c905b3fa2147169f9791c4f0679260339 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 18 Aug 2020 22:16:18 +0200 Subject: [PATCH 02/16] Add requirements --- recipes/libsndfile/1.0.29/conanfile.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 63e23298f713f..f69fb093bff07 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -13,10 +13,16 @@ class LibsndfileConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_alsa": [True, False], + "with_sqlite": [True, False], + "with_external_libs": [True, False] } default_options = { "shared": False, "fPIC": True, + "with_alsa": False, + "with_sqlite": True, + "with_external_libs": True, } generators = "cmake" @@ -25,6 +31,16 @@ class LibsndfileConan(ConanFile): def _source_subfolder(self): return "source_subfolder" + def requirements(self): + if self.options.with_alsa: + self.requires("libalsa/1.1.9") + if self.options.with_sqlite: + self.requires("sqlite3/3.29.0") + if self.options.with_external_libs: + self.requires("flac/1.3.3") + self.requires("ogg/1.3.4") + self.requires("vorbis/1.3.6") + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -42,6 +58,9 @@ def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) + self._cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared + self._cmake.definitions["BUILD_REGTEST"] = self.options.with_sqlite + self._cmake.definitions["ENABLE_EXTERNAL_LIBS"] = self.options.with_external_libs self._cmake.configure(source_folder=self._source_subfolder()) return self._cmake From 549694793ec9f8dcf747da4f7184d77221cd0877 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 18 Aug 2020 22:43:20 +0200 Subject: [PATCH 03/16] libsndfile: package_info fixes --- recipes/libsndfile/1.0.29/CMakeLists.txt | 7 +++ recipes/libsndfile/1.0.29/conanfile.py | 62 +++++++++++++++---- .../1.0.29/test_package/CMakeLists.txt | 6 +- .../1.0.29/test_package/conanfile.py | 2 +- 4 files changed, 62 insertions(+), 15 deletions(-) create mode 100644 recipes/libsndfile/1.0.29/CMakeLists.txt diff --git a/recipes/libsndfile/1.0.29/CMakeLists.txt b/recipes/libsndfile/1.0.29/CMakeLists.txt new file mode 100644 index 0000000000000..bd3083b512cb9 --- /dev/null +++ b/recipes/libsndfile/1.0.29/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index f69fb093bff07..505192b662065 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -13,6 +13,8 @@ class LibsndfileConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "programs": [True, False], + "experimental": [True, False], "with_alsa": [True, False], "with_sqlite": [True, False], "with_external_libs": [True, False] @@ -20,48 +22,60 @@ class LibsndfileConan(ConanFile): default_options = { "shared": False, "fPIC": True, + "programs": True, + "experimental": False, + "with_alsa": False, "with_sqlite": True, "with_external_libs": True, } - generators = "cmake" + exports_sources = "CMakeLists.txt" + generators = "cmake", "cmake_find_package" _cmake = None + @property def _source_subfolder(self): return "source_subfolder" def requirements(self): - if self.options.with_alsa: - self.requires("libalsa/1.1.9") + if self.options.get_safe("with_alsa"): + self.requires("libalsa/1.2.2") if self.options.with_sqlite: - self.requires("sqlite3/3.29.0") + self.requires("sqlite3/3.32.3") if self.options.with_external_libs: self.requires("flac/1.3.3") self.requires("ogg/1.3.4") + self.requires("opus/1.3.1") self.requires("vorbis/1.3.6") def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + del self.options.with_alsa def configure(self): if self.options.shared: del self.options.fPIC def source(self): - tools.get("https://github.com/erikd/libsndfile/archive/v{0}.tar.gz".format(self.version)) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder()) + tools.get(**self.conan_data["sources"][self.version]) + os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) - self._cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared - self._cmake.definitions["BUILD_REGTEST"] = self.options.with_sqlite + self._cmake.definitions["BUILD_PROGRAMS"] = self.options.programs + self._cmake.definitions["BUILD_EXAMPLES"] = False + self._cmake.definitions["BUILD_TESTING"] = False + self._cmake.definitions["ENABLE_CPACK"] = False + self._cmake.definitions["ENABLE_EXPERIMENTAL"] = self.options.experimental + if self.settings.compiler == "Visual Studio": + self._cmake.definitions["ENABLE_STATIC_RUNTIME"] = "MT" in str(self.settings.compiler.runtime) + self._cmake.definitions["BUILD_REGTEST"] = False self._cmake.definitions["ENABLE_EXTERNAL_LIBS"] = self.options.with_external_libs - self._cmake.configure(source_folder=self._source_subfolder()) + self._cmake.configure() return self._cmake def build(self): @@ -69,9 +83,33 @@ def build(self): cmake.build() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder()) + self.copy("COPYING", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + def package_info(self): - self.cpp_info.libs = ["sndfile"] + self.cpp_info.filenames["cmake_find_package"] = "SndFile" + self.cpp_info.filenames["cmake_find_package_multi"] = "SndFile" + self.cpp_info.names["cmake_find_package"] = "SndFile" + self.cpp_info.names["cmake_find_package"] = "SndFile" + self.cpp_info.names["pkg_config"] = "sndfile" + self.cpp_info.components["sndfile"].libs = ["sndfile"] + if not self.options.shared: + if self.settings.os == "Linux": + self.cpp_info.components["sndfile"].system_libs = ["m", "dl", "pthread", "rt"] + elif self.settings.os == "Windows": + self.cpp_info.components["sndfile"].system_libs.append("winmm") + if self.options.with_alsa: + self.cpp_info.components["sndfile"].requires.append("libalsa::libalsa") + if self.options.with_sqlite: + self.cpp_info.components["sndfile"].requires.append("sqlite3::sqlite3") + if self.options.with_external_libs: + self.cpp_info.components["sndfile"].requires.extend(["flac::flac", "ogg::ogg", "opus::opus", "vorbis::vorbis"]) + + bin_path = os.path.join(self.package_folder, "bin") + self.output.info("Appending PATH environment variable: {}".format(bin_path)) + self.env_info.PATH.append(bin_path) diff --git a/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt b/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt index d4fdee1a8a79c..f5dc5a6ae755e 100644 --- a/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt +++ b/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt @@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 3.1) project(PackageTest CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +conan_basic_setup(TARGETS) + +find_package(SndFile REQUIRED) add_executable(example example.cpp) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example PRIVATE SndFile::sndfile) diff --git a/recipes/libsndfile/1.0.29/test_package/conanfile.py b/recipes/libsndfile/1.0.29/test_package/conanfile.py index 90b540e6c6ef7..6adfe2d570be6 100644 --- a/recipes/libsndfile/1.0.29/test_package/conanfile.py +++ b/recipes/libsndfile/1.0.29/test_package/conanfile.py @@ -5,7 +5,7 @@ class LibsndfileTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + generators = "cmake", "cmake_find_package" def build(self): cmake = CMake(self) From 5e62119add3dd3f8df2765607d76a52b769b10d7 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Wed, 19 Aug 2020 18:16:05 +0200 Subject: [PATCH 04/16] vorbis 1.3.7 --- recipes/libsndfile/1.0.29/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 505192b662065..545d583cc7ed0 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -47,7 +47,7 @@ def requirements(self): self.requires("flac/1.3.3") self.requires("ogg/1.3.4") self.requires("opus/1.3.1") - self.requires("vorbis/1.3.6") + self.requires("vorbis/1.3.7") def config_options(self): if self.settings.os == "Windows": From b9dcd51a7957ded59c23955ed2a410fe10d11562 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Mon, 31 Aug 2020 14:41:52 +0200 Subject: [PATCH 05/16] Fix folder end of string --- recipes/libsndfile/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libsndfile/config.yml b/recipes/libsndfile/config.yml index 85b497bba5f59..b64f2efec7aea 100644 --- a/recipes/libsndfile/config.yml +++ b/recipes/libsndfile/config.yml @@ -2,4 +2,4 @@ versions: "1.0.28": folder: "1.0.28" "1.0.29": - folder: "1.0.29 + folder: "1.0.29" From 63e540c44d9c886465f6112eb4a8912757f38517 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 10 Sep 2020 11:14:48 +0200 Subject: [PATCH 06/16] Update recipes/libsndfile/1.0.29/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 545d583cc7ed0..642c5045df46b 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -88,6 +88,7 @@ def package(self): cmake.install() tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "cmake")) tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) tools.rmdir(os.path.join(self.package_folder, "share")) From c522803eb5a5b6a8a349f0a1fbbbb9e72aa17989 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 10 Sep 2020 17:29:58 +0200 Subject: [PATCH 07/16] Update recipes/libsndfile/1.0.29/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 642c5045df46b..a1feb8e807a74 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -104,7 +104,7 @@ def package_info(self): self.cpp_info.components["sndfile"].system_libs = ["m", "dl", "pthread", "rt"] elif self.settings.os == "Windows": self.cpp_info.components["sndfile"].system_libs.append("winmm") - if self.options.with_alsa: + if self.options.get_safe("with_alsa"): self.cpp_info.components["sndfile"].requires.append("libalsa::libalsa") if self.options.with_sqlite: self.cpp_info.components["sndfile"].requires.append("sqlite3::sqlite3") From a5610850d7d10456b5954d440a434ac1025e218c Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Fri, 11 Sep 2020 11:28:19 +0200 Subject: [PATCH 08/16] Update recipes/libsndfile/1.0.29/test_package/CMakeLists.txt Co-authored-by: Chris Mc --- recipes/libsndfile/1.0.29/test_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt b/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt index f5dc5a6ae755e..a9ca2324c4d7e 100644 --- a/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt +++ b/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1) project(PackageTest CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +conan_basic_setup() find_package(SndFile REQUIRED) From 0cd65d2feb16a65d6563c110bdf53bd2b0ec710c Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 17 Sep 2020 16:25:27 +0200 Subject: [PATCH 09/16] Update recipes/libsndfile/1.0.29/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index a1feb8e807a74..7b111c2862ab8 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -27,7 +27,6 @@ class LibsndfileConan(ConanFile): "with_alsa": False, "with_sqlite": True, - "with_external_libs": True, } exports_sources = "CMakeLists.txt" generators = "cmake", "cmake_find_package" From 462c83ca7a782c6cabea88cb38fa035d6aadc6ff Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 17 Sep 2020 16:25:45 +0200 Subject: [PATCH 10/16] Update recipes/libsndfile/1.0.29/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 7b111c2862ab8..03094cb0a4ee0 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -42,11 +42,10 @@ def requirements(self): self.requires("libalsa/1.2.2") if self.options.with_sqlite: self.requires("sqlite3/3.32.3") - if self.options.with_external_libs: - self.requires("flac/1.3.3") - self.requires("ogg/1.3.4") - self.requires("opus/1.3.1") - self.requires("vorbis/1.3.7") + self.requires("flac/1.3.3") + self.requires("ogg/1.3.4") + self.requires("opus/1.3.1") + self.requires("vorbis/1.3.7") def config_options(self): if self.settings.os == "Windows": From 725f92e903e452399e2b12672804daf85d357338 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 17 Sep 2020 16:26:01 +0200 Subject: [PATCH 11/16] Update recipes/libsndfile/1.0.29/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 03094cb0a4ee0..73c9f8bb3db8b 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -72,7 +72,7 @@ def _configure_cmake(self): if self.settings.compiler == "Visual Studio": self._cmake.definitions["ENABLE_STATIC_RUNTIME"] = "MT" in str(self.settings.compiler.runtime) self._cmake.definitions["BUILD_REGTEST"] = False - self._cmake.definitions["ENABLE_EXTERNAL_LIBS"] = self.options.with_external_libs + self._cmake.definitions["ENABLE_EXTERNAL_LIBS"] = True self._cmake.configure() return self._cmake From b063dd82f43b567387150069b15e2f37d7821bfe Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 17 Sep 2020 16:26:20 +0200 Subject: [PATCH 12/16] Update recipes/libsndfile/1.0.29/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 73c9f8bb3db8b..38a9cc621bfa5 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -106,8 +106,6 @@ def package_info(self): self.cpp_info.components["sndfile"].requires.append("libalsa::libalsa") if self.options.with_sqlite: self.cpp_info.components["sndfile"].requires.append("sqlite3::sqlite3") - if self.options.with_external_libs: - self.cpp_info.components["sndfile"].requires.extend(["flac::flac", "ogg::ogg", "opus::opus", "vorbis::vorbis"]) bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: {}".format(bin_path)) From 3b599b658f0355b56d8b312fb7445cfe59a46184 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 17 Sep 2020 16:26:34 +0200 Subject: [PATCH 13/16] Update recipes/libsndfile/1.0.29/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 38a9cc621bfa5..386c758d48fb4 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -97,6 +97,7 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "SndFile" self.cpp_info.names["pkg_config"] = "sndfile" self.cpp_info.components["sndfile"].libs = ["sndfile"] + self.cpp_info.components["sndfile"].requires = ["flac::flac", "ogg::ogg", "opus::opus", "vorbis::vorbis"] if not self.options.shared: if self.settings.os == "Linux": self.cpp_info.components["sndfile"].system_libs = ["m", "dl", "pthread", "rt"] From f7d2f6c9a446820069b71e5f9bbd7d3dd931d022 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Fri, 18 Sep 2020 14:36:49 +0200 Subject: [PATCH 14/16] Apply suggestions from code review Co-authored-by: Anonymous Maarten --- recipes/libsndfile/1.0.29/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 386c758d48fb4..8cf856a811fee 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -17,14 +17,12 @@ class LibsndfileConan(ConanFile): "experimental": [True, False], "with_alsa": [True, False], "with_sqlite": [True, False], - "with_external_libs": [True, False] } default_options = { "shared": False, "fPIC": True, "programs": True, "experimental": False, - "with_alsa": False, "with_sqlite": True, } From d411f6333ad6706f06fe96fcabe6c05945c14818 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Sat, 19 Sep 2020 14:29:00 +0200 Subject: [PATCH 15/16] Apply suggestions from code review Co-authored-by: Chris Mc --- recipes/libsndfile/1.0.29/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/1.0.29/conanfile.py index 8cf856a811fee..dc2fd4e75230b 100644 --- a/recipes/libsndfile/1.0.29/conanfile.py +++ b/recipes/libsndfile/1.0.29/conanfile.py @@ -89,8 +89,6 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.filenames["cmake_find_package"] = "SndFile" - self.cpp_info.filenames["cmake_find_package_multi"] = "SndFile" self.cpp_info.names["cmake_find_package"] = "SndFile" self.cpp_info.names["cmake_find_package"] = "SndFile" self.cpp_info.names["pkg_config"] = "sndfile" From 64e6fb926010277f9b7646128dda17c34f38a94d Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Sat, 26 Sep 2020 12:49:08 +0200 Subject: [PATCH 16/16] Folder 1.0.29 => all --- recipes/libsndfile/{1.0.29 => all}/CMakeLists.txt | 0 recipes/libsndfile/{1.0.29 => all}/conandata.yml | 0 recipes/libsndfile/{1.0.29 => all}/conanfile.py | 0 recipes/libsndfile/{1.0.29 => all}/test_package/CMakeLists.txt | 0 recipes/libsndfile/{1.0.29 => all}/test_package/conanfile.py | 0 recipes/libsndfile/{1.0.29 => all}/test_package/example.cpp | 0 recipes/libsndfile/config.yml | 2 +- 7 files changed, 1 insertion(+), 1 deletion(-) rename recipes/libsndfile/{1.0.29 => all}/CMakeLists.txt (100%) rename recipes/libsndfile/{1.0.29 => all}/conandata.yml (100%) rename recipes/libsndfile/{1.0.29 => all}/conanfile.py (100%) rename recipes/libsndfile/{1.0.29 => all}/test_package/CMakeLists.txt (100%) rename recipes/libsndfile/{1.0.29 => all}/test_package/conanfile.py (100%) rename recipes/libsndfile/{1.0.29 => all}/test_package/example.cpp (100%) diff --git a/recipes/libsndfile/1.0.29/CMakeLists.txt b/recipes/libsndfile/all/CMakeLists.txt similarity index 100% rename from recipes/libsndfile/1.0.29/CMakeLists.txt rename to recipes/libsndfile/all/CMakeLists.txt diff --git a/recipes/libsndfile/1.0.29/conandata.yml b/recipes/libsndfile/all/conandata.yml similarity index 100% rename from recipes/libsndfile/1.0.29/conandata.yml rename to recipes/libsndfile/all/conandata.yml diff --git a/recipes/libsndfile/1.0.29/conanfile.py b/recipes/libsndfile/all/conanfile.py similarity index 100% rename from recipes/libsndfile/1.0.29/conanfile.py rename to recipes/libsndfile/all/conanfile.py diff --git a/recipes/libsndfile/1.0.29/test_package/CMakeLists.txt b/recipes/libsndfile/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/libsndfile/1.0.29/test_package/CMakeLists.txt rename to recipes/libsndfile/all/test_package/CMakeLists.txt diff --git a/recipes/libsndfile/1.0.29/test_package/conanfile.py b/recipes/libsndfile/all/test_package/conanfile.py similarity index 100% rename from recipes/libsndfile/1.0.29/test_package/conanfile.py rename to recipes/libsndfile/all/test_package/conanfile.py diff --git a/recipes/libsndfile/1.0.29/test_package/example.cpp b/recipes/libsndfile/all/test_package/example.cpp similarity index 100% rename from recipes/libsndfile/1.0.29/test_package/example.cpp rename to recipes/libsndfile/all/test_package/example.cpp diff --git a/recipes/libsndfile/config.yml b/recipes/libsndfile/config.yml index b64f2efec7aea..b7c2e501d48e8 100644 --- a/recipes/libsndfile/config.yml +++ b/recipes/libsndfile/config.yml @@ -2,4 +2,4 @@ versions: "1.0.28": folder: "1.0.28" "1.0.29": - folder: "1.0.29" + folder: "all"